I was told that i could make a simple battery charger from a LM317 and a resistor to charge some Ni-MH Batteries. Can someone just expand on this a little such as how it works as I don't really understand it. Some more information is that there are 12 AAA batteries that hold a charge of 1000mAh and 1.2v per cell.
This page apparently describes a LM317-based charger with auto-shutoff, though it has a few more parts than a resistor.
At the most crude, you can use an LM317 and resistor to form a regulated current source, which is how NiMH/NiCd's should be charged. See "Precision Current Limiter" (p. 19) on the LM317 datasheet. The regulator functions as a current source by attempting to supply as much current as possible to have
Vout - Vadj be 1.25 V.
Note that there is nothing inherent in the LM317 to shut off a charge, so if the batteries are fast-charged (~C/2 or higher), they will fail if you do not terminate the charge at the appropriate time. With a trickle-charge (C/20), you "can" leave them alone with no ill-effect.
So in your specific case, the 2-part charger would be a LM317 and a resistor to charge the pack at C/20.
- Charge rate:
1000 mA·h @ C/20 => 50 mA
- Resistor value:
1.25 V / 50 mA = 25 Ω
You need to provide a voltage to
Vin at least 2.0 V (dropout voltage) + 1.25 V (reference voltage) = 3.25 V greater than the maximum charging voltage. The resistor would be connected between
Adj, and your load is connected to
Adj (not Vout)
A good tutorial using a microcontroler to automatically disconnect the charger when the battery is full is available on http://www.shapely.asia/charge1.html
You can use this for simple trickle charge. Use the resistor to ensure that the charge delivered to the battery is less then C/10 (capacity of battery divided by ten, ie. 1200mAH batter gets 120mA or less). Most NiMH batteries can handle this for quite a while.
There are some pretty cool designs out there for this. As long as you keep your charge current low you can accidentally leave the battery on the charger for many hours past the point of full charge without having to worry about overcharge damage, the downside being that they will take 12 or 15 hours to charge in general.
NiMH have very interesting charge characteristics. They need to be changed very intelligently to stop from possibly shortening their life. If you want something that charges in a time like 4 or 5 hours from fully dead you need an intelligent controller.
Quoting Russell from the PIClist: "AA cells of over 2000 or so mAh from reputable manufacturers recommend NO trickle charge or low AND extremely short duration trickle charge." Low capacity cells (e.g, 800 mAh AA) are OK with trickle charge.
You are definitely into high-capacity cells with 1000 mAh AAAs. Check the manufacturer's datasheet before charging them with the indefinite-trickle method. However reputable manufacturers place a catalyst that will handle small amounts of excess trickle charging and will be able to handle a few extra hours of C/40 or less charge rate after charged.
The most dependable smart chargers(in relation to ensuring full charge) must use overcharge heating to detect overheating. It is almost unavoidable.