IoT Plant Vitals – Stats Monitor

In this project, we will monitor the growth of a pansy plant over a period of 3 weeks in a contained environment. The values were collected from various sensors using the Beagle Bone as the Host. Data will be pushed to database and will be made public. We are using Python/Bash/Cron to program the BBB Linux utilities and the various sensors being implemented in this project.

Python Script was used to collect data from sensors. Thanks to the rich libraries that are provided on the beagle bone platform,

Snippet of Script for data collection

#import libs for use
import time
import math
from bbio import *
import Adafruit_BMP.BMP085 as BMP085
import os
import urllib2
# initialize the sensor and read data 
sensor = BMP085.BMP085() 
def analog_read(channel):
r = SPI0.transfer( [ 1 , ((8 + channel) << 4) , 0] )
#transfer data to adc. 
adc_out = ((r[1]&3) << 8) + r[2]
return adc_out
#indicate if it is day or night 
while True:
if analog_read(0) > 100:
dayandnight = 'day'
dayandnight = 'night'

#read data from sensors.
moist = analog_read(1) 
pressure= sensor.read_pressure()
#print data
print 'Pressure = {0:0.2f} Pa'.format(sensor.read_pressure()) 
print 'Temp = {0:0.2f} *C'.format(sensor.read_temperature()) 
print "dayandnight = "
print dayandnight 
print "moisture = "
print moist
print " \n"

Linux Cron: scheduler runs our python script every hour. High customization allows for precise and continuous data collection.


BBB Setup


DATA: Download CSV Format

Getting Webcam Images with Python and OpenCV 2 (For Real This Time)

2 thoughts on “IoT Plant Vitals – Stats Monitor

    1. I was going to use openCV to take periodic pictures of the plant. Unfortunately i had hardware issues with BBB and power supply for the Camera(not enough current, would shutoff randomly). Thanks for the reference !!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s