Home » Battery Cut off Switch Diagrams » 5 Best 6v 4ah Automatic Battery Charger Circuits Using Relay and Mosfet
5 Best 6v 4ah Automatic Battery Charger Circuits Using Relay and Mosfet

5 Best 6v 4ah Automatic Battery Charger Circuits Using Relay and Mosfet

The following 5 versions of 6 volt 4 AH battery charger circuits has been designed by me and posted here in response to the request from Mr. Raja, let's learn the whole conversation.

Technical Specifications

"Dear sir, please post a circuit to charge 6 volt 3.5 ah lead acid battery from 12 volt battery. The charger should automatically stop charging as the battery is fully charged.

Please use transistor instead of relay to stop charging, and also tell me how to use 12 volt relay for the same circuit.

Explain Which is safe and durable either relay or transistor to cut off charging. (At present i am charging my above said battery by simply using LM317 with 220 ohm and 1 kilo ohm resistors and a couple of capacitor) i'm awaiting your article, thank you".

The Design

The following circuit shows a simple automatic 6 volt 4 to 10 AH battery charger circuit using a 12 volt relay, designed to automatically cut off the supply to the battery as soon as the ful charge level for the battery is reached.

How it Works

Assuming no battery is connected with the circuit, when power is switched ON, the relay contact will be at the N/C and no power will be able to reach the IC 741 circuit.

Now when battery is connected, the supply from the battery will actuate the circuit, and assuming the battery to be in a discharged state, pin#2 will be lower than pin#3 causing a high at pin#6 of the IC. This will switch ON the transistor relay driver, which in turn will shift the relay contact from N/C to N/O connecting the charging supply with the battery.

The battery will now begin charging slowly and as soon a its terminals reaches at 7V, pin#2 will tend to become higher than pin#3, causing pin#6 of the IC to become low, switching OFF the relay and cutting off supply to the battery.

The existing low at pin#6 will also cause pin#3 to become permanently low through the linked 1N4148 diode, and thus the system will be latched, until power is switched OFF and ON again.

If you don't wish to have this latching arrangement, you can very well eliminate the 1N4148 feedback diode.

Note: The LED indicator section for all 3 following diagrams were recently modified after a practical testing and confirmation


6V automatic charger circuit

The following circuit shows a simple automatic 6 volt 4 AH battery charger circuit without using a relay, rather directly through a transistor, you can replace the BJT with a mosfet also to enable high Ah level charging also.



The above transistorized 6V charger circuit has a mistake. At the full-charge level as soon as the battery negative is cut-off by the TIP122, this negative from the battery is also cut-off for the IC 741 circuit.

This implies that now the IC 741 is unable to monitor the discharging process of the battery, and will be unable to restore the battery charging when the battery reaches the lower discharge threshold?

To correct this we need to make sure that at the full-charge level, the battery negative is only cut-off from the supply line, and not from the IC 741 circuit line.

The following circuit corrects this flaw and makes sure that the IC741 is able to monitor and keep track of the battery health continuously under all circumstances.

How to Set Up the Circuit

Initially, keep the pin6 feedback resistor disconnected and without connecting any battery adjust R2 to get exactly 7.2V across the output of the LM317, for the IC741 circuit.

Now simply play with the 10k preset and identify a position where the LEDs just flip/flop or change or swap their illumination.

This position within the preset adjustment may be considered as the cut-off or the threshold point.

Carefully adjust it to a point at which the RED LED in the first circuit just lights up......but for the second circuit it should be the green LED that is supposed to get illuminated.

The cut-off point is now set for the circuit, seal the preset in this position and reconnect the pin6 resistor across the shown points.

Your circuit is now set for charging any 6V 4 AH battery or other similar batteries with an automatic cut-off feature as soon as or each time the battery becomes fully charged at the above set 7.2V.

Both the above circuits will perform equally well, however the upper circuit can be altered to handle high currents even up to 100 and 200 AH just by modifying the IC and the relay. The lower circuit may be made to do this only up to a certain limit, may be up to 30 A or so.

The second circuit from above was successfully built and tested by Dipto who is an avid reader of this blog, the submitted images of the 6V solar charger prototype can be witnessed below:

6V, 4ah battery charger prototype breadboard image

Adding a Current Control:

An automatic current control regulator function can be added with the above shown designs by simply introducing a BC547 circuit as shown in the following diagram:


The current sensing resistor can be calculated through the simple Ohm's law formula:

Rx = 0.6 / Max charging current

Here 0.6V refers to the triggering voltage of the left side BC547 transistor while max charging current signifies the maximum safe charging for the battery, which may be 400mA for a 4AH lead acid battery.

Therefore solving the above formula gives us:

Rx = 0.6 / 0.4 = 0.24 Ohms.

By adding this resistor will ensure that the charging rate is fully controlled and it is never exceeded the specified safe charging current limit.

Test Report Video Clip:

The following video clip shows the testing of the above automatic charger circuit in real time. Since I did not have a 6V battery, I tested the design on a 12V battery, which does not make any difference, and its all about setting the preset accordingly for the 6V or a 12V battery as per user preference. The above shown circuit configuration was not changed in any manner.

The circuit was set to cut off at 13.46V, which was selected as the full charge cut off level. This was done to save time because the actual recommended value of 14.3V could have taken lot of time, therefore to make it quickly I selected 13.46V as the high cut off threshold.

However one point to be noted is that the feedback resistor was not employed here, and the lower threshold activation was automatically implemented at 12.77V by the circuit, as per the IC 741's natural hysteresis property.

6V Charger Design#2

Here's another simple yet accurate automatic, regulated 6V lead acid battery charger circuit which switches off the current to the battery as soon as the battery reaches full charge. An illuminated LED at the output indicates the fully charged condition of the battery.

How it Works

The CIRCUIT DIAGRAM can be understood with the the following points:

Fundamentally the voltage control  and regulation is done by the versatile, work horse IC LM 338.

An input DC supply volt in the range of 30 is applied to the input of the IC. The voltage may be derived from a transformer, bridge and capacitor network.

The value of R2 is set to get the required output voltage, depending upon the battery voltage to be charged.

If a 6 volt battery needs to charged, R2 is selected to produce a voltage of around 7 volts at the output, for a 12 volt battery it becomes 14 volts and for a 24 volt battery, the setting is done at around 28 volts.

The above settings take care of the voltage that needs to be applied to the battery under charge, however the tripping voltage or the voltage at which the circuit should cut off is set by adjusting the 10 K pot or preset.

The 10K preset is associated with the circuit involving the IC 741 which is basically configured as a comparator.

The inverting input of the IC 741 is clamped at a fixed reference voltage of 6 via a 10K resistor.

With reference to this voltage the tripping point is set via the 10 K preset connected across the non inverting input of the IC.

The output supply from the IC LM 338 goes to the battery positive for charging it. This voltage also acts as the sensing as well as the operating voltage for the IC 741.

As per the setting of the 10 K preset when the battery voltage during the charging process reaches or crosses the threshold, the output of the IC 741 goes high.

The voltage passes through the LED and reaches the base of the transistor which in turn conducts and switches off the IC LM 338.

The supply to the battery is immediately cut off.

The illuminated LED indicates the charged condition of the connected battery.


This automatic battery charger circuit can be used for charging all lead acid or SMF batteries having voltages in between 3 and 24 volts.

The above circuit was found not so satisfactory by some of the readers, so I have modified the above circuit for a better and guaranteed functioning. Kindly see the modified design in the below given figure.

PCB Design for the above finalized 6V, 12V, 24V automatic battery charger circuit

Solar 6V Battery Charger Circuit with Over Current Protection

So far we learned how to a simple 6V battery charger circuit with over current protection using mains input. In the following discussion we will try to understand how the same could be configured in conjunction with a solar panel, and also with an AC/DC adapter input.

The circuit also includes a 4 stage battery status indication feature, an over current controller stage, automatic switch OFF for the load and battery charging, and also a separate cell phone charging outlet. The idea was requested by Mr. Bhushan Trivedi.

Technical Specifications

Greetings, I trust you are well. I am Bhushan, and I am working on a hobby project currently. I am very impressed by the knowledge you share at your blog, and was hoping if you would like to guide me a bit with my project.

My project is around charging a 6V 4.5 Ah sealed battery with grid and solar panel.

This battery will supply power to led lights and a mobile phone charging point. Actually, the battery will be kept in a box. and box will have two inputs for battery charging. These two inputs are solar (9V) and AC (230V) for charging the 6V Battery.

There will not be any automatic switchover. Its like the user has an an option to either charge the battery from solar or grid. but both the input options shall be available.

For example, if on a rainy day or for some reason the battery can't be charged from a solar panel, then grid charging should be done.

So I am looking for an option of both the inputs to the battery. Nothing automatic hereThe battery level indicator LED should indicate in red yellow and green on the battery level.

Automatic battery cut off after voltage goes down certain limits to ensure long battery life. I am attaching a short problem statement along this email for your reference.

I am looking for a circuit for the arrangement shown in it. I am keen to hear from you on this

Kind Regards,


The 5th Design

The required 6V solar battery charger circuit can be witnessed in the diagram presented below.

Referring to the diagram, the various stages may be understood with the help of the following points:

The IC LM317 which is a standard voltage regulator IC is configured to produce a fixed 7V output determined by the resistances 120 ohms and 560 ohms.

The BC547 transistor and its base 1 ohm resistor ensure that the charging current to the 6V/4.5AH battery never exceeds the optimal 500mA mark.

The output of the LM317 stage is directly connected with the 6V battery for the intended charging of the battery.

The input to this IC is selectable via a SPDT switch, either from the given solar panel or from an AC/DC adapter unit, depending whether the solar panel is producing sufficient voltage or not, which could be monitored through a voltmeter connected across the output pins of the LM317 IC.

The four opamps from the IC LM324 which is a quad opamp in one package are wired up as voltage comparators and produce a visual indications for the various voltage levels at any instant, during the charging process or during the discharging process through the connected LEd panel or any other load.

All the inverting inputs of the opamps are clamped to a fixed reference of 3V through the relevant zener diode.

The non-inverting inputs of the opamps are individually attached to presets which are appropriately set to respond to the relevant voltage levels by making their outputs high sequentially.

The indications for the same could be monitored via the connected colored LEDs.

The yellow LED associated with A2 may be set for indicating the low voltage cut-off threshold. When this LED shuts off (white lights up), the transistor TIP122 is inhibited from conducting and cuts off the supply to the load, thereby ensuring that the battery is never allowed to discharge to dangerous unrecoverable limits.

A4 LED indicates the upper full charge level of the battery....this output could be fed to the base of the LM317 transistor in order to cut-off the charging voltage to the battery preventing overcharging (optional).

Please note that since the A2/A4 do not have hysteresis included could produce oscillations at the cut-off thresholds, which won't necessarily be an issue or affect the battery performance or life.


Adding an Auto-cut OFF on Batery Battery Full Charge

The modified diagram with over charge auto-cut of can be implemented by connecting A4 output with the BC547.

But now the current limiting resistor formula will be as follows:

R = 0.6 + 0.6 / max charge current

Feedback from Mr. Bhushan

Thank you very much for your continued support and the above circuit designs.

I have a few minor changes to the design now, which I would like to request you for incorporating in the circuit design.  I would like to express that cost of the PCB and components is a big concern, but I do understand quality is also very important.

Hence, I request you to strike a fine balance between the performance and cost of this circuit. So to begin with, we have this BOX, in which will house the 6V 4.5 Ah SMF Lead Acid Battery and the PCB too.

The 6V 4.5 Ah Battery will be charged either through the followingn options from one single input:

a) A 230 V AC to 9V DC Adaptor (I wish to go ahead with a 1 amp rating charger, your views?) ‘OR’

b) A 3-5 Watt Solar module (Max Voltage: 9 V (6V nominal), Max Current: 0.4 to 0.5 Amps)

Block Diagram

The battery can be charged by only one supply at a time hence will only have one input on the left side of the box.

For the time when this battery is being charged, there will be small red led light which glows on the font face of the box (Battery Charging Indicator in diagram) Now, at this point, the system should also have a battery level indicator (Battery level Indicator in diagram)

I wish to have three levels of indications for the battery state. These tables state the open circuit voltage. Now with the very little electronic knowledge I have, I am assuming this is ideal voltage and not the actual conditions, right?

I think I will leave that on you to decide and use any correction factors if required for calculations.

I wish to have the following indicator levels:

  1. Charge level 100% to 65% = Small Green LED is ON (Yellow and Red LED off)
  2. Charge level 40% to 65% = Small Yellow LED is ON (Green and Red LED off)
  3. Charge level 20% to 40% = Small Red LED is ON (Green and Yellow LED off)
  4. At 20% Charge level, battery disconnects and stops supplying output power.

On the Output side now (Right Side View in diagram)

The system will supply power to the following applications:

a) 1 Watt, 6V DC LED Bulb – 3 No’s

b) One output for Mobile Phone Charging I wish to incorporate a feature here. As you see, the DC loads connected to the battery are of relatively less wattage. (just a mobile phone and three 1 watt LED Bulbs). Now, the feature to be added in the circuit should kind of work as a fuse ( I don’t mean an actual fuse here).

Assume if a CFL bulb is connected here or some other application of higher wattage rating, power supply should be cut off. If the total power drawn is in excess of 7.5 Watts DC connected to this system, the system should cut off supply and shall only resume when the load is below 7.5 Watts.

I basically wish to ensure that this system is not misused or drawn excessive energy from, thereby damaging the battery.

This is just an idea. I do however understand this can potentially increase the complexity and cost of the circuit. I will look for your recommendation on this on whether to include this feature or no as we already are cutting off the battery supply once the state of charge reaches 20%.

I hope you find this project exciting to work on. I look forward to receiving your much valued inputs on this.

I am thanking you for all your help till now and in advance for your extended cooperation on this.

Kind Regards,


The Design

Here's a brief explanation of the various stages included in the proposed 6V battery charger circuit with over current protection:

The left side LM317 is responsible for producing a fixed 7.6V charging voltage across its output pin and ground for the battery, which drops to around 7V via D3 to become an optimal level for the battery.

This voltage is determined by the associated 610 ohm resistor, this value can be reduced or increased for changing the output voltage proportionately if required.

The associated 1 ohm resistor and the BC547 restricts the charging current to around a safe 600mA for the battery.

The opamps A1---A4 are all identical and perform the function of voltage comparators. As per the rules if the voltage at their pin3 exceeds the level at pin2, the corresponding outputs become high or at the supply level..... and vice versa.

The associated presets may be set for enabling the opamps to sense any desired level at their pin3 and make their corresponding outputs go high (as explained above), thus A1 preset is set such that its output becomes high at 5V (Charge level 20% to 40%)....A2 preset is set to respond with an output high at 5.5V (Charge level 40% to 65%), while A3 triggers with a high output at 6.5V (80%), and finally A4 alarms the owner with the blue LED at battery level reaching the 7.2V mark (100% charged).

At this point the input power will need to be switched off manually since you did not demand for an automatic action.

Once the input is switched off, the 6v battery level sustains the above positions for the opamps, while the output from A2 ensures that the TIP122 conducts keeping the relevant loads connected with the battery and operative.

The LM317 stage at the right is a current controller stage which has been rigged to restrict the output amp consumption to 1.2 amps or around 7 watts as per the requirements. The 0.75 ohm resistor may be varied for altering the restriction levels.

The next 7805 IC stage is a separate inclusion which generates a suitable voltage/current level for charging standard cell phones.

Now, as power is consumed the battery level begins receding in the opposite direction, which are indicated by the relevant LEDs....

Blue is the first one to shut off illuminating the green LEd, which shuts off off below 6.5V illuminating the yellow LEd which identically shuts off at 5.9V making sure that now the TIP122 no longer conducts and the loads are shut off....

But here the condition may oscillate for some moment until the voltage finally reaches below 5.5V illuminating the white LEd and alarming the user for an input power switch on and commence the charging procedure.

The above concept can be further improved by adding an automatic full charge cut off facility, as shown below:


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!

214 thoughts on “5 Best 6v 4ah Automatic Battery Charger Circuits Using Relay and Mosfet”

  1. I have been trying to make this circuit, But the charging LED doesn’t seem to wok for some reason, Please help me out with it

    • Is it only the LED that’s not illuminating or the entire circuit not functioning? Try removing the 1N4148 feedback link and check again.

            • You will need a variable power supply for the setting up procedure. Initially do not connect the mains input or the battery. Rotate all the presets to ground side. Apply 5V across pin#4 and pin#11 of the LM324.
              Adjust the lowest opamp A1 preset such that the white LED just illuminate.
              Increase the voltage to 5.5, adjust the A2 preset such that the yellow LED just illuminates.
              Again increase the voltage to 6.5V, adjust the A3 preset such the green LED just illuminates.
              Repeat the same for A4 with a voltage of 7V until the blue LED just illuminate. When blue lights up RED will shut off.
              That’s all the circuit is set up now. Remember the output after D3 should be 7.2V, so adjust R2 near LM317 accordingly.

              This is the correct setting up procedure, I hope you understood now

        • You can freely discus the problems here, I will solve them all step by step, the concept above is very simple, so it won’t be a problem.

          • I made the circuit and converted it into 12Volt by using 6V zener instead of 3V zener and connected it to a 12V 7Ah battery. At initial stage the battery was 12.05V. then I checked the battery Voltage after 19Hours, the battery voltage dropped to 11.71 Volts. Is this circuit supposed to use the battery this much? What are the options to reduce this drop? Also, Only the circuit was connected no load was connected.

  2. I want to have charging auto cutoff in your last 6v battery charging circuit having mobile charging facility.
    Waiting for reply

  3. sir,
    I have successfully built one of your project ‘ pwm inverter using sg3525 ‘. Now I wants to include the charger circuit no.3 to the inverter circuit. Since the circuit is for 6volt battery, will it be compatible for the inverter of 12volt battery. If so what are the changes to be made. Pl. kindly suggest me sir. Is ziner diode of 3volt is to be substituted with 6volt?
    Thanking you sir.

    • Hi BK, I am glad you could build it successfully.

      you can use the same circuit for charging 12V battery also. You can use a 6V zener if you wish, although a 3V will also work without issues.

      If your battery is higher than 10 Ah, then you can replace the LM317 with a LM338

  4. Sir,
    I can’t find 741 IC, 2N2219 and LM338 instead i found HA17741 IC, TIP41C and LM317T
    is there any changes in the final circuit sir? the battery is 12v 50Ah.. thanks a lot sir..

    • Hi Paul, those parts will also work without issues, however TIP41 can be unnecessarily big for driving a relay, you can try any other small signal transistor such BC547, or 8050, or BD139.
      By the way for a 50 Ah battery LM317 won’t work , and won’t be required also. You can use a 0-12V 5 amp or 7 amp trafo, rectify the output with a bridge rectifier and a 2200uF/25V filter capacitor, and feed the DC to the opamp circuit, ….at the anode of the left side diode. This diode must be rated at 10 amps.

      Also for the 1N4148 diode, use two in series.

      • Sir i cannot see the relay in the finalized circuit where it will put? and the 1N4148? im going to make the modified finalized circuit?

        • OK, if you want to use the last diagram, you can build it with your available parts, but TIP41 will not respond correctly with the opamp output. You will have to reinforce it with another NPN in a Darlington configuration. It can be a BC547 or any similar. TIP41 will also need a good heatsink.

  5. Hi Swag,
    In the 3rd circuit, the one corrected, what changes do I have to do in order to charge 3 6V/4.5AH batteries connected in parallel?.

    Best Regards,
    Nélio Abreu

  6. Hi sir I’m Yogesh .6v/4.5ah ka Jo circuit h usme 12v off karneke bad green led battery supply pe on hi raheta h to usko disconnect kaise karneka .plz help me .

    • Hi Yogesh, the green or red LED will be ON if the battery remains connected, because the LEDs will indicate the immediate status of the battery, green will indicate that the battery is not fully charged and red will indicate it is fully charged….so that’s part of the circuit and it is correct.

    • you can make use of the 3rd circuit and use it for your purpose…just make sure to supply the correct specified amount of current from the input side, and set the preset accordingly for the cut off

  7. Hello Swagatam, I am facing great issue every time to take out the battery from my nokia x2 to charge and your charger circuits are very promising and I even built a skeleton circuit with the design with two bc547, will check out..but, we all need fastest charger, and nearly everything I used so far, universal charger etc. plus your schemes, provide very little current and rate, 150ma or so. So I have to wait six to seven hours for fully charging! The reason is stated that liion batteries keep good health if charged very slowly, but again, liion has advantage of charging almost equal rated current as its Ah. Even, companies, in my case, microsoft, provides charger with rated current 600 ma. So I need a design with simplest scheme with charging current around 1-1.5 A, using 555ic or tl431and any regulator ic 317, 7805etc, I am not much into zener diodes ) and your charger design with two bc547 lacks charging led indicators, so these in new design will also be welcomed. I can buy 4056 module, that comes with a 1A promise, but, I want to make something myself also the components at my disposal needs to be used. Thanks for your time.

    • Hello Indrajit, I never said that Li-ion battery must be charged slowly. This is true only for lead acid battery not for Li-ion.

      None of my circuits are designed to restrict current to a fixed level or to 150mA, it depends what input supply you apply. All The auto battery cut-off circuits which I have explained only act like a switch and will never drop current by itself.

      It completely depends on the input supply current that you use and ofcourse your battery health condition, if your battery is bad then it will never consume current at the correct fast rate, regardless of which charger you use.

      For more info you can red the following post:

      By the way which charger circuit are you referring to??

  8. Hi, how to control the charging current to the battery with the third circuit? Because the LM317 in the above circuit acting as voltage regulator. I need to charge a 12v, 1A battery with the above circuit which require 100mA for charging?

  9. Hai sir…

    I try lm317 charging circuit for 6v 4.5ah battery….
    I try only charging section not auto cutt off section..
    Input i use 12v 1.5ampere adapter….
    I adjust the output voltgae 8v…
    Now battery is charging…
    But ic heat sink more heat..can’t even touch it….
    After few hours the ac adapter power led auto off and on.when adaptor output voltage got short it only the led off..but here i check the connection all proper
    .i check the 317 output voltage…its decrease and increase.like
    2.5v,3.4v ,4v,5.23v,6v continues …
    When i remove battery the lm317 output voltage good…i think that battery may be damage ,so i check with another battery same think happening
    So i change Ic …half hour charging well afterwards this problem continues…
    And also i change adaptor….
    But this problem continues when i connect to battery..
    Without battery its working good…
    Guide me sir…

    • Hi Kesav, it may be happening due to the IC getting overheated, which is never good for any IC, you must use a large adequate amount of heatsink to control and dissipate heat appropriately. and also make sure that the battery is getting charged with a correct ampere rate, for a Lead acid battery it should be 1/10th of its AH, exceeding this will be bad for the battery and also for the controller circuit if its not rated to handle this.

  10. Sir today i check it ampere ratings of transformer…

    12v 2ampere transformer output showing 6 ampere in DC AMPERE in multimeter out of 10.

    12V 3 Ampere transformer output showing 9.47 Ampere sir..

    I think that multimeter may be faulty..so I check with another one multimeter also showing the same results….

    While charging battery when i check ampere it shows only 700 to 800ma in 2A Trans…900 to 998ma in 3A trans…
    New transformer also showing same results.
    Even i not make any complex circuits…simple rectifier only…to battery charge…

    What should i do sir….
    Help me sir

    • Kesav, check it again with your meter on the AC 10 amp range directly across the transformer wires, a 2 ampere trafo cannot produce 6 am or 9amp.

      while charging your battery connect a 12V motorcycle headlamp bulb in series with the positive wire…if this lamp glows brightly initially while charging then your battery might be OK and charging normally, if not then your battery could be faulty…

  11. 12-0-12 2ampere…i make fullwave rectifier and connected to the battery .12v 7.5ah
    I check ampere level..it shows only 718ma….
    I use 5408 diodes…
    Is it Transformer problem sir…

    If i use 3ampere transformer …battery charging ampere shows 980ma…
    Remaining 2 ampere ?…

    Pls guide me sir

    • Kesav, check the current using a DC 10 amp range meter directly across the bridge output without any battery, this will tell you the actual ampere rating of the trafo. take the reading quickly within 1 or 2 seconds

    • Okay sir today i will do….

      Instead of transformer we can use SMPS sir….
      Which one is good for charging battery.
      Which one will be life span high without trouble

    • It blocks the leakage offset voltage from the output pin, if the zener is removed the transistor will remain permanently switched ON and not respond to the opamp ON/OFF correctly

  12. Dear Sir, I have the 6v, 4.5ah battery and it's charging nicely with the second circuit you provided, and now I want to add one more feature how to know how much charge is present in battery and supply this information to arduino microcontroller and also power the same arduino with that battery. What changes I have to add to make this new feature work.
    Thank you,

    Yours sincerely
    Siddharth Talesra

    • Thanks Siddharth, your Arduino must be coded such that it is able to read the charging rate and the reduction in current consumption while it's charging and then compare these parameters to figure out the approximate time left.

      A crude method is to attach a 9V incandescent bulb in series with the positive of the battery and monitor its intensity electronically to learn the same.

  13. Hi Swagatam,
    I was replaced LM317 by another one (not LM338 as you mentioned) but I still get the current is 20mA. Maybe the problem is due my battery.
    Have you any battery charging circuit similar with above circuit (without relay) which can adjust the voltage and current by VR? If yes, could you please give me the link?


  14. Hi Swagatam,

    I made one circuit without using a relay for battery charger. I using power source with 14v 1A. Because I do not have R1=240 Ohm should I replace it with one resistor 220 Ohm.
    I have set up the circuit in the following way:
    1. Without connecting any battery, disconnect one pin of the 100k resistor to pin6 (IC741). Another pin of 100k resistor keep connected to pin2 (IC741)
    2. Adjust R2 to get 7.2v. At this step, I have put 2 ends of VOM at 2 points on the circuit to get 7.2v:
    – point 1: Behind 1N5408 diode
    – point 2: Behind 10k POT (GND)
    is that right?
    3. Adjust 10k preset and identify a position where RED led just lights up and GREEN led supposed to get illuminated.
    4. Reconnect 100k resistor to pin 6 of the IC 741.
    5. Connect 6V 4AH battery to charging (the voltage of the battery when not connected is 4.8v).
    At the moment, I use VOM to measure amperage passing through battery is 20mA, too small compared to 4/10=0.4A=400mA.
    Could you please help me know where I was wrong?

    • Hi SY, all the mentioned procedures are correct….now the moment you switch ON power with the batt connected, the 7.2V instantly should drop to the battery level at 4.8V, please check whether this is happening or not?

      If this is happening next you can check the current by connecting ammeter in series with the battery positive line.

      If it's 20mA as you say then either the battery is faulty or the LM338 is faulty…confirm the output current from the LM338 by connecting ammeter across its output and ground line…it must show the maximum available current as per the supply source rating….if not then do the same across the supply source terminals to confirm the current.

  15. Sir why have u used a 470 ohm resistor in between the battery negative rail and the ground rail in the last circuit ( charger without using relay ) ?
    Will it cause the continuation of charging even after the over charge cut off is detected since the current is enable to enter into the ground rail from the battery -ve through the 470 ohm resistor always ?

    • RT, it is optional, I have included it to enable trickle charging for the battery after the transistor has cut off at the full charge threshold. This is to make sure that the battery is always in the topped-up condition and to eliminate self-discharge

  16. So, if I used TIP122, either I give lesser input current (1-2A) or 4A together with a cooling fan would do right ?
    If I were to use TIP142, how to make a heatsink ? I am sorry sir since I am still a student and never learnt this term before. Can you suggest me the way to do it ? Thank you for always making my doubts clear 😀

    • for a TIP122, exceeding 2 amp is not recommended, for a TIP142 you can use 4amp but the heatsink will need to be of high quality, as shown below:


      but a hand made using aluminum sheet will also work, as shown below


  17. Hello sir, Chaw is here again !! I want to clarify some of the facts with you in second diagram(using transistor).

    (1) Since I wanted to have an input DC supply of 3-30V, I will use LM338 IC, 480ohm resistor(two 240 ohms in series) and 10k preset to have an output of 27V, calculated based on the calculator u have provided. Am I on the right track ?
    (2) For the input current, let's say 1A is given, the battery terminals will receive the full charging current right ?
    (3) May i know what is the use of 470 ohms resistor connected to the cathode of battery ? Any other value can I use (0.1k,1k,10k etc) ?
    (4) Plus, Is there anything do I need to modify to the auto cut off part of the circuit according to my specs ?
    (5) Instead of TIP122, can I use BC547 instead ?


    • Hello Chaw, here are the answers:

      1)If you have calculated the figures then it would be fine to go ahead with the mentioned values of the resistors and the port.

      2) yes full 1amp would reach the battery.

      3) It's for providing the battery with a floating or trickle charge current after it has reached the full charge level and the transistor has switched OFF

      4) No need of modifying anything, but with a IC741 you cannot exceed the voltage above 19V across its pin#7 and pin#4

      BC547 will be able to supply only upto 50mA…for 1amp you will have use a TIP 122 or a TIP142

    • Noted sir !! But LM741CN i bought from the market has a supply voltage from 10-36V. So I could apply up to 30V right ? By the way, I am going to charge 3.7V 4000 mAh lithium ion battery. I need to confirm with you that
      (1) Before charging, 100k resistor is removed and I know that we need to give an input supply. Is this input voltage is three or five volt higher than the battery like the last time in 6V,12V battery charger circuit ? (for my case would be 6.7V )
      (2) For the input current, is it possible to set at full rate 4000 mA ?
      (3) There is no effect to TIP122 right ? My one has a DC collector current of 5A/
      (3) An input current of five or ten time lesser than the battery is only for lead acid batteries right ?


    • 1) yes the input should be adjusted to achieve around 20% higher than the battery rating…meaning for example in case of a 12V batt it's 12 + 20% = 14.4V…this should be confirmed across the points where the battery needs to be connected.

      2) input current can be 4 amps but that will generate some heat on the batt which will need to be monitored and controlled with a cooling fan.

      3) TIP122 will get significantly hot at 4amps so TIP142 is recommended, which will also require a heatsink.
      3) that's right 10 times less current is recommended for lead acid batts not for Li-ions.

  18. Thank you so much Swagatam for your valuable share. As I am not an engineer but hobbyist and have enough Know-How about Arduino's and it's circuitry and using ESP8266 WiFi module a lot in my hobby projects. I have bunch of 4v 1 amp/hr lead acid batteries, lot of LM393, 5v dc wall supplies, TIP122 darlington transistors, bunch of IN4148, and off course capacitors and resistances. I want to build an automatic chargers to charge these batteries used in my hobby projects. May you suggest some design? I have few in my mind, including your this project, but want to seek help of a professional one like you. I don't want to buy automatic battery chargers available in market as they are more than what needed. May you help me?

    • Thank you Waqas, the above designs are the best and universally suited to all batteries for achieving automatic cut offs at the intended thresholds….so I would recommend you to go for one these circuits and try it for your application..

  19. Hi Swagatham, thanks
    I assembled 2nd circuit for charging 3.7v/800mah Li-Ion battery. Not yet tried hysterisis control and TIP122 section section.Circuit working perfect as you described.

    I have a doubt to clear.
    Input supply is 9v/500mah and charging supply is 4.2v/500mah. Battery rated 3.7v/800mah. So, I think I have to add a current limiting resistor (42v-3.7v/160mah=3.125ohms) 3ohm/1W series with battery to reduce charging current to 160mah (800mah/5=160mah).

  20. Hi bro. I want automatic circuit for my 6v 4ah battery which is connected with my wifi router and the source is the dc input of 9v which is the adapter of wifi. I want that 9v 2amp adapter is to charge mai battery when battery get charge then it can automatically stop further charging. Any idea pls

  21. hello sir i have confusion about +supply pin of ic741 in the circuit +supply go to pin 7 and 4 is ground but in other circuit +supply gose to pin 4 and 7 is ground

  22. sir i try again to make this circuit with a new ic, as you have said a few days ago, the voltage at pin6 should be in 0v but in my reading the lowest voltage whenever i adjust the preset is proximately 2v but i connect the zener diode correctly. sir what do you thinks is the problem?

    • Check the voltage across pin6 and ground….and then across zener anode and ground, if both these voltages are same then probably your zener diode is faulty or is wrongly connected.

  23. sir one more question, why did you used a 3v zener diode in series with the 10k resistor and that is connected at pin3?

    and what is the function of a 470ohms resistor that is connected to negative terminal of the battery. sir please explained it to me so that i can understand more.

    • as explained above, it's for the setting up a reference point for the other pin.

      the 470 will keep the battery charging continuously at a very low rate even after the actual charging is cut off…in order to prevent the batt from self discharging.

      the 100k is for latching the IC in the cut off position so that it does not oscillate while the battery voltage drops slightly after the cut off

      • Can TIP 122 cutoff load up to 5A if not than suggest suitable alternate for 5A load Also can we have overload LED indicator with cutoff.

        • Use TIP142 for 5 amp and above. Connect a red LED across the 1 ohm resistor for overload indication, and connect a 1N4148 in series with the BC547 emitter associated with this resistor. Calculate the 1 ohm using the following formula:

          R = 1.5 / max charging/discharging current

  24. sir thank you for responding! i have read the article about the opamp. and i learned more about it.

    sir the 10k resistor and a 3v zener diode juction in which the pin 3 is connected across it is a "REFERENCE VOLTAGE" if so, what voltage value or how much voltage is your ref voltage?

    and if i am not mistaken the 10kpot preset is the sensing voltage. Meaning when the voltage across it falls or increase above the reference voltage the output at pin 6 will change to high state then it will be "on" the transistor TIP122.
    Sir if i wrong please correct and guide me so that i can learn much about this circuit.

    • Angelous, you understood it correctly, an opamp output will always go high if its (+) input pin attains a higher potential than its (-) input pin, regardless of which pin may be connected as the reference.

      The reference voltage can be any voltage below the actual supply voltage for the IC.

      when the output is high tip122 will conduct and vice versa

  25. sir can you explain on how this circuit operates please. what is the fuction of the tip122 it shoulbe in off state or on state?

  26. sir, in this circuit i used a 9v rectified as supply in this charger circuit so it is okay to use 9v or to supply a 9v? cause as far as i know a 9v supply is good enough to charge a 6v and 4.5ah lead acid battery.

  27. well, thank you sir i will make it again and i really want to success with your circuit. sir could you please send me a link about on how 741ic works as comparator?

  28. i have already make this circuit and i connected correctly all of the components based on the circuits above without using a relay when i connect the 6v bat and a 9v supply the green and red leds are glown.. it supposed to be the green led will glow first then when the bat is full the red led will glow…

    • Measure the voltage at pin6 with reference to ground, it must show zero volts or supply voltage depending on the 10k preset setting.

      the red LED is glowing due to leakage voltage at pin6, but the 3V zener is supposed to stop this, make sure you have connected the zener at pin6 correctly.

      I think I have explained the entire setting up procedure somewhere within the comments please search it and set the 10K preset accordingly.



    • Angelous, did you you use the 3V zener diode at pin6, it's supposed to block this leakage 2V…or may be your IC is duplicate quality and faulty, change it with a good one and check again

    • use a big heatsink for the TIP122, to keep it cool…make sure that the transformer current rating is not over 1amp for the connected 4AH battery

    • sir, it should be set the pot preset at pin 6 to 0v first then you can charge your battery now? then when the battery being charge reach the reference voltage lets say the ref voltage is 7.2v then the red led will on and the green led should be in off state when the battery gets full charge?

    • Angelous, the 3V zener at pin6 is supposed to block the leakage voltage across pin6 and ground….if you wish you can use a preset also across pin6 and ground for the same but that can be risky and damage your IC if accidentally the preset is grounded while adjusting.

    • sir i think there is something wrong with your circuit because i have already made it base on your circuit diagram with the right components as your circuit indicates. please check it again and make some improvement.


    • yes sir, i used 3v zener diode but still not 0v and i also try to replace that zener diode with a new one just to make sure but still there is a 2v output voltage at pin6.

    • Angelous, I have myself tested and used this circuit many number of times for different applications, and it worked perfectly….may be you are not able follow my instructions, and so not able to troubleshoot your circuit.

      and if you keep trying without understanding you are never going to succeed with any circuit…so attempting after understanding the details is the most important thing.

  29. sir what should be the resistance value of 10k potentiometer that is connected to pin2 of ic1 if im going to charge a 6v lead acid battery…

    i have maked the circuit above but the two leds are glow.

  30. Hello Swagatam,

    Can i ask you for help for this circuit, please… i made the first one and i want to use it for 12V battery; the problem is, that when i'm adjusting the output voltage, and when it exceed 1.5V the relay is triggering, so the charging LED is lighting, and when i try to adjust the other pot – on the IC741, it is always flicking

    I used resistor R1 – 220 ohm, instead of 240 ohm;
    and also i saw in the first coment, that initially, the pot under LM317 has been 2.2K

    • Hello Goran,

      initially keep the preset slider arm towards ground, completely…so that the pin#3 of the opamp is at a zero potential.

      Now adjust a 14.4V from the LM317 and slowly adjust the preset slider arm upwards until the red LED just lights up (green LED shuts off)

      220 ohm is OK….

      2.2k pot is not proper…it must be around 5k to 10k

    • Yes, initially the preset is giving 0.0V at pin#3, but adjusting the preset is just slightly increasing the light of the RED LED, and the relay is getting triggerd when i'm adjusting the output voltage, just when it exceed 1.5V;
      Also the RED LED is always very slightly flickering, even when the preset is giving 0V at pn#3,
      maybe some resistor must be bigger…?

    • No, everything's perfect in the circuit and the resistors don't matter much, even if you were to use 100k resistors at the input of the opamp, it would provide the same sequence of results.

      make sure that you remove the feedback resistor across pin6 and pin3 while setting-up the pin3 preset.

      did you include the zener at the output pin6 of the opamp?

      there should be no battery connected while the setting up procedures are being carried out.

    • I wasn't removed the reedback resistor while setting up… so i did it with a swich, but there was no difference, because the voltage at pin#6 is always about 2.8 – 3V for 14.4V output;

      what do you mean about the zener? i have it on the place, like on the circuit diagram;

      yes, there's no battery while setting up;

      But i have used C1 – 0.1uF ceramic? Maybe it must be electrolitic…?

    • that means your IC is faulty or you have done something wrong with the connections, the output pin6 must instantly turn equal to the supply voltage as soon as pin3 potential is pushed just above pin2 potential….this will happen while you adjust the preset….but if that's not happening indicates that something's not right in the assembly.

    • I remade the circuit entirely from the beginning, but it's happening the following:
      1 – when the voltage exceed ~2.3V the relay is triggering
      2 – the voltage at pin#3 is 0V but at pin#6 it is not the same, but about 2.6 (which i think is because of the 3V zener…)
      3 – at the situation of "2" the both LEDs are lighting equally, and when the input voltage (at pin#3) exceed ~2.3V the voltage is jumping to about 9V at the both input and output, and afterwards it's increasing while adjusting… but in that very moment the RED-Batt Full LED starts shining stronger, and the GREEN LED shines slower
      4 – all the time the relay is triggered and the LEDs are lighting, no matter of the brightness

      I didn't understand what happened, but in one moment the IC exploded along with the input C1, as the last one set on fire, so i wanted to ask you, do you have that circuit made and all working properly…?

    • All these indicate that your IC is duplicate or of poor quality….with pin3 grounded the voltage at pin6 should be not more than 1V or max 1.5V (leakage volts)

      the 3V zener is introduced to block the pin6 leakage voltage from reaching the BC547 base, it won't create the volts as you are assuming.

      did you remove the 10k feedback resistor across pin6/pin3, while adjusting the 10k preset??? it needs to be removed and later on reconnected

      and under no circumstances the IC can explode unless the pin7 voltage is increased above 22V

      please go through all the comments above to get a better idea regarding the procedures.

  31. Hi swagatam, thanks very much for posting these circuits. I want to ask 2 questions about your second circuit.
    1) Can i charge a 6V 6.8Ah battery from this circuit? Any modifications?
    2) What is the function of the 10K potentiometer used at the right side of the battery with op amp. How much should i adjust both the potentiometers to charge 6V 6.8Ah battery

    Thanks in advance

    • Hi Muhammed, yes you can charge the mentioned battery, just adjust the LM338 pot and ensure a 7V across the battery terminals without connecting any battery.

      the 10k preset is for adjusting and setting the cut off threshold at the battery full charge level, set this such that the green lights up and red led shuts off at 7V across the battery terminals

  32. Hi Swagatam,

    I am looking to build the second of the two circuits you listed above. Going through the list of explanations you provided in the comments I think I have a fair understanding of how it works, except for the tip122 on the output of the op-amp. Could you please explain what the purpose is of this component ?

    Kind regards

    • Hi Louis,

      TIP122 acts like a switch, it remains switched ON and connects the negative of the battery with the negative supply line as long as the battery is charging and is below the full charge mark…it switches OFF the negative line to the battery the moment it reaches the full charge,

  33. Thank you very much sir for the above circuit it works perfectly for me.I need one more feature on the above circuit because the above circuit didn't cutoff the load when the battery voltage is to low this will affect the life of a battery.please say any idea that battery should be automatically isolated from the load when battery voltage is to low.I am waiting for your reply sir.

    • Hi Vijay,

      the above two circuits will never allow the connected battery to go below a predetermined level (as set by the value of the feedback resistor from pin6 to pin#3)…as soon as a low battery is detected the circuit will revert and begin the charging process for the battery

    • OK sir.my supply voltage is from solar panel.during night if the voltage from a panel is to low the charging process get stopped on such period of time my battery voltage reaches to low it will affect the life time of battery .can u get my point sir????.pls suggest an idea for me.thanks for your reply sir

  34. Hello Sir, I have built the 2nd circuit again but I am facing one problem. When ever I vary the 10k preset the light shifts position but the other LED glows dimly. For example if red LED is glowing brightly then green is glowing dimly vice versa.

    I interchanged the position of the resistor (100 ohm) and zener at pin 6 and placed LED junction in between them as you have instructed earlier, but it is not working. Is there any other modification I can do?

    • Hello Dipto, for charging a 6V batt you will need at least an input of 9V in the above circuit, so probably a 9V or a12V panel may be required.

      yes it can be used in conjunction with the referred changeover circuit….

    • thanks you sir for your quick reply. I will be doing my final year project & your blog is helping me a lot.

      another question I have sir,
      what should be the current rating of the solar panel? and how long will it take to charge the battery 6V 4.5AH with a 10W 12V solar panel?

    • withe the given solar/batt specs it could take around 6 to 8 hours for the battery to get fully charged

      current rating of the panel may be calculated as follows:

      10/12 = 0.833 amps

  35. you can try a readymade 12V smps 1amp adapter, and regulate the output using an LM317 circuit…that would be much clean and easy.

    use a good heatsink for the LM317

  36. Sir,I need to charge a 11.1 volt 2200 mah lion battery, i have read your above reviews and understand that i will have to use a 14-15 vdc source. I am not too sure about the Current rating of the dc source, should be be around 250 ma(1/10 of the mah) or how much more? as there would be current draw from the circuit itself. thanks and warm regards

    • Hi Richard, I might have missed your comment, so I am replying it now, for Li-ion you can use a current source that may be equal to the batt AH rating, therefore in your case you can charge it at the the rate 2.2 amps.

  37. Thank you so much for this great circuit, I always like to build your circuit.
    Pls am having problem here getting TIP 122 pls can I use BC transistor or Mosfet instead of TIP122, if yes which BC or mosfet can I use?
    Thanks so much

  38. Thanks so much, you are indeed angel sent from heaven to solve human electronic hobbyist problem, more grease to your elbow.
    Sir , am having problem getting TIP122 pls can I replace it with BC or mosfet? If yes which BC or mosfet can I use? Thanks in advance

  39. Dear sir
    I have 6v 4a battery which I use for a toy car
    problem is the adapter broken and I got a adapter 6v1
    Will it work?

    • Hello Sumantri,
      yes, it's to keep the battery trickle charged even after cut-off.

      you can eliminate the 470 ohms if you don't want this to happen.

  40. Hello Swagatham thanks for your help, I believe i can use the same for charging 12V battery. with suitable corrections of resistors?? Thanks for your great help
    Yeshwanth kumar J

  41. Dada,
    If we use LM324 in place of IC741 and 4.7V Zener then do we have to change any components in the 2nd Circuit.

  42. please clear the confusion, 2nd design tip122 transistor emiter and collector are joined to 470R resistor with ground,i think collector should go to positive. what is the purpose to use 3v zener at the base of tip122?
    if i want to use 2nd circuit to charge cellphone battery (3.7v,800mah) with USB power source, what modification should be done?

    • the TIP122 connection is correct, rest assured.

      It will be difficult to explain all the modifications for a USB 3.7 charger, because there are many changes to be done.
      I'll post the compete design in my blog and provide you with the link soon.

  43. hello, i tested the ckt some month ago. after that i was an accident and do not finished. now i again test. but something is wrong. when i switch on the power of ur ckt my relay is energized and green led is lit. i bought new 6V 4.5A battery and connect to the ckt. but my battery do not charge. plz give some advice to me. i use 3.3v 1w zener diode.

    • Without any battery connected the input voltage should be 7V, at this voltage first adjust the 10k preset such that the relay just cut-off or deactivates.

      Once this is done, then connect the battery and switch ON power, now the relay will not activate until the battery is charged.

      While adjusting the 10k preset remember to keep the pin6 10k resistor disconnected…..connect it back after the adjustment is finished.

  44. Sir
    I am interested to make a battery charger for 12 volt battery.But when I went shops to get parts they could not understand relay for 12 volt battery charging.What specifications like any series number should i tell so that I can get it
    Thanking you
    P Ramamurthi

  45. It means your opamp is faulty or there's some other kind of mistake, because altering the 10K preset should certainly make the relay flip.

    I think it would be better if you refer and learn how an opamp functions, it will help you to troubleshoot the issue immediately from the core. there are many online sources dealing with this subject

    By the way did you remove the feed back 10k resistor while doing the testing, it is important otherwise the relay will not respond properly.

    The relay N/C contact connects with the diodes, diode should be a rectifier diode rated at least at 1amp, any type will do.

  46. 1) It's due to parasitic leakage from the IC output, it can be corrected in the following manner.
    Swap the positions of the transistor base resistor and the zener, next shift the LED joint in between the resistor and the zener, this will clean up the issue.

    2)The relay contacts can be seen connected with the battery positive, so as soon as it activates the battery gets disconnected from the supply at the full charge conditions.

  47. Thank you very much for you very useful information. But can you please tell me which circuit should I built for my case ? the first one or the second one ?

    And Kindly please tell me which presets I should change to charge 3v & 4v batteries ?

    I understand that I can use the Nokia charger to power the circuit to charge the 3v & 4v batteries, but in this case I need any parts change on the circuit ?

    Waiting for your information.

    B. Regards,

  48. Hi,
    I am sure this circuit is very good. But I need your help here. This circuit is for 6v 4ah battery but I have 6v 4.5ah (1) battery. and I also have 4v 3ah (1) and 3v 2ah (1) total 3 batteries that I bought few days ago.

    Please help me build charger for the battery 6v 4.5ah battery. and also please tell me can I use Nokia charger (5v 350 ma) for two of my other batteries directly to charge?

    I will be very happy if you help me.


    • Hi,

      You can use the above circuit for charging all the three batteries that you have bought by suitably adjusting the given presets in the circuit.

      You can use the 5v charger supply with the above explained circuit for charging the 3V batteries.

  49. Dear Sir,
    As per your instruction I have repeat the
    previews adjustment, first adjust 2K2 POT
    for required output charging voltage & swap
    the 10k variable resistor with successfully
    Green LED on and shut off red but not fully
    off with slide lighting . but could not
    charging when connect negative voltage from
    TIP 122 (Collector). after input negative
    voltage connect to battery terminal & it
    charging to battery with heat to LM 317.
    please help me to find-out the problems.
    for your information I have attached picture
    file of circuit.
    1. How to off & on TIP 122 transistor with
    which voltage need to done this job?
    2. please explain the function of base
    Zaner diode of TIP 122 transistor?

    Below the voltage status of circuit
    Input voltage 11.94 with 5A
    output regulated voltage 7.77 after adjusting the 2.2k variable.
    IC PIN 2 voltage =7.77
    IC pin 3 voltage =7.08
    IC pin 6 voltage =2.17 after swap the 10k
    variable & before swap 10kV voltage was V6.74
    TIP122 Base voltage after swap 10k variable
    140 mV and 0.657V before swap the 10k

    Thanks & Regards
    Tanvir Ahmed

    • Dear Tanvir,

      You have done just the opposite of what was required to be done.

      Without connecting any battery, set the 2k2 pot for the required output, next adjust the 10k preset to just switch ON the RED LED.

      After this switch off the circuit, connect the battery, and switch ON power. Now you will find red LED switched OFF and the green LED coming ON…once the battery gets fully charged, the RED will again switch ON indicating that the battery is charged and disconnected.

      While setting 10K preset remember to disconnect the 100k feed back resistor….connect it back after the setting is done.

Leave a Comment

Do NOT follow this link or you will be banned from the site!