Home » Inverter » Build a Solar Panel Voltage Regulator, Charger Circuit at Home

Have a Question?

Please feel free to ask any circuit related question and get a quick solution from me.

Build a Solar Panel Voltage Regulator, Charger Circuit at Home

We all know pretty well about solar panels and their
functions. The basic functions of these amazing devices is to convert solar
energy or sun light into electricity.

Basically a solar panel is made up discrete sections of
individual photo voltaic cells. Each of these cells are able to generate a tiny
magnitude of electrical power, normally around 1.5 to 3 volts.  

Many of these cells over the panel are wired in series so
that the total effective voltage generated by the entire unit mounts up to an usable
12 volts or 24 volts outputs.

The current generated by the unit is directly proportional to
the level of the sun light incident over the surface of the panel.
The power generated from a solar panel is normally used for
charging a lead acid battery. The lead acid battery when fully charged is used
with an inverter for acquiring the required AC mains voltage for powering the
house electrical.
Ideally the sun rays should be incident over the surface of
the panel for it to function optimally. However since the sun is never still,
the panel needs to track or follow the suns path constantly so that it
generates electricity at an efficient rate.
 If you are interested to build an
automatic dual tracker solar panel system you may refer one of my earlier articles.
Without a solar tracker, the solar panel will be able to do the conversions
only at around 30 % efficiency.
Coming back to our actual discussions about solar panels,
this device may be considered the heart of the system as far converting solar
energy into electricity is concerned, however the electricity generated
requires a lot of dimensioning to be done before it can be used effectively in
the preceding grid tie system.
The voltage acquired from a solar panel is never stable and
varies drastically according to the position of the sun and intensity of the
sun rays and of course on the degree of incidence over the solar panel.
This voltage if fed to the battery for charging can cause
harm and unnecessary heating of the battery and the associated electronics;
therefore can be dangerous to the whole system.
In order to regulate the voltage from the solar panel
normally a voltage regulator circuit is used in between the solar panel output
and the battery input. This circuit makes sure that the voltage from the solar
panel never exceeds the safe value required by the battery for charging.
Normally to get optimum results from the solar panel, the
minimum voltage output from the panel should be higher than the required battery
charging voltage, meaning even during adverse conditions when the sun rays are
not sharp or optimum, the solar panel still should be able to generate a
voltage more than say 12 volts which may be the battery voltage under charge.
Solar Voltage regulators available in the market can be too
costly and not so reliable; however making one such regulator at home using
ordinary electronic components can be not only fun but also very economical.
Referring to the proposed solar panel voltage regulator, charger circuit we see a design that
utilizes very ordinary components and yet fulfills the needs just as required
by our specs.
 A single IC LM 338
becomes the heart of the entire configuration and becomes responsibly for implementing
the desired voltage regulations single handedly.
The shown solar panel regulator, charger circuit is framed as per the standard mode of the IC 338
The input is given to the shown input points of the IC and
the output for the battery received at the output of the IC. The pot or the preset
is used to accurately set the voltage level that may be considered as the safe
value for the battery.
The circuit also offers a current control feature, which
makes sure that the battery always receives a fixed predetermined charging
current rate and is never over driven.
The module can be wired as directed in the diagram. The relevant
positions indicated can be simply wired even by a layman. Rest of the function
is taken care of by the regulator circuit.
The switch S1 should be toggled to inverter mode once the
battery gets fully charged (as indicated over the meter).
The charging current may be selected by appropriately
selecting the value of the resistors R3. It can be done by solving the formula:
0.6/R3 = 1/10 battery AH
The preset VR1 is adjusted for getting the required charging
voltage from the regulator.


  1. The transistor is BC547, and the value of R4 is = twice R3.
    The value of R3 will depend on the charging current which should be ideally 1/10th of the connected battery AH.
    The formula for calculating R3 is given at the end of the article.
    The diode is 1N5402.


    • What is the function of transistor BC547? And don't the LM338 needs a negative pulse protective diode? Does this circuit gives a fixed output voltage even if the solar panel's voltage fluctuate?

    • BC547 is used as the current limiter.

      Yes you may add the required protection diodes for better safety to LM338.

      Absolutely, the circuit will provide a fixed set voltage at the output, irrespective of the input voltage fluctuations.

  2. Thanks and great circuit. Just wondering, does the solar panel specs and battery specs such as voltage matter? I know the battery AH matters for R3 and R4, but is it okay to use a 12V solar panel and a 12V battery for this configuration?

    • Hi Kevin

      Preferably the optimal voltage from the solar panel should be twice that of the battery voltage for the above circuit, in this way a voltage level that's always above the required minimum input value becomes available, irrespective of the suns position.

  3. Hi Swagatam!
    Great circuit! I was wondering what the P1 is in the circuit, I am assuming it is a potentiometer, but what I don't understand is the input coming into the left of P1?

  4. Ok, but you don't really explain how the switch works. How does it know when the certain voltage is reached and what exactly are you using for this switch? This is the biggest problem I am having, is getting the overcharge protection to work.

    • In case of an over current, R3 develops enough voltage across it to just switch ON the transistor, which stops the IC from conducting and freezes the output, preventing the battery from the dangerous situation.

    • If the open circuit voltage of your solar panel never exceeds 35V then this circuit will work outstandingly well.

      I have a great respect for the IC LM338, its awesome.

  5. sir,can you provide me the circuit diagram for it?i want to do it as the final year project…sir,can you please suggest me a good one?my colleague is interested in doing electronic dipper.I asked my guide about doing a graphical equalizer.but he is not interested in it.He is interested in circuits like solar inverter and all.sir,please suggest me a good one with its details….waiting for your valuable advice…

    • Hi Surya,

      I'll try to design and post a suitable circuit soon, however it won't be an easy project, and therefore it will require a sound prior knowledge of electronics and soldering, or else you might waste a lot of money without succeeding.


  6. sir,we are new to the field of electronics application,can you please suggest me an idea and its details for me?sir,will you please guide me..?we have to submit it by Aug 29th

    • This project is very good but I am not sure whether you will be able to complete it successfully because this project is not for the beginners.

      If you have somebody who has a strong command over electronics and who can assist you with the proceedings then you can be hopeful.

      However I will post the circuit within a couple of days and let you know.


  7. Hello Swagatam,

    Thanks for the circuit. I am looking for suitable solar charge controller to handle currents upto 30A in buck (40 to 24 V) configuration. This will prevent the loss in the form of heat by increasing the amps.


    • Hi, Vishal,

      The above circuit is probably one of the best circuits for charging a battery through any DC source, for getting 30amps you can add a pull-up power transistor across the IC…this will increase the current handling capacity of the circuit many folds.

      I'll try to post a related circuit article very soon.

      Thanks and Regards.

  8. One the coming applications of solar is for small water pumps… like feeding a drinking trough for cattle or watering a garden. These simple solar applications require, in addition to a charge regulator, an inhibit switch to shut off the water pump when battery voltage goes low. Can anybody come up with a simple way to add a cut-off switch to this regulator circuit? I believe this small addition would increase the popularity of this circuit and offer many people an expensive way to operate small water pumps. Thanks for any comments.

    Roswell, New Mexico

  9. Swagatam

    I have been thinking about the ultimate solar regulator for RVs and solar water pumps. I am now working on a PC board design (ExpressPCB) which will allow for a number of options. 1) your regulator as shown 2)provisions for an AtTiny microprocessor which can provide timers, analog input and digital output 3) several LM117 switches 3) heat sensor and 4) photoresistor. Given this pc board can provide these functions it should offer a lot of versatility. Last I will note the LM338 comes in a T0-3 case which allows for external mounting on a metal box (heat sink).

    The real trick, of course, is to design an intelligent pc board layout which can provide any or all of the above functions and offer self protection by shutting down under extreme heat or heavy current loads.

    I might also suggest, by incorporating PMW outputs, this pc board could also provide solar tracking ability by using the photoresistor and microprocessor logic.

    I understand this is overkill for most solar applications today, but as solar applications increase in sophistication, all these functions will become necessary.

    FYI… I do have several web sites which discuss solar installation and solar tracking technology.

    Roswell, New Mexico

    • That's indeed very interesting. Thanks sundownr!

      I'll look into the the feasibility of the above mentioned features and hopefully come up with a more versatile and improved solar controller circuit.


  10. Take a look on Digikey at a STP-75NF75. The specs on this MOSFET are terrific for $2.39 a copy. Nothing else in this price range comes even close for temperature and amperage. With a 555 and a little PWM circuity you can charge anything and/or drive anything (water pump) without worrying about heat dissipation.

    Take a look at this circuit ===> http://chemelec.com/Projects/PWM/PWM-1.jpg

    The guy that runs this site can design anything. His name is Gary and he is tops in analog design.

    • Hmm…yes the mosfet specs are very good, specifically suitable for controlling heavy motors.

      The circuit link shows a PWM motor speed controller,I think I have a similar circuit posted in this blog too.

      However this circuit is more elaborate and powerful, I am sure, folks will love making it.

      Appreciate all the info you have provided, thanks very much.

    • Hi Swagatam,
      Nice to see u r valuable suggestions, its a great work.

      using solar panel, without any battery, i need a variable voltage and current supply to run my project ,it doesn't matter how many hours it may work, till sun is their. the specs required for me is variable voltage 0-4 v and current 0-10A, just what we see in regulated power supply using AC power.

      Will it be possible, if so solar panel required with what voltage and current, can u help me out with u r suggestions and any circuit with u…u can post to my mail id may9th@gmail.com

    • Yes, I was thinking that a series MOSFET switch would be a better deal. The 3-terminal regulator just needs too much headroom. It forces you to use a higher voltage solar panel, and then throws away some of the power.

  11. i think lm 338 will handel only up to 5 amp ,how to handel the 30 amp current to charge the battery ?will putting a series of lm 337 in parallel will work to handel 30 amp current?

  12. I plan to build a solar panel voltage regulator to replace a damaged unit used for a navigational light. The supply to the light is always on because its location. will there be a problem?

    • Do you mean the charger controller will remain switched ON permanently, day and night?

      Will do, that will do no harm to the above suggested controller design….

  13. I know this post is relatively old but I have a question. For the S1 could you setup a relay to automatically switch from battery to inverter once the battery was charged. If so what all would be involved in such a mod.

    • Sir!i see this subject was before 3 years a go,i m a new one.anyway still not too late to learn.pls help me.
      i saw a formula to solve the same equation,but diffrent result.Vout=1.25(1+R2/R1).is it something another.
      counting on your help

  14. hi,
    kindly explain in the connections of the POT…..the diagram shows the variable and fixed end goin indirectly to the adjust of IC only…..and thats confusing me.

    kindly explain that sir.

  15. hey,

    how do you verify the working of the circuit???????
    like once the circuit is connected and supply is provided, how do you verify if its working correctly or not?????

  16. Found this on a google search. I recently aquired a 22 volt probably 20 watt panel. I bought a regulator for my first motorhome solar system and it failed shortly there after.
    I've checked amazon … no luck. Where can I buy these items without having to buy 50 of each?
    Thanks from sunny San Diego, CA for posting the project.

    • In India (Mumbai) anybody can get the parts from the main electronic market situated at Lamington Road(grant Road)….not sure where you would find them in your area.

      In India all the above material would cost just a couple of dollars.

  17. Hi,
    I have a home inverter of 800VA with the battery rating of 12V, 100AH. please suggest wheather regulator circuit will work as it is or it requires any change and secondly please let me know the value of R3 & lastly wheather can i get the assembled circuit in bangalore

  18. sir , i have connected this circuit with 100 watts panel and it is giving 20 volts .but the regulator output is 9.6 volts only. i used all the components as u mentioned. please help me to solve the problem in this circuit

  19. Well I am a newbie at this.I have a 10w , vmp=17, imp=0.59, voc=21v solar panel. Will the circuit work for me??
    and should i use a 12v 2.5Ah or a 12v 7.5Ah battery?

    • The circuit will work with all types of solar panel whose max output voltage is not beyond 30V.

      The battery ratings will depend upon your output load specs, this regulator will support upto 50 AH

    • what type of inverter circuit should i use for above specs?(10w , vmp=17, imp=0.59, voc=21v solar panel)
      PLEASE provide me a link for the same…

  20. i have 5watts 18v open circuit solar panel.how many hours this solar panel can charge a 12v 4A battery. it is okay to use this circuit?

  21. sir this is raju i have 12v 100AH battery with 125 watts solar panel. plz tell me the values of R3 and pot and any other changes in the circuit

  22. dear sir , i am bala , i am learning lot from your blog. i did the circuit , it is working well. please add battery over charging protection using IC 741. that will be very helpful.

  23. sir, i cannot understand double diode near battery positive and relay n.c area. please explain that will help me to understand

    • when the charger cuts off, these doides keep supplying the battery with a charging voltage that's much lower than 14.3V, because two diodes will drop around 0.6+0.6 = 1.2V….so 14.3 – 1.2 = 13.1V….the battery will stay at stand by position always at this 13.1 volts even after cut off.

  24. Dear Sir, I am greatly amazed by your project cos I am new to electronics project. I am working out a 24 hours running exhaust fan with solar panel, so i need a battery connected with solar panel which constantly run the fan 24 hours 7 days per week for my house, does this work ?

    Thanks a lot experts.


  25. Hellow Swagatam,
    What is the typical voltage dropout in this circuit? And, I understand the values of R2, R3, and R4 but what determines the value of R1 to be 120 ohms in this circuit above? And finally, what modification do you suggest to use this circuit using a solar panel of (Voc 10.7V, Vmp 8.7V, with short circuit current of 0.34A)to charge a 6v 4.5AH battery? Thank you for your time to reply me.

  26. Normally speaking, a charge controller not only regulates the charging voltage and current but also cuts off the charge when battery is fully charged to prevent explosion. I don't understand what component is used to cut off charge to prevent overcharge on this ciruit? I read somewhere an addition of zener diode prevents overcharging, if so, can a zener (or any other suitable component) be added on this circuit to prevent from overcharging?

    • The above circuit is a voltage regulator, not a controller…of course a controller can be easily added….i have discussed many automatic battery charger circuits in the blog, any of them may be attahed with the above design for making it a full fledged unit.

      a zener is not enough for controlling the circuit, you will have to incorporate a comparator stage for sensing and cutting of power during the threshold levels.

  27. http://www.google.com.pk/search?q=simple+electronic+content+uploads+2009+solar+charger+control&hl=en&source=lnms&tbm=isch&sa=X&ei=kKNOUdyUFcGFO8T1gfAF&ved=0CAoQ_AUoAQ&biw=1517&bih=714#imgrc=-3hZdM0fFsV41M%3A%3Bk9jsIKax_xUnXM%3Bhttp%253A%252F%252Fsimpleelectronic.com%252Fwp-content%252Fuploads%252F2009%252F06%252Fsolar-charger-control.gif%3Bhttp%253A%252F%252Fsimpleelectronic.com%252F2009%252F06%252F29%252Fsolar-charger-controller-circuit-diagram%252F%3B765%3B534

    Hi swaghtam , I have designed this shunt mode solar charge controller(whose link ihav given above but the problem is that it directly connects my 20 volt solar panel to the battery which is not good for the battery. and the other prob is that it connects the battery to dummy load when set point voltage is reached (which drains the battery).
    so kindly help me solve 2 probs :
    1- how to ensure that battery gets no more than 14v from panel
    2-how to stop panel from overcharging without using dummy load

    • Hi Sultan,

      Add a rectifier diode exactly in between battery (+) terminal and junction of 68 ohms resistor and diode 1N5818.

      Adjust the 100k pot so that the mosfet conducts exactly at 14V

  28. no ithink u didnt undersstand my question the mosfet conducts when set point is reached and ten dummy load starts conducting from the panel/battery and
    before mosfets is turned on at 14v the panel will be directly connected to the panel which is bad my question again stands:
    what do i do to not alow more than 14v at ny instance on battery
    and how do i turn off charging without using pathetic dummy load

    • the mosfet will not not allow the voltage to go above 14v, if the preset is adjusted to conduct at 14v, so your battery is always safe.

      but an over charge cut off facility is not there in this circuit, so you will have to add it externally

      the 68 ohm resistor must be reduced to 10 ohms or even less.

      the diode as mentioned in my previous comment is vital.

  29. can u give me the circuit of overcharge cut off
    and do u want me to place the diode between battery positive and 68 ohm load?
    kindly specify the diode model and also the direction ( reverse or forward direction)

  30. Sir could you explain the working of the BC547 switch? How it would determine whether the battery is fully charged or not?

  31. Respected Swagatam Majumdar, Me Rajib Banerjee, The most I think that with Normal 800va or more Inverter system if I add solar pannel to charge the same battery like hybrid solar inverter then need an external hybrid system for normal Inverter, which circuit can measure the battery charge full or not, if it not full by solar pannel then automatically switch to the grid current to fullfill the battery charge. Is it possible to make this type circuit device for externally adding with Normal Inverter then please help me and also Need to know the exact calculation of the need solar pannel WP for 800 va 150 Ah 12V battery or 180 ah 12 volt. what is the exact WATT (Working Load) calculation in VA, Thanks Please I am waiting for answer.

  32. Hello, i wanna ask you about this solar panel regulator bcz i have a battery of 12V 5AH/20HR my question is if this regulator can work well in charging even it is 5AH? The second is if i can replace LM338 by LM317.

  33. Hi Sir

    I have solar panel 300W, Charge controller 35A, Battery 150AH, How can I connect this to Home inverter, so that i can charge the battery from both the source solar and Main supply.

    If i connect charge controller directly to inverter how it will decide which source should be selected and in absence of AC power supply will it feed the inverter from solar power.


  34. Hello sir, wonderful circuit. I've built it and it works fine.
    I would like to ask, is there anyway to indicate if overcharging?
    Thank you sir.

    • It's for grounding the ADJ pin of the IC in case the the output load exceeds the preset current limit. This results in switching off of the IC and its output voltage to the load.

  35. Pleased with the existence of your blog,
    I am very confused with my project about solar cell phone charger.
    In this case I use the former solar cell flashlights that produce voltages of 7-10 volts and want to reduce the voltage to 5 volts.
    I have tried to use LM7805 but is only capable of producing the range of 3 V around to the scorching sun.
    What types of ic regulator 5v with small amps??
    Thank you

    • Thank you!

      7805 is a very reliable IC and it will 100% produce 5V with a minimum of 7V input.

      Check the compare input and output voltages using 7805 without any load connected, you will find exact 5V at the output of 7805.

  36. hi sir.i like your post. considering im using 18.5v panel with 2.2amp current 70ah battery what will be the value of r3,r4 and pot?pls include the wattage. thank you

  37. Hello! Found this page very useful. Thank you for the detailed information. I am actually looking to build a solar charger to charge my NiMH rechargeable batteries which will in turn run a dc stepper motor. My NiMh batteries are 12V 2700mAh. The solar panels that I am using are TWO 6V panels with a power of 1.5W each. The DC motor’s working voltage is 12V and current is 0.33A. Will this circuit schematic work for the solar panel and the rechargeable batteries? How will I determine the resistor values? I will be very obliged if you can help me out. Also can I use a substitute transistor instead of the BC547 and use LM317T instead of LM338.

    • Thanks!
      yes you can use the above shown circuit for your application. Since the charging current is within the range of the iC 317, it can be used in place of LM338.
      The pot P1 should be adjusted for getting 14V at the output for the battery under charge.
      The panel must be capable of generating in excess of 14V, may be a couple of voltages more.
      R4 is not important so it may be removed.
      R3 = 0.6/1 = 0.6 ohms 1/4 watt
      BC547 can be substituted with any identical NPN transistor

    • Thank you so much Sir. Also, in the circuit above (not the upgraded version but the one that is shown above on this page), you have not used a capacitor? Could be get by without one?

      Also in the upgraded version (for which you provided the link in your above reply), I would need to use a NC switch? And the resistor values shown in the upgraded version are fixed or will they vary according to our battery specifications?
      Really appreciate all the help and your prompt replies.

    • capacitor would be required only if the supply is derived from an ac source and the bridge is 6 inches away from the IC, it's not required for a DC source such as a solar panel.

      sorry i did not understand what you meant by a NC switch?
      R2 should be replaced with a 10k pot for adjusting the charging voltage as per the requirements.
      and the BC547 emitter resistor must be selected as instructed in the above article.

    • I'm sorry to bombard you with a million questions but I had a few more queries (actually not so few). So for the circuit shown above on this page, are we using a toggle switch (one that is referred to S1 above)? and what is the inverter positive? So for my requirements where I am using two 6V solar panels (1.5 W each) to charge my 12V NiMh battery, the pot that I calculated was 2K. I just wanted to make sure that I was using the right one.

      For the new circuit that you mentioned, R2 would be replaced with a 10K pot (instead of the 2K that I am currently using) but the resistors connected to the IC741 chip would have the values as shown in the schematic or would they differ according to requirements? And we're only using one pot in the new schematic, right? The rest are fixed resistors? Also would it be ok if I used the npn transistor 2N2222 instead of BC547? Lastly for this new schematic, the diodes connected to the positive of the battery need to be connected to a switch?

      Sir, I am also somewhat confused about another facet. I am using my 12V NiMh batteries to run a DC stepper motor (driven by a H-bridge) and controlled by an arduino. the battery is used a backup power supply to run the motor whereas the primary supply would be AC (converted to DC through the AC to DC converter of the microcontroller). I was wondering firstly how would i connect my DC motor inorder to run it with the battery? Secondly can i incorporate some sort of option where the user can use either the direct power supply to run the motor or switch to running the motor from the NiMh battery pack?

      I apologize for the plethora of questions. I am not extremely familiar with the circuitry and therefore am encountering these questions. I will be grateful if you can help me out with my queries. Thank you so much. =)

    • Inverter is the unit that converts battery voltage to 220V AC mains, here S1 is a switch which can be used to shift the battery from charging mode to inverter mode once it gets fully charged from the LM338 circuit, so that the inverter can be used for obtaining the intended 220V AC

      A 10k pot will give a bigger adjustable range, so a 10k pot is better.
      other parts associated with IC 741 will remain as given.
      other than the 10k pot the 741 circuit includes a 10k preset which should be used for setting the over charge threshold.

      2N2222 will be fine.

      the battery (+) can be connected to the motor bridge via a 1N5402 diode and also stepped down to 5V via a 7805 IC for feeding separately to the arduino board, so basically that's 12V via diode to stepper bridge, and 5V via 7805 to arduino.

      With so many initial doubts and questions, I fear there could be 90% chance that you wouldn't succeed with these circuits, especially the 741 automatic charging circuit, because it's for experienced hobbyists who are already well versed with the basics.

    • Dear Sir,
      Thanks for patiently answering my questions. I know I'm a novice in this field but I guess I'll never learn until I experiment and make mistakes. Please excuse my ignorance though. So I had gone ahead and tried making the circuit above (I'm not trying to attempt the automatic cutoff circuit just yet) and well, the circuit 'seems' to be doing something but I'm not sure if it's functioning correctly. I just wanted to clarify whether I had my connections right. I did not include the switch and the inverter. For now I only want to recharge my battery using my solar panels and possibly control the charge current.

      So I had the positive of my solar panel connected to one side of the diode. The other side goes to PIN3 (input) of LM317. I have one leg of the 220 ohms resistor coming out from pin2 of LM317 and the other leg attached to a 2K pot. I also have a connection from Pin 1 of LM317 with this end (wiper and leg1) of the pot. The other leg of the pot is grounded. Then from Pin 1 of LM317 I have attached pin3 of the 2N222 transistor. Leg 1 of the transistor is grounded and leg 2 is connected to one side of a 2.2ohms resistor. The other side of the resistor is grounded. Finally I have the positive of the battery connected to PIN 3 of LM317 and the negative is grounded. I am not sure if my configuration is correct. Is there a connection between R2 and R3? Are the negative of the solar panel, Emitter of the transistor, one leg of R3, one leg of the pot R2 and the negative of the battery all commonly grounded?

      My desired charging current is 0.27A. I am using a 12V 2.7Ah NiMh battery and I am using 4 (4.5V) solar panels in series with a power rating of 1.5 W (each panel) and current rating of 0.334. When I connected an ammeter in series with the positive of the battery it gave me a 0.09A which doesnt seem alright. When I tested under a bright lamp right, the solar panel was giving a decent voltage output but the ammeter read 0.0A. When I took it outside, that was when it gave me 0.09A. I am not sure if my circuit is working correctly or I have connected everything correctly. Before connecting my battery to this circuit, I measured the voltage of the battery as 6.79 and after connecting it and putting it in the sun for a while, I disconnected and isolated the battery and tested the voltage which was then 11.04V. So is my circuit charging the battery? And why is the current so low? Should I not be getting something close to 0.27 A.

      Again would appreciate it a lot if you can help me clear my confusions. Thank you πŸ™‚

    • Dear Zara,

      You will have refer to te datasheet of the IC 317 to correctly understand its pinout connections.
      However, with the present connections if the pot rotation is giving a variable output then you can assume the connections to be right.
      yes all the negatives sould be made into a common line as given in the diagram.
      with an ammeter connected short the output of the circuit and check the current, if it's equal to the panels maximum amp value (1.5amp max for 317 IC) then you can be sure that the circuit and the panel are working coirrectly.
      For 12V set the output to 14V, otherwise the battery will not initiate the charging process.

    • Dear Sir,
      Thank you so much for being patient enough to answer my barrage of questions. I tried the above circuit without the inverter and it seems to be charging my 12V NiMh batteries. I had a few questions that I still had some doubts about.

      Firstly, I have not tested running the DC motor on the battery as yet but I was wondering whether I will be able to use the above circuit to continuously charge my battery even while it is connected to the motor and running the motor?
      Secondly, I was also confused as to how to determine Icharging or the current that is charging the battery. Does the ammeter connected in series with the battery positive and one leg of the R1 resistor measure Icharging? If that is not equal to the solar panel's max current but is below the charging current set by the transistor and R3, is the circuit working? Is the charging current provided to the battery different than the solar panel max current? And is the transistor basically also helping in trickle charging the battery? And would I be able to change Icharging? Or the current I am using to charge the battery?
      Lastly, I am currently using 4 solar panels to get a dc input voltage but the system I am designing needs to be compact. Would there be a way I can use only a small solar panel with a low dc voltage and somehow step it up to charge the battery? I do not want the charging current t be affected though. Would I be able to use a transformer (or that would be only in the case of AC current) or a boost converter? If it is possible, could you please explain how I can integrate it in the above circuit? So if I have a panel outputting 4.5 volts and I want to step that up to 14V to charge my battery, would that be possible?
      Sir, I would be very grateful if you could shine some light on my queries. I apologize for bombarding you with so many questions every time. Greatly appreciate your efforts. Thank you.

    • Dear Zara, here are the answers:

      I have not tested running the DC motor on the battery as yet but I was wondering whether I will be able to use the above circuit to continuously charge my battery even while it is connected to the motor and running the motor?

      No, including the motor will need the charging curent to be increased which might affect the battery when motor is switched OFF.

      Secondly, I was also confused as to how to determine Icharging or the current that is charging the battery. Does the ammeter connected in series with the battery positive and one leg of the R1 resistor measure Icharging?

      Yes, you can see the CHRG current in that way.

      If that is not equal to the solar panel's max current but is below the charging current set by the transistor and R3, is the circuit working?

      The current reading could be equal to the set value by R3 or less than that, but never above that no matter how large the input current may be..

      Is the charging current provided to the battery different than the solar panel max current? And is the transistor basically also helping in trickle charging the battery? And would I be able to change Icharging? Or the current I am using to charge the battery?

      R3 will not cause trickle charging. It can produce a lot more than that.

      R3 can be changed only to change the charging current rate of the battery.

      Lastly, I am currently using 4 solar panels to get a dc input voltage but the system I am designing needs to be compact. Would there be a way I can use only a small solar panel with a low dc voltage and somehow step it up to charge the battery? I do not want the charging current t be affected though. Would I be able to use a transformer (or that would be only in the case of AC current) or a boost converter? If it is possible, could you please explain how I can integrate it in the above circuit? So if I have a panel outputting 4.5 volts and I want to step that up to 14V to charge my battery, would that be possible?

      Boost circuit can be used for increasing the solar panel voltage, only if the VxI of the panel is well above the VxI requirement of the output

  38. sir good day can you give me a simple schematic of a solar charge controller able to charge 200ah thru a 200 watts panel. parts here in the philippines are very hard to find so if possible use of common parts is very much appreciated. thanks and more power…

  39. ok will lm337 work instead of 338? i cant find 338 here. and assuming a 50 watt panel what is the maximum wattage of an inverter it can operate safely? 1 have 1000 watts modified sine inverter. thanks again

  40. Hi Swagatam,

    I have solar panels 240W, 30.04V,7.4A, (generating 31-32.5 V in sun with no load) Open circuit 36.5V, 8.4A. I want to build a Charge controller for Battery 150AH/180AH and want to connect this to Home inverter ( 12V single Battery/24V Double Battery) to be given to two schools I want to charge the battery from both the source solar (preferably during day time ) and Mains supply (during rainy reason/night).

    Please let me know if I can use the above circuit such that inverter decides which power source should be selected and in absence of Solar power supply it should feed from AC.


    • Hi Gopal, LM338 will not be able to charge a 150ah battery.

      you can use two LM196 in parallel for the same, but a 30V panel with 7amp current won't be combatilble for a a LM196 or any such regulator
      You will probably need a buck converter circuit, which would convert 30 x 7.4 parameter to 14 x 15 for the required charging

  41. Hello,

    can you please tell me what modifications to be made on your schematics in order to obtain a 12V output to drive directly a 12V dc motor of max. 90W?

    Thanks in advance for you answer.

    • Hi, for 90 watts you will have to use LM196 instead of LM338, rest everything will remain as is except R4 that can be removed since it does not play an important role in the design.

      P1 should be a 10k pot, and R3 is calculated as follows:

      R3 = 0.6/7 = 0.085 ohms or any nearby value will do,

      P1 must be set to obtain 12V at the output….

      the input must be above 13V but less than 30V
      the IC will need an heatsink.

  42. Hey,

    I tried this one, but I failed with it. I have 2 solar panels (each 4,5V) LM338, BC547, 10k pot and other stuff (resistors, diodes). I connected it, but it doesn't work as it should. If I change the position of the solar panels, the voltage changes. It should not alter or am I missing something somewhere. Isn't LM338 here to adjust the voltage so it is not changing?

    • the IC is not designed to boost an input voltage, it will only produce a max output that may be 1V lower than the input and a minimum that may be equal to 1.25V.

      In your case the achievable output range would be from 1.25V to 3.7V

    • I connected solar panels in series, so I get between 8V and 9V. In the end I set it to be 5V (just like the USB port), but when the light is changing, the output voltage is changing. Isn't that bad for the battery?
      And thanks for your fast reply πŸ™‚

    • LM338 ICs have excellent line regulation feature, meaning the output will never deviate more than +/-1% regardless of input voltage changes.

      I think there may be something wrong with your circuit connections or the IC could be faulty (duplicate)

  43. thank you sir. and sorry, for i didn't know that my reply has been sent already. another question sir, can we use the circuit in other application instead of using it as battery charger?? like can we connect some LED lights as it's output??? thank you sir,. πŸ™‚

  44. hi swagatam,
    i have 5 hp solor pump set running ,now i want to use for home when not in use for pumping water ,the panels connected in serious for vfd dc 700 volt ,now i want to convert dc 700 volt to ac so i can stepdown to 36 volt by transformer and feed this to battery for charging and using it for day time ,please give me any circuit

    • hi shiva, converting the 700V may not be required, we can get a lower voltage option through one of the solar panels or through a couple of them…what is the rating of each panel that you you have used in the array??

  45. hi sir may i ask do you have any substitute regulators for LM338 that i can use? i cannot find any LM338 here in my current location. my solar panel is a 50w 20Voc with 40AH battery. what are the values of R3 and R4? also why did you use a potentiometer? what's the purpose of the potentiometer? can i just use a fix resistor with 2k ohm value? thanks and more powers

Leave a comment

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