Using LTSpice 4.2.1 on Win8.1.
I found an AA battery charger circuit that I’ve modeled in Spice and want to make sure I have wired it together correctly. The design comes from http://www.eeweb.com/blog/extreme_circu … nimh-cells. It is based on an LM317 voltage regulator. The LM317 mfg doesn’t provide a Spice model, so I created one from .SUBCKT code I found here http://www.electro-tech-online.com/thre … del.18270/. There are three different SUBCKT examples provided in that forum thread, and I have tried them all, but am thinking the one provided by member Optikon (.SUBCKT LM317/TI in adj out) is the best choice.
I have attached my Spice schematic and all the models and subckt code, but let me know if I forgot anything.
I didn’t know what to put in for a battery that is being charged, so I put in a battery load resistor and made two runs - one run uses a 0.02 ohm value representing a fully charged set of four AA niMH, the other run uses double the battery resistance because I’ve read that small battery resistance increases as batteries discharge up to a max of about 0.04 ohm (http://www.powerstream.com/1922/battery … pter08.htm).
I set R5 to 250 Ohm. The original circuit uses a 500 Ohm trim pot, so I chose the mid value.
If you look at my Spice runs, the one on left is fully charged batteries, on right is fully discharged. V[n003] is at the +V1 node; V[n004] is at + side of BATTERYLOAD resistor.
I have some questions:
-
Is using a load resistor with these values wrong? The graphs are identical - this can’t be correct.
-
Why would I be seeing negative voltages at the +load resistor?
-
If I make the load 4000 Ohm the voltage across the load doesn’t change, but its current goes to a trickle.
Thanks for helping!
Bob