Home » Renewable Energy Projects » Solar Panel Voltage Regulator Circuit

Solar Panel Voltage Regulator Circuit

The post details how to construct a simple solar panel regulator controller circuit at home for charging small batteries such as 12V 7AH battery using small solar panel

Using a Solar Panel

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 with 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.

Why to we Need a Solar Regulator

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.

Circuit Diagram

Solar Panel Voltage Regulator

Track side PCB Design (R4, Diode and S1 not included...R4 is actually not important and may be replaced with a jumper wire.

Solar Panel Voltage Regulator PCB layout

 How it Works

Referring to the proposed solar panel voltage regulator 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 circuit is framed as per the standard mode of the IC 338 configuration.

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.

Current Controlled Charging

This solar regulator controller 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).

Calculating Charging Current for the Battery

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.

SHARING IS CARING!


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!



85 thoughts on “Solar Panel Voltage Regulator Circuit”


  1. Howdy, Friend! Interested to Learn Circuit Designing? Let's Start Discussing below!
    • Ijaz, please specify the voltage of the panel, and the voltage/AH of the battery, so that I can suggest you the right data

    • yes it will work, but make sure the panel voltage is above 15V, and current above 5 amps.

      buck converter won't be required unless you want something too efficient…

  2. I am building a model of a solar panel house for middle school students. One of the circuits I’d like to show is solar panels connected directly to a simple 12vdc -115vac inverter without a battery (no sun, no power).

    Since the output of the panels varies from about 10 -18volts, I’d like to regulate it at about 12-13vdc. Can I use your solar panel voltage regulator circuit which uses an LM338 regulator without a battery to connect directly to the inverter (switch S2 connected directly from LM338 to inverter)?

    • yes definitely you can use it, if possible replace the IC with a LM196 or LM396 so that the max current handling capacity can extend upto 10 amps max…

  3. hi. great circuit you got there. can i ask if the circuit can withstand 48V from the solar panel? and if not can i use a voltage divider in the input of the voltage regulator to lowered the input voltage?

  4. Beni, the formula is given in the datasheet of the IC, please confirm it for assurance.

    By the way what results are you getting?

  5. 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.
    thanks.
    counting on your help

  6. 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

  7. 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??

  8. sure hessika, you can use the circuit as a LED driver also, I already have a few articles whee the same configuration has been implemented as LED drivers

  9. 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,. 🙂

  10. i have 6V/2W solar panel, will this provide an output of 1.5-4.5 volts? i will use an eveready rechargeable battery 1.5V 1300mAh for the output battery

  11. 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?
    Thanks

    • 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)

  12. 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.

  13. 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.

    Regards
    Gopal

    • 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

  14. 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

    • 337 is a negative regulator, you can use it but the configuration will need to be reversed entirely for getting the same results.

  15. 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…

  16. sir can you give me a simple schematic of a charge controller able to charge 200ah battery? my panels are 200 watts. parts in the philippines are very hard to find. thanks

  17. 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

  18. i have 150 watt panel and its voltage is 15v to 20v, i want exact 12v for dc fans so is it the above circuit will work for me.

  19. 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.

  20. No, not for overcharge, it's for controlling overload or short circuit at the output, it will not cut off the battery when it's fully charged.

  21. 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.

Leave a Comment

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