[ Play Video ]

Welcome to my solar charge controller tutorials series.I have posted two version of my PWM charge controller.If you are new to this please refer my earlier tutorial for understanding the basics of charge controller.

1. Version-1

2. Version-2

This instructable will cover a project build for a Arduino based Solar MPPT charge controller.It has features like: LCD display,Led Indication,Wi Fi data logging and provision for charging different USB devices.It is equipped with various protections to protect the circuitry from abnormal condition.

The microcontroller used is in this controller is Arduino Nano. This design is suitable for a 50W solar panel to charge a commonly used 12V lead acid battery. You can also use other Arduino board like Pro Mini,Micro and UNO.

Now a days the most advance solar charge controller available in the market is Maximum Power Point Tracking (MPPT).The MPPT controller is more sophisticated and more expensive.It has several advantages over the earlier charge controller.It is 30 to 40 % more efficient at low temperature.But making a MPPT charge controller is little bit complex in compare to PWM charge controller.It require some basic knowledge of power electronics.

I put a lot of effort to make it simple, so that any one can understand it easily.If you are aware about the basics of MPPT charge controller then skip the first few steps.

The Maximum Power Point Tracker (MPPT) circuit is based around a synchronous buck converter circuit..It steps the higher solar panel voltage down to the charging voltage of the battery. The Arduino tries to maximize the watts input from the solar panel by controlling the duty cycle to keep the solar panel operating at its Maximum Power Point.

Specification of version-3 charge controller :

1.Based on MPPT algorithm

2. LED indication for the state of charge

3. 20x4 character LCD display for displaying voltages,current,power etc

4. Overvoltage / Lightning protection

5. Reverse power flow protection

6. Short Circuit and Over load protection

7. Wi Fi data logging

8.USB port for Charging Smart Phone /Gadgets

Electrical specifications :

1.Rated Voltage= 12V

2.Maximum current = 5A

3.Maximum load current =10A

4. In put Voltage = Solar panel with Open circuit voltage from 12 to 25V

5.Solar panel power = 50W

This project is consists of 40 steps.So for simplicity I divided the entire project in to small sections.Click on the link which you want to see.

1. Basics on MPPT charge controller

2. Buck circuit working and design calculation

3. Testing the Buck Circuit

4. Voltage and Current Measurements

5.LCD display and LED indication

6.Making the Charging Board

7.Making the Enclosure

8. Making the USB Charging Circuit

9. Wi Fi Data Logging

10. MPPT algorithm and flow chart

Problem in V-3 :

During my prototyping, I have faced a critical issue.The issue was that when I connect the battery to the controller,the connection between the battery and the switching ( buck converter ) become very hot and then MOSFET Q3 burn out.It was due to shorting of MOSFET-Q3. So Current flows from Battery -MOSFET Q3- GND which is unexpected.

Update : 29.07.2016

I am no more working on this project due to some issues.This controller is not working.

So don't try to build, if you don't have enough knowledge on this field.

You may take ideas from this project.


1. Arduino Nano (Amazon / eBay )

2.Current Sensor ( ACS712-5A / Amazon )

3.Buck Converter ( LM2596 / Amazon )

4.Wifi Module ( ESP8266 / Amazon )

5. LCD display ( 20x4 I2C / Amazon )

6 .MOSFETs ( 4x IRFZ44N / Amazon )

7. MOSFET driver ( IR2104 / Amazon )

8. 3.3V Linear regulator ( AMS 1117 / Amazon )

9. Transistor ( 2N2222 )

10.Diodes ( 2x IN4148 , 1 x UF4007 )

11.TVS diode ( 2x P6KE36CA / Amazon )

12.Resistors ( Amazon / 3 x 200R ,3 x330R,1 x 1K, 2 x 10K, 2 x 20K, 2x 100k, 1x 470K )

13.Capacitors ( Amazon / 4 x 0.1 uF, 3 x 10uF ,1 x100 uF ,1x 220uF)

14.Inductor ( 1x 33uH -5A / Amazon )

15. LEDs ( Amazon / 1 x Red ,1 x Yellow ,1 x Green )

16.Prototype Board ( Amazon )

17.Wires and Jumper wires ( Female -Female )

18.Header Pins (Amazon / Male Straight ,female , Right angle )

19. DIP Socket ( 8 pin )

19.Screw Terminals ( 3 x2 pin ,1 x 6pin / Amazon )

20.Fuses ( 2 x 5A)

21. Fuse Holders (Amazon / 2 nos)

22. Push Switch (Amazon / 2 nos)

23.Rocker /Toggle Switch ( 1 no)

24.Female USB port ( 1no)

25. JST connector ( 2pin male -female )

26.Heat Sinks ( Amazon )


28.Plastic Base

29. Spacers ( Amazon )

29. Screws/Nuts/Bolts


1.Soldering Iron ( Amazon )

2. Glue Gun ( Amazon )

3. Dremel ( Amazon )

4. Cordless Drill ( Amazon )

5.Hobby Knife ( Amazon )

6.Wire Cutter ( Amazon )

7.Wire Stripper ( Amazon )

8.Screw Driver ( Amazon )

9. Ruller and pencil

<p>I have a question regarding MPPT. I have a 12 V 1.2 Ah rechargeable battery. I am using a 30 Watt, 12 volt solar panel to charge this with an MPPT solar charger in the middle. Now the MPPT charger is rated as 12 V, 17 AMP. Does this mean that 17A will flow into the battery via MPPT controller and damage it? Please help me as I am not familiar with the spec and this is the first project I am doing on solar panel</p>
<p>Hello, can i ask where 8 come from in the calculation for the capacitance:</p><p>The out put capacitor ( Cout)= dI / (8 x Fsw x dV)</p><p>Thank in advance</p><p>. </p>
<p>Good job deba168. I want to simulate it in proteus. Please, can you send me the simulation at diegotm_@hotmail.com</p>
Would this set up work with a DC motor being driven as a generator?<br>I suspect that a generator would put out much more power than solar panel.<br>What would need to be changed to handle the higher out put?<br><br>Ideally I would like to control the resistance felt on the bike and have the charge sent to the battery secondary, once the battery is charged I would like to have the load sent to a &quot;dummy load&quot; like a DC water heater element.
<p>i used an ir2104 as a gate driver and it seem work just fine but after i connected to my buck converter. it can not send duty cycle that i put it. Does anybody help me please TT</p>
<p>Did you mean Q4 as a blocking reverse power from battery to the solar panel during night? because i do not think Q1 is not blocking anything.</p>
<p>Hi</p><p>Can you please tell me how to make this a MPPT 100 Amp Solar Controller</p><p>Cheers</p>
is it possible to drive the gate by just using only 1 nmos as a switch? someone reply me please
<p>no,</p><p>sourcing and sinking current both are mendatory for driving mosfet. or you will suffer from switching loss</p>
<p>why i cannot download pdf</p>
<p>deba168 whether by changing the size of the inductor and enter the calculation formula, I can raise the input of solar cells into 200-1000wp thanks</p>
<p>what components need to be changed if I would use solar panels to specifications 200wpx5 = 1kw thanks</p>
<p>This controller is not fully functional.So I will recommend you to proceed.</p>
<p>Hello All,</p><p>I have two things to share:</p><p>I. Maybe worth to check and try this to prevent burning MOSFET: <a href="http://tahmidmc.blogspot.nl/2012/10/magic-of-knowledge.html" rel="nofollow">http://tahmidmc.blogspot.nl/2012/10/magic-of-knowl...</a></p><p>II. I originally build the circuit discussed by deba168, but I as well had issues (did not try yet the modification from upper link). So finally I modified LOT of things and now it works great, and it is simple (and is non-syncronous...). Modifications:</p><p>1. I bought from eBay this nonsyncronous Buck converter and asked than for refund, as there are usually based on XL4016 IC, which is not 12A, but 8A...;) Still, up to around 9-10A you can use it and it costed 0 USD :)</p><p><a href="http://www.ebay.com/itm/DC-DC-CC-CV-Buck-Converter-Step-down-Power-Supply-Module-7-32V-to-0-8-28V-12A-HT-/112149106365?hash=item1a1c9b8ebd:g:K38AAOSw7KJXDg5f" rel="nofollow">http://www.ebay.com/itm/DC-DC-CC-CV-Buck-Converter...</a></p><p>I am charging Li-ion battery pack (10x7.2Ah).</p><p>2. I am manipulating via simple analogWrite command on default 490Hz (pin D11) the FB pin of XL4016 of Buck through a diode and 150 ohm resistor. Buck has a cooling fan what above 4A turns on.</p><p>3. As I want to get the most power NOT from just the Solar panel, BUT from the entire system (solar+buck), I am tracking &quot;mppt_track = buck_amps * sol_volts&quot; (I have ACS712 on output of the buck as well). So with this, system track the MPP of the solar+buck as well.</p><p>MPPT algorithm and Mode selection is very simple. </p><p>4. I built an Ideal diode based on LTC4412 (ordered as sample), see the solution in this pdf: <a href="http://www.linear.com/solutions/1464" rel="nofollow">http://www.linear.com/solutions/1464</a></p><p>5. Energy meter, with long term and daily Wh feature is in as well, measures daily and long term peak W, peak buck amp, etc. See LCD on attached pictures.</p><p>I have added an &quot;MPPT test&quot; void as well, which stops all, and runs an MPPT test to find on-demand again the MPP point - if for any rason you want to check it.</p><p>6. To mine solution I have added some home automation as well: controls night light, air cleaning fan speed (On, Silent, Manual, AutoSpeed, Off), will soon add temp and humidity sensor as well and RTC module to turn on-off at pre-defined time the Wifi router, etc.</p><p>Pictures shows a mess, but it will be like this for a while due to continous running improvements. Complete Sketch attached (comments in it are not always updated at the moment). </p><p>Just wanted to share with you mine ideas and my progress status, so we can keep running this project. :)</p>
<p>Thanks for sharing your work.</p><p>I really appriciate it.I hope it will be helpful others also.</p>
<p>what is A0, A1, D9, D8 etc in circuit diagram ?</p>
<p>Hi Kapilku97, A0, A1, D9, D8 etc. are the analog and digital pins on the Arduino Nano used to control the MPPT charge controller.</p>
i want to simulate it in the proteus.
<p>How do You want to simulate if You are not able to find the I/O Pins?</p>
<p>Thanks keith, for answering on behalf of me.</p>
<p>whats are jp1 jp2 etcc. i want to simulate</p>
<p>Hey its written in the schematic.</p><p>Jp1 is for solar panel and Jp2 is for battery connection terminals.</p>
<p>Hi all,</p><p>I've just read this thread regarding the issue with the low-side MOSFET remaining open too long:<a href="http://www.mjlorton.com/forum/index.php?topic=68.60" rel="nofollow"><br></a></p><p><a href="http://www.mjlorton.com/forum/index.php?topic=68.60" rel="nofollow">http://www.mjlorton.com/forum/index.php?topic=68.6...</a></p><p>The first post describes, that increasing the Arduino frequency to 20 MHz solves the problem. </p><p>This sounds reasonable from my perspective (as a non-electrician), because it increases the precision of the PWM signal controlling the MOSFET driver and therefore leads to a more precise opening/closing of the low-side fet.</p><p>What do the experts here think about that and is anybody having a finished ciruit willing to give it a try?</p><p>Regards, Thomas<br></p>
<p>Hi Thomas / thschaef,</p><p>I think it is very unlikely that changing the clock frequency in the Arduino will fix the problem of the low-side MOSFET being on for too long, and sometimes on at the wrong time altogether. I am working on a solution but I want to test it carefully before going public. </p>
<p>Hi Keith (hope it's your first name),</p><p>that are good news, that<br>you are working on a solution. I hope you will publish (or announce) it here<br>when you got it and what has to be changed.</p><p>Good luck and I hope to<br>hear from you soon,</p><p>Thomas</p>
<p>I am eagerly waiting for it.</p><p>After long time working on this project,I don't want to scrap it.I hope you will definitely find a solution.</p>
<p>good contribution deba168</p>
<p>Instead of batteries I want to connect AC 220V 1kW water heater. Is it suitable for this controller?</p><p>Thanks.</p>
<p>sir where is proper circuit diagram of charge controller</p>
<p>I could not figure out how to use IR2104 so I used a pic 16f684 for PWM generation and IR2110. Circuit works perfectly. Thanks.</p>
<p>Looks nice, i don't want to discourage you but it will work until you will hook the battery after that you will wounder why Q3 aka the lower mosfet burns out and the upper one aka Q2 is so hot that you will burn your finger if you touch it. </p>
I wish to use use this with another buck circuit to drive an inverter. I am not using battery in my system. But still for the safety precautions I will put a diode before Q2 diode. <br>
<p>I don't understand Your Idea with a second buck converter... !?</p>
<p>I am designing a Solar Inverter without battery. I will have a separate battery for driver circuit and I would charge it with a dedicated battery charger and not by using Solar panels. Now the question is if I really need MPPT? Technically, I dont. Even without MPPT my circuit would work perfectly if I take a supply from Solar panels and Buck Boost it to a constant voltage that would appear at the input of the inverter which would convert it to ac power. <br>I am designing MPPT(buck) before the main buck converter just to get the maximum power that is available at the input side of MPPT (buck) to the main buck. So this MPPT buck's job is just to give whatever maximum power it can give from Panels to the main Buck. If I dont have MPPT, the power at the input of the buck will not be the maximum power all the time. <br>This, of course is a test product. I would like to check how much difference of power do I get from two methods.<br>If you have any other suggestion, you are most welcome.</p>
<p>I am not sure of this but the idea of the MPPT is that different voltages provide different amounts of power depending on the amount of sunlight falling on the panel. <br>The reason MPPT has to change the input voltage is to find the maximum amps x volts coming from the panels at that particular time. <br>So this is done regularly every few minutes to adjust to the changing &quot;maximum power point&quot; of the panels at the different times. <br>If your buck boost circuit is happy with a specific voltage as the input, then the panels shall supply the current and power based on that selected voltage. It may not be the most &quot;powerful&quot; voltage at the time. <br>Power = amps x volts. <br><br>Regards, <br>Khawar Nehal </p><p>http://atrc.net.pk</p>
<p>i have tryed this without a battery and had success basically i lowered the panel voltage down to 12 volts with a step down regulator or buck converter which i then fed into the inverter and i was able to power anything up to 40 watts from a 60 watt solar panel. however i had problems powering anything over 40 watts the inverter would beep and briefly power it but not constantly power it. i think what you could use is a stiffening capacitor making sure you connect it after the buck converter as its only made to handle 12 volts, this would allow some surge capacity without a battery and it will also help to smooth the output and possibly be able to increase the load. keep in mind that if a cloud passes your wattage will go way down and you would temporarily lose power. i have a video on youtube where i tryed this i can give the link if you request</p>
<p>Solar Inverter without a battery will work but not for long, i tried your idea last summer and it has problems. Any consumer that uses a motor will need a short amp spike to start, that spike can be 3x the rated working amperage so if you have a motor rated at 1Amp it will need for 0.5s a 3amp supply to start and after that it will fall back to the normal 1Amp. This instant starting current may be lower or bigger depending the starting torque needed by the motor to speed up. Without battery you are limited to the panels output even if your panel can handle the power requirement of the motor you can't give that x3 instant power to start it up and not last any small shadow on the panel will force the inverter in protection. If you don't need to store the energy and you want to use it directly when the panels are generating you don't need a big battery a 15-20Ah is fine but you will need one if you don't want to kill the inverter and damage the consumers. </p>
<p>Thanks for your detailed description but I am planning to build the system for 3kW so, I will have enough current to supply at motor starting. And the main reason to remove the battery is cost problems. Is there any other solution that you can suggest without using a battery?</p><p>And forgive me but I did not understand your explanation about IR2110. I consider it as a MOSFET driver, so its job is to drive the MOSFETs, how does it matter what load is there at the output of the MOSFET? And charge pump's job is to give gate pulse to high side MOSFET with respect to the source voltage. So even if we have 300 volts at VS terminal ( High side source and low side drain), charge pumop would work perfectly to give 12-15 volts of pulse above that. Please let me know if you think I am wrong. <br>Thanks.</p>
<p>I don't know any alternative to the battery, well if you have 3kW solar panels i think you afford a 40-50Ah car battery it;s not that expensive, well it will work without battery but you need to make sure that the panels will always have sufficient output current, like an example if a small cloud will pas in front of the sun cause 3-4min shadow your inverter will first enter in protection because it will not have enough output for the load and it will force the load to stop. </p><p> with IR2110 it's simple, voltage means potential difference 12V means a 12V difference between positive lead and Gnd/negative lead. The charge pump of IR2110 is just a simple capacitor and a blocking diode no boost converter or etc... now if you solar panel output is lets say 48V and the battery voltage is 45V what is the potential difference the capacitor can charge up ? 48-45 = 3V so your boost capacitor can charge up only to 3V not even near the required 8-10V. That is the reason of resistive load where on the OFF period on Source side you have 0V so potential charge voltage is input-0V si if you input is 48V then you have 48V-0V = 48V on the capacitor.</p>
<p>The charge pump of IR2110 does not care about the vs voltage. CHarge pump's job is to consider vs voltage as a reference and create a voltage at HO referenced to that (VS) voltage. So even if the battery is 48V and solar panels are 100 V , it will not have 52 volts across it. It will have only VCC voltage across the capacitor which you give to the 3rd pin. I dont see any reason why a MOSFET driver should change its working depending on the load. IR2110 will not be a problem.<br></p>
<p>If you say so then i will not argue with you. I tested it myself, i asked 3 experienced electrotechnician's opinion, two of them are designing chargers and SMPS-t for years so i doubt they didn't know what are they talking about when they told me what i told you about that charge pump. Your free to go and try it yourself. IR2110 charge pump is not a boost converter with switching involved, it's just a simple capacitor with a reverse biased blocking diode allowing it to charge up when the mosfet is OFF and blocking it's discharge back to the solar panel side and forcing it's charge to go trough the IR and from there to the mosfet gate. </p>
<p>The charge pump of IR2110 does not care about the vs voltage. CHarge pump's job is to consider vs voltage as a reference and create a voltage at HO referenced to that (VS) voltage. So even if the battery is 48V and solar panels are 100 V , it will not have 52 volts across it. It will have only VCC voltage across the capacitor which you give to the 3rd pin. I dont see any reason why a MOSFET driver should change its working depending on the load. IR2110 will not be a problem.<br></p>
<p>About how much power are we talking now?</p><p>As BansiS1 told this allready I would use a Battery to pick up spikes.</p><p>I would also use less &quot;converting steps&quot; ... and MPPT + Solar Tracker.</p>
<p>The power will be about 3 kW just enough for one home. </p>
<p>You can add as many diodes as you want it will not change anything, just read the DS of IR21xx and you will see that it needs a resistive load, what is a resistive load ? well anything that has 0V when Q2 is OFF. A battery is not a resistive load because when the mosfet is OFF if you measure the voltage between Gnd and Q2 source pin you will have 12V aka battery voltage and not the required 0V by IR21xx then the charge pump will fail -&gt; Vgs will be very small something like 3-4V tops -&gt; Mosfet will open only 30-40% -&gt; mosfet = high value resistor and will burn out. Q3 burns out because sync buck converter needs a very strict timing and with a &quot;home made&quot; software + harder you will not achieve that timing and on Q3 you will short out the battery for very short periods of time. That diode you speak about would be needed after Q3 and inductor , right before battery + lead but then the efficiency will be even smaller than an async buck which i did. </p>
Can you help me with this project ? Ill pay you
<p>About problem of burning low side mosfet. Did You tried to add pulldown resisors at SD pin and IN pin of mosfet driver? You can add also the shottky diode in place of low side mosfet. You can also add blocking dc diode at output of converter. This will lower the efficiency but converter will work. </p><p>Also, You can use another mosfet driver with two separate inputs for low side and high side mosfet. Then You will have a opportunity to use a comparator for detecting reverse current and closing low side fet before short circuit will happen. </p><p>If You will have more questions feel free. I am also working at my own design but I want to use current mode dc-dc controller like uc3843 (or newer) and arduino for monitoring and mppt :)</p>
<p>With IR2104 converter will not work also in light load environment. </p><p>This is half bridge driver, low side mosfet stay open whole time when high side mosfet is closed - this will also short the battery circuit without blocking diode at output. </p><p>I am recommending changing topology to non-synchronous buck converter / adding blocking diode at output / changing mosfet driver with two separate inputs HIN/LIN + comparator for example at VS node (checking negative voltage when circuit is closing through low side fet in continous conducution mode).</p>

About This Instructable




Bio: I am an Electrical Engineer.I love to harvest Solar Energy and make things by recycling old stuffs. I believe &quot;&quot;IF YOU TRY YOU MIGHT ... More »
More by deba168:3 Useful Things From an Old Laptop DIY Mobile Boombox DIY Portable Mini Refrigerator 
Add instructable to: