UPS backup for EmonPi

Is there a suitable UPS for the EmonPi in its official casing, that works with the required EmonBase?

I’ve had power cuts that last a few minutes, but it seems to equate to quite a gap in data.

UPS,… how far do you want to go?? 240Vac UPS are generally not a good idea for small scale apps… h/w like we have here. You need to ask your self what events do you want to cover for?,… brown outs,… or total power out,… and for how long. Basic UPS cost more to run than they are worth, IMHO.
However… Check out AliExpress etc,… there are modules there specifically designed to support UPS functionality,… I run a UPS module with a 12v car battery,… yes I supply the system with a 24v 10Amp DC supply,… but this allows me to run my EmonCMS database and EmonTX4 during power outages,… for probably 7Hrs+,… as well as all my Internet access and wifi,… which when a power cut occurs, as I had a few weeks ago, for 3hrs,… was really useful.
The same modules can be run with Li-ion cells,… and depending on capacity will determine how long the system holds up… its all a balance of cost Vs Up-Time…
That’s just my opinion,…But,… it all depends how you wish to approach the problem, and how tech you want to get.

OK, so I have a cheap Cyberpower UPS for my WiFi and internet router. This means the network is technically available for about 15 minutes or so.

However, the “big UPS” as I call it is a maintenance item (SLA batteries don’t last forever!) and as you say, unsuitable.

There’s a couple of options for smaller UPSes, like the one from Waveshare, with two 18650 Lithium cells, but they add size to the RasPi directly, and I want to know if the official EmonBase case has space for it.

Alternatively, I wonder if there’s a separate solution that anyone has used, maybe like this one from Eaton?

Finally, does the EmonTX have any backup options? I guess it works from USB-C, so the situation is similar to the above.

What’s the point? Accumulated energy values are saved to EEPROM when there’s been a significant change from the last saved value, otherwise when the power fails, there’s nothing for it to do. The saved energy values are restored on start-up. The only downside is emonCMS will record null values rather than zero during the outage, unless you power it too from the UPS, or arrange (say) an input from the UPS to write zero values into the energy monitor feeds at the appropriate intervals (the minimum for “sensible” graphs would be a set of zero values immediately the UPS takes over, and again immediately power is restored).

Weeeell… all good points!

I see the EmonTX can run from the RasPi power via USB, and with that arrangement for data and power, I can add my own pi in my own enclosure (with room for a UPS hat) with no need for the 433MHz receiver. Both devices would then have backup power.

If I stuff it all in the space occupied by the current solution, it’ll probably be ok…

Do you have an EmonBase, an emonPi or a Raspberry Pi?

If you’re using a RPi hat and you have an emonPi, you need to be aware of what the emon board uses on the GPIO connector and what the UPS wants to use, likewise if you have an emonBase with the RFM69Pi. If you’re using a naked RPi to run emonCMS with the emonTx doing the monitoring, only then is all the GPIO available to the hat.

My current setup is a (relatively) naked Raspberry Pi 3b+ connected to an Iotawatt via wifi. I see the new EmonBase doesn’t have the LCD screen, and is a relatively “generic” case, so that gives me a positive feeling about the available pins required.

The Waveshare UPS appears to come in two flavours, and both connect via I2C, so no pins are “consumed”. I don’t believe it needs to interface to work properly, its just for monitoring / soft shutdown. They also do a “3S” model, which is kind of standalone.

The Iotawatt is hidden behind my kitchen cabinet plinth, below the cupboard with the consumer unit, and the CT wires run behind the back board. It’s powered and monitoring a socket next to the dishwasher, which is adjacent. I know it’s not ideal. I’m considering replacing it after a year of operation because it also doesn’t play nicely with powercuts, having shut down for most of December before I noticed it wasn’t monitoring.



Just for info,… this is my UPS, control module, with battery conditioning unit.
The board with the large heat sink provides ‘load’ to discharge the battery ( once per month on the 1st sunday morning of a new month) in a controlled manor, not essential but a nice to have.
The UPS board, with all the controlled 12volt outputs,… let me explain… the UPS board top left provides 15v dc,… which I then step down to 12v,… multiple outputs… (so not all eggs in one basket from a supply pov),…
The lead acid battery provides power during power outages,… which I believe is in excess of 7hrs…

Souns like there may be some name confusion here…

The emonBase never had a “factory installed” LCD. The emonPi is the “box” that has an LCD.

As Bill says, the emonBase has never had an LCD. An emonBase is a Raspberry Pi with a RFM12Pi, later a RFM69Pi, radio receiver module. It runs emonCMS, it does not monitor power.
An emonPi is a Raspberry Pi with a cut-down 2-channel emonTx and the radio receiver on a piggy-back p.c.b, in a metal case with an LCD (and a pushbutton).
If you’re going to be connecting the emonTx4 via a wired serial USB connection, and the iotawart is sending into your LAN by WiFi, then you don’t need the radio receiver and so you don’t need an emonBase, your RPi 3B will be fine - not so fast as a latest Pi, but fine nevertheless - you’re only likely to notice when it’s rendering a big graph.

I suspect we are trying to over engineer what could be a simple setup as most of these devices use a USB power feed which is 5V so use a standard charging system for a 12V battery (there are many on the Net) take the 12V feed into one or more LM7805 voltage regs to feed the devices. The size of 12V battery will determine the duration of supply with no mains but suspect should not need to be too big as draw by the devices will not be that hi.

John

A couple of caveats WRT the LM7805.

From 7805 Voltage Regulator IC Pinout, Features, Circuit, Equivalent & Datasheet

The output current of this IC can go up to 1.5A. But, the IC suffers from heavy heat loss hence a Heat sink is recommended for projects that consume more current. For example if the input voltage is 12V and you are consuming 1A, then (12-5) * 1 = 7W. This 7 Watts will be dissipated as heat.

The first being the 1.5 A current limit per device. The second, about the heat dissapation.
Otherwise, with a different 12-to-5 Volt “conversion device” a sound idea. :wink:

And of course lost, and not available to power the emonPi; whereas a switched-mode step-down converter is likely to offer around 80% efficiency compared to 40% with the linear regulator.

1 Like

I totally agree with the above, I am sure there are many better 12 - 5V devices around, it was more the concept :slight_smile:

John

These may be better :slight_smile:

Youmile 5PACK Dual USB Step-Down Power Module LM2596 Double USB Step-down Converter Module DC 6V-40V To 5V 3A Double USB Charge DC-DC 9V/12V/24V/36V to 5V USB 3A : Amazon.co.uk: Business, Industry & Science

John

1 Like

I’ve been using a mini UPS like this one for a while for rpis, switches, and routers, and it does a pretty good job. No reset during power cuts, rpi doesn’t complain about undervoltage, all is well.

As I have a PoE switch, on a UPS, I power my emonPi with one of these:

That is an impressive setup!

I think we all are, too! Like I said, it’s all tucked under/behind a kitchen cabinet plinth! I’m just trying to get something that can bridge those random power cuts at 3am.

I’ve used those (or mini boards based on linear regulators) before, for giving ESP8266 devices 3.3V from a 5V USB, and they get warm even then. If they were fed e.g. 9V tapped from the wall-wart for my WiFi then they get very hot! The solution seems to be to use a mini-buck board to 5V, and then a linear supply for the last drop to 3.3V, to keep the boards stable.

I use the potted version of those on my 3d printers, to run the Pi off the 12V supply. They’re very good, and the Pi never complains. I’m just not sure a 12V setup isn’t overkill.

Thanks - this was the kind of thing I was looking for. Does anyone else have any similar suggestions for decent quality products?

When looking for small Low voltage SMPS, it worth investing in the slightly more expensive modules that come with integrated current limit.
As cautionary note I would say do not under estimate the power of a small battery to cause an ignition point, so current limit and fuses are essential, particularly when playing with Li-ion or lead acid batteries. Also using the more expensive modules with the large choke are a better bet,… as they have better heat dissipation curves etc. Always try to run modules on the cool side,… excessive heat shortens component life,… hence my slight over kill.
Screenshot from 2023-03-22 16-19-34
This unit above,… you will find also find on ebay, meets the requirements of plenty of capacity,… runs cool, and is definitely not over stressed, as it will easily supply to a max of 300w,… so 12v ( or less ) @ 3amps is no trouble.
Alternatively
Screenshot from 2023-03-22 16-22-39
This module will current limit,… has reasonable heat dissipation… ( I normally use two small finned heatsinks back and front ), but at lower power levels,… spec says 3 amps,… but I think this is pushing it,… and as we want our control bit to run at cool low temps as much as possible,… I would only ask probably 1 to 1.5 amps of it,… don’t forget the inrush startup currents will be greater,… so I would have to say not ideal for a RasPi 4 which I believe Likes up to 3amps to start,… although I know it ticks along a much less.
Just some more food for thought…

1 Like

This is the type of power supply I go for. They don’t seem too bad for the raspberry pi, and seem not to get hot either.

But I have no idea if there’s a current limit or thermal protection!