Sunday, January 24, 2016

Automated Worm Bin Progress: Part 2

See Part 1 of my notes for the first steps.

I have nearly completed building my worm bin.  The temperatures have been too cold to get glue to dry to finish some details. Meanwhile, I will work on the technical portion of the worm bin's temperature monitoring.

nearly complete worm bin with heater rack in foreground

I have the soil temperature part working well.  The soil sensor is collecting the temperature and displaying it on the graph on the bin's home page.

The soil temp line is brown on the graph but shows as grey with the other color settings being a little transparent.  You can see on the far left, I had the probe on an ice pack to help me see that it was there (otherwise it would be almost the same temp at the air).  Near the very end (right), there is a blip up where I held it in my hand for a couple of seconds.

I had to edit a few of the step 1 and step 2 files to get the second sensor working with the others.

I modified the step 1 python script ( to include some of python code from step 2:

You will need to edit the line:
soil_temp_sensor = '/sys/bus/w1/devices/28-000006c3a429/w1_slave'
To match your sensor's id see the step 2 tutorial link.

I also edited the public/index.html file to handle the new sensor info:

Be sure to restart everything (the web server or Raspberry Pi) to make sure it all works.

Now would be a good time to make a backup disk image if you are following along.

Measuring Soil Moisture

I now would like to measure the soil moisture.  This seems to be a bit trickier to find a sensor that will work with Raspberry Pi and Python.  There are some tutorials on Arduino moisture sensor ideas.  This project uses both Aruino and Raspberry Pi for monitoring crops.

So far, this combined temp and soil moisture sensor might work (a bit pricey):
Seems to work with Arduino but not sure about a Python.  I did find python library for it which might work :

There are also some projects that show other options that look interesting:

This Instructable looks really interesting because it gets into many more elements beyond just monitoring and looks at reacting to conditions.

I have a few other related projects to work on.  I'll take a break on the technical part of my worm project for now and think about the moisture sensing a little more.   I need to finish my worm bin construction, put some worms in it, and install on outdoor wireless access  point to connect to the the Raspberry Pi from the comfort of my house (200 feet away).

I hope what I have done so far gets you started.  If you have any improvements or other ideas please let me know.


  1. Hi Sean did you ever complete your bin? what about the Raspberry PI?