Difference between revisions of "Charge controller project"

From Organic Design wiki
(stub)
 
(See also: NinjaSCC - NinjaSCC is not just another Solar Charge Controller)
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{stub}}
+
I'm building a [[Our power project#Charge controller|solar MPPT charge controller]] based on the [http://www.freechargecontroller.com FreeChargeController.com] open source project which is in turn based on [http://www.timnolan.com/index.php?page=arduino-ppt-solar-charger Tim Nolan's project]. Their system uses the Arduino for the processing part, but I'm going to build mine using a [[Raspberry Pi]].
  
*[http://learn.adafruit.com/downloads/pdf/reading-a-analog-in-and-controlling-audio-volume-with-the-raspberry-pi.pdf Analog Inputs for Raspberry Pi Using the MCP3008]
+
== Voltage and current measurement ==
 +
We need to have real-time voltage and current sensing of the solar array to determine the optimal voltage and current to draw from it that delivers the maximum power (the maximum power point tracking, MPPT). And we need to also measure the voltage of the battery to know what kind of charging requirements it has, and finally the current on the load needs to be monitored so that we can graph our power usage over time.
 +
 
 +
The voltage measurement simply involves a very low current potential divider to ground set such that the maximum voltage the divided point can have is not higher than the maximum input of the system's ADC's.
 +
 
 +
Current measurement is a little more complicated and involves a shunt resistor (very low value with high precision) placed in the circuit segment requiring measurement, then taking the voltage measurement across this shunt resister and using ohms law to calculate the current. Since the shunt resistor's value is so low (to ensure minimal voltage drop) the voltage across it needs to be amplified using a current-sense amplifier chip which is basically an op-amp designed for single ended configuration rather than requiring a feedback system. See this [http://www.eetimes.com/design/industrial-control/4236380/A-Current-Sensing-Tutorial-Part-II--Devices current-sensing tutorial] for more detail.
 +
 
 +
One issue with this is that there isn't any analogue inputs on the Pi, but that can be done with a single chip solution such as the MCP3008 which gives eight analogue channels and connects directly into the SPI port. See [http://learn.adafruit.com/downloads/pdf/reading-a-analog-in-and-controlling-audio-volume-with-the-raspberry-pi.pdf Analogue Inputs for Raspberry Pi Using the MCP3008] for more details.
 +
 
 +
== MPPT algorithm ==
 +
I'm not 100% clear on the way this works yet, but I think it's like this: the DC-DC converter's output voltage is forced to what the battery wants, but may be set to an overall preconfigured value.
 +
 
 +
The duty cycle of the PWM which is set by the processor based on its solar power detection is effectively alternatively opening and shorting the solar input, but due to a reasonably big capacitor this works as a means of varying the current drawn between zero (always open) and the maximum the panels can deliver (always closed). The processor can then determine whether to draw more or less current based on the effects on the power output that the last change had.
 +
 
 +
== PWM DC-DC converter ==
 
*[http://www.maximintegrated.com/app-notes/index.mvp/id/2031 How DC-DC converters work]
 
*[http://www.maximintegrated.com/app-notes/index.mvp/id/2031 How DC-DC converters work]
*[http://www.timnolan.com/index.php?page=arduino-ppt-solar-charger DIY Arduino-based MPPT charge controller]
+
 
 +
== Three-stage battery charger ==
 +
 
 +
== Web-based interface ==
 +
 
  
 
== See also ==
 
== See also ==
 
*[[Raspberry Pi]]
 
*[[Raspberry Pi]]
 
*[[Our power project]]
 
*[[Our power project]]
[[Category:Projects]]
+
*[http://www.timnolan.com/index.php?page=arduino-ppt-solar-charger DIY Arduino-based MPPT charge controller]
 +
*[https://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_2170337_-1 The Arduino-based version available as a kit]
 +
*[http://www.freechargecontroller.com FreeChargeController.com] ''- wiki dedicated to developing and evolving the Arduino-based controller''
 +
*[[:File:Detailed analysis of MPPT.pdf|Detailed analysis of MPPT]] ''- a very detailed PDF explaining the PWM-based DC-DC converter method of doing MPPT''
 +
*[https://apollo.open-resource.org/lab:ninjascc NinjaSCC] ''- NinjaSCC is not just another Solar Charge Controller''
 +
[[Category:Projects]][[Category:Hardware]]

Latest revision as of 16:53, 27 June 2018

I'm building a solar MPPT charge controller based on the FreeChargeController.com open source project which is in turn based on Tim Nolan's project. Their system uses the Arduino for the processing part, but I'm going to build mine using a Raspberry Pi.

Voltage and current measurement

We need to have real-time voltage and current sensing of the solar array to determine the optimal voltage and current to draw from it that delivers the maximum power (the maximum power point tracking, MPPT). And we need to also measure the voltage of the battery to know what kind of charging requirements it has, and finally the current on the load needs to be monitored so that we can graph our power usage over time.

The voltage measurement simply involves a very low current potential divider to ground set such that the maximum voltage the divided point can have is not higher than the maximum input of the system's ADC's.

Current measurement is a little more complicated and involves a shunt resistor (very low value with high precision) placed in the circuit segment requiring measurement, then taking the voltage measurement across this shunt resister and using ohms law to calculate the current. Since the shunt resistor's value is so low (to ensure minimal voltage drop) the voltage across it needs to be amplified using a current-sense amplifier chip which is basically an op-amp designed for single ended configuration rather than requiring a feedback system. See this current-sensing tutorial for more detail.

One issue with this is that there isn't any analogue inputs on the Pi, but that can be done with a single chip solution such as the MCP3008 which gives eight analogue channels and connects directly into the SPI port. See Analogue Inputs for Raspberry Pi Using the MCP3008 for more details.

MPPT algorithm

I'm not 100% clear on the way this works yet, but I think it's like this: the DC-DC converter's output voltage is forced to what the battery wants, but may be set to an overall preconfigured value.

The duty cycle of the PWM which is set by the processor based on its solar power detection is effectively alternatively opening and shorting the solar input, but due to a reasonably big capacitor this works as a means of varying the current drawn between zero (always open) and the maximum the panels can deliver (always closed). The processor can then determine whether to draw more or less current based on the effects on the power output that the last change had.

PWM DC-DC converter

Three-stage battery charger

Web-based interface

See also