SolarHeat
A solar heat project
Me
I live in
Stockholm, Sweden, When I went to school I learnt electronics and worked with
that for several years, even though not designing, now I am working with
computer systems and document management. I have always had an eager to
investigate things and invent my own stuff. Thanks dad!
Background
A couple of
years ago, I started to think about getting a system to heat tap water. I
considered a few different options, solar cells to produce electricity and a
couple of different ways to heat water. In a few years, it might be better with
solar cells, and heating water with electricity, but I don’t think quite yet. Even
though Sweden and Stockholm is quite a bit to the north we have the same number
of daylight hours as more southern countries, just distributed a little
differently over the year. We also must consider that the system must withstand
freezing. A system for heating water using the sun is estimated to give 5-6 months’
worth of hot water every year.
When I had
decided for a solar heat system it was time to look at different types of solar
panels. Or not panels at all. There are basically three types of solar heat
systems, flat panels, U-type pipes and heat pipes. Flat panels are cheap but
not that very efficient. Both U-type pipes and heat pipes have double concentric
glass tubes with vacuum in between. U-type pipes are, well, U shaped pipes that
leads the water down through the glass tube, absorbs heat and returns up to the
manifold. In heat pipes does each glass tube have a single copper tube inside,
sealed in both ends and the upper end inserted in the manifold. Inside the heat
pipe is a liquid that vaporizes by the heat from the sun, raises up to the
manifold, condensates and thus leaves its heat energy to the manifold. When the
liquid condensate does it flow back down again. If the upper end of the heat
pipe is not cold off will it be very hot, upwards 200 - 250°C. I burnt my fingers a couple of times when mounting the tubes.
System
I ended up
buying a system from the Swedish company Handskholmen, consisting of everything
needed. Tubes, pump unit, expansion tank, all couplings, and a controller unit.
The pump unit is prebuilt with pump, valves, gauges and connections. The
tubes had couplings attached, but as I had to cut the tubes I also needed a few
more connections. Handskholmen offered to lend a tool for the connections but I
forgot to mention that when I ordered. It turned out that connectors were quite
simple to press using the connectors and a spacer, pressing without the gasket.
The stand
In the
shipment is included fasteners to place the solar panels on the roof. Our roof
is 45 degrees to the south, so it should be ideal, but it is three stories high
so I decided to place the panels on the garage roof instead. The garage roof is flat
so I had to construct my own rack, it took some thinking as I did not want to
make holes through the roof. I ended up with a rack that sits on the wall and
just hangs out over the roof, without touching it.
Installation
The
installation took a couple of hours, building the rack not included. The
biggest problem was that the tubing were 20 meters long, and the both tubes are
glued together. My idea was to keep them together as much as possible, if I did
this again I would have separated them before the install, that would have made
things a lot easier. 20 meters by the way, I got a bit lucky there, I ended up
needing 19.7 meters. The tubes had to pass through the garage, one problem was
that there is a large I-beam dividing the garage, I had to cut holes in the
ceiling to pass over it.
Mounting
the tubes in the manifold also required some thought, as leaving them in the
sun for just a couple of minutes made the end that goes into the manifold very
hot.
Filling
I started to
fill the system using a pump powered by an electric drill, that did not work.
The pump I got pumped too slow so some air bubbles remained in the tubes. To
find if there is still air in the system the easiest is to look at the flow
meter, provided the system has one, and it is made of a glass tube. Also, the
pump will make some noise when the air passes, at worst it is cavitating and
stops pumping. I decided to use the garden hose instead of the drill pump and
flush the system for several minutes, until no more air came out. Before the
winter will I replace the fluid with one mixed with glycol. But I expect I can
do that change with the drill pump.
The preset
pressure in the expansion tank must be set, mine was factory set to 1.5 bar
which was way too much for me. Per the instructions should mine be set to 0.8
bar. The system pressure is then set to 1 bar at the pump, giving 0.7 bar at the
manifold.
When
powering up the system should the flow be adjusted, the instructions for my
systems says it should be 1.5 liter/minute per panel. So, 3 liter/minute in my
case. Since the pump is already set as slow as it can, is the only option to
restrict the flow by closing a valve a bit, select a valve AFTER the pump.
The controller
Included in
the system is a controller that measures the temperature at the bottom of the
heat tank and the outlet of the manifold. It follows some rules explained
below to decide whether the pump should run or not.
Explaining the logic
To decide whether the
pump should run or not are the temperature at the outlet of the manifold
compared to the bottom of the tank. If the manifold is more than 8°C warmer
than the bottom of the tank will the pump start. When the temperature
difference goes down to less than 4°C warmer does the pump stop. The thresholds
can be adjusted.
The maximum temperature
in the bottom of the tank should be set to 85°C, that will be enough to prevent
boiling at the top. When this temperature is reached will the pump stop.
What happens then is
that the tubes keep heating the manifold, but there is no water flow to cool
it. This will inevitably have the temperature raise quickly, if there is sun
shine, that is.
This leads us to the
next threshold temperature, the maximum temperature in the manifold. This
should be set to 120°C, which is roughly the boiling point of water at 1 bar of
pressure. If the manifold is that hot, the pump will not start even though the
tank has cooled off. The reason for this is we have reached what is called
partial vaporization, the water in the manifold has turned into steam, pressing
out water in the expansion tank. Glycol cannot handle these high temperatures
but by allowing vaporization in the manifold isn’t there any glycol there to
take damage. As soon the manifold cools off will the pump start again. The
highest reading I have seen in my system so far, is 170°C, but I believe it can
raise a bit more. At that time the system pressure was at 2 bar at the pump.
Wanting to monitor
So, now the
system runs and produces hot water. I think. I would like to be able to monitor
and measure the performance of the production. I have for a long time looked
for an excuse to buy a Raspberry Pi, and see how that works. I figured I could
hook that up to the thermistors used by the controller and log temperatures
that way. Probably I could also sense if the pump is running or not. So, I got
a Raspberry and an AD converter and hooked the ADC to the thermistors. And the
controller reports short circuit. It turns out the ADC has too low input
resistance. So, I got an operational amplifier, connected as a voltage
follower, before the ADC, and then measuring the resistance works. Or rather, I
measure the voltage over the thermistors and figure I can calculate the temperature
from that. Nope, it turns out that the voltage values are all over the place.
The controller must measure resistance in some other way, probably by adjusting
the current, or pulsing. Anyway, I can’t get any readings that way. I could
hook up a separate set of thermistors and measure those. Or I could build my
own controller. Guess which I went for.
My own controller
Of course I
decided to build my own controller, how hard can it be? I had already concluded
that I can measure the thermistors so now I only had to find a way to control
the pump. The logic is fairly simple, as described above. I also must figure out
how to make it really fail safe, and a way to log data. And present the data in
some way.
Hardware
The
computer is as mentioned a Raspberry Pi, a version 3 model B, and a MCP 3008
ADC connected to the SPI interface on the Raspberry. I downloaded the operating
system ready to go in the form of a flavor of Debian called Raspbian. This
Linux installation has all the needed drivers for Raspberry and also the MCP
3008 drivers already installed. Each analog input is isolated using an MCP 6002
operational amplifier connected as a voltage follower.
There are
four thermistors in the system. Two PT1000 that came with the delivery, one is
measuring the temperature of the water leaving the manifold, the other measures
the temperature in the bottom of the tank. The values from these two determines
whether the pump should run or not. There are two 10kOhm thermistors, one strapped
on each tube at the pump station, used to measure the difference in temperature
of the water leaving the tank, and going to it. Using that information and the
fact that the flow is 3 liters per minute, the produced power can be calculated.
To control
the pump I use a 230V solid state relay from Seinsmart, controlled via a
2N2222 transistor. The relay is designed for the Arduino system originally.
The
Raspberry to the left, ADC and the other electronics on the Veroboard and the
display in the box.
The
connections
And in
production. As seen on the display is the manifold more than 8 degrees warmer
than the tank, and thus the pump runs, and the system produces a fair amount of
power.
And in production. As seen on the display is the manifold more than 8 degrees warmer than the tank, and thus the pump runs, and the system produces a fair amount of power.
Software
To make the
software as stable as possible have I divided it up in relatively small
programs that each is run independently. They are started by Cron, a timer
service in Linux that starts programs at regular intervals. All code that reads
the thermistors and controls the pump is written in Python, because there are
drivers already installed for the GPIO, ADC and Python is also capable of
handling MySQL. One of the programs, collectdata.py, reads the thermistors voltages,
calculates the temperatures and stores the data in a table, 'status', in the
database. Another program, pump.py, reads the data from the database and
decides if the pump should run or not, it also controls the pump. It writes history
to another table, 'history'.
Once a day is last days data summarized and saved in a single line in the table 'archive'.
The MySQL database
is named ‘solarheat’.
Database
tables:
Settings: Holds the various temperature limits
and hysteresis values
name varchar(255)
value varchar(255)
This table holds these lines:
tankbottommax 85
hysteresismax 8
hysteresismin 4
colmaxtemp 120
status: Holds current values
temp0 decimal(4,1)
temp1 decimal(4,1)
pumprunning tinyint(1)
time datetime
temp3 decimal(4,1)
temp2 decimal(4,1)
History: Contains values from each
measurement, stores new values as long as the pump runs
time datetime
pumprunning tinyint(1)
temp0 decimal(4,1)
temp1 decimal(4,1)
tempdiff decimal(4,1)
Archive: Contains produced power per day
time datetime
energy decimal(6,1)
Programs:
collectdata.py
Runs once per minute, started by Cron. This program reads the voltage values for
each thermistor, calculates the temperatures and saves its findings to the
Status table.
pump.py
Runs once per minute, started by Cron. This program reads the temperature values
from the status table, calculates whether the pump should run or not, and
controls the pump. This program saves data in the history table and displays
the data on the display.
archive.py
Runs once per day, started by Cron. This program summarizes last day and saves the total in the table 'archive'.
database.py
Contains a number of routines that handle database operations.
powercalc.py
Does the calculations of power.
I2C_LCD_driver.py
Library for the display. Code from GitHub: https://gist.github.com/DenisFromHR/cc863375a6e19dce359d
Once a day is last days data summarized and saved in a single line in the table 'archive'.
Database tables:
name varchar(255)
value varchar(255)
tankbottommax 85
hysteresismax 8
hysteresismin 4
colmaxtemp 120
temp0 decimal(4,1)
temp1 decimal(4,1)
pumprunning tinyint(1)
time datetime
temp3 decimal(4,1)
temp2 decimal(4,1)
time datetime
pumprunning tinyint(1)
temp0 decimal(4,1)
temp1 decimal(4,1)
tempdiff decimal(4,1)
Archive: Contains produced power per day
time datetime
energy decimal(6,1)
Programs:
Runs once per minute, started by Cron. This program reads the voltage values for each thermistor, calculates the temperatures and saves its findings to the Status table.
Runs once per minute, started by Cron. This program reads the temperature values from the status table, calculates whether the pump should run or not, and controls the pump. This program saves data in the history table and displays the data on the display.
Runs once per day, started by Cron. This program summarizes last day and saves the total in the table 'archive'.
database.py
Contains a number of routines that handle database operations.
powercalc.py
Does the calculations of power.
I2C_LCD_driver.py
Library for the display. Code from GitHub: https://gist.github.com/DenisFromHR/cc863375a6e19dce359d
Web page
To be able
to always monitor the system does the Raspberry also host a web server in the
form of Apache, a few PHP-scripts reads data from the database and presents on
a web page.
Hopefully
this article can be of some inspiration, just let me know if you have any
questions or maybe tell about your own project.
In this link are the source code for all the programs and the web page, it will probably require some work to get it running, consider it a starting point for your own code.
Source code
Tomas Rudh
Sweden
Hopefully
this article can be of some inspiration, just let me know if you have any
questions or maybe tell about your own project.
In this link are the source code for all the programs and the web page, it will probably require some work to get it running, consider it a starting point for your own code.
Source code
In this link are the source code for all the programs and the web page, it will probably require some work to get it running, consider it a starting point for your own code.
Source code
Tomas Rudh
Sweden
Sweden
Comments
Post a Comment