# Recharge a 9V NiMh battery with a Solar Panel / Constant Current Generator

Hi guys,

if you enjoyed the previous post solar-powered Arduino board, you should keep reading this one as well to improve your solar power generator. In fact, with that setup the 9V battery would decay too soon: A NiMh (Nichel – metal hydroxide) battery must be recharged with a constant current generator, a solar panel alone is not.

In order to do so, we can assemble a quite simple circuit using the following components:

• LM317M or LM317LZ
• A 200Ohm trimmer
• 10Ohm resistance
• A LED to check if the current is actually flowing

The core of this circuit is the integrated three-terminal adjustable linear voltage regulator LM317. The ‘adj’ pin is a control terminal that is used to adjust the output current. So, the trick is to use a variable resistor (in our case, a trimmer with a small resistance put in front of it) to set the current at a definite value.

Constant current generator with a LM317

With an input DC voltage of max 24V, and the resistances shown in the diagram, one can obtain an output current of:

I_out = 1.2/(10 + R_trim) [A]

This current must be less than 1/10 of the battery output, e.g. for a 750mAh battery the output current must be less than 75mA. As usual, it is customary to insert a capacitor (100uF should be ok) in parallel at the input node to smooth out fast-varying voltages.

Pin diagram of a LM317LZ

## 6 thoughts on “Recharge a 9V NiMh battery with a Solar Panel / Constant Current Generator”

1. julius

Hi,

I am looking for LED board ( 6 x1.5V ) with 9V battery be charged by solar unit.

Are you doing something like this ?

Thx and have a nice day.

Julius

• I tried something like this some months ago. It worked fine. Maybe some more posts in the future…

2. Vincent

Hi very good guide ,
Can someone can help me to make a solar charger for 3.7V Li-PO baterry with included control charger with auto-off charging when 3.7v cell are full ?

3.7V Li-ion baterry 2900mah
solar panel are 5v/70mA

Thank you very much for all your help

3. Nice post. I was checking constantly this blog and I am
impressed! Very useful information specially the last part ðŸ™‚ I
care for such information much. I was seeking this
certain information for a long time. Thank you and best of luck.