Introduction: ARDUINO MPPT SOLAR CHARGE CONTROLLER (Version-3.0)

Picture of ARDUINO MPPT SOLAR CHARGE CONTROLLER (Version-3.0)

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

Step 1: PARTS AND TOOLS REQUIRED:

Picture of 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

Step 2: Basics on MPPT Charge Controller

Picture of Basics on MPPT Charge Controller

A solar panel will generate different voltages depending on the different parameters like :

1.The amount of sun light 2.The connected load 3.The temperature of the solar panel.

Throughout the day, as the weather changes, the voltage produced by the solar panel will be constantly varying. Now, for any given voltage, the solar panel will also produce a current (Amps). The amount of Amps that are produced for any given voltage is determined by a graph called an IV curve, which can be found on any solar panel's specification sheet and typically looks like the figure-1 shown above.

In the above figure-2, the blue line shows a solar panel voltage of 30V corresponding to a Current of about 6.2A. The green line shows a Voltage of 35V corresponds to a current of 5A.

We know that Power = V x I

In the picture shown above as you move along the red curve above you will find one point where the Voltage multiplied by its corresponding Current is higher than anywhere else on the curve. This is called the solar panel's Maximum Power Point (MPP).

Ref : I have downloaded the images from web ( www.solarquotes.com.au ) to explain the MPP.

What Is MPPT ?

MPPT stands for Maximum Power Point Tracking. MPPT charge controllers used for extracting maximum available power from PV module under certain conditions. Look at the image shown above. We have seen that the maximum power point (MPP) of a solar panel lies at the knee of the current and voltage curve.

A 12V solar panel is not really a 12V panel at all.Its really a somewhere in between 12V and 21V panel depending on what load is connected to it and how bright the sunlight is.The panel has an internal resistance which changes dynamically with differing irradiance levels. Solar panels will only deliver their rated power at one specific voltage and load, and this voltage and load moves around as the sunlight intensity changes.

For example take a solar panel rated at 100 watts, 18V at 5.55 amps.

The 18 V at 5.5 amps means that the Solar panel wants to see a load of 18/5.5 = 3.24 ohms.

With any other load the panel will deliver less than 100 watts.So if a static load is connected directly to a panel and its resistance is higher or lower than the panels internal resistance at MPP, then the power drawn from the panel will be less than the maximum available.

Taking a simple example say we connected the above 100W panel directly to a 12V lead acid battery, the panel voltage would be dragged down near to the load voltage of the battery as the batteries resistance is lower than the panels, but the current stays the same at 5.55 amps.This happens because Solar Panels behave like current sources, so the current is determined by the available sunlight.

Now the power (P)= V x I = 12x5.55=66.6W. So the Solar panel is now behaving like a 66 watt panel.

This equates to a loss of 100W-66.6W = 34W ( 33.4%).

This is the reason for using a MPPT charge controller instead of a standard charge controller like PWM. The MPPT controller is consists of a DC -DC converter where the duty cycle is varied to track the Maximum Power Point.

Step 3: BUCK CONVERTER WORKING

Picture of BUCK CONVERTER WORKING

A buck converter is a DC - DC converter in which the output voltage is always lower or same as the input voltage. The schematic of a buck converter is shown in the above picture.

Working Principle :

When the MOSFET is ON

When the MOSFET is ON, current flows through the inductor (L) , load (R) and the output capacitor (C ) as shown in the fig-2. In this condition the diode is reverse biased.So no current flows through it. During the ON state magnetic energy is stored in the inductor and electrical energy is stored in the output capacitor.

When the MOSFET is OFF

When the MOSFET is off, stored Energy in the Inductor is collapsed and current complete its path through the diode ( forward biased) as shown in fig-3.When stored energy in the inductor vanishes, stored energy in the capacitor is supplied to load to maintain the current.

What is Synchronous Buck Converter ?

In the above topology the diode used have considerable amount of voltage drop which reduced the efficiency of the Converter.To improve the efficiency a Power electronics switch is used in its place.Thus a synchronous buck converter is a modified version of the basic buck converter circuit topology in which the diode, D, is replaced by a electronics switch like MOSFET( Q2). It is shown in fig-4.

I would like to give special credit to coder-tronics from which I have taken this explanation part of buck converter.

You can see his work at http://coder-tronics.com/c2000-solar-mppt-tutorial...

Step 4: BUCK CONVERTER DESIGN

In our case the input source is a 50W solar panel and load is a 12V lead acid battery.From the earlier discussion we have conclude that a buck converter is consist of

1.Inductor

2.Capacitor

3.MOSFETS

Selecting the frequency: The switching frequency is inversely proportional to the size of the inductor and capacitor and directly proportional to the switching losses in MOSFETs. So higher the frequency, lower the size of the inductor and capacitor but higher switching losses.So a mutual trade off between cost of the components and efficiency is needed to select the appropriate switching frequency.

Keeping this constraints in to consideration the selected frequency is 50KHz.

Step 5: INDUCTOR CALCULATION

Picture of  INDUCTOR CALCULATION

Calculating the inductor value is most critical in designing a buck converter. First, assume the converter is in continuous current mode( CCM). CCM implies that the inductor does not fully discharge during the switch-off time. The following equations assume an ideal switch (zero on-resistance, infinite off-resistance and zero switching time) and an ideal diode.

Assume

We are designing for a 50W solar panel and 12V battery

Input voltage (Vin) =15V

Output Voltage (Vout)=12V

Output current (Iout) =50W/12V =4.16A = 4.2A (approx)

Switching Frequency (Fsw)=50 KHz

Duty Cycle (D) =Vout/Vin= 12/15 =0.8 or 80%

Calculation

L= ( Vin-Vout ) x D x 1/Fsw x 1/ dI

Where dI is Ripple current

For a good design typical value of ripple current is in between 30 to 40 % of load current.

Let dI =35% of rated current

dI=35% of 4.2=0.35 x 4.2 =1.47A

So L= (15.0-12.0) x 0.8 x (1/50k) x (1/1.47) = 32.65uH =33uH (approx)

Inductor peak current =Iout+dI/2 = 4.2+(1.47/2) = 4.935A = 5A (approx)

So we have to buy or make a toroid inductor of 33uH and 5A.

You can also use a buck converter design calculator

So 33uH is enough for our design.

Step 6: HOW TO WIND a TOROIDAL INDUCTOR

Picture of HOW TO WIND a TOROIDAL INDUCTOR

I have collected a bunch of toroidal cores from old computer power supply.So I thought to made the inductor at my home.Though it took a lot of time to make,but I learned a lot and enjoyed during making.These are few tricks what I learned during the making,so that you can make it easily.

How to Wind the wire :

Winding by hand is very painful for skin as well as you can't make the winding so tight.So I made a simple tool from popscile stick for winding the toroidal core.This simple tool is very handy and you can make perfect and tight winding.Before making the inductor you have to know the core specification and number of turns.

The important parameters of toroidal core are

1. Outer diameter(OD)

2.Inner diameter(ID)

3.Height (H)

4.Al value

As I did not know the part number,I used a indirect method to identify it.First I measure the OD and ID of the unknown core by using my vernier caliper,it was around

OD= 23.9mm (.94'") , ID= 14.2mm(.56") ,H= 7.9mm( .31") and yellow white in color.

I used a toroid core chart (page-8) to identify the unknown core.I have attached this toroid size chart in the bellow.It contains a lot of information for the inductor design.The PDF version is attached bellow.

Finding the part number :

I searched the Physical dimension table from the chart. From the table it was found that the core is T94

Finding the mix number :

The color of the core is indication for mix number.As my core is is yellow/white in color,it is confirmed that the mix number is 26

So the unknown core is T94-26

Finding Al value :

From the Al value table for a T94-26 core it is 590 in uH/100 turns.

After selecting the core now time to find out the number of turns required to obtain the desired inductance.

Number of turn (N) = 100 x sqrt( desired inductance in uH / Al in uH per 100 turns)

=> N= 100 sqrt(33/590) = 23.65 = approximately 24 turns

You can also use this online calculator for finding the number of turns.Only you have to know the part number and mix number.

Then I wind a 20 AWG copper wire (24 turns) around the the toroid core.At the both end of the winding leave some extra wire for connection lead.After this remove the enamel insulation from the lead. I used my leatherman file for removing the insulation. See the above picture for better understanding.

Note : Making a good inductor is not so simple.I am still in learning stage.If you are not so confident I will recommend to buy a ready made inductor.

Step 7: CAPACITOR CALCULATION

Picture of CAPACITOR CALCULATION

Output capacitance is required to minimize the voltage overshoot and ripple present at the output of a buck converter. Large overshoots are caused by insufficient output capacitance, and large voltage ripple is caused by insufficient capacitance as well as a high equivalent-series resistance (ESR) in the output capacitor. Thus, to meet the ripple specification for a buck converter circuit, you must include an output capacitor with ample capacitance and low ESR.

Calculation :

The out put capacitor ( Cout)= dI / (8 x Fsw x dV)

Where dV is ripple voltage

Let voltage ripple( dV ) = 20mV

Cout= 1.47/ (8 x 50000 x 0.02 ) = 183.75 uF

By taking some margin, I select 220uF electrolytic capacitor.

The equations used for calculation of inductor and capacitor is taken from a article LC Selection Guide for theDC-DC Synchronous Buck Converter

Step 8: MOSFET SELECTION

Picture of MOSFET SELECTION

The vital component of a buck converter is MOSFET.Choosing a right MOSFET from the variety of it available in the market is quite challenging task.

These are few basic parameters for selecting right MOSFET.

1.Voltage Rating : Vds of MOSFET should be greater than 20% or more than the rated voltage.

2.Current Rating: Ids of MOSFET should be greater than 20% or more than the rated current.

3.ON Resistance (Rds on) : Select a MOSFET with low ON Resistance (Ron)

4.Conduction Loss : It depends on Rds(ON) and duty cycle.Keep the conduction loss minimum.

5.Switching Loss: Switching loss occurs during the transition phase.It depends on switching frequency,voltage ,current etc.Try to keep it minimum.

These are few links where you can get more information on selecting the right MOSFET.

1.MOSFET selection for Buck Converter

2.A simple guide to selecting power MOSFETs

In our design the maximum voltage is solar panel open circuit voltage(Voc) which is nearly 21 to 25V and maximum load current is 5A.

I have chosen IRFZ44N MOSFET. The Vds and Ids value have enough margin as well as it has low Rds(On) value.

You can check the other parameters of IRFZ44N from the data sheet

Step 9: MOSFET DRIVER

Picture of MOSFET DRIVER

Why we need a gate driver ?

A Mosfet driver allows a low current digital output signal from a Microcontroller to drive the gate of a Mosfet. A 5 volt digital signal can switch a high voltage mosfet using the driver.A MOSFET has a gate capacitance that you need to charge so that the MOSFET can turn on and discharge it to switch off,the more current you can provide to the gate the faster you switching on/off the mosfet, that is why you use a driver.

Fore more details you can read about MOSFET Basics

For this design I am using a IR2104 Half Bridge driver. The IC takes the incoming PWM signal from the micro controller, and then drives two outputs for a High and a Low Side MOSFET.

How to use it ?

From the data sheet I have taken the image shown above.

Input :

First we have to provide power to the gate driver.It is give on Vcc (pin-1) and its value is in between 10-20V as per data sheet.

The high frequency PWM signal from Arduino goes to IN (pin-2) . The shut down control signal from the Arduino is connected on SD ( pin 3).

Output :

The 2 output PWM signals are generated from HI and LO pin. This gives the user the opportunity to fine tune the dead-band switching of the MOSFETs.

Charge Pump Circuit :

The capacitor connected between VB and VS along with the diode form the charge pump.This circuit doubles the input voltage so the high switch can be driven on. However this bootstrap circuit only works when the MOSFETs are switching.

The data sheet of IR2104 is attached here

Step 10: SCHEMATIC AND WORKING

Picture of SCHEMATIC AND WORKING

The input power connector to the solar panels is the screw terminal JP1 and JP2 is the output screw terminal connector to the battery.The third connector JP3 is connection for the load.

F1 and F2 are the 5A safety fuses.

The buck converter is made up of the synchronous MOSFET switches Q2 and Q3 and the energy storage devices inductor L1 and capacitors C1 and C2 The inductor smooths the switching current and along with C2 it smooths the output voltage.Capacitor C8 and R6 are a snubber network,used to cut down on the ringing of the inductor voltage generated by the switching current in the inductor.

The third MOSFET Q1 is added to allow the system to block the battery power from flowing back into the solar panels at night.In my earlier charge controller,this is done by a diode in the power path. As all diodes have a voltage drop a MOSFET is much more efficient.Q1 turns on when Q2 is on from voltage through D1. R1 drains the voltage off the gate of Q1 so it turns off when Q2 turns off.

The diode D3 (UF4007) is an ultra fast diode that will start conducting current before Q3 turns on. It is supposed to make the converter more efficient.

The IC IR2104 is a half bridge MOSFET gate driver. It drives the high and the low side MOSFETs using the PWM signal from the arduino (Pin -D9) .The IR2104 can also be shut down with the control signal (low on pin -D8) from the Arduino on pin 3. D2 and C7 are part of the bootstrap circuit that generates the high side gate drive voltage for Q1 and Q2. The software keeps track of the PWM duty cycle and never allows 100% or always on. It caps the PWM duty cycle at 99.9% to keep the charge pump working.

There are two voltage divider circuits( R1,R2 and R3,R4) to measure the solar panel and battery voltages.The out put from the dividers are feeds the voltage signal to Analog pin-0 and Analog pin-2 .The ceramic capacitors C3 and C4 are used to remove high frequency spikes.

The mosfet Q4 is used to control the load.The driver for this mosfet is consists of a transistor and resistors R9 ,R10.

The diode D4 and D5 are TVS diodes used for over voltage protection from solar panel and load side.

The current sensor ACS712 sense the current from the solar panel and feeds to the Arduino analog pin-1.

The 3 LEDs are connected to the digital pins of the microcontroller and serve as an output interface to display the charging state.

Reset switch is helpful if the code gets stuck.

The back light switch is to control the back light of LCD dislay.

Step 11: Test the Gate Driver and MOSFETs Switching

Picture of Test the Gate Driver and MOSFETs Switching

Hey I think I have talked a lot on the theory.So lets do some practical.

As I have told earlier the heart of the MPPT charge controller is Buck Converter.As per me if your buck converter circuit work perfectly.You can do the rest thing easily.So first lets test the Mosfets switching and the driver.

Before soldering ,I request to do it on a bread board.I have blown lot of MOSFETs during my testing.So be careful during the connection.

Connect the everything as per schematic given above.Now you can omit the TVS diode,current sensor and voltage divider.

After connecting everything test the resistance between the input rail.It should be several KOhm. If you get resistance bellow 1K then recheck the circuit connection.

Upload the test sketch to the Arduino.The code in the form of text file is attached bellow.

Then connect the scope in between the source of Q1 and GND.

The result should be a PWM with frequency 50KHz.

The waveform obtained during my testing are shown above.

If everything goes right then proceed to complete the bulk converter circuit.( i.e adding inductor and capacitor)

Step 12: Test the Buck Converter

Picture of Test the Buck Converter

In the previous steps we have calculated the inductor and capacitor rating.Now it is time to using and testing it.

Add the 33uH inductor and 100uf input and 220uF out put electrolytic capacitor as per schematic.You can also use 0.1uF ceramic capacitors parallel with input and output capacitors.It will give better result.But it is not mandatory.

Then make the snubber circuit by using a 0.1uF ceramic capacitor and 200ohm resistor.

Again check the resistance in between the input rail.It should be order of K ohm.

Now give power to the input rail and Arduino.

Connect the probe of your scope in between the output capacitor.

The result is shown above .The out put should be a steady DC.

Vout = Duty Cycle x Vin

For example if i give 50% duty cycle to a 12 input supply, the output should be 6V in the scope.

After confirmed that everything working fine,now we can add the blocking mosfet Q1.It is used to block reverse power from battery to the solar panel during night.

Add the third mosfet Q3 as per schematic.Then place the 470k resistance and diode IN4148.

Again check the output it should be same.

At last put the scope in between the gate of Q1 and Gnd.

Do you know ? you have done the most critical part of this project.

Step 13: VOLTAGE MEASUREMENT

Picture of VOLTAGE MEASUREMENT

Voltage Measurement :

As you may well know, Arduino’s analog inputs can be used to measure DC voltage between 0 and 5V (when using the standard 5V analog reference voltage) and this range can be increased by using two resistors to create a voltage divider. The voltage divider decreases the voltage being measured to within the range of the Arduino analog inputs. We can use this to measure the solar panel and battery voltages.

For a voltage divider circuit

Vout = R2/(R1+R2) x Vin

Vin = (R1+R2)/R2 x Vout

The analogRead() function reads the voltage and converts it to a number between 0 and 1023

Example code :

// read the input on analog pin 0 ( You can use any pin from A0 to A5)

int Value = analogRead(A0);

Serial.println(value);

The bove code gives an ADC value in between 0 to 1023

Calibration :

We’re going to read output value with one of the analog inputs of Arduino and its analogRead() function. That function outputs a value between 0 (0V in input) and 1023 (5V in input)
that is 0,0049V for each increment (As 5/1024 = 0.0049V)

Vin = Vout*(R1+R2)/R2 ; R1=100k and R2=20k

Vin= ADC count*0.0049*(120/20) Volt // Highlighted part is Scale factor

Note : This leads us to believe that a reading of 1023 corresponds to an input voltage of exactly 5.000 volts.

In practical you may not get 5V always from the arduino pin 5V .So during calibration first measure the voltage between the 5v and GND pins of arduino by using a multimeter,and use
1ADC = measured voltage/1024 instead of 5/1024

Check your voltage sensor by a test code attached bellow

Step 14: CURRENT MEASUREMENT

Picture of CURRENT MEASUREMENT

For current measurement I used a Hall Effect current sensor ACS 712 (5A).

The ACS712 sensor read the current value and convert it into a relevant voltage value, The value that links the two measurements is sensitivity.You can find it on the datasheet.

As per data sheet for a ACS 712 (5A) model :

1. Sensitivity is 185mV/A.

2. The sensor can measure positive and negative currents (range -5A…5A),

3. Power supply is 5V

4. Middle sensing voltage is 2.5V when no current.

Calibration:

Value = (5/1024)*analog read value

// If you are not getting 5V from arduino 5V pin then, value = ( Vmeasured/1024 ) * analog read value

// Vmeasured is the voltage in between Arduino pin 5V and GND. You can measure it by a multimeter.

But as per data sheets offset is 2.5V (When current zero you will get 2.5V from the sensor's output)

Current in amp = (value-2.5)/0.185

Test it by a sample code for ACS712 attached bellow.

Step 15: LCD Display and LED Indication

Picture of LCD Display and LED Indication

LCD display :

A 20X4 char LCD is used for monitoring solar panel, battery and load parameters.For simplicity a I2C LCD display is chosen.It needs only 4 wires to interface with the arduino.In my earlier design the LCD was consuming lot of power.The main cause was LCD back light.So I add a push switch to control the back light.By default the back light will be in off condition.If the user press the switch then it will on for 15 secs and again goes off.

Vcc--> 5V , GND-->GND, SDA-->A4 and SCL-->A5

Column-1 : Solar panel voltage,Current and Power

Column-2 : Battery Voltage,Charger state and SOC

column-3 : PWM duty cycle and load status

For testing the LCD download the test code attached bellow.

You download the library from LiquidCrystal_I2C .

LED indication :

Red ,Green and Yellow leds are used to indicate the battery voltage level.

Low Voltage -- > Red led

Normal Voltage --> Green Led

Fully Charged --> Yellow Led

Step 16: HARDWARE AND SOLDERING

Picture of HARDWARE AND SOLDERING

Before soldering you should clear about the Power and Control Signal.Do not mix up between them.Otherwise you will fry everything.

Power Signal :

1.Solar panel -> Fuse -> Current sensor -> Mosfets Q1,Q2 ,Q3 -> Inductor -> Battery.

2.Battery -> Fuse -> Load -> Mosfet Q4

Control Signals :

1.Signal from the different Sensors to Arduino

2. Signals from the Arduino to the Mosfet drivers,LED,LCD

3. Signal between the Arduino and ESP8266

I used red and black thick wires ( 0.5 to 0.75 sq mm) for power and ground connections respectively.

All the colored thin wires are for control signals.

Tips: Print the PDF format Schematics before soldering.Keep it in front of you during soldering for reference.

Step 17: Drill Holes for Mounting

Picture of Drill Holes for Mounting

First hold the prototype board by a vice.

Then drill 4 holes (3mm) at the 4 corners of the prototype board.

Step 18: Add the Input and Out Put Terminals :

Picture of Add the Input and Out Put Terminals :

First solder the three screw terminals for solar panel,battery and load connection.

The left one is for solar panel,middle one is for battery and the right one is for load connection.

Step 19: Add the Fuse Holders

Picture of Add the Fuse Holders

On the extreme left and right solder the two fuse holders.( One in the solar panel side and other on the load side)

Then connect the left terminal of the solar screw terminal with one leg of the fuse holder.

Step 20: Solder the MOSFETS and Input Capacitor

Picture of Solder the MOSFETS  and Input Capacitor

Solder all the 4 MOSFETs with equally spaced on the top of the prototype board.(Leave some space to putting the heat sinks)

Then add the input 100uF capacitor.I left some space in between the fuse holder and Capacitor for installing the current sensor later.

Solder connecting wires as follows :

Between positive terminal of input capacitor(C) and source of mosfet Q1.

Between drains of mosfet Q1 and Q2.

Then in between source of Q2 and drain of Q3.

Step 21: Mounting the Arduino Nano

Picture of Mounting the  Arduino Nano

First cut two rows of female and male header pin with 15 pins in each.I used a diagonal nipper to cut the headers.

Then solder the male header pins.Be sure the distance between the two rails fits the arduino nano.

Leave two rows on each side of the female header and then solder the two male headers.

Then short the corresponding male and female pins.Though I forgot this during my soldering.

The female headers is used to mount the Arduino nano and male headers are used for external connection with the Arduino.

Step 22: Make the Power Supply

Picture of Make the Power Supply

To run the Arduino ,different sensors,LED,LCD and the wifi module( ESP8266 ) we need power.

Except ESP8266 module all the others can be run by 5V power supply.The ES8266 module need power not more than 3.7V. It is recommended to run it on 3.3V. Though Arduino Nano have 3.3V pin but it can not provide sufficient power ( around 200mA to 300mA) to run the ESP8266 module.So we need a separate 3.3V power supply which can provide at least 300mA current.

5V Power Supply :

In my previous version I used a LM7805 linear voltage regulator to step down the battery voltage to 5V for the power supply.But it produces a lot of heat during its working.So I used a high efficient buck converter in this design.

Adjust the output voltage of buck converter :

First connect the battery on the input terminal of the buck converter and adjust the potentiometer to get 5V out put.

See the above picture.

Cut 4 pcs of male header with 2pins in each.Solder the headers as per the holes given in the converter.

Place the converter on the above 4 header pin and solder on the top.Be sure the input side is toward the battery screw terminal.

Add the output capacitor(C2) near to the battery screw terminal.The positive terminal of the capacitor should be on the left.

Then connect the input of the buck converter to the battery screw terminal and output to the 5V and GND pin of the Arduino Nano.At this stage you can check it.Place the Arduino nano on the header pin and connect the 12V battery to the screw terminal.If everything is correct then Arduino power led should glow.

Finally add two rows of male header pins to the side of Arduino 5V and GND pin for external connection.

3.3V Power Supply :

I am planning to use a voltage regulator AMS1117 to step down from 5V to 3.3V.

Solder the voltage regulator first, then add two 10uF capacitors. One on the input and other on the output side.

See the above schematic.

Step 23: Solder the Mosfet Driver Circuit

Picture of Solder the Mosfet Driver Circuit

First solder the 8 pins DIP socket just above the arduino header pins.

Add 10uF capacitor and and a 0.1uF capacitor in between the pin-1 and pin-4.

Solder the diode (D2) in between pin -1 and 8.The diode cathode should be connect to the pin-8.

Solder the capacitor (C7) in between pin-8 and pin-6.

Solder two 200ohm resistors ( R7 and R8) just side to the pin-2 and pin-3.

Solder one 470K resistor (R1) near to the mosfet Q1 and a diode (D1) in between gates of mosfets Q1 and Q2.The diode cathode connects to the gate of Q1.

After this complete the circuit by soldering wires as per the schematics.

Step 24: Solder the Voltage Sensors

Picture of Solder the Voltage Sensors

Solder solar panel voltage divider near to the fuse and battery voltage divider near to the output capacitor.

Then solder two ceramic capacitors ( C3 and C4) across the 20k resitors.

Then solder a wire between middle point of the solar panel side voltage divider and arduino pin A0.

Finally solder a wire between middle point of the battery side voltage divider and arduino pin A2.

Step 25: Solder the Inductor and Snubber Circuit

Picture of Solder the Inductor and Snubber Circuit

First solder the resistor (R6) and capacitor ( C8) in series just above the output capacitor( C2).

Then solder the inductor parallel to it.

Inductor is the heavier component in the entire circuit.To sit it firmly, apply glue at the base.

Then solder the ultra fast diode (D3) .

Step 26: Solder the Load Mosfet (Q4) Driver

Picture of Solder the Load Mosfet (Q4) Driver

Solder the 2N2222 transistor near the gate of the mosfet (Q4).

Then add a 10k resistor (R9) near to the collector and a 1k resistor( R10) near to the base.

Then connect the points as per schematic.

Step 27: Adding the Current Sensor

Picture of Adding the Current Sensor

Solder two thick wire in between the solar panel side fuse and capacitor (C1).

Then screw the wire in to the ACS712 screw terminal.

Step 28: Solder the TVS Diodes

Picture of Solder the TVS Diodes

I do not have spare TVS diode.So I solder it later.You can solder it earlier also.

One TVS diodes, D4 near the connector JP1 and D5 near the connector JP3.

Note : I am using bidirectional TVS diode.So no polarity mark is there.

Step 29: Connect the GND

Picture of Connect the GND

After soldering all the components, connect all the grounds (GND) shown in the schematic.

I am using thick black wires.

Step 30: Make the USB Charging Circuit

Picture of Make the USB Charging Circuit

The buck converter used for power supply can deliver maximum current 3A. So the power supply have sufficient margin for charging the USB gadgets.

Make the Circuit :

Solder the male JST connector near to the buck converter and connect two pins with positive ( 5V )and negative

( GND ) out of the converter.See the picture.

Insert the USB port and switch in to the slots made earlier.Then apply hot glue surround them.

Solder the red wire (+ ve ) of the JST connector to one terminal of the switch.Then solder a small red wire between another terminal of switch and USB Vcc terminal.Finally solder the black wire (-ve ) of the JST connector to the USB GND.

For USB pin out see the above picture.

You can make this step earlier also.

Step 31: Make the Wifi Module ( ESP8266 ) Circuit

Picture of  Make the Wifi Module ( ESP8266 ) Circuit

First cut 2 female header with 4pins in each.

The solder it side by side near the load side fuse holder.

Complete the circuit as per schematic.

Be careful about when you solder this module. Voltage more than 3.7 V kill this module as it operates at 3.3 V .

Even the serial lines should not exceed this voltage.I am planning to use a 3.3 V regulator ( AMS1117 ) to power this module. A voltage divider circuit is used to drop the arduino Tx ( 5V ) to ESP8266 3.3 V ( RX).

Setting up the ESP8266 :

The first thing you want to do with ESP8266 is to establish communication.You can see this example project for setting up the ESP8266.Then connect it to your WiFi router.

Hey now you are ready to upload your data to the web.

You can see the following projects to get some idea to use ESP8266 for data uploading to web.

https://www.instructables.com/id/ESP8266-Wifi-Tempe...

http://www.element14.com/community/groups/internet...

The ESP8266 connection schematic is taken from http://www.martyncurrey.com

Step 32: WiFi Data Logging and Scientific Exploration

Picture of WiFi Data Logging and Scientific Exploration

As the solar panel are installed at remote location,monitoring systems parameter is vital for us.This gives me the idea to add the data logging feature to my controller.

The WiFi module( ESP8266 ) automatically uploads live power generation, voltage,Current data to the Web( https://thingspeak.com/ ).Then the web application graph and tabulate data in live.You can download the feeds from the website in the form of a Xcel sheet.Then explore these data for further analysis.I attached a sample of feeds downloaded from thingspeak.

The test code is attached bellow.Hey if you are really excited to see how the tiny WiFi module upload data to the web.Just upload the test code attached bellow.You can test it without any sensor hook to the arduino.Though you will get arbitrary values.It is just for fun :)

See the graphs on thingspeak.com .Interesting ??

Note : You can use this test code for other multi sensor system like: weather station .Just you have to calibrate your sensors accordingly.

Go to Data Import/Export and then click on Download.See the above pics.

If you are app developer,then develop a apps for Android, iPhone and Windows Mobile to see these useful data.If you make please share me.I am not a developer.

Step 33: Make the LED Panel

Picture of Make the LED Panel

Take a small size rectangular prototype board and drill holes at both end for mounting on the enclosure.

Solder the Leds with equally spaced.

Then solder the 330 ohm resistors (R11,R12 and R13) and 4pin male headers.

Finally complete the circuit as per schematics.

Step 34: Make the Back Light and Reset Switch

Picture of Make the Back Light and Reset Switch

Take 5 female -female jumper wires and cut one side headers in all.

Insert heat shrink tube in all jumper wires.

Reset Switch :

Solder two jumper wires directly to the two pin of the push switch.

Back Light Switch :

Solder two jumper wires to the two pins of the switch.

Solder a 10k resistor to any one pin of the switch.

Then solder a jumper wire to the other end of the resistor.

Finally cover the joints with heat shrink tube and apply hot air.

Step 35: Prepare the Enclosure

Picture of Prepare the Enclosure

I used a 6" x 8" plastic enclosure.

Mark the LCD,USB and Switch sizes .Then cut out the rectangular portion by using a dremel. Finally finish the edges by a hobby knife.

Then mark the mounting holes position for LCD,LED panel,Switches and External screw terminal by a pencil.

Drill holes at all the marked position.

Note : The holes size for LED is 5mm ,switches are 7mm and all other are 3mm.

Step 36: Make the External Connection Terminal

Picture of Make the External Connection Terminal

The external connector is used for outside access of all the 3 screw terminals in the controller board.

Mark the hole positions for mounting and 6 wires.

Then screw the wires in all the terminals.Use different color to distinguish between positive and negative terminal.

Step 37: Mount Everything

Picture of Mount Everything

To mount the controller board I used 4 plastic bases.Screw the main board over the base.

Mount the LCD and Led panel by screw and bolts.

Then mount the two switches.

Step 38: Connect All the Panel and Switches

Picture of Connect All the Panel and Switches

After mounting everything connect the panels,switches and external connector.

Use female-female jumper wires for connecting the panels.

Refer schematics for connection.

Finally box up the enclosure.

Step 39: Software and Algorithm

Picture of Software and Algorithm

The Maximum Power Tracker uses an iterative approach to finding this constantly changing MPP. This iterative method is called Perterb and Observe or hill climbing algorithm.To achieve MPPT, the controller adjusts the voltage by a small amount from the solar panel and measures power, if the power increases, further adjustments in the direction are tried until power no longer increases.

The voltage to the solar panel is increased initially, if the output power increase, the voltage is continually increased until the output power starts decreasing. Once the output power starts decreasing, the voltage to the solar panel decreased until maximum power is reached. This process is continued until the MPPT is attained. This result is an oscillation of the output power around the MPP.

Dowload all the softwares from my GitHub page

https://github.com/deba168/MPPT_Master

Step 40: Version-4 Design Ideas and Planning

I would like to give special thanks to Keth Hungerford and Petar who are the new members to my project and actively contributing to it. Keith is playing the key role for designing this new version Charge controller.

For the time being we are planning to see the following changes in existing version charge controller.

Changes at the moment are:

1.Increase panel voltage rating to allow for panels with 60 cells (i.e up to 40 V, so-called "grid connect" panels);

2.Higher current rating, at least 20 amps and preferably 40 amps;

3.Metering current on the battery and load;

4.Improve design robustness to ensure external conditions do not cause any failures;

5. Design that allows multiple controllers to feed into a power distribution switchboard;

6. Optimal battery management for several different battery types, such as Lead Acid (several variants), NiFe, LiFePO;

7. Ability to control more than one load output – either to allow for greater capacity, or timing control of when the output is on or off.

8.Real time clock with date to enable time stamping of statistics and timer control of loads.

9.Operational configuration capability (buttons or via WiFi?);

10.Greater data collection to get illumination statistics, battery performance statistics, load statistics.

11.Higher battery voltage (to 24 or 48 V) and associated higher solar panel voltages;

12.Much higher panel voltage (to 150 V or so)

13.Multiple Load outputs regulated to close to 12 V

14.Panel safety and overload disconnect

In addition there are some "internal" matters that are worthy of investigation:

  • Focus on maximising efficiency
  • Fail-safe software or self-recovery features
  • MPPT algorithm refinements
  • will it all fit in Arduino Nano? or selecting another Arduino Board ?

All the ongoing activities are given in Arduino-MPPT-V4 folder ( .rar file).

I request to all of my followers,team members and viewers to give suggestions on it.

You can write your suggestions/feedback in the comment section below.

Step 41: Overview of Version-3.1

After lot testing we observed that MOSFET ( Q3 ) in ver-3.0 design is burning repeatedly.We tried to modify the existing software but not find any satisfactory result.

The other problem was that MOSFET Q1 ( in V-3.0) conduct even when there is no solar input. To solve the above problems and enhance the power handling capability we are modifying both the hardware and software.This is named as Version-3.1 Charge Controller.

This version is not completed yet.So wait until it is complete.

Don't worry we are making a solution for those who have made the V-3.0 prototype.After little modification we will able to use the new software.

You can see the updates on Hackaday.com

This version have 3 options.

1. 5 Amp version :

T94-26 toroid, 48 turns of AWG20 wire to give 135 uH (it takes almost 1.5m of wire)

Q1, Q2 and Q3 all pairs of IRFZ44N MOSFETs (6 in all).

C1 will be 3 * 220 uF low ESR capacitors in parallel, C2 will be a single 220 uF low ESR capacitor

Single ACS712 on the panel side as per version 3.0

2. 8 Amp version :

T106-26 toroid wound with 23 turns of a compound wire made from 3 strands of AWG20 wire twisted together to give 47 uH (this takes about 3.1 m of wire).

Q2 will be a pair of FDP150N10A MOSFETs in parallel.

C1 will be 5 * 220 uF low ESR capacitors in parallel,C2 will be a single 220 uF low ESR capacitor

Two ACS712, one on the panel side as per version 3.0 and one in series with the battery.

3 10 Amp version :

T130-26 toroid wound with 23 turns of a compound wire made from 4 strands of AWG18 wire twisted together to give 41 uH (this takes about 4.5 m of wire).

Q2 will be a pair of FDP150N10A MOSFETs in parallel.

C1 will be 6 * 220 uF low ESR capacitors in parallel,C2 will be 2 * 220 uF low ESR capacitors in parallel.

Three ACS712, one on the panel side as per version 3.0, one in series with the battery and one in series with the load.

The drive circuitry (common to all 3 versions) will use 3 separate IR2104 driver chips, one for each of Q1, Q2 and Q3. We drive the Q1 and Q2 drivers from pin D9 and HO1 and HO2, and drive Q3 from pin D10 and LO3.

In driver chips 1 and 2, pins IN and SD are driven in parallel by Arduino output pin D9. In the case of driver 1 (for Q1) there is a low pass RC filter in series, with a time constant of about 1 ms. Driver 2 is driven directly (as in the current circuit, but probably with a slightly higher series resistor to allow more current for the Q1 driver and its RC filter).

In driver chip 3, IN is driven by D9 and SD is driven by D10.

The purpose of using separate drivers for Q2 and Q3 is to enable us to switch Q3 OFF to operate in Asynchronous mode at low current levels when the controller will be in DCM (Discontinuous Current Mode). There may be a better way to do this but in the short time we have available this is a simple option and easy and reliable to implement.

All 3 versions should have LCD displays, WiFi, LED indicators (maybe with a more fancy coding scheme to separately indicate DCM and CCM).

All 3 versions should be able to cope with either 18 V or 30 V panels, and use algorithms that stop them burning out if the panel can produce more current than the rating allows. This can all be done auto-detect.

All the components exposed to panel voltage need to be rated for at least 40 V (in particular C1 and our buck converter to generate 12V for the drivers and to power the control electronics.

Step 42: Conclusion

I have tried my best to make this instructable. Till now I am learning more on MPPT. So if I have done any mistakes please forgive me and raise a comments.I will rectify it as soon as possible.

I love getting feedback on my projects! The earlier version charge controllers has received a ton of feedback, and many users have posted pictures of their build.
If you follow this Instructable and make your own controller, please share pictures and videos.

At last,I would like to give very special thanks to timnolan. As I have learned and used several things from his design.

Fore more updates and new projects subscribe me.

Thank you so much for reading my instructable.

Comments

Electronicslovers made it! (author)2017-12-03

This Simulation has been designed in Proteus Software 8.6 version. You can make your own by using Arduino Library for Proteus...

http://www.electronicslovers.com/2015/09/arduino-based-mppt-solar-charge.html

buggeroff1 (author)2017-11-11

What is the name of algorithm is pritube or observe or incremental conductance

farmerkeith (author)buggeroff12017-11-20

The algorithm is described in Step 39, and is called Perterb and Observe.

pikkukumar (author)2017-10-13

is this project working or not ?

farmerkeith (author)pikkukumar2017-10-14

Not working.

santhu78 (author)farmerkeith2017-10-21

I think BUCK MOSFET failure us due to VCC of IR-2104. In circuit VCC is connected to Panel. Resolving this might solve the burning of MOSFET. Data sheet says minimum of 10V required.

farmerkeith (author)santhu782017-10-21

Please note neither I nor Deba168 (author) is currently working on this project. There are several issues with this circuit. However, Vcc of the IR2104 is connected to the battery, which is nominally 12V, and which is within the range 10 to 20 V given in the data sheet.

From memory, I can say that the burning of the MOSFETs is due to Q3, the low side MOSFET, being turned on continuously and drawing a large current from the battery to ground, resulting in a lot of heat and failure of the MOSFET.

There are several parts of the circuit that do not work well, with the transition from OFF to Charging being the most serious one.

I am quite happy to give you feedback on design ideas if you want to do some work on this circuit, but I am not in a position to do the design myself at the moment.

Mugambimoses (author)2017-09-20

Hi. Good instructable. I just wanted to inquire about the efficiency of the circuit.

EbenezerJ (author)2017-08-27

Hello, thanks for sharing this piss. Can you possible give me some guidelines as I want to start working on this project?

ebenezeridiong@gmail.com

fstkech (author)2017-08-18

Hello, thank you for sharing this worthy work. But I have a question which is Why using the diode D3 (UF4007)? i didn't really understand its importance and the purpose of using it .

Thanks in advance.

farmerkeith (author)fstkech2017-08-19

To answer your question, Diode D3 is in parallel with Q3, which has an internal body diode. They both have the effect of preventing the inductor voltage (at the drain of Q3) going excessively negative. When Q2 turns off, the inductor current continues and will drive that drain voltage a long way negative unless it is prevented by these diodes.

Really the diode D3 should be a Schottky type, rather than the UF4007.

The diode only conducts for a short period, starting when Q2 turns off, and ending when Q3 turns on. This delay is controlled by the internal delays of the IR2104, which intentionally delays the turn-on of Q3 to make sure that Q3 is not turned on before Q2 is fully off.

Please be aware that this project is not really working. Please see the note at the end of the introductory step.

fstkech (author)farmerkeith2017-08-22

Ok i understand now; thank you for this good explaination. Please if you wouldn't mind i have another question about the gate driver ; i have approximately the same project and i use exactely the same mosfet driver IR2104 but my question is how i can know that the driver operate properly or in other word how the Vs waveform _ the driver output which is connected to the load_ should be? by the way i already tested the LO and HO and those two outputs are in anti-phase which allows controlling the two MOSFETs of the power stage and i think that's good but as said i still wondered how the Vs waveform should be.

Thank you in adavance for every information will be given.

farmerkeith (author)fstkech2017-08-23

Hi fstketch, easy to ask but the answer is a bit complicated and depends on several factors I don't know about your design and test conditions.

If your test circuit is running in Continuous Current Mode (CCM) the Vs waveform will have two parts. One part (Panel phase) is at the panel voltage Vpp, minus the voltage drop across the high side components (mainly Q1 and Q2 in series). The other part is at Earth minus the voltage drop across the low side components (Q3 and D3 in parallel). The transitions between these may show some overshoot and other effects.

If your test circuit is running in Discontinuous Current Mode (DCM) the Vs waveform will have 3 parts, Panel phase and Earth phase as for CCM, and then Null phase when Vs will be at the output voltage (battery Vbb). Again transitions may have some additional effects.

This photo shows a sample DCM waveform with the 3 phases. From left to right you can see Panel phase, Earth phase, Null phase, then Panel phase again. The top trace is Vs. The bottom trace is a composite of IN and SDbar of the IR2104.

I don't have a photo of a CCM trace.

fstkech (author)farmerkeith2017-08-24

sorry about any inconvenience and thank you so much

farmerkeith (author)fstkech2017-08-24

My pleasure. I will be interested to hear how you get on.

Jo01 (author)2016-02-21

Hi

just another question....

In teh sketch you are using a simple algorithm for tracking, just takeing care for the power.

In step39 there is a pic of another algorithm which did not watch only for thepower biz also for the voltage.

Could someone please explain the advantages/disadvantages of both versions

Thanks

BandiS1 (author)Jo012016-02-22

I think the pic from step-39 is wrong for me it dose not make sense and i think they realized it to and that's the reason why in the sketch is only Power Tracking.

The power tracking algorithm works "acceptable" on my charger ( with my own algorithm) the simple power tracking works well when the illumination is constant ( there is a constant sun light on the panel without shadows) but when the illumination is changing constantly in a short period ( multiple clouds passing by) the charger drifts away and hovers "on a false maximum point" pushing the Panel voltage up to 19-20V giving in some cases only 30-45% of the power, without help it can't go back on the real maximum power point. So i made an auto-reset function, knowing that the maximum power point is between 17-18.6V on the Solar Panel side, the auto-reset function is checking the Panel voltage if the panel voltage is above 18.6V a timer starts (45s) if in that time the power tracking algorithm dose not found the real maximum point dragging the panel voltage back between 17-18.5V the power tracking algorithm resets and is forced to begin the tracking from the begin. With this method i solved the hangouts i don't found the reason why it can't find again the real maximum power if it drifts away because of clouds but if i force it to search from the begin it finds it without any problem.

Jo01 (author)BandiS12016-02-23

uups... i always thought the algorithm in step39 is the original Perturb and observe. I also thought that the implemented simple algorithm ist the original Tim Niolan one. He always was talking about 'something simpel just to get it work'

I am asking because i found a perturb and observe version which was somehow in/decrementing in the opposite way ;)

So it looks like we have to try both, or to *think* about this before we start ;)

Thanks for the hint with the local maximum, we will have an eye on that.

BandiS1 (author)Jo012016-02-23

Yes your right, the step-39 algorithm is a kind of Perturb and Observe, well the simple power tracking is a Perturb and Observe to because it perturbs the PWM duty cycle and it observes if it gets more or less power. But still i don't understand why after power check is a voltage check to, the main goal is maximum power output aka Watts so if a perturb step gives more power then it dose not make any sense to check the currentVoltage and the lastVoltage. As an example:

PWM = 0, SolV = 22.5V , solA = 0 , solW = 0

We start the pwm -> we put load on the solar Panel so SolV = 22V , solA = 0.1,solW = 5

According to the algorithm: we get more power so we check currentV > lastV well no because we put some load on the panel and its voltage dropped back so the algorithm says decreasePWM so now what ? we decrease the PWM back to 0 ? it make no sense. It would make some sense in the other way, if we get more power and the solarPanel voltage increases then something is wrong because increasing PWM should drag the solarPanelVoltage down because we just put more load on it but still it makes no sense. Complex tracking algorithms like you get whit a quality MPPT charger are programmed with patters and the algorithm can figure it out if the pwm change caused the power increase/decrease or it was a light change, some charger are using light sensors mounted near the solar Panels measuring the light level, when the sensor reading indicate's light change the charger reacts according ignoring the Power measures knowing that the power change was caused by illumination change and not the pwm change.

Zibe made it! (author)BandiS12016-02-24

This is the code I wrote 6 months ago. Been tracking it flawlessly since. I have just finished off a ~ 1KW version, up to about 70A.

mallick (author)Zibe2017-07-25

Hi is there a full code to test this in arduino

CarlosG182 (author)Zibe2016-04-04

Hi, can you share your circuit? I have 500W solar panel and want to charge 12V battery

Thanks

stajoster (author)Zibe2016-04-01

hi

can you please update me with the circuit diagram of your 1kW version

Jo01 (author)Zibe2016-03-20

Hi

looks like we are somehow able to get the simple alogrithm working ;)

In your listing above there is a little line called 'step_size_change() '

Would it be possible to get this code?

Thanks a lot

Zibe (author)Jo012016-03-29

Just remove it from the code. Originally I was experimenting with periodically increasing the step size to help find the MPPT point. My idea was that if it got stuck on a local max a periodic step would force it to move and re-evaluate.

Jo01 (author)Zibe2016-03-30

:(

I think we will first try to get something simple which will work.

Next year ..... There is a lot of other work to do

Thanks....

BandiS1 (author)Jo012016-03-29

I am not 100% sure but i think it is checking the power change / step. As you are close to the MPP 1 step in PWM can give you maybe a 5-7W change and when you are far away from the MPP 1 step gives you maybe 2-3W , so possibly he is checking the power change / step if one step caused a big change like 5-7W then the step size aka PWM duty step is decreased to enable a more fine search, when a step is giving to less power change maybe 1-2W then the step is increased to speed up the search making bigger steps to the MPP point.

Jo01 (author)BandiS12016-03-29

That's what i hope he is doing ;)

I was just interested in the code which is manipulating the steps.

We have veeery less experience in programing, you know ;)

BTW maybe we have been thinking to 'static'

Changing in the power output could have different reasons. Not only moving at *the same* curve, but also dynamical switching between different curves, due of changing irradiation. Maybe this is the reason for also watching the voltage.

The confusion with in- or decreasing could also have a simple solution.

It just matters *what* you are workin with.

Increasing the duty cycle is decreasing the voltage. At least i think so ;)

BandiS1 (author)Zibe2016-02-24

Yes it's kind a what i say'd, you start increasing PWM until power is increasing, when the power is decreasing you check the voltage, if the voltage is going up on the SolarV it means that the charger puts less load on the panel so you change direction in PWM putting the load back on the solarPanel. But if you check this is the inverse of the step-39 algorithm where say's to decrease the PWM if we get more power and the solarV drops.. making no sense because getting more Power means more load on the Panel so ofc. the PanelV will drop..

Well my algorithm is simple, maybe a direction detection like you did would make better job, well i have a menu with 3 buttons maybe i will add one more menu and put both algorithm on the charger then from the menu change between the two and check how they work. My algorithm is really simple :

if (solarW >= oldSolarW)

PWM++;

else

PWM--;

Zibe (author)BandiS12016-02-24

Simple however, it will get stuck if there is a bit of noise.

Jo01 (author)Zibe2016-02-25

Perturb and observe should somehow work. Nearly every tracker did use it ;)

As said before, i found a algorithm which seems to work somehow in the opposite way of this in step39 (looks like increase/decerease is swaped). Unfortunately i just have no time for things like this. I will check it next week. At least i hope so ;)

BandiS1 (author)Jo012016-02-26

Yes ofc. it works, but the quality chargers uses a more complex perturb and observe not just a simple two "if" check algorithm ( they uses pattern recognition, the high end ones come with a light sensor mounted on the solarPanel measuring the light level so it knows how to react on fast light level changes,etc.. ) . And as you said the step39 is reversed.

dishak (author)BandiS12016-02-26

If you found that your panel had 17-18.6V was the correct voltage at
which max power could occur and say if you are not getting that point
you said you are dragging the panel voltage to the max power point
voltage that means your part of algorithm tracks Vmpp

And why i was saying Vmpp tracking was:

I
conducted an experiment with rheostat (higher watt capacity) across the
panel and then went on varying the position of rheostat from max
resistance to min resistance with voltmeter across panel and ammeter in
series with the panel,rheostat circuit and noted down various V,I
readings at particular instant of the day with varying rheostat
positions what i found was V*I=power always occurred at particular panel
voltage only and for my 75W 21V panel it came around 14.85V so thought of tracking this Vmpp only

BoatengD (author)2017-07-21

thanks for this project, please i have the uno how can i use it for this project. please can you help me with the circuit and code for my uno. thanks

SHARANYADAS (author)2017-06-28

One thing I can't understand in your picture that with no load,how the output is able to be at desired voltage(For say,at 6v with 50% duty and input at 12v).With a Ideal Buck converter with no load connected,the capacitor will be reached to almost the same voltage as input(I also faced it practically).

farmerkeith (author)SHARANYADAS2017-07-08

Hi, when the load current requirement reduces, as in the case you mention, the PWM duty cycle decreases so as to keep the charging current just at the point that maintains the battery voltage at the correct value.

yogeshbagul (author)2017-06-30

Sir, Can I use this system for 12V 35Ah Lead acid battery?

farmerkeith (author)yogeshbagul2017-07-08

Hi, maybe you missed it, there is a note at the bottom of the introduction page,, just before step 1, saying that this project is not working. You can't actually use it, except for ideas and learning about MPPT solar chargers.

nepcono (author)2017-05-22

Hi do you sell the board when its totally working, would like to have one.

Pedrosc (author)2017-05-21

​Hello friend.
Very good project, my congratulations.
Do you sell the mounted boards V3-1?
Pedro Santos, from Brazil

mispph@yahoo.com.br

RogerGriff (author)2017-05-01

I'm a little confused. None of the versions are working or only Version III is not working ?
Thank you

DevikaB2 (author)2017-03-08

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

Maverick71 (author)DevikaB22017-03-31

Hello,

What kind of battery and solar panel is this exactly?

You have to set up the charging rate 1/10C - 1/2C on the charger to the

proper charging characterisic according to your battery.

You should not charg directly without setup.

It can destroy your battery (and even more if it burns).

Regards,

Maverick

Satrah101 (author)2017-02-16

Hello, can i ask where 8 come from in the calculation for the capacitance:

The out put capacitor ( Cout)= dI / (8 x Fsw x dV)

Thank in advance

.

KentK15 (author)2017-02-04

Would this set up work with a DC motor being driven as a generator?
I suspect that a generator would put out much more power than solar panel.
What would need to be changed to handle the higher out put?

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 "dummy load" like a DC water heater element.

lpghost11 (author)2017-01-20

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

lpghost11 (author)2017-01-16

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.

billa141 (author)2017-01-11

great

ICESOFT (author)2017-01-11

THANK YOU

billa141 (author)2017-01-10

Hi

Can you please tell me how to make this a MPPT 100 Amp Solar Controller

Cheers

About This Instructable

811,916views

1,525favorites

License:

Bio: I am an Electrical Engineer.I love to harvest Solar Energy and make things by recycling old stuffs. I believe ""IF YOU TRY YOU MIGHT ... More »
More by deba168:DIY Professional 18650 Battery PackDIY Acrylic RGB LED SignHow to Make a Bench Power Supply
Add instructable to: