Universal nicd and nimh battery charger using LM317T

Here is a current and voltage constant  NiCD battery charger circuit for 2.4V, 4.8V, 9.6V. Also, if you may apply more voltage.

I like them. Are you the same as me?  In the past, I used the alkaline battery. Because it is high power.  But now I mostly use NiCD / NiMH batteries. Because it can be recharged many times(+500).

UniNiCD NiMH battery charger using LM317T

A general Nicad battery has a voltage of  1.2 V. But we can use it instead of 1.5 V battery.


It has a constant voltage level while supplying a current. And when the electric charge is almost empty, Its voltage will drop quickly. This is different from other types of batteries ( Like Alkaline). See the graph below.

NiCD battery has 1.2V constant voltage

However, charging batteries must be highly careful. And use the correct method only.

Basic principles of charging NiCD batteries.

3 types of the battery charger systems

There are many ways to charge NiCD batteries.  I would like to divide into 3 major categories as follows

Constant current

This method is easy and safe. But it takes a very long time. 

Example of a 500mAh battery.

The suitable charging rate is 0.1 times the current capacity. So, we should charge with a constant current of 50mA for 10 hours. But actually takes 14-16 hours. Because when the battery is almost full, the current will be charged less.

If needing to charge faster. We can increase the charging current to 100mA. And the charging time will be faster to 3-5 hours.

Good sound? But…be careful!

When the battery is full, have to disconnect it immediately. Otherwise, the chemicals inside it get too hot. Until causing damage


Constant voltage

Normally, NiCD battery has a voltage of 1.2V and when fully charged is 1.25V-1.3V

For example

If you want to charge 4 batteries, set the constant voltage to 1.2Vx4 = 4.8V.

But at first, there will be very high currents. Because of the voltage level between the charger and the battery is very different. It may cause overheating until the battery is damaged.

Constant current and voltage

This type of charging uses more slightly devices. But it is worthwhile because it is the safest method. And the battery voltage does not exceed the limit of the battery.

Sometimes we may forget to charge it for too long. Without any problems Because the voltage between the charger and the battery is the same.

How to design

Which is better for you. In this circuit is NO.3.

Some want to learn how to design the circuit is simple. In this project, we will try to design it together.

First, see the block diagram of this project.

Block Diagram of Universal NiCD NiHM Battery Charger

Here is a step by step process.

  • 12V unregulated Supply
    Almost all electronic projects that use the AC Main Circuit must use this part. It is a simple DC power supply circuit. That is easy to design.
  • Simple Voltage Regulated Supply
    It is Series Regulator with adjustable output voltage to make a constant voltage.
  • LM317 constant current
    It is an easy circuit. Why? read below.
  • Ammeter
    Shows the amount of current flowing into the battery and know that the connection points are normal.
  • 2, 4, 8 Batteries in series

Let’s getting started.

12V Unregulated supply at 300mA

See in the circuit below.

12V Unregulated power supply

When we use a battery with a size of about 10V and not more than 200mA. It is advisable to use the DC power supply 12V 300mA. Set …

  • The voltage of the secondary winding is 9V at 300mA.
  • Capacitor-220uF 25V is the filter to smooth voltage. We use 220uF for this current.

Recommended: Unregulated power supply Working

LM317 constant current

First, design a constant current. We have many ways to do it. Example, transistor circuit. Now, using LM317 is simple, too. It is good at the simple variable power supply.

It has a lot of helpful. If I would explain to you all about it. This post will very very long surely. So, read how LM317 works pinout and more. Now, Let me explain to you how to use it is a simple constant current.

Look at the circuit below. Yes! There only is IC and Rs. Is it easy?

simple LM317 constant current

In short, we can find the output current (Iout) easily, too.

Iout = Vref / Rs

Imagine we use Rs of 10 ohms.
Vref = 1.25V
So, Iout = 1.25V / 10 ohms = 0.125A

If we want Iout = 50mA = 0.05A

Rs = 1.25V / 0.05A = 25 ohms

You may use 24 ohms to 27 ohms.

Important: The input voltage must always be greater than the output voltage at 0.7V.

When charging all 3 types of batteries. So, use different levels of voltage must be specified as follows:

  • 2 Batteries
    Vin = 3.1V; Vout = 2.4V
  • 4 Batteries
    Vin = 5.5V; Vout = 4.8V
  • 8 batteries
    Vin = 10.3V; Vout = 9.6V

Related circuits about battery chargers

Simple regulated voltage

Then, we look at a simple regulated circuit. To adjust the voltage in all 3 levels above

basic Series Feedback Voltage Regulator

It is a Series Feedback Voltage Regulator circuit that uses a transistor and a Zener diode.

Learn more: Series Regulator with adjustable output voltage

So what?

Here is a step by step to calculate this circuit.


When Vout = 10.3V
Get VB = 10.3V + 0.6V = 10.9V
Find RB = (12V – 10.9V)/1mA = 1.1K
Use RB = 1.2K


Some current of Vout is a bias current of Zener diode of 5mA. So, the current flows RA of 4mA.

VZD = 2.4V

It is a way to find RA = (10.3V – 2.4V)/ 4mA
Thus RA is about 2K

We will see that the bias current of Zener Diode is still of 5mA. Though Vout is lower than 10.3V.

Because… When Vout reduces. And the current of RA is lower, too. But the current of RB is more. So, the bias current Zener diode is 5mA.

Do you understand?


Then, set the current of RE is 2mA.
So, we can find RE = (2.4V + 0.6V)/2mA
Use RE is 1.5K


Vout = 3.1V
RV = (3.1V – 3V)/2mA = 50 ohms
Use 50 ohms

Vout = 5.5V
RV = (5.5V – 3V)/2mA = 1.25K
Use 1.2K

Vout = 10.3V
RV = (10.3V – 3V)/2mA = 3.65K
Use 2.7K and 1K in series

Then, we merge all parts together to become complete circuits below.

Circuit diagram of constant voltage  and current nicd battery charger

We add LED1 to show circuit power on. And R8 is limiting the current resistor of LED1.

Plus we add an ammeter to indicate current charging into the battery. In first it read high current. But when the battery is full we read it is zero.

We can select the voltage to charge the battery by SW1.

Read before make

I publish this circuit. Because of the benefits of calculating the power supply circuit. But I never tried it at all. So I can’t confirm that Is it works? I sincerely apologize.

It is perfect for those who like to experiment with simple circuits. Even if there is a mistake. It’s fun and challenging. with solving problems.

Parts you will need

0.25W Resistors, tolerance: 5%

  • R1: 1.2K
  • R2: 2K
  • R3: 1.5K
  • R4: 50Ω
  • R5: 1.2K
  • R6: 1K
  • R7: 2.7K
  • R8: 470Ω
  • R9: 27Ω
  • R10: 5Ω

Electrolytic Capacitors

C1: 220µF  25V


  • D1,D2: 1N4001, 50V 1A Diodes
  • D3: Zener Diode 2.4V 0.5W
  • LED1: LED
  • Q1,Q2: 2SC1815, 45V 100mA NPN Transistors
  • IC1: LM317 voltage regulator IC


  • T1: Transformer 9-0-9, 300mA
  • Meter
  • Switch 3 selector
  • Wires, AC main, battery holder, and more

How to build

Since this project has quite fewer parts. So, we may assemble them on the universal PCB or perforated board. You should check diagram well before charges the battery.

Now I add The copper PCB layout and the components layout.
Though this circuit very old or very ancient. But still useful.

However, if this error please tell me.

See: LM317K pinout

The actual-size of Single-sided Copper PCB layout
At 200 pixel per inchs.

component layout of universal Battery Charger
The Component layout of the Universal Battery Charger

Not only that you may like these projects

Related Posts


I always try to make Electronics Learning Easy.


  1. Leon

    I am a big fan of your site, but that last time there are more and more errors (mistakes) in your circuitry. these charger circuits take the cake on that…..

    LM317T Contant current and NiCd charger circuits;

    A lot of errors damn!
    circuit 2 ; + therminal of C1 bufferelco should be connected to the both cathodes of D1 and D2. Then the center tap CT should be connected to GND..

    circuit 3 ; R6 and R7 should be connected to GND and not to the +….current flows out of the base of the PNP transistor Q2

    circuit 3 with LM317 ; the diode D2 is shorted…take a look the line after the one that connects D1 with D2 should be removed.So that the tap 0V (center tap) is connected to the elco C1. next resistors are forgotten at the switch S1 5,5V and 10,3V settings…the are non now….so output is about 3V nou.
    And the LM317 with resistor as current source take up 3V + 1.25V +(300mA x 5 Ohm) is 4.25V+1.5V=5.75V drop….so the batt get NOTHING and will not charge! That LM317T circuit should be placed between the buffer elco C1 and transistor Q1. So to charge even the 9.6V batt. the raw voltage at the rectifier sould al least be 10.3V+5.75V=16.05V
    trafo 9V gives only squar root of 2×9 = 1.414=12.72V !!! So the trafo must at least be 12V AC.

  2. Jack

    Re: Nicad Battery Charger by IC LM317T.
    Nicad/NiMh batteries require approx 1.65V/cell for charging. So for 2 cells you require close to 3.3V at the battery. Then you need about 1.5V for the LM317 to work as per spec. So the input voltage to the LM317 should be 3.3+1.5 = 4.8V. Then remove R7 which messes up the whole circuit.
    The Vref in the LM317 is 1.25V. So if you want 50mA then 1.25V/.05A = 25 Ohms. 24.9 Ohms for R6 is close to that. With 27 Ohms you get near enough 46mA. Next is the “4.8V” which I am assuming is for 4 cells i.e. 6.6V and for 8 cells is 13.2V at the battery terminal. Your reference is 3.1 at the base of Q2. So in place of R3 you need 820 Ohms; in the line marked 5.5V you need a resistor 2400 Ohms and in the one marked 10.3V you need 5600 Ohms.
    This will make the circuit work forever and perfectly. By the way instead of all those parts Q1, Q2 etc why not use another LM317 with biasing resistors to give you the voltages as follows: 4.8V; 6.6+1.5 = 8.1V and 13.2+1.5=14.7V. less parts and more robust. The reference voltage in the LM317 is much better that the Zener diode and the base-emitter junction you presently have.
    and yes Leon is right: the trfo diodes are shorted. u need to remove the line from D1 to GND and I did not calculate the input voltage to the circuit.

  3. By the way, I think 27 Ohms is correct because the LM317 also supplies some current which I did not take into consideration. The reference voltage made up of the ZD1 and the Vbe of Q2 is good enough for a battery charger. However, if you put the voltage feedback lines from S2 instead of some internal voltage then you have better control of the battery voltages, and you do not need S1. So your feedback resistors will be 96 Ohms instead of R3; and the other two resistors will be nearest value to 1694 Ohms and the one for 13.2V will be nearest value 4.9K Ohms.

  4. J.Richert

    Is the schematic now updated with the corrections?

  5. zala

    is this circuit now updated to corrected one ?

  6. riadh

    pleae submit the updated ciruit thanks a lot

  7. The Parts list for resistors you provide for the final circuit needs to be addressed as it does not link to the circuit presented. It creates confusion and a point of error for anyone who might build this! Fortunately I realized it before I started building.
    Here is how it should list the Resistors
    R1: 1.8K – correct
    R2: 2K – correct
    R3.1: 50Ω – should read R4
    R3.2: 1.2K – should read R5
    R3.3: 2.7K – should read R7
    R3.4: 1K – should read R6
    R4: 1.5K – should read R3
    R5: 470Ω – should read R8
    R6: 27Ω – should read R9
    R7: 5Ω – should read R10
    I see you updated this page March 27, 2020 May I suggest you look at updating it again.

    • I thank you very much. You are a very observant person. I have already updated this article. I believe that you must be a great electronician and will definitely enjoy creating electronics. I hope you will review my other articles.
      Note: I use google translated for this. If it doesn’t understand. It’s not because of this tool. It is because I am developing my own English.

  8. SER

    You’d made so many mistakes/errors in the circuit design it’s hard to believe you ‘graduated with a High Vocational Certificate in Electronics’.

    • Hi SER,

      Thank you so much. You are correct. The circuit has too many mistakes. I do not design this circuit and others.

      I promise to improve and learn more. It’s good to share/spread what you know to your friends for further study/experiment. Many people have discovered new things that they have wanted to learn for a long time.

      Your message is great. It was a motivating force for me to develop myself even more.

      My mother always said that a good friend is one who always encourages us to improve.

      We can be friends now, right?

      thank you again
      Have a great day.


  9. ser

    I did not mean to insult you or something. My question was REAL. I just wanted to know – nothing else. I got nothing against you as a person.
    I was just wondering.

    • Hi, friend
      I don’t feel you really look down on me.
      I feel good about your question.

      I should increase my learning skills. Something I forgot. Something I still misunderstood. Or still don’t understand. I believe that we can keep improving ourselves. It’s important to know your own mistakes.

      Yes, I feel it with my heart. You have good intentions. You are not against me at all. I feel positive from your observations. 🙂

      For this article, there are several mistakes. And when I’m free, I will try this circuit myself again.

      Have a great day.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.