Trickle Chargers
Apr 6, 2014 at 6:22 PM Post #76 of 94
I'm a bit confused in terms of your math and reading about the circuit on this thread. Based on the given formula, I was under the impression that 75 ohm resistor would be fine because 1.25/75 would come out to 16mA, which would come out to around 16 hours to charge the batteries. I haven't read anywhere about being aware of a voltage drop. Just that you want to have a supply that has more voltage than the batteries in series. Maybe I'm missing something.
 
With regard to measuring the current, my MM doesn't read Amperage. Instead, could I use any value resistor and measure the voltage across that? I have nothing that is super low other than a 1 ohm resistor that measures 1.2 ohms. I do have a few 1k ohm resistors. Would those work better?
 
Apr 8, 2014 at 11:14 AM Post #78 of 94
Nope don't have 1.25v. I ended up with what looked like 2.5mA when I did V/R. This was between + in from the wallwart and on + on the first battery terminal with the batteries disconnected and power on. Then I turned power off and got nothing. I'm assuming this circuit allows charging with the power off. I connected the batteries and did the same measurement and blew something. Can't tell what it was, but I saw and smelled magic smoke. Looking at the schematic and at the data sheet I think I might have wired up something wrong. The data sheet for this version of the LM317 says that pin 1 is Adjust. Pin 2 is Vin and Pin 3 is Vout. On Tangent's schematic Pin 2 is Vout and Pin 3 is Vin. I'm using the part in his BOM. I wired things up based on the schematic, not based on the parts pin out. Anyways, time to reorder some new parts and start from scratch.
 
Apr 9, 2014 at 7:18 AM Post #79 of 94

Originally Posted by Mullet /img/forum/go_quote.gif

This was between + in from the wallwart and on + on the first battery terminal with the batteries disconnected and power on.

 
1.25V is expected between ADJ and OUT, not IN and OUT. The voltage drop between IN and OUT varies depending on the battery voltage, even if all else is fixed.
 
The data sheet for this version of the LM317 says that pin 1 is Adjust. Pin 2 is Vin and Pin 3 is Vout. 

 
I'm not aware of any standard way to number the pins on 3-pin parts. Packages with so few pins typically have their pins function-labeled, rather than numbered.
 
In data sheets, such parts are usually drawn as 2D parallel projections, with no standard orientation, which makes it easy to mentally flip things around so you get the pin order backwards.
 
This is especially easy to do when popping back and forth between data sheets for TO-220 and TO-92 versions of the LM317, since some manufacturer data sheets draw TO-92 from the bottom view. When I see that characteristic D-shaped outline, I initially see it as from the top, probably because I'm used to seeing these parts from the top side of the board. (I made that mistake yet again while composing this message, thus the edit!)
 
The data sheet for this version of the LM317 

 
What version is that? Please give manufacturer and package type, at least.
 
On Tangent's schematic  

 
Which one is that?
 
The only current schematic on my site that I'm aware of with an LM317 based trickle charger is the PIMETA v2 schematic, which doesn't have numbered LM317 pins.
 
in his BOM 

 
Again, which one? I have many parts lists on my site.
 
Apr 9, 2014 at 12:15 PM Post #80 of 94
Tangent,
 
My apologies for not offering enough information with regard to schematics, etc. The schematic I was using is from the PINT amp, since I have one that I'm building (and having major DC offset issues with, but that's for another thread). Since the design has been deprecated it's no longer on Tangent's current site. You can find it using the waybackmachine. Here's a link...
 
http://web.archive.org/web/20060709073018/http://tangentsoft.net/audio/pint/misc/sch-1.3.pdf
 
I used the parts list from the PINT pages as well...
 
http://web.archive.org/web/20060709072626/http://tangentsoft.net/audio/pint/plists.html
 
511-LM317LZ is the part I used for the LM317. The pin out is pretty easy to identify. Here is the datasheet...
http://www.st.com/web/en/resource/technical/document/datasheet/CD00000469.pdf
 
Is this the correct part to use with the PINT even? I could go with something like this instead, which looks to have an easier pin out to deal with...

http://www.mouser.com/ProductDetail/Fairchild-Semiconductor/LM317LZ/?qs=sGAEpiMZZMtUqDgmOWBjgMYFDKwfkxOWk1Et%252bC0eWgo%3d
 
Thanks,
Mullet
 
Apr 9, 2014 at 3:58 PM Post #81 of 94
The LM317 symbol I used on that schematic came straight out of the gschem parts library. I have no idea why its creator numbered the pins that way. I can't fix the PINT schematic in the Wayback Machine short of asking them to remove the content, which seems like an overreach to me.
 
Why did you dig the PINT out of the Wayback Machine anyway? Why not build something that has a large, satisfied user base instead?
 
Apr 9, 2014 at 6:33 PM Post #82 of 94
I chose to build the PINT because I had the opportunity to pick up a board on the FS forums. I scored at PPA-S as well, which is what I'm using the trickle charger for.
 
Sep 16, 2014 at 12:36 AM Post #83 of 94
I am trying to use the charger from o2. I am  using a single battery and will be using dc input, say a 15v walwart, this is to drive a cmoy based on ne5532.  Attached is the circuit I am trying to simulate. I had a few questions about this.
 
1. How do I simulate a battery. What would be the approximate resistance and capacitance of a 9v rechargeable battery.
 
2. is it safe to switch on the amp while its charging. Can the amp be used safely while its charging.
 
3. If I use about 20mA current to charge, how much total current will be needed from the regulator. How much if I am using the amp while charging. I guess ne5532 uses Iq 20ma + 80ma max for output and 20 ma for charging, so total 120ma. Sounds good? 7812 driven from 15v supply at 120mA wont need a heatsink right? Is there a smaller cheap regulator I can use for this. SMD is also fine.
 
 

 
Sep 16, 2014 at 11:03 AM Post #84 of 94
  1. How do I simulate a battery.

 
Normally with a voltage source, same as with your 15V input supply.
 
That will only simulate a perfect battery, which has no ESR and a flat voltage vs time curve.
 
There is nothing in SPICE that simulates the chemistry of a real battery. You can try to approximate various aspects of the battery, such as by adding 2-3 Ω in series on the positive terminal of the voltage source, being the ESR of a "9V" NiMH battery.
 
What would be the approximate resistance and capacitance of a 9v rechargeable battery. 

 
The ESR, as I said, is about 2-3 Ω.
 
Capacitance? While there certainly is some capacitance in a battery, it's not especially useful to try and model it, at least as far as battery charging goes.
 
If you're trying to model a NiMH battery using nothing but passive components, don't bother. A battery is an active nonlinear device.
 
2. is it safe to switch on the amp while its charging. Can the amp be used safely while its charging. 

 
Yes.
 
The LM317 based chargers are nicer in this regard, in that they help lower the total supply impedance when they are active. In this O2 design, the 330 Ω resistor effectively causes the wall supply to not contribute to the power performance of the downstream circuit, since the source impedance of the battery is a couple of orders of magnitude lower.
 
3. If I use about 20mA current to charge, how much total current will be needed from the regulator. How much if I am using the amp while charging. I guess ne5532 uses Iq 20ma + 80ma max for output and 20 ma for charging, so total 120ma. Sounds good? 7812 driven from 15v supply at 120mA wont need a heatsink right?

 
You're going about that calculation the wrong way.
 
Again, because of the 330 Ω between the regulator and the battery — and the load! — ~99% of the current needed by the load will come from the battery, not from the wall supply. If you're using a 20 mA trickle charge and the load is drawing 40 mA, that means > 39 mA will come from the battery, and less than 1 mA from the wall supply.
 
The solution is not to increase the charge current, because that will endanger the battery, since there is no intelligent cut-off circuit. Correct solutions include:
 
  • Accept that you cannot run such a load continuously without running the battery down. If you only use the circuit for a few hours a day, it will have time to recover overnight, if you leave it plugged in most of the time.
  • Switch to one of the LM317 based chargers, which form a true constant-current source with near-zero output impedance, so they take the load while the wall supply is plugged in, not the battery.
 
Sep 17, 2014 at 11:59 PM Post #85 of 94
   
Normally with a voltage source, same as with your 15V input supply.
 
That will only simulate a perfect battery, which has no ESR and a flat voltage vs time curve.
 
There is nothing in SPICE that simulates the chemistry of a real battery. You can try to approximate various aspects of the battery, such as by adding 2-3 Ω in series on the positive terminal of the voltage source, being the ESR of a "9V" NiMH battery.
 
 
The ESR, as I said, is about 2-3 Ω.
 
Capacitance? While there certainly is some capacitance in a battery, it's not especially useful to try and model it, at least as far as battery charging goes.
 
If you're trying to model a NiMH battery using nothing but passive components, don't bother. A battery is an active nonlinear device.
 
 
 
Yes.
 
The LM317 based chargers are nicer in this regard, in that they help lower the total supply impedance when they are active. In this O2 design, the 330 Ω resistor effectively causes the wall supply to not contribute to the power performance of the downstream circuit, since the source impedance of the battery is a couple of orders of magnitude lower.
 
 
You're going about that calculation the wrong way.
 
Again, because of the 330 Ω between the regulator and the battery — and the load! — ~99% of the current needed by the load will come from the battery, not from the wall supply. If you're using a 20 mA trickle charge and the load is drawing 40 mA, that means > 39 mA will come from the battery, and less than 1 mA from the wall supply.
 
The solution is not to increase the charge current, because that will endanger the battery, since there is no intelligent cut-off circuit. Correct solutions include:
 
  • Accept that you cannot run such a load continuously without running the battery down. If you only use the circuit for a few hours a day, it will have time to recover overnight, if you leave it plugged in most of the time.
  • Switch to one of the LM317 based chargers, which form a true constant-current source with near-zero output impedance, so they take the load while the wall supply is plugged in, not the battery.

 
I was asking about the battery as a load while charging it, not as a source. Just to test the circuit in ltspice.
 
I guess i gotta live with option 1. I think 2 would require me to disconnect the batteries when they are charged or it might damage the batteries or would need some detection mechanism and  cutoff for batteries.
 
Sep 18, 2014 at 4:05 AM Post #86 of 94
  I was asking about the battery as a load while charging it, not as a source.

 
I know.  That's why I remarked that there is nothing in SPICE to simulate the chemistry of a battery, whether charging or discharging.
 
If you just want a load for the charger, you can use Ohm's Law to calculate an approximately correct resistor, or you could insert a current sink.  Neither will really tell you that much about whether the circuit works, though. Doing that is kind of like in algebra where you find that you've made a pointless substitution and end up proving that 4=4. True, but not actually interesting.
 
The electrical version of that is where you have a current source on one side and a current sink on the other, and learn that current in equals current out. That is, you'll just end up proving Kirchhoff's Current Law.
 
2 would require me to disconnect the batteries when they are charged or it might damage the batteries or would need some detection mechanism and  cutoff for batteries. 

 
Where did you get that idea?
 
An LM317 trickle charger is no more dangerous to the battery than the circuit you're already looking at, provided that you configure it as a true trickle charger, which is defined as one having a charge current of C/10 or lower, yet not so low that it can't keep up with the battery's self-discharge rate.
 
For a 250 mAh "9V" NiMH battery, that means 25 mA or lower, which you get with a current setting resistor of 50 Ω or higher in an LM317 trickle charger. (R=V/I, R=1.25/0.025, R=50.)
 
These principles apply just as well to the circuit you're looking at now, except that the charge current varies as the battery voltage increases. I guess one could argue that this makes it "safer" because it can cause less damage if you leave it sitting there, but that assumes that long hours of sitting on any trickle charger are good for a battery. That is not the case.
 
Sep 18, 2014 at 7:44 AM Post #87 of 94
I checked the output resistance of the 7812, its listed at around 15 milliohms while the tenergy 9v rechargeable is listed at max 1200 milliohms.
 
http://www.synthdiy.com/files/2006/LM7812.pdf
 
http://www.all-battery.com/datasheet/10001_datasheet.pdf
 
It doesn't look like the resistor is in the path when using a dc source as well as a battery with the amp switched on. Only the battery charging current goes through it. From 7812 to the amp, it goes through D4. From battery to the amp, it goes through D2. Resistor is in the path only for charging the battery from 7812.
 
Had a doubt about CCS, how will CCS help in running the amp while the amp is in use. If I set the ccs to 20ma, it doesnt have enough to power both the battery and the amp. If I set it to say 150ma, it will cause issues with the battery if the amp is not running.
 
Sep 18, 2014 at 8:49 AM Post #88 of 94
Ah, I didn't see that dangling wire as a bypass path.
 
Sep 18, 2014 at 2:04 PM Post #89 of 94
By the way, it's not difficult to modify the PIMETA v2 LM317 trickle charger to let the wall supply run the amp when on wall power, bypassing the battery:
 
 
 

Unlike the one you show, the LM317 isn't regulating the wall power supply, so you'll want to use a reasonably clean wall supply if you go this route.
 

Users who are viewing this thread

Back
Top