Tuesday, August 12, 2014

Weekly and Monthly Data Sets

I have been data gathering for almost a month now.  Here is the last week's data.  Saturday and Wednesday were foggy days!  Typical SF summertime weather...


And for the last month:

When the panels where dry, before I turned on the controller/pump, the low was about the same, but the high was 190 C (375 F), not 90 C (194 F).  Most of the cooler days indicate presence of our lovely fog.

Tuesday, July 15, 2014

Data Logging: Results!

As of last night I completed hookup of the eighth 1-wire temperature sensor.  It is reading at the hot inlet to the mixing valve, which is also the outlet to my old 30 gallon hot water heater.  This will give me an idea of the performance of the mixing valve and it's settings, as the difference between the "Domestic Hot Water Supply" and the measurement read at this sensor is how much cold water is being mixed into my hot water supply.

The data that I am generating is being put, for each sensor, into an RRDtool database every 30 seconds.   I have no idea what a good sampling frequency is, so I settled on this one because it sounded about right.   I will probably blow away this database and recreate it a few times in the next week or so trying to get it 'just right'.

Here is the dataset for the last four hours today:


The lines I found most interesting are the roof (red), solar storage tank temperature (green) an domestic hot water supply (should be magenta, but looks red!).  DHW supply roughly shows the usage during the afternoon.  I very much dig the slow but steady rise of the storage tank temperature!




Tuesday, July 8, 2014

Time to start Datalogging

My system has been running for almost a year now.  I've been busy raising our twin girls, now a year old, and the solar system 'hobby' has faded into the background.  I get started getting tiny time slices for projects in the last couple months, usually between nine and ten at night on weeknights.  With some of that time my next addition to the system is data logging.

An Arduino Uno with ethernet shield and microSD storage was my first thought for a data logger.  It is economical, available with great libraries, sample code and forum support.  I got a little ways down the road using one and then realized it would be so much easier with a Raspberry Pi, add-on 16-bit ADC (ADS1115) and 1-wire thermal sensors (the ubiquitous Maxim ds18b20).  My money making gig is as a Linux administrator, so working with Raspbian on the Pi is a simple pleasure for me.  Also, getting Network Time Protocol (NTP) and a Real Time Clock (RTC) working on the Pi is simpler.  I ended up getting a DS1307-based RTC that works over i2c.  It's plenty accurate when paired with NTP which will give me good timestamps for my time series data.  To make interfacing all these devices easier to my Raspberry Pi, I'm using the Adafruit Pi Plate (see below).


The ADC is used to read voltages on the two temperature sensors (located at the panel output header and storage tank) that came with the Steca controller.  The voltage range that it presents is pretty small - 64F/2.040V - 176F/2.200 - so I'm happy having the 16-bit ADC rather than the Arduino's 10-bit ones.  In the image below you can see how I have used and orange and green pair from CAT5 cable to tap into the roof and storage tank thermal probe leads.


I ordered 10 1-wire sensors from Amazon that were nicely soldered onto cables with stainless shrouds protecting the sensors.   I hope they will withstand years of hot water temperatures.  Five of them are now patched into a 12-port patch panel which I am using as a combined 1-wire and ethernet patch panel.  The ethernet patch is for the Pi.  For the 1-wire bus, three conductors in the CAT5 cable - blue (data), green (ground), and orange (power) - will extend the sensor wire to the panel.  I'm using 568B wiring style in all the jacks regardless of whether it's ethernet or 1-wire.  I borrowed a buddy's 110 impact punch down tool to connect all the wires easier (Thanks Peter!).  Here's the back of the patch panel:
Happily all the 1-wire sensors are working.  I'm happy about this as each sensor connection required crimping one RJ45 jack, soldering three leads and punching down three wires.  There was plenty to screw up and I didn't.  woO!  The two ADC connection to the roof and storage tank temperature sensors are also reporting their temps to a python script that uses the adafruit ADS1115 libraries.  The completed setup is below.  I'm kind of dreading writing all the code - there are a lot of decision to make about it - but at least most of the HW setup is done.