Mar 18, 2013, 01:59 PM Registered User Nelson B.C. Canada Joined Feb 2003 216 Posts Help! Lm317 formula? Hi! Guys Could somene tell me the formula for calculating the R4 current resistor in this circuit. I can't see how the values given were figured out. I would like to build a 2s 240ma version, but would like the formula for other values. Thanks Mike https://sites.google.com/site/donuts...-the-schematic
 Mar 18, 2013, 02:24 PM Stuart UK, Cardiff Joined Dec 2008 3,444 Posts Try a Google Search on 'LM317 Datasheet' you will likely find the voltage formula on the first page. R4 then acts to limit the charge current which can be no more than the voltage output of the regulator - the battery voltage divided by the resistor. So if Vregulator = 4.2v, Vbat is 3V, and R is 1.2R, the current would be (4.2-3)/1.2 = 1A. Last edited by srnet; Mar 18, 2013 at 02:31 PM.
 Mar 18, 2013, 05:40 PM Registered User Nelson B.C. Canada Joined Feb 2003 216 Posts Hi srnet I have the data sheet, and your example work fine for: Vregulator = 4.2v, Vbat is 3V, and R is 1.2R, the current would be (4.2-3)/1.2 = 1A If you try it on the other examples it does not or I have something wrong. eg Vregulator = 4.2v, Vbat is 3V, and R is 1.8R, the current would be (4.2-3)/1.8 = .666666A ---should be 1.5A eg Vregulator = 8.4v, Vbat is 3V, and R is 4.7R, the current would be (8.4-3)/4.7 = 1.1489A ---should be .550A If I work it backward (.550A x 4.7R)-8.4V = 5.815V Vbat Obviously Vbat must change. BTW: Vbat does mean Voltage Battery right? Did you arrive at Vbat is 3V by working it backward? Thanks for the help, hope there is a formula for this. Will keep trying. Mike
 Mar 18, 2013, 06:09 PM Registered User Staffs, UK Joined Nov 2003 11,138 Posts The reason you're having trouble understanding the values in that link you posted is because they're wrong. In particular 1S 1.8R is wrong as you can see if you look at the other values. If 1.2R = 1A and 2.2R = 0.55A then there's no way 1.8R is going to be 1.5A. OTOH 0.8R would be about right. BTW VBat = 3V is based on what it says in the text "...battery voltage is lowest. (that is 3V min for a lipo)". I wouldn't let my lipos get below about 3.6V but then I wouldn't use such a crude circuit to charge lipos either, not when there are plenty of better ones about. Steve Last edited by slipstick; Mar 18, 2013 at 06:14 PM.
Mar 18, 2013, 06:19 PM
Stuart
UK, Cardiff
Joined Dec 2008
3,444 Posts
Quote:
 Originally Posted by slipstick I wouldn't let my lipos get below about 3.6V but then I wouldn't use such a crude circuit to charge lipos either, not when there are plenty of better ones about.
Indeed, there are plenty of ready made and cheap Lipo chargers that will look after your Lipos a lot better and are a lot safer to use.

The 'simple circuit' has no low voltage protection, it can be hazardous to attempt to charge a Lipo that has fallen below 2.5v or so, which is why most proper chargers will prevent you doing this.
 Mar 18, 2013, 06:20 PM Reduce the drama... USA, OR, Damascus Joined Apr 2004 4,045 Posts Mike Here is a thread with lots of questions answered http://www.rcgroups.com/forums/showthread.php?t=130567 Here is Scott Henion's chargers. I especially like #3 http://www.shdesigns.org/lionchg.html
 Mar 18, 2013, 09:10 PM Registered User Nelson B.C. Canada Joined Feb 2003 216 Posts slipstick (Steve) I guess I didn't think that through to clearly of course your right. I usually stop discharging at 3.7v, 3.8v. ----------------------------------- srnet (Stuart) Yes it has no low voltage protection, kind of like the earlier lipo chargers. -------------------------------- rick.benjamin (Rick I hope) The charger I actually built was electron_head's from your first link. Scott Henion's chargers are nice too. ------------------------------------ To all How this started out, I have a young guy coming over to look at my plane and stuff. His mom says he's really into planes. So I thought I'd fix him up with something to start out. A long time ago I bought a few wally world flying wings for gifts and occasions like this. Thought I better check it out make sure it works the battery was a nimh 4.8v 110mah If I had those cells I would have soldered up a couple more packs, but I didn't. I built a 2s 240mah lipo pack with 5v regulator, same weight as old pack and fits. Now he'll need a small lipo charger I was going to build the one I asked about in the thread. (good thing I was having trouble with the charge rate) and didn't build it. electron_heads does work fine for this job Thanks to all; knowing you will make a young guy happy Mike