Monday, April 25, 2011
Easter Hack - An Arduino Solar Thermal Controller - in 3 days!
With the longer sunshine hours and warm temperatures, it's time to take my solar water heating out of winter hibernation and improve its control system. After some experience of making an Arduino Mega 2560 based central heating controller, it seemed a good idea to extend some of the ideas to include control of the solar panel. Central heating is generally in use from October through to April, and solar water heating for the remaining months. It seemed sensible to ultimately incorporate solar heating control into the central heating system and get the most from the control and monitoring system.
As part of my aim to use low-cost web connected sensors to measure the contribution of renewable energy systems to the UK domestic energy mix, using a solar thermal panel as a potential first candidate seemed a good idea.
My task for the Easter weekend was to come up with an Arduino based solar controller and use it to collect solar and temperature data and pass this up to the internet using my Nanode low cost Network Node and a web-data service such as Pachube.
It had to measure the inlet and outlet temperatures of the solar panel, the flow rate and control the speed of the pump motor. It also monitors the quantity of solar heat into the water by measuring the flowrate of the circulated water.
Here's my array of 20 evacuated solar water heating tubes. They are mounted on my south west facing shed roof. There is a small 1W solar panel mounted to the upper right of the frame, which can power the Arduino circuitry and also give a good indication of the strength of the incident sun.
This photo was taken about 6pm - just when the sun was leaving the panel.
It is in sunlight from 10am to 6pm, and produces useful thermal output from about 10:30am. Not bad for late April.
The output of the solar thermal array is linked back to my hot water cylinder with about 25m of insulated microbore tubing, and the water is pumped with a 12V dc pump.
Here's my DIY Arduino built on stripboard. It's a bare minimum configuration, just ATmega328, 16MHz crystal and reset circuit with a FTDI cable connection to the laptop programme it and log the solar and temperature data. A 5V linear voltage regulator allows the board to be powered from a wide range of supplies, eventually a small PV panel will be used to power the system during daylight hours.
The dc pump motor speed control is a PWM signal to an IRF640 Mosfet. It is on the bottom right of the case mounted to a heatsink.
The board is mounted inside a Danfoss central heating "wiring centre" case. It's a convenient case with screw terminal connectors.
This photo shows the dc pump (Totton Pumps) and the water flow sensor (UCC from Farnell/RS).
The pump motor is 12Vdc max 4 amps and I use an IRF640 power mosfet with PWM drive to control the speed of the dc pump motor. The Mosfet has to be mounted on a heatsink as it definitely runs on the warm side.
The flow sensor provides a square wave output of frequency proportional to the flowrate. I use an interrupt driven routine averaged over 4 seconds to determine the water flow rate.
Temperature sensors are 10K thermistors. I use a pipe-clip type available from Rapid Electronics (26-7470). These are fitted to the inlet to the panel and the water outlet. I calculate the temperature difference between outlet and inlet, and also the flow rate of the water through the panel.
Multiplying the temperature difference by the flowrate gives a figure which is proportional to the instantaneous power output of the solar thermal panel.