Social

Social

Social

Friday, January 22, 2016

Make a Rasperry Pi Worm Bin Monitoring System

I have 10 horses generating manure every day, so I am curious about using that for feeding my earthworms.  I will be exploring other feedstocks too.

I am building this OSCR flow through bin pictured, and I want to get email or text alerts when things are not ideal so I do not kill my worms and I have the most efficient system possible.

I also want to know how well the bin design functions.  For example, does the insulation work well in summer and winter or does it work less well in summer?  If I add some frozen water bottles in the heat of summer how much will it impact soil temp?

unfinished OSCR worm
bin
Incidentally, my bin now is painted and has insulation panels inside as well as  a heating tray for under the soil.  I'll post more on that later.


Building the Monitor

Monitoring web page charts worm bin exterior temperature and percentage humidity after step 1 below.

There are many ways to do the tech part of things to setup a worm monitoring system.  You can choose from Raspberry Pi, Arduino, and other micro controller boards to get started.  I chose Raspberry Pi because I am comfortable with Linux and can cobble together a little Python code.  Additionally, there seems to be plenty of libraries for the various sensors available.

I basically I want version 1 of my monitor to tell me my outdoor temp, soil temperature, and soil moisture level.  PH might be nice too.  I am very experienced with technology in general and much less experienced with worms and Raspberry Pi and sensors.

Eventually I may want to automate feeding or watering but I must take baby steps.

This is not a finished tutorial, but rather a document of what I am currently exploring.  It's purpose is to help me remember my steps.  You might find some inspiration to get started making your own monitoring solution.  I may not have technical answers to your Raspberry Pi or sensor questions but it does not hurt to ask :-)

What you might want to buy:

Raspberry Pi board.  Raspberry Pi is much different than an Arduino.  A Raspberry Pi can run a full operating system cheaply (including Windows 10).  I use an older Raspberry Pi B+ but would prefer new faster model 2.   Get a  power supply for it too.

There are many temperature sensors out there.  My favorite place to browse for them is Adafruit, but some of the prices on Amazon are better.  Adafruit has a nice looking sensor for soil temp and moisture for around $50.

Other things to consider...
HINT: You may want to save yourself some grief and periodically make a backup image file of your work.  (Like after step 1).  Just use the same software you used to transfer your raspian operating system to the card from step 1.

Basic Steps 

Keep in mind that I just started this project so I will modify this post or add more posts as I make progress.

Step 1 Adding Air Temperature/Humidity Sensor

You can follow this home automation tutorial to get the basics up and running with ambient temperature sensor first.  I did not need the humidity functionality but decided to use it anyway.
http://www.home-automation-community.com/temperature-and-humidity-from-am2302-dht22-sensor-displayed-as-chart/

The Raspberry Pi B+ board has more GPIO pins than the original Raspberry Pi so I am always looking them up with this image:
http://www.raspberrypi-spy.co.uk/2014/07/raspberry-pi-b-gpio-header-details-and-pinout/#prettyPhoto/0/

After step 1 my setup looks like this
The Raspberry Pi is on the left (green) and a breadboard is on the right (white).  The breadboard just helps you attach wires, sensors, and resistors to the Raspberry Pi.

The white box on the lower left of the breadboard is the air temperature sensor- less than $9 on Amazon.  The larger black box to the right (orange light) is my wifi antennae attached to USB hub (not necessary).  The other cables coming into the board on left are mostly unnecessary too because they are just to setup the operating system until I have a network connection  (USB mouse and keyboard and HDMI for video)

Step 2 Adding soil sensor

A different tutorial explains how to setup the soil sensor.
http://www.modmypi.com/blog/ds18b20-one-wire-digital-temperature-sensor-and-the-raspberry-pi
Because I am already using pin 4 for the first sensor, I decided to use pin 17 for the second sensor.

where instructions say to edit /boot/config.txt
and add:
dtoverlay=w1-gpio
I also add the new pin info (since the device defaults to using the pin I am already using for the air temperature sensor in step 1)
dtoverlay=w1-gpio,gpiopin=17


So far, I now have the soil sensor working.  I am now about to begin the python programming.  In an future blog post I will look at the script from step 1 and see how I will incorporate the second sensor into the monitoring script I already have so it's results will be included in the graph on the web page.

The circled up black cable is the added waterproof soil sensor. 


In general, if you are not very technical, start out with very small steps.  Do some basic Raspberry Pi tutorials first.  The when comfortable, try reading your room temperature, and move on from there.

Part 2: Adding the soil temperature sensor.

No comments:

Post a Comment