loading

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.

This is project is entered to " 2015 Hackaday Prize ".If you want to support me and see the project in a new level,please follow and give skulls to my project @ hackaday.io.This will be very helpful for me.

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


Updates as on 16th June 2015

Version-4 Design Ideas and Planning

After my version-3 Charge Controller became popular on web,I received mails and comments with request for making a higher rating Controller. So we are designing our Version-4 Charge Controller which is more advanced, greater capacity and useful more potential applications.When the project complete, it should be useful for off grid electricity users, control of autonomous street lights and signs, and many other applications that need medium power levels and efficient reliable operation

For all the ongoing activites click here


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.

To solve this problem I have asked to viewers. After taking suggestions from all, Keith suggestions really works for me.So I have modified few things.

Rectifications / Changes :

As per Keith suggestions

Modification in MOSFET Driver Circuit :

1. With the existing circuit, if the panel voltage is zero then the IR2104 has no VCC input. This may make its behaviour unpredictable.As per data sheet, the driver VCC should be in between 10 and 20 Volts for "proper operation".

2. It means the driver will always be working, and so there is a positive control over the switching MOSFETs at all times.

3. The voltage from the solar panels has been specified as up to 25 volts, which is a bit more than needed to connect a standard 36 cell solar panel. The voltage doubler circuit that generates the Vb voltage for the driver will turn that into 50 volts, which in turn will put 25 volts onto the Source-Gate interface of both Q1 and Q2. The maximum rating of this interface is 20 volts, so either of these FETs may become unreliable with a high solar panel voltage of more than 20 volts.

4. Using the battery for Vcc of the driver means that Q1 and Q2 both only have Source-Gate voltages equal to the battery, which is comfortably within the 10 - 20 Volt range of these MOSFETs.

Changes : Powering the MOSFET driver IR2104 from battery terminal ( 12V ) instead of solar panel ( earlier ).

If anyone making this controller, make this changes and test it. If you have any test results / suggestions, comments it below.

Step 1: PARTS AND TOOLS REQUIRED:

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 )

27.Enclosure

28.Plastic Base

29. Spacers ( Amazon )

29. Screws/Nuts/Bolts

TOOLS REQUIRED :

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

Battery and load correctipns are not displayed correctly on d lcd hardware part is checkd its correct is showing 30 bit its not nd load though not connected it shows on
<p>Hello, I'm trying to make this device by now, but I have some problems in understanding the code.</p><p>My problem is in the 'bat_float' status charging, why we should run the 'set_pwm_duty' void after we run the 'TURN_OFF_MOSFET' ? Because I think it willn't give system any impact because the MOSFET Driver is in 'Disabled&quot; condition. Hope you guys can help me. Thanks !</p>
<p>You should rewrite this code, like I have done this.</p><p>The code posted here is useless.</p>
<p>I see, so can you share your code ? I really appreciate if you can help me :)), so we can discuss if there's something wrong. Thank you so much.</p>
<p>Hello,</p><p>Unfortunatelly, I'm just on the beginning.</p><p>I don't have got Shematics or Code written down.</p><p>You can see my Hardware Chaos on the Image.</p><p>All what I can tell You right now, is that the Hardware AND Software</p><p>from deba (or Tim Nolan) does NOT work!</p><p>There are huge bugs in the Hardware so, its burning MOSFET(s) all the Time.</p><p>There are bugs is the Software too, it doesn NOT calculate properly and so on...</p><p>I put very much time and effort to (till I) understand this.</p><p>After some 8-10 Months pause I come back to see if this bugs are gone-or not.</p><p>The bugs was still there, but I found another shematics from BANDIS1.</p><p>His project looked very promising for me and I give it a try.</p><p>Un fortunalety he does NOT postet complete shematics and absolutelly no software as he using another &micro;Controller.</p><p>With the help of BANDIS1 I was able to finish the hardware.</p><p>As the software from this website was NOT compatible I wrote new one.</p><p>Now, exactly the PWM calculations are missing as I needed to proove</p><p>if the Hardware is working properly before I begin to develop software for it.</p><p>I tested the chargers PWM functions by adjusting the PWM frequency manually.</p><p>As you can see on my image I also using different display controller too.</p><p>You can read my conversation with BandiS1.</p><p>Don't use the shematics from him or the PCB from me.</p><p>Regards,</p><p>Maverick</p>
<p>Hi everyone, i ask wouldn't be better if instead of N channel mosfet we use a P mosfet like this <a href="https://www.fairchildsemi.com/datasheets/FQ/FQP47P06.pdf" rel="nofollow"> https://www.fairchildsemi.com/datasheets/FQ/FQP47...</a> ?</p><p>So in that way we don't need to make voltage doubler. </p><p>Regards.</p>
<p>It will work if you are planning for small solar panel ( 5-8 Amps ) if you are going up to 10Amp or more the P channel has bigger Rds on your particular Mosfet you linked has 26Mohm, an N channel has 15Mohm or less. So on high power a P channel Mosfet fill generate more heat so you will need a big heatsink or forced cooling with a heatsink + fan.</p>
<p>Hello,</p><p>Why do You connect pin5 of the TLC to Vcc?</p><p>There is allways electricity. At least 12V.</p><p>I don't understand the purpose of connecting pin5 to PLUS Rail.</p><p>Regards,</p><p>Maverick</p>
<p>The reason is simple, on the OFF period the mosfet gate need to be pulled to Source pin voltage = positive rail of the battery so pin 5 need to be connected to the positive rail. Anyway there is no such thing that Vcc need to connected to 0V aka ground, the powering voltage in datasheets is the voltage difference between Vcc and Vdd si in the TLP's case Vdd is +22V from 555 ,Vcc +12V from battery that means that is powered at 22-12 = 12V. </p>
<p>I understand. Vcc is the relative Ground.</p><p>So, if I'm charging the battery to 14V (Cycle use) I'll need</p><p>at least 22V, better 24V on Vdd to get the 10V on the IX Chip,</p><p>which is rated to max 20V.</p><p>If something goes wrong on Vcc, I'll get 24V on Vdd which is on the limit.</p><p>EDIT: What about a little MOSFET on Vcc to turn on Vdd</p><p>that we stay on less than 20V for every case?</p><p>If there is no Battery connected, there is no Vdd voltage.</p><p>But without connected battery the charger will not work.</p><p>Regards,</p><p>Maverick</p>
<p>With a 14V battery voltage you need to get 34V output from the 555 / boost converter, to get 20V on IX's supply ( 34-14 = 20V) less probably that you will get such high voltages, it's nearly impossible just if you boost converter malfunction and rises the voltage above selected one. Anyway you can use a simple clamp zener to protect the IC, as you can see i have one to on the 555 input ( a resistor + 15V zener ). Well none of voltage regulators are designed to work without battery, almost all of &quot;high end&quot; chargers have a warning sign saying that you should never disconnect the battery's before you disconnect the Solar Panels.</p>
<p>In the mean time im running in to huge problems here.</p><p>As I understand Voltage Doubler gives me DC Voltage.</p><p>It destroys my 50% Square Wave.</p><p>Currently I have got 25/50/100kHz 50% DutyCicle 12V Square Wave from 555 (to Pin 8) and 50kHz PWM from Arduino which I can send to the IXYS Driver.</p><p>Pin 6 of the ISYS Chip driving the MOSFET's gate.</p><p>Which Signal should be there?</p><p>In similar circuit like yours I got 300mA from the solar panel going nowhere.</p><p>I measured this with real MM. The Battery on another side loosing 50mA too.</p><p>Any Ideas?</p><p>Regards,</p><p>Maverick</p>
<p>555's square wave is not going as square wave to the TLP, if you follow the schematic you will see that 555's output is square waving a capacitor that capacitor when is fully charger to 12V it discharges to the second capacitor on the output, so the second capacitor will hold smooth 24V dc, if the capacitor is large ( is use 22uH) it will hold enough dc voltage to charge couple of times the mosfets gate which is in the range of nF's, then the 55 completes the next cycle and charges the capacitor again. Anyway the 555's frequency should be at least equal of arduino's one or higher.</p><p>Arduino's PWM is linked to the Pin2 which activates the internal logic circuit which on HIGH signal will pull the mosfet gate to pin8 and on LOW signal will pull the gate to pin 5, on short it opens / closes the mosfet.</p><p>There is no such thing that &quot;is going nowhere&quot; it is going somewhere most possible in heat, some components or the mosftet doesn't got the minimum 8V gate voltage and opened only partially acting like a high value resistor generating 300mA worth of heat. Then also take in conisderation the circuit consumption, LCD back-light, arduino, 555, for all of this you use linear regulators ( LM78xx) those generate a lot of heat to = again power losses in heat) etc... my circuit eat's around 100mA not taking in consideration the looses in the mosfet / blocking diode on the solar input,etc... </p>
<p>OK, I found something.</p><p>The gate Voltage with 12V was to low-as you told this before.</p><p>I tried to switch the gate directly from the solar panel and now it's charging.</p><p>I'll try to feed the MOSFET driver with a regulated boost converter.</p><p>What do You say about this?</p><p>Later I can increase the driver frequency up to 110 or 230kHz.</p><p>Regards,</p><p>Maverick</p>
<p>Well connecting directly to solar input is not something good because you don't have 8V difference, if you hold the solar panel at 17.5V then you barely get a 4V and that Mosfet is acting like a big value resistor... same problem in the original schematic with the charge pump getting only 3-4V Vgs and as you can see mosfets got burned one after other. For testing it's ok. but make sure you have a decent heat-sink on that mosfet.</p><p>I don't tried with boost converter but it should work. </p>
<p>You are right i only need 11 amps by now. <br>But when add more panels i was thinking just put 1 or 2 more mosfet in <br>parallel to compensate losses. Please tell me what you think, and if you <br>already probe that and has some downside that i don't see.</p><p>Other <br>thing is that i like the idea that would be possible use 24v system or <br>maybe more. The 555 is simple and so very practical but is only for 12v.</p><p>The other possibility could be use the 555 and a little ferrite transformer to isolate the mosfet gate.</p><p>Thanks.</p><p>Regards. </p>
<p>Well i never used P-channel on the charger so i can't tell you if the generated heat is okey with just a heat-sink or needs a fan to. With 555 you can get maximum 30V output but it can be replaced with a 12V transformer you can find any old charger that outputs 12V that will work with any solar panel voltage), the only problem is that the charger is no longer stand alone and it will need a 220V power supply for the transformer.</p>
<p>If You adjust the Voltage You can use the 555 on a 24V sistem.</p>
I needed information regarding buck converter connection and circuit diagram and even abt lcd display plzz do reply sooon
<p>how to increase current? and for 24v what should i modify?</p>
<p>thank you very much</p>
<p>???</p>
<p>hi everyone, in the updated version 3 schematic diagram, the output of buck converter module +5V is connected to Arduino mega 5V pin as you can see at step 22. Would it will damage the Arduino itself??or is it suppose to be connected at Vin?</p><p>Your reply is much appreciated. Tq</p><p>Pleas</p>
<p>Here is my Setup and Testing for a 50 Watt Solar panel and two 12Volt Batteries. Is it working All right. I am a bit confused as the current drawn from the panel is very less. The first Image is of the LCD when charging a 7AH Battery and the next image is the setup of the same. The second set of images are while charging an 18AH Battery.</p>
<p>hello there.</p><p>May I ask which version of schematic and code did you used to get such setup?</p>
<p>Hey it looks great.Thanks for sharing the image.</p><p>I think the current sensor is to be properly calibrated.</p>
<p>It is already calibrated, I tested the current sensor with different loads with the same microcontroller along with a multimeter (Ammeter is series), before I pulgged it in this circuit.</p>
<p>Try to change the wire at the current sensor, going to the panel and going to the battery with a bigger size. some current or voltage is lost due to size of wire</p>
<p>Great setup Debashish! Thank you for sharing!</p>
<p>Sorry for the late answer but i had other things to do. Here is my schematic for an asynchronous version of the charger. How you may already experienced IR2104 is not made for capacitive loads like battery's it is only for resistive loads and it was causeing mosfets to overheat and blowing off, so i replaced it with an opto-gateDriver IC, and with the help of a 555 timer i am doubling the battery voltage up to 20-22V so it will always give at least 8Vgs, the 555 timer could be replaced with a Dickson charge pump pumped by two PWM signals from the arduino. My charger is up and running almost from a month without any problems, with this winter-ish sun i got a maximum of 3.5Amps from the solar panel(rated at 5.5Amps), and the charger handled it very well so after a 4 hour charging at 3.5A the heatsink was not warmer than the ambient temperature without any forced cooling with fan or etc.... I will make some photos and maybe a video in the next day's if there will be a bit of sun. </p>
<p>Hallo BaniS1</p><p>Can You please post an Image of Your Circuit?</p><p>The Voltage Doubler seems wrong somehow.</p><p>I have got the same voltage on the outpur like on the input.</p><p>Regards,</p><p>Maverick</p>
<p>The two unmarked resistors and the ceramic capacitor values are calculated according this calculator : http://houseofjeff.com/555-timer-oscillator-frequency-calculator/ , make sure the duty cycle is as close as possible to 50%, my configuration for 30Khz has a 57% duty cycle.</p>
<p>Hello BandiS1</p><p>I'm looking on the current path right now.</p><p>You driving the MOSFET with the TLP250 (pin 6), correct?</p><p>What about limiting the current on the pin 5 of the TLP?</p><p>What kind of signal You got from the 555 on pin 8 on the TLP250?</p><p>Sorry for the question's, i don't understand the function of the 555.</p><p>Regards,</p><p>Maverick</p>
<p>Yes the MOSFET is driven from pin 6 or pin 7 they have the same function. The current doesn't need to be limited on pin 5, it is limited by the resistor between pin 6 and MOSFET gate pin by a small value resistor 30-60 ohm. </p><p>555 is configured as a high frequency (25-30Khz) square wave generator aka 25Khz 50% duty PWM signal, and it't pumping up the voltage on the two output caps, it's called &quot;dickson charge pump&quot;. To open the MOSFET you need at least 8Vgs that means 8V more than the battery voltage so if the battery voltage is 12V to open the MOSFET you need to feed to it's gate 12+8 = 20V, the 555 's job is to generate that extra 8V you need, the &quot;dickson charge pump&quot; it's a voltage doubler meaning that it's output is 2x the input so in theory you get battery voltage x2 on the output and feed it to theTLP pin8. So if the battery is at 12V the 555 output should be 24V so you have 12Vgs, but that's theory in reality you will get something like input x1.6 so the gain is somewhere at 7-8V just perfect to open the MOSFET.</p>
<p>Ok, I guess I should change the settings for the 555 Timer if I change the PWM signal 100kHz instead of 25kHz for the TLP250 (which I will change to IX3180).</p><p>Correct? </p><p>I have made a PCB. It's for Your shematic, without the gate resistor we talked before.</p><p>The MOSFET should survive testing also without gate R </p><p>if I'm limiting the source curent, correct?</p><p>I'll test it today or tomorrow.</p><p>Regards,</p><p>Maverick</p>
<p>Yes it should be fine, the TLP / IX3180 has logic circuits inside and that's the reason you should not add the limiting resistor on the iC inputs ( Vcc / Gnd because now your limiting the internal circuit powering and it may work or may work in strange ways) instead add it to the mosfet gate but for a quick test it should be fine. And yes if you are increasing the PWM signal you need to increase the 555 frequency to allow it to produce the extra voltage more quicker because you will charge / discharge the mosfet more often on high frequency. Now i am not really familiar with arduino but 100kHz sounds a bit high are you sure that it can produce 100kHz PWM signal at a fair resolution ? I mean it will not be ok if you get maybe 4-5 bit resolution PWM because it will not be able to find the maximum power point, the steps will be simply to big and it will hover a lot around the MPP. </p><p>Anyway if your Panel ratings are not very big (250W+) on the last couple week's with strong sun i noticed that a 100W panel with Voc 22V will output more power if it's directly connected to the battery or at 100% PWM duty. In low illumination aka a cloudy day with MPPT tracking will give more power than directly connecting to the battery. The reason is fairly easy, MPPT point is at 17V , in a hot strong sunny day the cell's will warm up , they can easily reach 50-60 Celsius and the voltage will drop 2-3V ( solar cell's doesn't like heat, if they are hot the output voltage drops) and whit that 2-3V drop you will end up with 17-3 = 15V which is very close to the battery and then if you take in the calculation the switching losses you will end up loosing power with MPPT, so in that case a direct connection aka PWM charger will get you more power. </p><p>So at the end if your panel is not a high rated panel, i don't think that it worth to invest money in very fast components. </p>
<p>No, AFAIK the arduino is not able to generate such PWM signal.</p><p>I have to search for replacement which I know to programm right now.</p><p>C8 is for the frequency setup, correct?</p><p>Do You have got a calculator for it?</p><p>Regards,</p><p>Maverick</p>
<p>http://houseofjeff.com/555-timer-oscillator-frequency-calculator/</p>
<p>Hello BandiS1</p><p>Q: If You dont put any Signal on the TLP, nothing happens as the MOSFET is closed, correct?</p><p>Q: You dont have got any protection for Your Battery.</p><p>Do You know how much current do You drawing, when there is no sun?</p><p>Regards,</p><p>Maverick</p>
<p>1. Yes, no signal = MOSFET closed. </p><p>2. I have a fuse on the negative connection of the battery, it's not visible on the schematic.</p><p>3. With no sun, the charger is consuming something like 100-150mA including LCD back-light. </p>
<p>BandiS1 thanks for your responses so far , and to any one in the house please which of the arduino code in the forum can be used with BandiS1 posted schematic or does any one have his code. Please am just in urgent need of a diy mppt controller without Q3 problems .</p>
<p>I am not 100% sure but i think the V3 is compatible , it must be the version with a single IR2104, the V3.1 code is for two IR2104 and it will not work. You just need to connect the IN pin from the IR2104 to the TLP250 PWM pin trough a resistor (330-470 range , the LED inside the TLP250 is a 1.7Vf @10mA ).</p><p>My code is written for PIC microcontroller so it's not compatible with the arduino. </p>
<p>I appreciate your quick reply thank you I have some familiarity with PIC I even have pickit 3 programmer so please help me with your code I will be grarefull. No access to the Google drive link you gave below if that is the code, so please help.</p>
<p>I would suggest you to try with the arduino, my software is customized for my hardware, i would need to explain in details the charger schematics so you will know how to build yours to work with my software. Anyway in this days i have strong sun and i am noticing that a 21Voc solar panel works better in PWM charge configuration when is a strong illumination ( PWM charger means that bulk is 100% PWM, and float is sort impulses but not PWM pulses it gives one 0.5s pulse / 3-4s) and the MPPT charger configuration is working better on low illumination like a cloudy day. So i am thinking to rewrite the whole softer and teh charger will work in both modes. It starts in PWM mode if the charging current is more that 1.5-2Amps it will stay in PWM if it is less then it will switch to MPPT mode, if in MPPT it reaches 1.5A it will switch back to PWM mode, it will be something like check if illumination is strong then go PWM mode if is low illumination go MPPT mode. The problem with this 21Voc panels are the temperature, at 45C cell temperature you already loos 2V output, and you get very close to the battery voltage, if you include the &quot;homemade&quot; switching circuit which is far from a &quot;perfect one&quot; you will have more switching loses then differential loses in case of a direct connection between Panel and battery aka 100% PWM. </p>
<p>Hi,My solar panel ratings are: 110W,5.9A current,21V oc voltage. Inductor value=250uH(designed considering ripple current 7-10%).</p><p>Now before trying on solar i used artificial setup with those 9V batteries as solar and load and tried it stepped down voltage exactly driving the mosfet so as when i connected the solar panel initial testing was satisfactory with the panel voltage stepping down to battery voltage.</p><p>Even MPPT algorithm was satisfactorily implemented (on artificial setup)</p><p>My algorithm is based on just tracking Vmpp and not power because at Vmpp only max power is delivered.So the algorithm i had written made sure that panel voltage remains exactly at say some specified value( for artificial setup).</p><p>But when i tested it on solar panel With Vmpp set to 17.89V .The results were not good with voltage always below 16V or sometimes voltage even got boosted up to 20V-22V and sometimes shorting the solar.</p><p>I could not figure this out as it worked perfectly fine on artificial setup</p>
<p>You should use RC filters like in deba's circuit,i have to but i didn't placed them on the circuit because they don't really belong on the buck, their place is near the analog input pin. Because you are sending current as pulses to the battery they can mess up with the analog reading, the filter will stabilize the pulses and offers a nice stable dc voltage to the analog input, making sure the reading will be more accurate, but still i am taking 25 readings at a time to make sure i am getting a value as close as possible, in my case the deviation is 0.1V side by side with my uni-t multimeter.</p><p>P channel mosfets Rds on is bigger and they dissipate way more heat, if you only want to manage 1-2Amps it's fine but in my case 5Amps would be to much for a P channel mosfet and i would need to use 2-3 of them in paralel with a bigger heat-sink.</p><p>The problem with the algorithm is the following: If you search on google a solar panel curve you will see that power increases until you reach the maximum point, after that it will fall back. Now if you don't use power tracking your algorithm will fail because until you are below the maximum point PWM++ will indeed cause more and more stress on the PV and it's voltage will drop, but when you are near the maxim point, the solar panel strive to fall very dramatically to the battery voltage, even 4-5% PWM modification will cause 3-4V drop, and here your algorithm will struggle to keep that 17.5V, because even 2 PWM steps will cause very huge voltage differences not taking in consideration that any small light change will shift the maximum point on the curve ( i will tell you later about it)</p><p>The reason power tracking will not fail is that after the maximum point the voltage will drop 2-3V but the amperage dose not suffer huge drop, and after the power calculation formula the difference will be maybe 2-3W, the algorithm will step the PWM back and it will gain back the 2-3W, step again back observes that he lost again 2-3W then changes direction and steps up and etc.... and here comes the stabilization i told you. The power tracking algorithm after 10-15s will find the maximum point and after that it stabilizes and will hover nicely there with that 2-3W of power difference between each PWM step. A power tracking algorithm in full sun will stabilize around 75-80% PWM. So if you only wan't a &quot;guessed&quot; MPPT , you could just simply do a fixed 75-80% of PWM, in low illumination the PWM will fall back to 45-50% PWM.</p><p>Now the MPP shift on the curve. If the illumination changes the curve will shift, if it shifts your algorithm it will think he made a bad step because the voltages changed in different way he wanted and will change direction. A power tracking algorithm will do a step and observes the change on the power, if the curve shifted forward it will get more power and it will continue going on the same direction, if the curve shifted back it will loss power and then it know's that the curve is shifted back and in the next step will change change direction and steps back until it found's the MPP again, in a simple voltage tracking you can't really tell if the voltage gain/loss is because the modification of the PWM or the curve shifted it's position, and that's the reason your algorithm is jumping crazy, if the algorithm itself is made correctly, and the analog readings are correct, if not the reason can be wrong readings ,etc.. and you may get a better result but i don't think you could stabilize the PV at 17.5V.</p>
<p>thanks,</p><p>But before going for MPPT i have to make sure my buck converter is working or not.With battery as load i could successfully step down the voltage to required value by varying PWM like say if set frequency =20K then PWM for 55.55% on time i could get required stepped down voltage. But,one thing i noticed while doing all these is that: for max duty cycle say 99% not 100% the voltage across panel actually had to reduce to the battery voltage but, that did not happen it reduced just by 3V i.e for 21V oc voltage after almost 100% duty cycle the voltage became=18V this is something wrong and even during all this process MOSFET did not heat up even for bit of time which means load is not consuming any current.. I have rigged up everything proper even voltage across Vgs=8.3V but Vds=0V if MOSFET had to turn on say at 99%duty cycle then there had to be atleast 2-3V drop but that didnot happen.. Did you also face this thing?</p>
<p>The mosfet should not heat up, i was pushing trough it 4.5Amps for 4 hours and the mosfet was barely warm, this means that the mosfet get's enough Vgs and it's operating in normal conditions. </p><p>At 100% PWM ( with my circuit you can use any PWM cycle between 0-100% it dose not matter) the panel should drop to battery voltage +1V, that 18V doesn't seems good. My charger drops to the battery voltage. </p><p>What battery do you use as load ? Maybe the battery is to small or it is well charged and the solar panel can rise the battery to 18V. I am using an 56Ah car battery for a 100W solar panel.</p>
<p>Say for 100% duty cycle the voltage as i said for complete turn on of <br>mosfet battery voltage is raised to 14.4V and panel voltage droped to <br>14.6V.<br><br>But,<br><br>simultaneously there will be sensing of battery voltage as well to operate it in safe operating area(soa).<br><br>But when for a &quot;&quot;moment&quot;&quot; of 100% duty cycle the battery voltage has <br>raised to 14.4V implies conntroller will sense it has exceeded the <br>soa(as 13.5V say is max voltage to charge battery to 70% of soc) which <br>will make the controller to turn of or go in constant voltage mode but, <br>as soon as controller goes in cv mode battery voltage drops to <br>discharged state voltage so again controller switches to mppt mode. Wont<br> this action be to &amp; fro leaving the battery uncharged.</p>
<p>I am using 2 step charging: Constant current ( bulk) until battery reaches 14.4V, and constant voltage ( float) at 13.7V. In float mode the charger hold's the battery at 13.7V, if for any reason it can't hold it at least at floatV-0.6V so if the battery drops below 13.1V the charger has 15s to bring it back above 13.1V if it can't it will enter back in bulk because that means the battery has some load on it and then the chargers kicks the solar panel in, this way the load will get it's power from the Solar Panel, if the load consume less than the Panel output the rest of it will go in the battery, if the load consumes more, the extra power will be from the battery.</p><p>A battery charging at 0.1C ( in my case for a 56Ah battery is 5.6Amps, the solar panel absolut maximum output is 5.5A so it will never be more that 0.1C) is considered charged at 14.4V. So if at 100% PWM if the current is at/below 0.1C charging current and it rises to 14.4V it means that the battery is 100% charged and can go to float or a Absorb mode but Absorb it's harder to implement on a solar system so i am not using it and from bulk it's going directly to float.</p><p>Anyway you don't really need to stick 100% PWM. 100%PWM dose not mean maximum charging power, 100% PWM is the end of the Power Curve, the maximum power output of the solar panel is around 70-75% of the Power Curve meaning that at 100% PWM you get less charging power that at 75% PWM. </p><p>My algorithm in steps :</p><p>1 OFF: if solar Panel voltage &gt;17V then it checks battery status : if batteryV &gt;=12.7V then enters in Float else it enters to Bluck.</p><p>2. Bulk : running mppt algorithm (getting maximum power out of the solar panel) until batteryV &lt; 14.4V if batteryV&gt;=14.4V it enters Float.</p><p>3. Float : if batteryV&lt;13.7 running mppt ( to get more power form the solar panel), if batteryV &gt;13.7V PWM--. If battery drops below 13.1V a 15s timer starts, if the 15s timer ended and the batteryV is still &lt;=13.1V it enters Bulk.</p><p>4. Not a charging step so on every function call is checked. If SolarPanelV&lt;=batteryV+0.5 enters OFF mode (it means it night and the panel is not producing).</p>

About This Instructable

525,869views

1,240favorites

License:

Bio: I am an Electrical Engineer.I love to harvest Solar Energy and make things by recycling old stuffs. I believe in ""IF YOU TRY YOU ... More »
More by deba168:DIY 3D Hologram PyramidSIMPLE QUADCOPTER ( HUBSAN X4 )ESP8266 Weather Widget
Add instructable to: