This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
5v UPS
#1
Came across this youtube of a 5v UPS, might be of interest to a few on here..

https://www.youtube.com/watch?v=jecgoBqOrhk
Reply
#2
I have ordered one UPS module, and I will test it when I get it:
https://www.aliexpress.com/item/10W-3-7V...12117.html

I have also designed a card that normally runs on the supplied 5 V, but switches over to battery operation it the input voltage gets too low. It then tells the pi to shut down, and turns off the power after about 30 s. The plan is that this will ensure that the pi is always shut down correctly, even if you just turn off the power. I have ordered the PCB, but I need to order the components and assembly it when I get the time...
Reply
#3
(2017-11-13, 08:55 AM)shipahoy Wrote: I have ordered one UPS module, and I will test it when I get it:
https://www.aliexpress.com/item/10W-3-7V...12117.html

I have also designed a card that normally runs on the supplied 5 V, but switches over to battery operation it the input voltage gets too low. It then tells the pi to shut down, and turns off the power after about 30 s. The plan is that this will ensure that the pi is always shut down correctly, even if you just turn off the power. I have ordered the PCB, but I need to order the components and assembly it when I get the time...

Nice idea of a good mannered shutdown, I use a node red button to shut down Opencpn then the Pi, some sort of clever UPS would be cool as well. 

Another clever design here -
http://www.cruisersforum.com/forums/f134...ost2393825
Reply
#4
Unfortunately most of the UPS solutions won't work for me. On the boat the pi is fed by the 12v system and should be shutdown when I kill the main power. After the shutdown the pi needs to be cut of the UPS's battery because it won't turn off completely. The pi still sucks some current in shutdown and fires the GPIO pins so the UPS wouldn't last very long. I haven't figured out yet how to detect whether the pi has finished the shutdown completely. Because of that i need some sort of timer like shipahoy wrote. First I was going for a NE555 and a relay but recently I've tested a MOSFET and a capacitor at the gate. I'm a total newbie when it comes to electronics and I'm trying to figure everything out by myself and not follow some DIY-guide. I hope I'll have a working solution in the next weeks. Currently I'm waiting for the delivery of last parts from china.
Reply
#5
I originally planned to detect when the pi had finished shutting down. I expect this can be done by setting an I/O-pin high, and when the pi has shut-down I would expect it to go low.
The UPS however cannot keep the pi powered infinitely, so I skipped the shut down detection, because I would have to cut the power after a while anyway, even if the pi did not shut down correctly.

What parts are you planning to use? If you have any problems I might be able to help you :-)
Reply
#6
I expected the same but on my RPi 3 a pin that is set high switches from 3.3 V to something floating between 0.5 - 2 V at some point during shutdown but definitely before the shutdown is finished. I tried to influence this behavior with some settings but had no success.

For my ups I'm using p-ch and n-ch mosfets, some resistors, capacitors, (zener) diodes, you know the usual stuff that every electro enthusiast knows about and that was unknown territory to me a few weeks ago  Big Grin
Besides that I'm using a buck-boost converter.
Thank's for your offer I might get back to you.
Reply
#7
You got me thinking about this. So, after a quick rummage in my junk box I came up with a little single-16850 power pack for a cell phone or whatever. I think I got it at a raffle or something. Simple device - just a micro-usb for input power and a standard USB for output. It probably has the same or similar circuitry inside as the guy used in the YouTube video that PaddyB posted. I think you can find these things at a corner store, but very cheap on Amazon (eg. https://www.amazon.com/Anker-PowerCore-L...B005X1Y7I2)

Sooo, how about this:
- Power that I was using for the PI goes into the charge port on the power pack
- Power out to the PI from the power pack to the PI
- Some sort of sensor (it would need to be through a voltage divider) from main power input to a GPIO to sense loss of main power. This lead going down would tell the PI to initiate a shutdown script. You could also wire that same GPIO to a pushbutton or switch for a shutdown. In my case I use a 12v-5v buck converter, so I'd sense the 12V, but it doesn't really matter.

I guess the only thing I would be concerned about would be current capacity of my little power pack. What do you guys think?
Reply
#8
As mentioned before. Most of the power banks can't be charged and discharged at the same time. Besides the probable capacity problems the pi would still suck the juice out of the power bank after the shutdown.
Reply
#9
Isn't that the basic idea behind all the current pi ups's on the market ?
Re the comments about a clean shutdown - I don't think you can detect a clean shutdown and besides, what would you do if the pi didn't completely shut down. When that happens on my laptop I kill the power because no matter what, it ain't going down clean.
As long as your battery pack can sustain operation for the longest possible shutdown sequence (might include writing data/backup) plus a bit of a margin then you are set to go.
Some sort of a secondary power shutoff should be incorporated in case the pi hangs during shutdown - you wouldn't want to kill the battery just because the pi hung.

(2017-11-13, 11:03 PM)shark24 Wrote: As mentioned before. Most of the power banks can't be charged and discharged at the same time. Besides the probable capacity problems the pi would still suck the juice out of the power bank after the shutdown.

I guess we cross posted .... I don't see any reason why you shouldn't charge/discharge at the same time (I am pretty sure I have seen commercial products that do both although I can't recall the particular products). If you have a timer of some kind for secondary power shutdown then you will not kill the power bank.
Reply
#10
(2017-11-13, 11:16 PM)JD1 Wrote:
(2017-11-13, 11:03 PM)shark24 Wrote: As mentioned before. Most of the power banks can't be charged and discharged at the same time. Besides the probable capacity problems the pi would still suck the juice out of the power bank after the shutdown.

I guess we cross posted .... I don't see any reason why you shouldn't charge/discharge at the same time (I am pretty sure I have seen commercial products that do both although I can't recall the particular products). If you have a timer of some kind for secondary power shutdown then you will not kill the power bank.

Yes there are some power banks that handle simultaneous charge/discharge but for me most of products out there didn't do the trick.
Yes if you have the timer mentioned above you can easily cut off the secondary power supply. Again I'm using a mosfet as a switch and a capacitor of a certain size to time this process
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)