Here's a little more detail about how we hacked Wotton Pool onto the Internet of Things.
The solar panel control system was originally introduced here.
The Raspberry Pi controlling the system is mounted inside one of the switch-gear cabinets, and wired into the ethernet connection on site. From one of the circulation pipes there is a diversion into a central heating pump. When switched on, this circulates the water through the solar panels and back into the pool. On its way, it passes a couple of temperature sensors and a flow meter.
Sensors
To measure how much heat is added by the panels, we are using some One Wire digital thermometers (DS18B20) mounted inside some of the pipes. These are good because they're pretty cheap and can be linked up in series to the GPIO pins on the Raspberry Pi board. Meaning that the 3 probes measuring the water in the panels can use the same wires (connecting to the Pi), but they are each addressable. We developed a technique of embedding the sensor in a 10mm copper pipe with epoxy resin. The pipe and sensor sticks into the flow of water supported by a T-junction on the pipe.
The flowmeter has a dial on it that rotates once per 10 litres of water. When the pointer passes the 0, it closes a reed switch. This is also connected to the Pi, and using the Python GPIO library, a timer logs the leading edge of the circuit being closed by the switch, recording the time taken for that 10 litres of water to pass. This gives us a reading for the flow rate, or volume of water being heated for a given period of time.
Maths
The temperature sensors measure the temperature before and after going through the panels, giving us magnitude of the heating effect. The amount of energy required to heat a kilo of water by 1 degree is 4.18 kilojoules. Our sensors let us know how much water is being heated, and by how much. Using this we can calculate the power output of the solar panels!
Pump
Sometimes, when it's cold, water running through all these extra pipes outside comes back colder than when it started. We don't want that. In these cases the pump should be switched off. The central heating pump used to circulate water around the solar panels is connected to a contactor, which is switched by a relay also connected to the Pi. It runs a Python script to check whether the water is coming back hotter or not. If not, it switches off the relay, stopping the pump from running and closing an electronicly controled isolation valve.
Code
So we can keep an eye on what's going on, the script posts the temperature data, and the state of the pump up to the website at regular intervals. You can see the data as we collect it on a graph here.
As an open source, open air swimming pool, the Python script is on Github
Let us know what you think?
If you find this interesting at all please get in touch: