Home » Battery Chargers » 3 Step Automatic Battery Charger/Controller Circuit
3 Step Automatic Battery Charger/Controller Circuit

3 Step Automatic Battery Charger/Controller Circuit

Generally it is noticed that while charging batteries people hardly pay any special attention toward the procedures. For them charging a battery is simply connecting any DC supply with matching voltage with the battery terminals.

How to Correctly Charge a Lead Acid Battery

I have seen motor garage mechanics charge all types of batteries with the same power supply source irrespective of the AH rating associated with the particular batteries.

That's gravely wrong! That's like giving the batteries a slow "death". Lead Acid batteries to a very extent are rugged and are capable of taking on the crude charging methods, however it's always recommended to charge even the LA batteries with a lot care. This "care" will not only increase the longevity but will also enhance the efficiency of the unit.

Ideally all batteries should be charged in a step wise manner, meaning the current should be reduced in steps as the voltage nears the "full charge" value.

For a typical Lead Acid battery or an SMF/VRL battery the above approach can be considered very healthy and a reliable method. In this post we are discussing one such automatic step battery charger circuit which can be effectively used for charging most of the rechargeable types of batteries.

How the Circuit Functions

Referring to the circuit diagram below, two 741 ICs are configured as comparaters. The presets at pin#2 of each stage is adjusted such that the output goes high after specific voltage levels are identified, or in other words the outputs of the respective ICs are made to go high in sequence after predetermined charge levels are accomplished discretely over the connected battery.

The IC associated with RL1 is the one which conducts first, after say the battery voltage reaches around 13.5V, until this point the battery is charged with the maximum specified current (determined by the value of R1).

Once the charge reaches the above value, RL#1 operates, disconnect R1 and connects R2 in line with the circuit.

R2 is selected higher than R1 and is appropriately calculated to provide a reduced charging current to the battery.

Once the battery terminals reaches the maximum specified charging voltage say at 14.3V, Opamp supporting RL#2 triggers the relay.

RL#2 instantly connects R3 in series with R2 bringing down the current to a trickle charge level.

Resistors R1, R2, and R3 along with the transistor and the IC LM338 forms a current regulator stage, where the value of the resistors determines the maximum allowable current limit to the battery, or the output of the IC LM338.

At this point the battery may be left unattended for many hours, yet the charge level remains perfectly safe, intact and in a topped up condition.

The above 3 step charging process ensures a very efficient way of charging resulting in almost a 98% charge accumulation with the connected battery.

The circuit has been designed by "Swagatam"

  1. R1 = 0.6/ half battery AH
  2. R2 = 0.6/one fifth of battery AH
  3. R3 = 0.6/one 50th of battery AH.

A closer inspection of the above diagram reveals that during the period when the relay contacts are about to release or move from the N/C position might cause a momentary diconnection of the ground to the circuit which in turn migh result in a ringing effect on the relay operation.

The remedy is to connect the ground of the circuit directly with the bridge rectifier  ground and keep the ground from the R1/R2/R3 resistors attached solely with the battery negative. The corrected diagram may be witnessed below:

How to Set up the Circuit

Remember if you are using 741 IC then you must remove the red LED from the lower opamp and connect it in series with the base of the transistor to prevent permanent triggering of the transistor due to IC leakage current.

Do the same with the upper transistor base also, connect another LED there.

However if you use an LM358 IC then you may not have to this modification and use the design exactly as given.

Now let's learn how to set it up:

Initially keep the 470K feedback resistors disconnected.

Keep the slider of the presets towards ground line.

Now let's say we want the first relay RL#1 to operate at 13.5V, therefore adjust the LM338 pot to get 13.5V across the circuit supply line. Next, adjust the upper preset slowly until the relay just toggles ON.

Similarly, suppose we want the next transition to happen at 14.3V, ...increase the voltage to 14.3V by carefully adjusting the LM338 pot.

Then tweak the lower 10K preset such that RL#2 just clicks ON.

Done! your set up procedure is complete. Seal of the presets with some kind of glue to keep them fixed in the set positions.

Now you can attach a discharged battery to see the actions happening automatically as the battery charges with a 3 step mode.

The 470K feedback resistor can be actually eliminated and removed, instead you can connect a large value capacitor in the order of 1000uF/25V across the relay coils to restrict threshold chattering of the relay contacts.


About the Author

I am an electronic engineer (dipIETE ), hobbyist, inventor, schematic/PCB designer, manufacturer. I am also the founder of the website: https://www.homemade-circuits.com/, where I love sharing my innovative circuit ideas and tutorials. If you have any circuit related query, you may interact through comments, I'll be most happy to help!

228 thoughts on “3 Step Automatic Battery Charger/Controller Circuit”

  1. Hi, Swagatam

    I am electronic noob trying to learning more. Sorry that some questions might look stupid to you. I am having difficulty in understanding the role or transistor (BC547) in the LM338 side. What is it for? If it is on, doesn’t it short Vout of LM338 to ground via 240 R? Moreover, why do you have diode in parallel with relay, is it necessary?

    Thanks in advance

    • Hi electronic noob,
      Yes it will shut down the output when the current exceeds the set limit, and in this way it will keep limiting the current to the battery.
      The freewheeling diode is for shorting the dangerous back emf from the relay coil each time it’s switched OFF, and for safeguarding the driver transistor from this EMFs

      • Swagatam many thanks for quick response. If you don’t mind, I would like to ask few more questions regarding to the circuit.

        Is the current limit set by the value of R1? and i am not sure if i understand how to calculate correctly. So here it goes

        To calculate R1, you stated that R1 = 0.6/ half battery AH. If battery is 100 AH, R1 = 0.6/50 =0.012 ohm? can you explain where 0.6 come from? and What would be power rating for this R1?

        Really appreciate your time in teaching me.

        • Hi electronic noob,

          R1, R2, R3 are toggled sequentially by the op amp and the relays to regulate the current for the battery as the battery reaches toward the full limit.

          The 0.6 is the optimal switching voltage level of the BC547

          • Swagatam Thank you so much!!

            I understand, after reading through comments below, that this circuit is not really suitable for high AH battery. Actually, I am looking for a charger circuit that can fast charge lead acid battery with high AH. Do you think this circuit on your website (https://www.homemade-circuits.com/fast-battery-charger-circuit/) should work? If so, I will probably ask you several questions after I finish my reading on how the circuit works.

            Best regards

            • You are welcome e_n,

              yes the fast battery charger circuit can be used for charging high Ah batteries in 3 steps.

  2. Is there any proof you have that this circuit works , if so could you point me in the right direction ASAP!? thank you sir

    • I don’t have any proof, but I believe since it’s a simple and obvious design therefore will work without any doubts.

  3. Well done Swagtagam, I have a concern over best charging system, a friend bought a famous imported inverter but in 11months the 36v batteries went bad. They may have 3days or more uninterrupted power supply. What could be the cause of short life for battery because the charging has floating charging system as well.

    • Thanks Glory, it could be either because the battery was originally a bad quality one, or the charging current was too high throughout its operational period ultimately destroying the battery, with float charge functional a battery can never get damaged…it will need to be checked thoroughly

        • Good day sir, please what’s your view on fast charging at 5C and cut off immediately when full. Is it OK. Most chargers now are fast charger, even in smartphone.

            • Thanks so much for your reply. Please does inductive load current draw have SIGNIFICANT effects on lead acid battery as per the battery AH -short burst. How

            • It won’t have any effect on the battery but it can affect the mosfets or the sensitive electronic circuitry if the secondary section is not adequately snubbered

            • Thanks sir, I meant I have 100ah battery, the inductive draw is 25amps but continuous current draw is 7amps, won’t the 25amps drawn have effects because discharge should be 10C of the battery AH

            • Hi Glory, sorry I could not understand how can there be two consumptions separately, do you mean 25 amp peak and 7 amp RMS?

            • I have 1 electric car battery 12Ah, how to choose the voltage to charge it at first? Assuming I use 12vac transformer, how much should I adjust lm338 to voltage, and not use filter capacitor? thanks

            • Glory, the charging is relative to battery temperature, if you can keep it cool at 60Ah then it’s fine. So check the battery temperature while applying 60Ah if it heats up then it’s bad for your battery!

    • Hi Swagatam, please how can one know quality battery, a friend got, an expensive highly acclaimed good quality battery. It is already going bad in 1year

      • Hi Glory, there’s only one way of abusing and destroying battery life, it is by charging or discharging the battery with higher current than the recommended rate, so make sure the rating is never exceeded and your battery will live long.

        • A very good method how to destroy a lead-acid batteri is to leave it (deep) discharged.
          A flooded (or SLA) battery should always be stored fullt charged..

    • Hi Swag, well done sir, please how can I build this circuit for my inverter/charger system. The inverter changes to charger when there is utility. Or any simple way.

        • Sir, do you mean the inverter can not be automatic in changing from inverter to charger. I think The positive and negative line on the battery with this circuit serve for inverter during changeover. I see the the relays, how can it be compatible with inverter at same time.

          • Glory, the relays in the above diagram has nothing to do with the changeover. I am not sure about your changeover circuit but I can suggest a separate method.

            You will have to use another relay. Break the connection between LM338/240 ohm junction and the battery positive. Connect the pole of the relay with the battery positive, N/C with the inverter positive and the N/O with the LM338’s 240 ohm junction. Connect one end of the relay coil with its N/O and the other with the bridge rectifier ground. Connect the common battery ground line with the inverter ground.

          • connecting capacitor across base/emitter of the BC547 will definitely prevent relay chattering, try increasing the value to 100uF…also the 470K should latch the relay, once the relay switches ON, decrease the 470k to 100K for quicker latching…another option to ensure perfect relay operation is to add a 10uF or similar capacitor across pin#3 and ground of the op amps.

  4. Hi Swagatam , You always publish useful posts . Doing a great job everytime .
    My query was between battery charger using pwm is better or the circuit above . which will yield more battery life .

    • Thank you Nikhil,

      The above charger will help to charge a lead acid battery relatively quickly and also maintain a reasonably good life, however charging a battery at a faster rate is never good no matter what technique is used. If long battery life is the main priority then a battery must be always charged at the lowest possible amp rate and for maximum possible time.

      Using PWM will prolong the charging time, a continuous DC is a better option, PWM may be useful for preventing sulfation in a battery, in that sense it can be useful

      • One more question , I am using this charger circuit for my UPS , so can I use the same transformer for inverter when mains are not available (primary 24v to 230v step up) and for charging when mains are available (secondary 230v to primary 24v step down) . I am using H bridge configuration for onverter section .
        Please help me with this I am stuck at this question .

      • Thanks for the enlightenment, I have this questions.
        1. Long battery life is my top priority. Please more information on this. What’s the lowest possible current and voltage for this priority.
        2. Between the above circuit and auto-cutoff circuit which is better to achieve this priority.

        • You can charge your battery with a current equal to 1/10th of its Ah rating for 12 hours manually, or if an automatic cut off is used set its cut off voltage at 17% higher than the printed voltage value of the battery, current should be always 1/10th of the Ah

          You can just follow the above and achieve an ideal battery charging prcedure

          • Thanks sir, I made a normal charger with trafo and rectifier, I checked the rectified voltage after filtering with my inverter it showed 21v but with the ac mains it was 14v.
            2. How can I check the voltage with my inverter accurately

            • Tolu,

              the AC voltage that you are seeing is the average voltage or the RMS voltage, after rectification it becomes DC and due to the capacitor storing voltage and discharging during OFF time of the AC cycles, you are able to see the peak voltage.
              The formula for converting RMS to peak is root2 x AC voltage
              therefore 1.41 x 14 = 19.74 (not 21V)

              therefore at 14V AC you might see around 20V in your meter.

              to charge a 12V battery you can use a 0-12V transformer which would enable you to get 1.41 x 12 = 16.92V ,and this can be used for charging your 12V battery if an auto cut off is included in the charger

            • Well done sir,for my inverter-charger as the battery is getting full, the charging current steps down to zero without any automatic charging circuit added, trafo just connected to mosfet with rectifier diode.what phenomenon is that. Please explain

            • Tolu, all batteries will restrict charging as soon as the set maximum set voltage is reached, meaning when the terminal voltage of battery becomes equal to the charger’s maximum set voltage the pressure becomes zero, and no current is able to push. As long as this level is slightly lower than the full charge level of the battery it is fine, otherwise an auto cut-of must be employed

            • Thanks for the quick reply, does it mean the charging voltage should not be set at high level of 14.4v, or what voltage charging level do you advise for battery safety.

            • if you have an auto cut off feature with your charger or if you are sure to remove the battery manually after the 14.4V is reached then it is OK, otherwise not

            • Good day sir, is it possible to remove lm338 completely and how can this be achieved, what is the disadvantage of this.thanks

            • Tolu, LM338 is responsible for controlling the current so removing it may not be possible, unless we replace with some other alternate current control option.

            • I have completed building the design, but so difficult to test if it is working, and difficult to set the charging parameters, please help out Sir.

            • Thanks so much for the update, as you mentioned can I just replace ic 741 with 358 with same circuitry.

            • LM358 has two opamps in it, please check the pinout diagram of the IC and replace the pins accordingly. The pinout diagram can be found in the datasheet of the IC

            • Thanks for your response, I use ic741
              1. Can I set it without a battery as load
              2.can I use it for a 6v battery any modification

            • It has to be set without a battery, if you connect battery it will give wrong results.
              yes any battery between 6V and 15V can be implemented using IC 741…no modifications are required

            • Thanks for your response, the led intensity connected to the transistor base varies as I vary the 10k preset for relay #1, but the relay doesn’t click and the collector does not trigger, it reads in millivolts, please any solution.

            • The LED should switch ON and OFF sharply, and not with dimming or fading effect, either your IC may be faulty or there could be some other fault in your circuit connections…It can be difficult for me to troubleshoot it from here

            • Yes, that was certainly how it did, the led light was on and went off sharply but the transistor collector reads in mV, and no trigger for the relay. Any reading on collector side.

            • connect an LED with 1K series resistor across collector of the transistor and positive line and check the response, if the LED does not switch ON OFF in response to preset variations then your transistor may be faulty or wrongly connected

            • The led in series with the collector comes on and goes off sharply in response to the preset but the led in series with the base goes off completely. Please more advice. Please what is the function of 4.7k preset.

            • If your collector LED is responding to preset adjustment then the opamp is working OK, now you must check why relay is not responding…

            • You said 741 ic can be used for voltages between 6v and 15v, I want to work with 24v battery how will do it. Thanks

            • Hello Swagtagam, with a charger made from trafo and rectifier, and charging current tends towards zero, you said an auto cut off should be added, please i want to ask will zero current with further charging still harm the battery.

            • Hello Tolu, yes it will harm due to continuous chemical reaction in the battery. However If you keep the overcharge voltage slightly lower the specified level then probably it won’t harm.

            • Tolu, Glory, favour, you can swap the input pin 3 and 2 with each other…the source and R3 will now connect with the positive, and drain/load with negative..

            • Tolu, please show me the link of the schematic I’ll try to guide you. Because opamp is used for cutting off supply at full charge, and current control is used for ensuring a safe charging for the battery as per its specification, so both elements work independently.

            • It’s a current controller circuit, the resistor is the sensor and the opamp is use a comparator for cutting off supply when the current exceeds the specified limit

            • Thanks so much, which resistor is the sensor.
              2. It is used for charging battery, which limit is exceeded sir, because it is used for trickle charge.

              3. How is it connected to relay to cut off charging

            • R3 is the sensor. When current exceeds, the voltage developed across R3 increases until the pin#2 potential goes above pin#3 reference level, causing pin#1 output to go low and cut off the mosfet. No relay is used her.

  5. can you please help me to know much details as my battery is 24 volt 18000mah battery which is used for a electric cart.can you please give a circuit for that as well as the components specification.

  6. Hi Swagatam, I’ve searching for a while a circuit like this (3 stage charger)and i found yours very interesting thanks for sharing your knowledge with us, God bless you!, I’m wondering if I could have a version of this circuit but using a lm317(i don’t have any lm338, and is very difficult to get in Cuba) for a >40AH batteries and if I could replace the lm741 with lM319 o lm318 instead, thanks very much for your quick reply….

    • Thanks dtorresreyes25,

      LM338 stage can be eliminated If the transformer is appropriately rated, and the supply can be directly connected to the shown circuit.

      LM317 cannot be used because it will restrict the current to 1.5 amps.

      yes, you can use single LM319 for the design instead of 2 LM741 ICs

    • Greetings my friend!, thanks so much for you quick reply,
      yes effectively I was thinking on using the LM317 with Outboard Current Boost Transistor Circuit ’cause
      my first battery to charge with this design will be a 12v40AH so I guess the 1/10th of battery total capacity current charge will be 4 amps and it exceed the actual
      capacity of 1.5 amps of LM317, but I wanted to know if I could use this 7812 configuration as you describe here -> https://homemade-circuits.com/2012/11/high-current-transistor-tip36-datasheet.html ???, so that I can keep with me the LM317 cause I’d like to use its regulator capacity in another project, so I’ve got two more questions for you:

      1- Why in R1 formula -> 0.6/ half battery AH , do you use the half battery capacity it shouldn’t use 1/10th battery AH?
      2- Somehow it could have a way of regulate the charge current rate when i’ll go to charge another batteries with diferent capacities or I have to recalculate the R’s every time for limiting charge current for each new battery AH capacity.

      • Thanks friend, yes you can use the 7812 configuration for your application, or a LM317 with a similar outboard transistor.

        In the 3 step charger, the initial current can be high, therefore R1 is calculated to provide 50% AH current.

        for different AH rating you will have to alter the resistor values accordingly, the same values will not work efficiently if the AH ratings differ widely.

  7. Hallo Swagatam sir,
    I'm interested in your multi stage circuit and i have doubt realted
    to filter capacitor design(1000uf).
    sir i used some calculation as below

    capacitance C = I * T/ delta V

    where i choose
    max load current, I = 5A
    time period ,T = 10ms (for bridge rectifire 1/f =100hz )

    for delta V,
    first ,peak voltage for 12v transformer
    = V rms *1.414 =12 *1.414 = 16.9v

    after rectifire drop out it become =16.9 – 1.4 = 15.6v

    and minimum voltage for 12v battery charging = 11v

    then delta V = 15.6 – 11 = 4.6v (max drop between peaks)

    so, C = 5 * .01 / 4.6 = about 10000uf
    if it is wrong, please help me for design ,Mohammed danish

  8. Dear Swagatam… Good Day!

    I'm still wondering the value of R1, R2 and R3. I have here 45 AH lead Acid Battery and wanna try this circuit. please do me a favor, what value then for R1, R2 and R3? Thanks in advance!


    • Dear Billa, the formula is explained in the article.

      for example the R1 formula is:

      R1 = 0.6/ half battery AH,

      for your case this can be solved as:

      R1 = 0.6 / half of 45AH

      = 0.6/22 = 0.027 ohm

      watts of this resistor wil be = 0.6 x 22 = 13.2 watts or 15 watts approximately

  9. Hi hello Mr swagatam. I feel sori for my last comment. That was wrong. I meant, the 10k potentiometer in pin no. 3, what is the voltage output and also the other 10k potentio? Thanks in advance mr swagatam

    • Hi Mark, the voltage at the relevant pin#3 should be just higher than the pin#2 reference voltages when the battery reaches the specified limits as per the user's preference….for example if the opamp needs the relay activation at battery 12.5V then the relevant preset should be adjusted such that at 12.5V the pin#3 voltage becomes just higher than the pin#2 voltage as set by the zener value

  10. Hi hello mr. Swagatam how are you?im back again..let me ask you. Can you give the exact setting of potentio from lm338 and potentio from relay 1 and potentio from relay2?thanks in advance

    • Hi Mark, that can be difficult and is not recommended, for perfect results the adjustments should be done and verified practically as explained in the article.

  11. Sir swagatam hi hello.. im back again..i almost finish my project..let me ask you sir.. what is tha maximum AH to charge this kind of circuit? Thanks sir swagatam in advance

    • Hi Mark, the AH capacity can be customized simply by modifying the current limiting resistors, the relay contacts, and the LM338 current delivering capacity…and you can virtually use any AH battery with it…the present set up will not allow you to charge over 50 AH battery

  12. Hi hello sir swagatam im here again..ask again.thank you..sir what is the best voltage regulator to use for 48V and also capabale of high ampere?

    • Hi Mark, I have suggested the link in the previous comment, you can use that circuit for your application, it will regulate the voltage as per the charge level of the battery and never allow over charge for the battery.

  13. Hi hello sir..im here again..can ask one more question? What if I will make a 48V charger with 365AH, what would be the IC needed to replace in order to have a capability to charge?
    And one more thing sir. What was that above of the R1 with two black dots opened? Thank you sir

  14. Sir swagatam pls.dont get tired replying us. We need you especially me still learning in electronics..thank you alot sir

  15. Hi hello sir swagatam.. im back to say thank you for your kind hearted..believe sir, you will reap what you sow..if you sow a good thing you will reap a good thing.. God bless you sir and your family

  16. Hi hello sir swagatam..can I ask you? Can I ask thhe example formula of R1, R2 AND R3 if I am making charger 48volts 200Ah? Sir thank you for this big help

    • Hi Mark, the formulas can be the same as given at the bottom section of the article:

      R1 = 0.6/50% of battery AH rating = 0.6/100

      R2 = 0.6/20% of the battery AH rating = 0.6/40

      R3 = 0.6/5% of the battery AH rating = 0.6/10

  17. Hi Swagatam,

    Can you show me the modifications of this circuit if i'm going to charge 300AH lead acid battery? Please help me. Please show me also necessary calculations.



    • Hi Jade,

      The relay contacts must be rated at over 40 amps in your case, and the relay driver transistors must be upgraded to 2N2222 or 8050… also the input current from the transformer to the circuit must be around 35 amps.

      Rest you will have do by yourself since I have elaborately explained the details in the article.

  18. Hello Mr. Swagatam,

    Thanks for the very fast reply. Let me verify if i understood it correctly
    R1 = 0.6/ half battery AH
    R2 = 0.6/one fifth of battery AH
    R3 = 0.6/one 50th of battery AH.

    if AH is 4.5
    R1 = 0R27
    R2 = 0R67
    R3 = 6R67.

    By the way sir, do you have any calculations for the exact preset values of all the variable resistors so it wouldn't be a waste of time tuning up.

    Does this circuit comes with an overdischarge protection sir?



    • Hello Jade,

      those values are arbitrarily chosen, you can change them differently for getting the most optimal charging results, although you can stick with the mentioned values to start with, later on you can alter the values with some trial and error.

      I cannot suggest fixed values and it will need to be confirmed manually…by the way the setting up procedure is a crucial part of the design..it cannot be considered a waste of time

      the circuit includes a trickle charging facility which stops it from self discharging

  19. Hello Swagatam,i am facing a problem with the the circuit above.
    instead of using lm338 iam preferring lm317 as the current requirement is low( for charging 5ah battery)each time i try to adjust 4.7k pot to regulate voltage it burns out .i have changed 6 lm317 so far.using 18v-700ma transformer with 50v,100mfd cap across bridge rectifier.
    could u pls help me finding out the bug.

    Thanks in advance


    • Hello Sandeep, there are two things that looks doubtful in your circuit. first is you might have connected the preset wrongly causing the the supply rails to short while adjusting it…secondly, LM317 have internal short circuit protection hence under any case it can never burn except until the input voltage is raised to above 40V.

      so it appears your IC could be duplicate, and/or your preset is not correctly wired. please check these again and do it only once you are absolutely sure about the procedures

    • Thanks for such a prompt reply Swagatam,
      as far as connection of preset is concerned it is ap per the schematics given in this article i.e pin-1 to adj of lm317,middle or pin 2 & 3 to ground.
      in order to protect the ic from damaging effect of filter cap i have used IN4007 across Vin-Vout-Vadj pins.
      the most surprising observation is that voltage regulation is perfect for 7-8 hrs & when the circuit is re powered; Vadj,Vout,Vinput readings become same.
      If 4.7k preset is turned at this state ..it simply starts burning.
      i also doubt genuineness of LM317 available here at rourkela,odisha @ Rs 10 per pc

    • Hi Sandeep,actually I thought you were referring to the opamp preset but anyway even it's the LM317 pot it should have no any effect of the IC no matter how its connected, so definitely its the IC that may be problematic…you can remove the diode across its output and input pins, its not essential and has nothing to do with the filter capacitor…the diode is required only if there's a situation were the output of the IC has a capacitor and the input of the IC is shorted with ground, which is mostly unlikely

    • …18V transformer will never produce 40V at any cost regardless of the filter capacitor….but if the trafo is rated at 24V then it could be an issue and must be verified with a meter….

  20. good day sir ! can i ask how to adjust the two 10k pot on the op amp? what is the proper settings? thanks!

    • Hi Tulisan, adjust the RL1 preset to activate the RL1 relay at around 13.5V, and adjust the RL2 preset to activate it around 14.3V

      this are for a 12V battery

    • operation of the two comparators. I mean, what voltages do they compare so we can get the output that will switch on the transistor?? Could you please explain to me precisely.

    • the tripping voltages can be approximately set, because it's not critical….RL1 may be set to activate at 13V or 13.5V, and RL2 at 14V or 14.3V.

      This might need to be done by using an actual discharged battery, and by setting as soon as the battery reaches the preferred voltage levels or by using some kind equivalently rated dummy loads

    • I read it, but I wanna know what voltages are compared. What's my reference voltage in this case? What adjustment should I make so that, relay one operates at say 12.8 volts and relay 2 at 13.3 volts?

    • the zener diodes determine the reference voltages and the 10k presets needs to be adjusted for setting up the triggering thresholds

    • Hallo Swagatam, that is a great idea!! I love it
      I'm using a 30Ah battery, is it wise to use a 2.5 Amps transformer? Also, can I use a less rated adjustable voltage regulator?
      I'm asking that, because I'm getting about 1.85 Amps (maximum current through resistor R1)

    • thanks luke, in the above concept for a 30ah battery minimum 5 to 8 amp transformer would be recommended…and same with the IC, it should be a LM338 so that 3 to 6 amps can be optimally produced for the various stepped charging phases

    • I have one last question, I've made the circuit and my output voltage from the regulator is 22.6 volts. Input voltage is 35.8 volts. How is this output connected to the relays, because I guess output voltage is too high and could cause damage?

    • you must adjust the output voltage to the charging level of the battery and the relay voltage rating should be selected to match approx this voltage level…

      the voltage can be adjusted by varying the the 4k7 pot (use 10K pot instead for a wider range)

    • Hallo sir, I have one more question.
      After putting up the circuit, I've realised that the voltage output to the battery gradually reduces from 14 volts down to 12 volts. What could be the posible cause for that?

    • I realised the voltage drops after connecting the relay circuit to the output of my regulator. Also, I've found out that the output of the comparators ain't high to turn on the bc 547 i.e. when varying the voltages to pin 3

    • Thank you so much Swagatam.
      At last, I managed to build a small battery charger for myself using your designed circuit.
      I would like to point out something, that it may require some advancement particularly, it should have a different signals to show connection of the battery to the circuit and also be able to indicate power supply. I mean, I noted that it was giving out the same signal either when power or battery is connected.

    • hello Luke, something is wrong in your circuit, when you connect the battery to the 14V output, initially the 14v should drop to the discharged battery's voltage level but once the battery begins getting charged this voltage should gradually rise and finally attain the 14V mark at full charge level.

    • remove the 470k while setting up the 10k persets of the opamps….connect it back once the setting up is completed….the setting should be done by connecting dummy loads selected to consume different current levels just as the battery would do.

    • Hi Luke, by "signals" do you mean to say LED indicators? OK, I'll try to update the circuit with the LED indicators for the different changeovers during the charging process…

  21. Navjot, if you connect resistor with the ADJ pin, the whole circuit will become useless.

    I think the transistor that you are using is faulty, change the transistor with a good quality one and then check the response, or there could be some fault in your circuit connections.

  22. helo sir…
    thanku for your reply..
    sir when collector of transisitor connected with adj pin of regulator that time output goes low…
    but when i used a resistor of 120k between the collector and adj pin then output didnt gone low..
    is it ok or not?

  23. Please explain the entire procedure and the current voltage parameters that you have utilized for the circuit, what you are suggesting can happen in a condition where the transistor may be faulty or if the circuit is configured wrongly.

  24. hello navjot, it's the optimal base trigger level of the BC547 transistor, so when 0.6V is reached the BC547 can be expected to conduct fully and ground the ADJ pin of the IC LM338

  25. hello sir…..
    can you please tell me the meaning of .6 in the formula which we are using to find the value of resistors..?

  26. Hello navjot, the transistors are used for activating the relays in response to the different voltage levels during the charging process, no switch mode technology is used here.

  27. helo sir….
    can you please explain the purpose of transistor in this circuit??
    are we using as switch mode or any other?

  28. Hi Swagatam,

    As suggested i changed the resistor on R3 but notice RL2 switch before it reaches 14.3v, i have aligned RL2 for 14.3 v properly.
    when i checked voltage on LM324 VCC it was 14.3 and at battery it was 13.7. so as we have changed the circuit ground path to the output of transformer, thus the preset ground need to be changed?, i mean connecting the preset ground point to battery ground instead of transformer o/p as there is voltage difference cos of voltage drop on R3.
    one more thing i noticed on both relay its get little hot when when voltage is 13.5 and above is it fine or we need to add a 12v zener ?

    Thanks & Regards,

    • Hi Anandan, in that case you can simply readjust the preset such that RL2 cuts off when the battery terminal voltage reaches 14.3V, that would probably mean at 15v, or 15.2V on the circuit.

      relay getting warm is quite normal, you can try adding a 1N4007 diode in series with the relay coil to keep it cooler

  29. Hi Swagatam,

    I was monitor the battery charging and noticed when the voltage reaches 13.5v it switch the RL1 and when it reaches 14.3 volt it switch the RL2 but when the RL2 is trigger the battery voltage start dropping and the RL2 goes again in normal mode (N/C) which disconnect the R3 and this keeps happening in every minute frequently RL2 On & Off, is this the normal operation expected from this circuit or do we need to make any changes?

    Thanks & Regards.

    • Hi Anandan, it could be happening due to a relatively higher R3 value, try other lower values and check until you find the right value which is able to hold the voltage in that position for the battery.

  30. Hi Swagatam,

    I cut track and change the ground link to the input of LM338 on the rectifier side now alignment is working fine :).

    I will monitor the charging of the battery and update soon.

    Thanks again for helping me.


  31. Hi Swagatam,

    Thanks for reply.

    I have already tried putting a high value capacitor across the relay only changes it decreased the ringing frequency e.i if i put 100uf it switch on & off 5 time a sec and if i use 470uf it switch 2 time a sec but switching doesn't stop.

    Now i added 2.2uf cap on base of the relay transistor it started ringing very fast didn't solve the issue.

    I also noted while charging the battery through solar panel when it reaches 13.5 volt the RL1 start ringing for sum time like 8 to 10 switch On & Off and then come to normal possession.

    Thanks & Regards,

  32. Hi swagatam,
    I tried shorting the black dot and emitter it stopped ringing so i traced the R1, R2 & R3 it connected properly R1 to RL1 N/C point R2 to RL1 N/O point and R3 to RL2 N/O point also the continuity is proper but still RL2 ringing 🙁

    Correct me if i understood wrong when u said adjust the voltage to 13.5v and tune the preset does it mean adjust the LM338 output to 13.5v and tune the RL1 preset and then adjust the O/P to 14.5v and tune the RL2 preset ?

    Thanks & Regards,

    • Hi Anandan,

      yes, for setting up the thresholds the LM338 pot has to be used, so you got it right.

      If RL2 is ringing then RL1 should as well ring, so that's confusing, and adding a high value capacitor across the relay should have corrected the issue

      Try putting a capacitor across base and ground of each transistor, this should hopefully solve the issue.

      The value of the capacitor can be anything between 1uF and 4.7uF

    • …if the problem still persists then may be we'll have to change the relay contact configuration so that while the contacts operate the ground link to the circuit does not get disconnected even for a fraction of a second.

    • Hi Anandan, I think I have located the fault, the ground of the circuit needs to be connected separately to the main ground which comes from the rectifier.

      The ground link which terminates from R1/R2/R3 must go only to the battery negative.

      I'll update the new diagram soon.

  33. HI Swagatam,

    As per ur suggestion i tried adjusting the circuit but when i increase the voltage to 14.3v and try to adjust the RL2 preset its starts ringing on & off, i have also connected the capacitor on both relay 100uf 25v .
    kindly suggest what could be done.


    • Hi Anandan, that should not happen, check R1, R2, R3 connections and there continuity, or temporarily short the emitter base black dots of the BC547 associated with these resistors and adjust again, if the ringing stops would indicate a wrongly connected R1,R2,R3.

  34. hi sir, you are doing the wonderful job ,i really appreciate your knowledge and work .i could not understand the use of bc547 located just above the R1 .will this affect the circuit ???

    • thanks krishna, the indicated BC547 is responsible for interacting with the relay contact changeovers and implementing the subsequent current limiting actions….so in a way it's the heart of the entire design

  35. I want to charge a 12v battery using a car alternator (so 14.4v). Is this circuit worth modifying for that? or should I be looking for some other solution?

    • nothing will need to modified except the trafo which will have no role in your application…use a 10k pot instead of the shown 4k7 for setting up the LM338 voltage…

    • Thanks for the response. The datasheet for the LM338 says the dropout voltage is up to 3v, meaning the maximum output is somewhere around 11.4-12v for a 14.4v input, correct?

  36. Hi Swagatam,

    Thanks a lot for reply

    I will do the same as you have mention above and let u know the result. 🙂

    Thanks & Regards,

  37. Hi Swagatam,

    For alignment of the preset for RL1 & RL2 i connect the discharge battery and kept the both the relay in normally connected mode and as the battery reached 13.5v i align the preset so the RL1 get trigger and waited till the batter voltage reach 14v and aligned the preset for RL2 so it get trigger. Battery gt fully charged up to 14.4v 🙂 but after i discharged the battery and started charging back again the RL1 started ringing after the battery reached 13.5v 🙁 please correct me if i did any thing wrong.

    Thanks & Regards,

    • Hi Anandan, use the method as described in the previous comment for setting up the circuit and put a 100uF/25V across both the relay coils for eliminating the ringing sound.

  38. Hi Swagatam,

    Thanks for reply.

    I have designed PCB for this circuit and all component are on it i have put a fix resistor in place of 4.7k preset (2.2k & 330ohms in series) i get 14.5 v at LM338 output.
    Now i want to align the preset for RL1 & RL2, can u please explain in short how to align?

    Thanks & Regards,

    • Hi Anandan,

      Initially keep the 470k resistors disconnected, then feed 13.5V to the circuit and adjust the upper 10K preset such that the relay RL1 just actuates at around 13.5V

      Next, increase the volts to 14.3V and adjust the lower 10k preset such that the RL2 just activates at this volts.

      Now reconnect both the 470Ks, the setting is done.

      Do the above without connecting any battery.

    • Hi Anandan Devendran, sir can I have the PCB design you did of this circuirT? thanks for sharing it for all of us, have a good day!

  39. Hi Swagatam,

    Thanks for reply.
    Currently i am using LM338 but i noticed when the battery was fully discharged to 10.5 v
    and kept for charging even the LM338 on heat-sink was getting hot.
    I see most of the people using LM317 for 7ah battery, will LM317 work for charging the 7AH battery or do u recommend to use LM338 only.

    Thanks & Regards,

    • Hi Anandan,

      LM338 is rated to handle upto 5amps and LM317 only upto 1.5amps…so if LM338 is getting hot LM317 will be even hotter…moreover LM317 will allow charging at the rate of 1.5amp max, therefore LM338 looks much better than LM317

  40. Hi Swagatam,

    Thanks for the reply.

    I have 0.47 ohms resistor is it ok in place of 0.42 ohm for R2?

    I will be using solar panel instead of transformer which is rated 17volt 25watts, as i see in the above diagram trafo spec is 0-24v will the solar panel rated 17volt will work?

    Thanks & Regards

    • Hi Anandan,

      yes 0.47 will do, the values are not critical because the recommended charging phases are not critical either.

      17V will be enough to operate the proposed system…

  41. Hi Swagatam,

    I have assemble the above circuit, i am using 12v 7Ah battery. As per the above calculation for R1, R2 & R3 i am getting the (R1 value 0.17 Ohm). (R2 value 0.34 Ohm) & (R3 value 0.68 Ohm) please correct me if i am wrong in the calculation.

    Thanks & Regards

  42. Hi sir swatagam,
    is the circuit can be modify to charge a 12vdc 100ah deep cycle battery?
    if ok, please tell what are the modification should i do.
    thanks in advance.

  43. Hi, im interested in doing a simple project of controlling home electrical system fan, tube light through remote control. can you pls help me by your simple circuit diagram so that it is very helpful and easy for me to do.

  44. By the way, am I right to assume that the same formulas above are to be used in computing the R1, R2 and R3 Resistor values, i.e.

    R1 = 0.6/ half battery AH
    R2 = 0.6/one fifth of battery AH
    R3 = 0.6/one 50th of battery AH

    Again I thank you.

  45. Thank you very much much for your quick reply. I will now embark on building the charger.
    Your help is greatly appreciated

  46. Good evening, sir, and thanks a lot for this very educative blog.
    I would like to build a charger for a 12V-66AH Automotive battery based on the above schematic.
    I have done the following modifications:
    1. Replaced the LM338 with an LM196 Adjustable Voltage Regulator
    2. Replaced the 4no. Rectifier Diodes 6A4 with a single Bridge Rectifier KBU1000
    3. Installed a 10A05 Rectifier Diode across each of the Relay Coils
    Please advise me if there is anything else I may have overlooked.
    I thank you in advance.

  47. Sir a small request is there, please carry on reading…….

    Sir i am very much tired of searching for those low value resistors ( of the order of 0.01 ohm ) in the internet. I need some few of them, but all of the websites that i searched want me to buy an atleast quantity which is predetermined by them and at the highest rates i have to pay. If anyone is gonna make this circuit, they will probably meet this dilemma for higher values of battery Ah.
    SIR as per your design, the more higher the battery Ah, lower will be the resistance values ( R1, R2 and R3 ). So could you please suggest us a more better circuit utilizing almost all features of this one, but having no such low valued components included also having the feature of charging higer Ah batteries too.

    ( As per your previous reply to ma comment i will not get 0.01 ohm resistor with ten 1 ohm resistors. Please not it……. I will have to take hundred instead of ten. It will not be feasible sir )


    • I just forgot to tell you that LM338 wil not hold more than 5 amps, meaning more ta 50 AH batteries can't be charged with is circuit.

      A transistorized current controller can be replaced for LM338, but even it will require the same low value resistors.

      One solution is to use resistor divider network which will allow us to use higher value resistors.

      I'll try to update the article soon.

  48. Dear sir,
    Are those resistors marked as R1 to R3 are necessary in the circuit ? What are their real functions in this circuit ?
    The 0.01 ohm resistors are not at all available in our area. Can you please suggest me a website from which i can buy that in smalk quantity ?

    I am asking this because i have seen different types of this resistance in internet such as wirewound, thick film, current sense resistor, surface mount type etc. Which should i prefer most. Please help me

    • Dear Devraj,

      R1, R2, R3 determine and confirm the 3 step charging process, without them the circuit will lose its purpose.
      You can put 10nos 1 ohm 1/4 watt resistors in parallel for getting the 0.01 ohm value, by the way R1, R2, R3 will need to be calculated as per the battery being used….did you calculate them as per your battery specs, everything's comprehensively explained in the article, pls read it carefully.

    • But sir, one doubt whether power will get added on paralling those resistors. I mean whether i will get 2 or more wattage rate for the entire resistor bunk by placing them parallel. Anyway that is very crazy to have such a connection. Anyway i am going to order for 0.01 ohm 2W current sensing resistors. Will that enough ?

  49. Thank you sir for the advice. but a bit of confusion in it.
    I am using three 12 V 20 Ah lead accid batteries ( 12EC25L SEALED ZERO MAINTENANCE RECHARGEABLE BATTERIES ) in series which have been taken from my old electric scooter. As per your suggestion 60 Ah can't drow current beyond 10 A. Then how it is possible for the four 20 Ah batteries in the scooter can run a motor rated above 600 W ?

    • Is your scooter an electric bike? even if it's so if you check the current at any instant, it won't be above 6 to 10amps….the ideal rate of charging or discharging any lead acid battery is at 1/10th its AH rating…..you can draw higher currents from it, but that would only mean shorter backups from the battery. discharging current is inversely proportional to backup time

  50. Thank you sir for the advice. but a bit of confusion in it.
    I am using three 12 V 20 Ah lead accid batteries ( 12EC25L SEALED ZERO MAINTENANCE RECHARGEABLE BATTERIES ) in series which have been taken from my old electric scooter. As per your suggestion 60 Ah can't drow current beyond 10 A. Then how it is possible for the four 20 Ah batteries in the scooter can run a motor rated above 600 W ?

  51. Hai sir, I am a sound engineer working in malayalam film industry, but an electronics enthusiast too.
    It seems your project be very much helpfull to me in order to make my own inverter which is rated 300 w. but i have some doubts regarding the circuitry
    1) First of all i am asking you that, will there be any problem in using a 300 W 12-0-12 V transformer in the circuit since it produces much current (25 A) than that given in the schematic.

    2).' Installing a 60 Ah battery needs the addition of a TIP136 over LM338 '. I found this advice in this blog. So please help me to identify this modification correctly by providing me the schematic. Please help me quickly, becoz i am using three 12 V 20ah lead accid batteries in series…..

    3).Is there any other modifications needed for complete safeguarding of the battery??

    Reply me as earlier as possible to ma email id


    • Hi Arun,
      If you are referring to the above circuit you can replace LM338 with LM196 and upgrade the circuit to handle upto 10amps.

      Rest will remain as is, but the limiting resistors will need to be calculated and fixed appropriately.

    • Thank you very much sir for replying fast. I am now gonna take care of it. But a doubt still remains that whether the 60 Ah battery can run that much load ( 300 W ) in the inverter. If it can how much hours of back up will i get ?
      And using TIP36 over the LM316 means replacing the regulator ic 7812 of the battery charging circuit with TIP36 given in the link


      with the regulator ic LM196 ?

      And also i want to know whether 0.01 ohm with 5w is sufficient instead of a similar one with 2 W, becoz 5w resistors are only available in our area. Can you please suggest me a site to buy these cheep resistance online ?

    • Hi Arun,
      60 AH will not support 300 watts full load, the discharging rate should not exceed 10amps for a 60AH battery, meaning 10 x 12V = 120watts max.

      With LM196, TIP136 will not be required, just replace it with LM338 in the above step charger circuit, it will provide you with all the required protections and cut-offs.

  52. Hi! Sir. I have a 15v 5a transformer. I want to use this circuit for charge 12v 50ah car battery. Can you guide me which components should be replace.

Leave a Comment