Ultra simple Hub UPS

I've been thinking of a simple HUB UPS. We don't get a lot of power interruptions but during a storm its not uncommon to loose power for some number of seconds.

I didn't want to deal with:

  • AC UPS devices as they are too big and cumbersome for my Hub location
  • Rechargeable Lithium batteries as I am concerned that a low cost charger for Li batteries could cause a fire hazard.

So I decided on AA Lithium (non rechargeable) batteries. 4 AA batteries can last 50 hours of HUB standby current.

This is the simplest version I could think of. On power loss from the AC adapter, the batteries continue to power the hub while a closure (or open) tells the door sensor to signal the Hub. With a simple rule to tell the Hub to shut down, thereby dropping the Hub current to 60 ma which will last ~50 hours before the batteries start to die.
The circuit will need to be reset by pushing the switch (SW1) after power is restored.

I'm working on a different version with a little more complexity that will shut the Hub off after it shuts down, when it is safe to turn off.

John

3 Likes

Wouldn't the hub pull power equally from the batteries and the supplied DC voltage in this case? What is going to keep from using the batteries too in this case? Wouldn't you need a transistor or something to shut off the flow from the batteries when the flow from the wall is on?

Why would you have to do that? That doesn't make sense. You want to be able to switch back to wall power automatically. If you have a 2 second blip of power, your hub will stop working till you reset the UPS manually? That's not a UPS then.

Wouldn't the hub pull power equally from the batteries and the supplied DC voltage in this case?

That's why there are two diodes D4 & D5. Agreed I might have to put a 3rd in depending on the batteries once it actually get some.

Why would you have to do that? That doesn't make sense.

It does make sense, remember I started the post with the "Simplest" implementation, this is the simplest I could come up with.
The next version will disconnect power from the batteries to the Hub after a period of time, but that will not be as simple.

That's not a UPS then.

Semantics, technically it is a UPS, however once the door sensor tells the hub to shutdown then something else needs to "reset" it. So its either "simple" aka push button or not as simple "yet to be finalized"

Remember the goal here (at least for me) is to not corrupt the Hubitat database by and uncontrolled shutdown.

I posted this mostly to see if anyone was interested in such a thing. Had I added and IC to allow automatic restart it might have put someone off that was comfortable with a few discrete parts but not an IC.

John

3 Likes

But that just keeps power flowing from the battery to the hub and prevents backlow into the batteries. It won't shut the flow from the batteries off.

Also, how are you dealing with the fact that you'll have two voltages? Assuming you have 4 AA's in series, that will be 6v. The wall will deliver 5.

This circuit is going to use the batteries while using the power from the wall-wart. The batteries will be dead long before you lose power and need the backup. It will be a matter of hours. Because there is nothing shutting the flow off from the batteries while power is being supplied from the wall-wart. Why will it choose to take it from the wall-wart? Because you want it to?

The red line and the blue line will both be supplying power at the same time. Why would it choose to only use the red line instead of using both? In fact, since the blue line has the higher voltage, at first, it's going to use MORE power from the batteries than the wall.

You need a PNP transistor in there to shut the flow off from the batteries when the wall is powered on. It should go in between the diodes and the base should go to the line supplied by the wall.

The pair of diodes will each drop .7 volts, or a total of 1.4, leaving 4.6 volts. Since this is less than the 5v, it should work just fine...:thinking:

3 Likes

That is why there are two diodes in series with the batteries and I mentioned the actual circuit may need a third. Remember this is the "simple(st)" circuit I can come up with.

Besides with an additional switch (PNP or whatever) there could be a delay causing a dip in power that might effect the HUB

John

1 Like

Upon further inspection, it looks like those are Schottky diodes in the diagram. Those should minimize the voltage drop. Perhaps use regular diodes for the battery voltage drop, and the Schottky for the power supply? Just thinking out loud....

1 Like

Perhaps use regular diodes for the battery voltage drop, and the Schottky for the power supply?

Good thought :slight_smile:

I had considered a 1N400x diode and was on the fence about using 2 different diodes or multiple schottky's. You could go either way. If you had parts laying around the 1N400x would do the trick but if you have to purchase these parts (this schottky is a ultra low drop device) maybe more of the same is better.

I'm working on one that will power off the hub after is shuts down. Which means it will power up automatically. I'm trying to stay with simple parts even though a small µP could easily do the trick. I think if anyone wants to try and build one a µP could easily put them off.

Still I'm really happy with the AA Lithium's for simplicity.

John

2 Likes

you can buy ready UPS solution on aliexpress but with 18650

click2

Thanks for the link.... interesting. But one of my goals was to stay away from rechargeable batteries :slight_smile:
John

I also like simple and cheap things.
I did for a specific simple project a very simple "UPS" (Ryan, I know, it's not technically an UPS :wink:)

I took a 12V car battery, used but in good shape (plenty of amps), connected to a basic trickle charger plugged on the wall. An electronic device was connected to the battery, so it was in fact not connected to the main power, just connected on a big buffer.
A small 12v to usb converter and, voilà !

In case of power failure (Quebec here...), the battery is always fully charged (because of the trickle charger) and can power my devices for weeks (because it's a car battery).

No electronic (except the regular trickle charger and the converter) and nothing to do. If you plug a HE hub on this unit (and other small electronic appliances), it will last "forever" without shutting down.

https://www.amazon.com/JZK-Converter-Voltage-Connectors-Charging/dp/B06XSCCLCD/ref=sr_1_1?

3 Likes

Sounds awesome. I imagine you could also use it to charge your cell phone in a power outage.

In fact, I use this kind of things for almost important in case of (power failures):

small 12V led lamps in my garage (frustrated to have no lights when power outages), my sump pump and controller, a small Li-ion battery bank with 12V/5V outputs, etc.

All based on [bad] experiences :slight_smile:
I remember a flood years ago in my son's house and his big sump pump (120V AC) was not running because the power was down, because of the flood... And the water stayed too long just because of this stupid setup...
I have in my home a 12V Bilge 4700 GPH pump and it can remove a lot of water in no time... whatever the main power status.

Some years ago I purchased a portable generator. Its good for long outages but too much effort to setup for short ones.

Funny thing is, I bought it during a winter storm when the power company said the power would be returned in 3 days. I went to Home Depot, they had already sold out of the smaller ones so I ended up purchasing a 5kW unit. By the time I got home the power was back on!

I kept it anyway.

John

I know you said no lithium, but check this out. 10 bucks, no special charger needed.
Use a high quality battery(panasonic) and you'll be fine

1 Like

I was thinking of doing something like this recently, not to power the hub but to keep repeaters alive in the event of an outage or if main power has to be turned off for whatever reason. Especially xiaomi sensors which may fall off the mesh if the connection is interrupted.

Without the hub, they will still fall off if they don't get a response from the coordinator (hub), so you would need a ups for hub also

I was thinking of doing this for 1 or 2 of mine as well. My concern was with regards to sensors and HSM. If the power fails and a repeater is not available, HSM is pretty much useless. It won't be able to receive the motion or contact sensors signals. I think this would best be accomplished for a zigbee mesh using Xbee's since they can be powered off 3.3vDC and there are inexpensive OTS systems you can buy for UPS systems for those.

1 Like

My hub is already hooked up to a UPS (along with my other network gear) so no problem there.:grinning: