PWM Solar Charge controller (Restarting old project)
eagletalontim
Posts: 1,399
I am back at it again and this time with a little more knowledge I hope :P I just recently bought some 12V solar panels and should be able to make around 200W to start with. I do plan on buying several more panels, but I need to be able to regulate what level the batteries charge to. I know there are a few ways to do this, but I would like to use a Prop to control the charging.
Some components I already have and am hoping I can use these P-Channel mosfets instead of buying parts if I can help it. Here is the mosfet I have :
http://www.digikey.com/product-detail/en/DMP3010LK3-13/DMP3010LK3-13DITR-ND/3076559 : 17A continuous
The first one is probably my best bet since it has higher amperage abilities. Problem is, 200W at 12V is 16.7A which is right on the verge of max. Is it possible to "stack" this mosfet and increase amperage ability? I use basic transistors and resistors to drive this mosfet. I can build several "driver" circuits to accommodate the extra mosfet if it is possible.
Second question is... To properly charge a battery, I understand that dumping the maximum amperage into it until the "saturation level" has been hit then switching to voltage leveling is best. Is this correct and how would I detect that the charging needs to switch to "float"?
Edit * : I also have an 8 bit 5V ADC and was wondering if I could use a resistor voltage divider circuit to monitor the battery voltage with this ADC?
Some components I already have and am hoping I can use these P-Channel mosfets instead of buying parts if I can help it. Here is the mosfet I have :
http://www.digikey.com/product-detail/en/DMP3010LK3-13/DMP3010LK3-13DITR-ND/3076559 : 17A continuous
The first one is probably my best bet since it has higher amperage abilities. Problem is, 200W at 12V is 16.7A which is right on the verge of max. Is it possible to "stack" this mosfet and increase amperage ability? I use basic transistors and resistors to drive this mosfet. I can build several "driver" circuits to accommodate the extra mosfet if it is possible.
Second question is... To properly charge a battery, I understand that dumping the maximum amperage into it until the "saturation level" has been hit then switching to voltage leveling is best. Is this correct and how would I detect that the charging needs to switch to "float"?
Edit * : I also have an 8 bit 5V ADC and was wondering if I could use a resistor voltage divider circuit to monitor the battery voltage with this ADC?
Comments
Yes, you can put 2 mosfets in parallel to increase the current.
The best charging method depends on the battery chemistry. What kind of batteries do you plan to use?
Yes, a resistor divider would work for monitoring the battery voltage. You will need to shut off the charging current (float) when measuring the battery voltage for determining if the battery is charged.
A 12V lead acid battery needs a13.8 to 14.4 V input voltage to charge it so you have three ways to approach this:
1- Put 2 solar cells in series to get a high enough voltage to charge the battery.
2- Use a switching regulator to boost the output voltage of a single solar cell.
3- Use an MPPT charger.
The MPPT charger is the most efficient method, and the two solar cells in series the least efficient.
Car batteries are normally charged with a constant voltage, and deep discharge (marine) batteries can be charged with a constant voltage or a charge controller optimized for that type of battery to maximize the battery life.
The mosfets you have will work if all you want to do is turn the charging current on and off, but not as a linear device to control the charging current. A single 200W solar cell or two cells in series would not put out enough current to damage a car battery as long as the charging current was turned off when the battery was fully charged.
So from what I understand is with stationary panels, I will lose some of the panel's ability to charge the best. Moving the panels according to the best output via a processor like the Prop would be better. Problem is...in electronics, I know how to turn something on or off. Adjusting current or voltage without a linear / mechanical device is a little out of my realm at the moment but I would love to learn. I can spend hours of researching something, but I usually don't comprehend until I actually put my hands on it. If someone is willing to help me along as I lean to build this charge controller, I would greatly appreciate the teaching!
What I would need to start with is the heart of the charging circuitry. In the above post it is stated "The mosfets you have will work if all you want to do is turn the charging current on and off, but not as a linear device to control the charging current." I don't quite understand this. I thought current was voltage and amperage moving through the circuit. The only way to change the amperage is to add resistance which will also reduce voltage but increase power dissipation which in turn creates heat. How is it possible to "digitally" adjust current? Using PWM would still cause the current to flow through the circuit as much as the circuit is set to handle correct? If you change the duty cycle of the PWM, the current does not change correct? I think I am confusing myself :P
EDIT * I found an interesting item that may be useful in this circuit : http://www.panucatt.com/Current_Sensor_for_Arduino_p/cs-100a.htm
An MPPT charge controller is not a simple project. It involves two separate systems with fairly complex behaviours. The current draw from the solar panel needs to be controlled so that the maximum possible power (watts) are extracted from it, and the output voltage to the batteries controlled to provide the maximum charging current to the batteries. In addition to that it has to make sure that the batteries are not damaged by excessive input current or overcharging.
In theory one should be able to do all of that by monitoring the input current and voltage to the batteries and using a propeller to control the output voltage of a switching regulator.
Moving the panels to face the sun will produce more power from the solar panel, so better charging of the batteries. The motors to move the panels can be relatively small since the speed is very low. The motor controls can be a very simple on/off circuit using the mosfets you already have. You will need a potentiometer or encoder for panel position.
What I meant by the sentence you quoted is that if you put the mosfet between two panels in series and the battery it would work as an on/off switch. If you tried to adjust the current through the mosfet by reducing it's gate voltage it would overheat and burn out. Using PWM would allow you to control the average charge current. If the solar panel could produce 10A and the mosfet was on for 50% of the time the average current would be 5A.
Before I make any suggestions it would be nice to have a look at the data sheet for the solar panel. Can you post a link to it, or the part/model number?
The current sensor you found could be useful but I would suggest looking at the INA219 (http://www.parallax.com/product/29130) before deciding. It is meant for use with solar panels, provides current, voltage, and power readings, and has sample software for the propeller.
http://www.ebay.com/itm/271576325290
With the above circuit, I could only use this for the solar charger to just turn the current on or off correct? I can't limit the current using PWM? Is there a reason why these mosfets will not work for an MPPT charger? Some of the other circuits I have seen for MPPT chargers use even lower rated mosfets than the ones I have.
Unfortunately not much information on that solar panel. You will need to do some experimenting to use it.
I have replaced the motor with a speaker and was playing with the PWM code to see how the Duty Cycle affects the sound vs the "Period" the pulse stays high. The longer the pulse stays high, the more current passes through at the input voltage. When I shorten the period, the amperage decreases and the voltage fluctuates. Is this what you were meaning by "linear" control?
I am far from being an expert on all that is available in the solar energy industry, but generally speaking the solar panels, MPPT controllers, and batteries are a matched set. The solar panels are selected based on the power requirement and average sunlight at the location, the MPPT controller based on the peak power available and the charging voltage requirement, and the batteries on the power storage capacity.
The average charging current going to the batteries can be controlled with PWM, but it is a very inefficient way of doing it. For instance, if you wanted to reduce the average current to 50% of what is available you would turn the mosfet on for 50% of the time and off for 50%. That means you are loosing half of the power the solar panel could produce. To make a solar installation as economically viable as possible you want to use every watt the solar panel can produce to charge batteries or power your equipment.
70 Volts ? I presume you mean the full solar energy, which will act like a current source rather than a voltage source.
Do you plan to use an inductor ?
The simplest controllers would just be a series On-Off switch, to set the average current.
However, you need to measure the battery voltage, and with both operating load and charge currents flowing, that is not so easy.
You also want to reduce the current swings into the battery, which means a proper inductor, synchronous switching and smoothed regulator and an accurate means to measure both Load and Battery currents.
Add measure of Solar Voltage and Current, and MPPT is not much of a step from there - you do not need to tune that operating point every switching cycle, but can do a slower triangle modulated sweep to check the peak power is in the centre.
A first pass design can just use a lookup for the V/I locus, and then you can add MPPT and see how much power you really gain, for how much effort.
Using a buck converter to regulate the incoming 26V to 13.8V would increase the current going to the battery.
Lets assume the buck converter has 90% efficiency and the solar panel puts out 26V and 10A, so 260W total.
The formula to calculate the output current would be Iin x Vin/Vout x Converter Efficiency.
Iin = 10A, Vin = 26V, Vout = 13.8V, and converter efficiency is 90% or 0.9 so:
The buck converter would output 13.8V and (10 x 26/13.8 x 0.9 = 16.96A) which would be 234W
The simplest way would be to use a switching regulator with an adjustable output voltage. Increasing the output voltage will increase the current going to the battery, decreasing the voltage will decrease the current to the battery. A propeller or other uC would control the output voltage based on the input and output voltage/current measurements. Of course the switching regulator has to be able to handle the maximum incoming voltage and current as well as the outgoing current. Not quite as good as an MPPT controller, but probably the next best choice.
There are several types of solar power systems and the design varies depending on it's usage. A system for powering a remote weather station would need to power the station during the day and charge a battery to power it during the night and on overcast days. A system for outdoor lighting would only need to charge the batteries during the day, and the batteries would power the lights at night.
Also... I made my own hand wound inductor with a ferrite core from RadioShack and some 16G enamel coated wire I have. It is about 30 wraps around a 3/8" square core. I do plan on getting something better as soon as I figure out what would be better.... When running the PWM, I can actually hear the inductor doing it's thing. Is there a specific frequency I should run this at? I have seen 20khz to 80khz but my mosfet / driver cannot do that since the best I was able to get on my O-scope before there was no "calulatable frequency" was around 10khz. The faster I got the frequency, the hotter the mosfet started to get. If I ran the duty cycle down lower than 50%, it would heat up way too hot and I shut down the circuit.
No, pulling the gate up to the input voltage (+24V) is not the problem. This is a P channel enhancement mode mosfet so the gate needs to be at +24V to turn it off. The problem is that the gate (which has capacitance) has to charge and discharge through the 220 and 330 ohm resistors, which takes time. During that time power is dissipated so the more often you turn it on and off the more power the mosfet has to dissipate and the warmer it gets. This is why a gate driver is used. It charges and discharges the mosfet gate capacitance much faster so less power is dissipated.
- Take a look at some of the data sheets on here
http://www.linear.com/parametric/Switching_Battery_Chargers
This app note has a variant on a MPPT
http://cds.linear.com/docs/en/lt-journal/LTJournal-V22N2-01-df-LT3796-XinQi.pdf
and this app note looks to have a good topology
http://ww1.microchip.com/downloads/en/AppNotes/01467A.pdf
(note this design can have vin pass through VBat)
It mentions using NCO, and a Pulse Frequency mode, so maybe the Prop can drive the MCP14628* with Pulse Frequency mode managed by one COG ?
( or just use the PIC16F1503, as they are cheap enough )
Addit: * the MCP14628 looks to be 5V optimised, so either use a 74LVC1T45 interface, or find a 3v3 MOSFET driver to direct connect the Prop.
Since it appears my mosfets will not be able to be driven with my current inventory, I will need to buy parts. If I buy parts, I might as well buy the right stuff the first time so I don't have to keep upgrading every time I get more panels. Is there an all around good mosfet and driver that I should look into that can handle the very minimum of 20A and can handle the 20 to 50 khz?
I found this FET which looks like it can handle the voltages and current, but I am not sure if it can handle the frequency or what driver to use with it. Are all drivers good for any FET (Mosfets)?
@jmg, the MCP14628 only handles 2A. The system I am working to set up would fry that instantly correct? (Hmmm. I think I see what this part is now. For some reason I was thinking this was the mosfet. This is a driver....)
Where deliver the coil its stored enegi?
Should the diode not be placed on the other side of the coil?