3

(coco) #1
FORGE

CHECKING IT WORKS
Once everything has been built, powered up and
programmed, it’s time to check it works. This is best
done before installing in the airing cupboard and with
the Pi Zero attached to a monitor and keyboard.
Run the script using this command:
python /home/pi/python/hotwater.py


You should see the information from each sensor
being printed to the screen, followed by messages
about the data being uploaded to Google.
Once everything is working when you run the script
manually, the final step is to have it run automatically
at regular intervals. The nice thing is that the Raspbian
operating system already has a built-in utility to do
just this: crontab.


CRONTAB IS YOUR FRIEND
Crontab is a Linux utility for automatically performing
tasks – either at fixed times of the day, or at boot –
but most importantly here, at regular intervals.
Crontab is opened using the following command:
crontab -e


You will see a text file in the standard Linux text
editor. Scroll to the end, and on a new line add
the following:
*/5 * * * * python /home/pi/python/hotwater.py &

This will automatically run the script every five
minutes. If you want a different frequency, then
change the number at the beginning.
You should now be able to open the Google Sheet
on another computer and watch the data come in
live every five minutes!

THE FINAL STEP
When everything is working correctly on the bench,
it’s time to fit the system into the airing cupboard
and the sensors to the hot water tank.
Starting at the mark made for the first sensor
location, use a blunt tool (a wooden skewer is ideal)
to poke a hole in the hot water cylinder insulation.
Wiggle it slightly to enlarge the hole until it is a little
smaller than the diameter of one of the temperature
sensors. Make sure the hole has passed all the
way to the copper wall of the internal cylinder
and that the insulation is scraped away from the
metal surface.
Put a blob of thermal paste about the size of a
small pea on the tip of the sensor and push it into
the hole until it makes contact with the cylinder wall.
The insulation layer should hold it in place.
Once everything is in, make sure all sensors are
reading approximately the same value when you
know the water is fully hot (within around 1°C).
If one is noticeably different, ensure there is no
remaining insulation between the sensor and tank
wall and make sure you have used enough thermal
compound to fill any air gaps.
That’s all there is to it. You can now monitor your
hot water system from wherever you are and you’ll
never have to endure a cold shower again.

TROUBLE SHOOTING


If you are experiencing issues, check the following:


  • The Google Sheet has the correct name and
    has been shared with the email address
    generated by the Google Developers Console

  • The client_secret.json file is in the correct place^

  • The codes for each of the eight sensors are
    correctly identified and entered into the script


WHAT TO CHECK


Only poke holes in
the insulation with
something soft that
will not damage the
internal cylinder
(avoid anything
made of metal).

QUICK TIP


Above
DS18B20 temperature sensors are available in waterproof
packages like this or three pin packages for more
confined spaces
Free download pdf