Arduino Green House Telemetry Project
Now that the Cattle Panel Green House has proven to make a huge difference I want to geek it up a little. By that I mean I want telemetry saved to a database that I can analyse at a later date and and in temperature and moister alarms. My goals are as follows:
- Measure soil temperature
- Measure soil moisture
- Measure the air temperature inside / outside the green house
- Send the data to the web automatically
- Have built in future expansion possibilities i.e. turn a drip irrigation system on and off.
So like every good hardware hacker I turned to Google to see what was out there for measuring soil moister as I was already familiar with 1-wire DS18B20 temperature sensors from my Solar Heater Project. I came across an EBay listing from pcbdaince for his type A soil temperature and moister unit.
It includes three DS18B20 1-wire temperature sensors, and four capacitive measurement areas. The link to information on this unit
http://pcb.daince.net/doku.php?id=sensor_soil_2
You will need 4 Resistors from 1M to 10M , 4 Capacitor from 100 to 200pF for every testing area that you got results for every of that area.
Please check schematic on http://pcb.daince.net/doku.php?id=da_sensor_1
Arduino class modified for measuring capacitance with this unit is at http://pcb.daince.net/doku.php?id=arduino_lib_dpcssoilsensor
Note if you buy the Type A PCB like I did you will need a 10m Ohm resistor between Arduino Pin 7 and each sensor line and a 220pF capacitor between each sensor line and ground. The type B has the resistors and capacitors included on the board so you can directly connect to the Arduino pins with out external components. (Wish I had figured that out before I ordered)
I will be using two additional DS18B20s, one for the outside air temperature and one for the inside air temperature. So in total there will be 5 DS18B20 1-wire temperature sensors.
Now to save the data I already use Host Gator for this page and a few others so my plan is to setup a database on that server to save the data to.
I tried several ways to save data from and Arduino to a MySQL database including the MySQL Library Chuck Bell wrote. The best way seems to be to have the Arduino make an HTML GET request with the data in it and have a small PHP script receive the request and post it the Database.
Once I have the PHP code finalized I’ll post it here.
The Arduino libraries that are required are:
DallasTemperature Arduino Library
SPI Arduino Library (Included in the Arduino Software)
Ethernet Arduino Library (Included in the Arduino Software)
Arduino Code to come still fine tuning it
Here’s a picture of the completed unit.
Leave a Reply