User avatar
Burngate
Posts: 6328
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Building a 5v UPS using LM317 IC. Help needed.

Fri Jan 04, 2013 12:34 pm

1N5824 isn't a zener - it's a 30v 5A rectifier
http://www.semiconix-semiconductor.com/ ... semi.shtml

The way these things work:

A switch inside the chip connects input directly to output.
Current starts to build up in the coil.
The internal switch opens.
The current in the coil continues, now being fed by the diode.
How often and for how long the internal switch is on, is determined by the voltage fed back into the pin marked feedback.

Ravenous
Posts: 1956
Joined: Fri Feb 24, 2012 1:01 pm
Location: UK

Re: Building a 5v UPS using LM317 IC. Help needed.

Fri Jan 04, 2013 12:40 pm

OK! So any big diode will do?

If so the only bit he needs is that pesky coil...

User avatar
Mortimer
Posts: 925
Joined: Sun Jun 10, 2012 3:57 pm

Re: Building a 5v UPS using LM317 IC. Help needed.

Fri Jan 04, 2013 12:48 pm

I would have thought a working coil could be conjured up from an old nail and some lengths of insulated copper wire. The difficult bit will be getting the number of turns right.
--------------
The purpose of a little toe is to ensure you keep your furniture in the right place.

User avatar
cyrano
Posts: 714
Joined: Wed Dec 05, 2012 11:48 pm
Location: Belgium

Re: Building a 5v UPS using LM317 IC. Help needed.

Fri Jan 04, 2013 1:24 pm

You might also need a battery survival circuit. One that prevents the battery from fully discharging. A lead/acid battery is dead if you fully discharge it. And some other cells have the same problem (Li/ion, if I'm not mistaken). But maybe you could implement that with the AD on the GPIO and an auto-shutdown routine.

User avatar
bugsy_malone 666
Posts: 292
Joined: Mon Dec 17, 2012 10:50 pm
Location: Basingstoke UK

Re: Building a 5v UPS using LM317 IC. Help needed.

Sun Jan 06, 2013 8:45 pm

I have just been looking into this a bit more myself as it got me thinking that I could build a mini ups using 1.2V NiMh rechargable AA batteries.

In my system I have an 18v live rail, but the UPS part would be 6V like your first post indicated, which is kind of my goal, its much easier to do conversion from 12v as you could use an L7805 regulator (I use them in the LED lights in my camper with small heatsinks) but anyway, starting with the 6v I came accross this:


The LT1085 is a 3A low drop out regulator, there is also the 1084/1083 which are 5a/7.5a versions. However looking on ebay the LT1085 isnt a cheap unit!

So looking at your original part I found this circuit for step down from 12v to multivoltages:
Image

When I looked at it, you can remove upto and including the 3300uf capacitor on the left as thats all the mains stepdown and smoothing. Then if you look at the 'Selector switch' at the bottom it gives you the various voltages, which looking at it if you use a resistor of the value r4+r5+r6 would give you a fixed 5v output.

Theres also this simple diagram here for an LM317:
Image

I hope that might at least be a starting point?

Have you got a way to charge your main battery? LM317 can also be used for that as thats what emergency lighting systems in offices use :)

sim_tcr
Posts: 331
Joined: Tue Nov 06, 2012 1:01 pm
Location: Bangalore
Contact: Website

Re: Building a 5v UPS using LM317 IC. Help needed.

Tue Mar 12, 2013 5:50 pm

Finally I was able to accomplish half of my project.
Some background, I was trying to find a solution to power my pi from a lead acid battery and recharge it using DC adapter. Main challenge was bringing down 12V or 6V battery voltage to 5V.
Two weeks back I got a ready made solution for stepping down the voltage. (LM2596S DC to DC Step Down Adjustable Power Supply Module)
http://fabtolab.com/index.php?route=pro ... uct_id=142
DSC00352_new.jpg
DSC00352_new.jpg (60.26 KiB) Viewed 4967 times
I used a 3 year old 12V lead acid battery from an old UPS. Stepped down the voltage to 5.4V and using above module and powered the pi. TP1 and TP2 voltage is 5V. Its still running from last 2 hours. I will update here tomorrow how long the battery lasted.
DSC00353_new.jpg
DSC00353_new.jpg (60.62 KiB) Viewed 4967 times
Now charging the battery part is still pending.
http://raspisimon.no-ip.org
Raspberry Pi Model B x 2, Raspberry Pi 2 x 2, Transcend 32GB Class 10, Transcend 16GB Class 10, Transcend 8GB Class 4, Custom 12V 1.5A (stepped down to 5.5V)

sim_tcr
Posts: 331
Joined: Tue Nov 06, 2012 1:01 pm
Location: Bangalore
Contact: Website

Re: Building a 5v UPS using LM317 IC. Help needed.

Thu Mar 14, 2013 4:16 am

Battery lasted more than 24 hours. I shut it down anyway.
Now I have connected by APC UPS' battery charging leads to battery at the sametime running by raspberry pi directly from the battery through dc to dc step down converter. NO issues to report so far.
http://raspisimon.no-ip.org
Raspberry Pi Model B x 2, Raspberry Pi 2 x 2, Transcend 32GB Class 10, Transcend 16GB Class 10, Transcend 8GB Class 4, Custom 12V 1.5A (stepped down to 5.5V)

treii28
Posts: 97
Joined: Fri May 10, 2013 4:52 pm

Re: Building a 5v UPS using LM317 IC. Help needed.

Sun Mar 27, 2016 4:19 pm

switching regulators as well as buck converters for 5.5v are all over the internet (check ebay). I'm using one of those currently testing a battery backed pi, but as I was searching around this morning it turns out there are a number of external power and microUPS based pi-plates out there. Sleepy pi, MoPI and UPS PIco for example. A number of different kidns are available from https://www.buyapi.ca it seems. I'm thinking I may get one of the UPS PIcos to play with and may consider the Sleepy pi even though it's a bit more pricey (currently out of stock) because it's arduino based and you can apparently also program it like an arduino for doing other stuff.

levelcrow
Posts: 47
Joined: Tue Aug 12, 2014 5:04 pm

Re: Building a 5v UPS using LM317 IC. Help needed.

Sun Mar 27, 2016 5:55 pm

I was getting into voltage boost/buck converters as a hobby about a year ago. I wanted to give a heads up that although the LM2596 buck converter and XL6009 boost converter modules seem like the convenient and cheap way to go, there's actually better modules out there for about the same price with better chips that switch in the MHz range instead of the kHz range - and so do not need as large capacitors and provide better conversion efficiencies.

For boost purposes, it seems like the mt3608 modules are superior to the XL6009 modules.
For buck purposes, it seems like the mp1584 modules are superior to the LM2596 modules.

Return to “General discussion”