Raspberry Pi UPS: Trickle Charger
<< Previous
First
2
3
Last
Next >>
Raspberry Pi UPS: A Very Simple Solution Raspberry Pi UPS: Trickle Charger Raspberry Pi UPS: Safe Shutdown Raspberry Pi UPS: Software
Simple trickle chargerOn the previous page I showed you how you can make a simple uninterruptable power supply for the Raspberry Pi or other microcomputer using just two diodes, a DC/DC converter and a battery. It will potentially keep your Pi alive for up to a few hours when the mains power fails and will satisfy the requirements of many hobbyists who are happy to change the batteries regularly. You can improve the usefulness of the UPS by charging the battery whenever there is power available. This will increase the time that the battery will last when powering your Pi and in many cases will eliminate the need to change the batteries regularly. I used NiMH rechargeable batteies in my UPS. They offer a good compromise between capacity and cost. They are not easy to charge quickly however. NiMH batteries can be charged fully in as little as one hour but to do that requires a smart charging circuit. I wanted to keep things as simple as possible so I ruled out the fast charge option. Fortunately it turns out that you can safely continuously charge NiMH batteries at up to 1/100 of the capacity of the battery. This is called "Trickle" charging and will fully charge a battery in approximately 150 hours or 6.25 days. The inefficiencies of the charging mechanism accounts for why the charge time is 150 hours and not 100 hours as it would be in a perfect world.
UPS with trickle charger
The components R2, R3, D4, D5, D6 and T1 make a simple constant current source which ensures that the battery receives a charging current that is largely independent of the state of charge of the battery. The constant current circuit works by using the two diodes and PNP transistor to provide a constant 0.75V across the emitter resistor R2. The current flowing through R2 determines the charging current. D6 prevents the battery from discharging through the charger circuit. I used two sets of batteries in my testing so I had to change the value of R2 to match the batteries in use. The two sets of batteries used are: 8 x 1000mAh AAA size and 8 x 2900mAh AA size. The maximum trickle current required for each are 10mA and 29mA respectively and as I don't like designing to the max. I have set the charging current to be a little below these values. For the AAA batteries I used a value of 82Ω for R2. This provides a theoretical 9.1mA charging current. Swapping R2 for a 33Ω resistor generates 23mA for the AA batteries. Practical testing found that the actual charging current was close to the predicted value.
How fast will the battery charge?Assuming that your Raspberry Pi draws 350mA out of the battery and you run the battery without mains power for one hour then how long will it take to replace the charge? For the AAA, 1000mAh batteries the charging current is 9.1mA. The time to recharge will be (350/9.1)*1.5 = 58 hours or 2.4 days. Using the AA, 2900mAh batteries for an hour will take (350/23)*1.5 = 23 hours or 1 day to replace the charge. So provided that power outages are not too long or too frequent you should be able to build a working UPS that will keep your Raspberry Pi going almost indefinitely.
<< Previous
First
2
3
Last
Next >>
Raspberry Pi UPS: A Very Simple Solution Raspberry Pi UPS: Trickle Charger Raspberry Pi UPS: Safe Shutdown Raspberry Pi UPS: Software |
Now subscribe to our newsletter and don't miss a thing |
|
Comments (66)
your scheme is really helpful for me. Thanks a lot.
But, i want to ask. what should i do, if i want to connect with 4 raspis all at once? should i just change fuse to be 8 A?
Thank you, I hope you will answer my question.
Thank you
Thank you
Thank you
Thank you again!
Thanks,
Borut
I would suggest to include another option: let the RPi know what the status of the battery is, or: add a similar circuitry as implemented for the 12VDC status. So pass a signal to the RPi "Battery_OK" . If this signal is going low it is really time to power down and deactivate the relay avoiding a complete failure of the batteries. This allows for even bigger battery packs.
Arthur
This is a simple and understandable ups for my raspberry.
I wonder what to modify to make it work as a UPS for my 12V picoPSU powered NAS ?
The aim would be to hard shutdown the NAS when power drop while using an external 12V battery.
To be as simple as possible, it would be acceptable if the circuit don't deal with battery charging.
Could you give some advices about the simplest way to achieve this ?
Many thanks
Does the charge is stopped to prevent any overcharge ?Regards,
And would they lose charge over time ( even if main power is always on ? )
I was thinking of the first version of the ups, what prevents the battery from discharging while on main power ?
And should minus on the battery connect to 0V ?
Is ground the same as 0V in this setup ?//P
Excellent explanation and functionality.
Maybe you can rearrange with power bank with 18650 batteries as they already have charger on them.
What do you think?
Thanks
Andrijan
Because I found and buy 2 batteries with 4V and 1.3mAh. I plan to connect it series(ony by one).And I didn't get with wich formula you calculte value for R10.Thanks!
i am not interested to switch between the two modes. i will do only with the disconnection of battery at the end. it is only interesting to keep the battery on if you have for example an arduino with the RPI.thanks again.
nuno
thanks .
nuno
very nice feature!
i will build this circuit and test in my rpi.
thanks again!
regards
nuno
did you try this circuit?
Add Comment