{"id":113,"date":"2015-09-11T15:38:11","date_gmt":"2015-09-11T22:38:11","guid":{"rendered":"http:\/\/ve6sar.northernsmiths.ca\/?p=113"},"modified":"2016-01-14T17:56:56","modified_gmt":"2016-01-15T00:56:56","slug":"arduino-green-house-telemetry-project","status":"publish","type":"post","link":"https:\/\/ve6sar.northernsmiths.ca\/?p=113","title":{"rendered":"Arduino Green House Telemetry Project"},"content":{"rendered":"<p>Now that the <a href=\"http:\/\/ve6sar.northernsmiths.ca\/cattle-panel-green-house\/\" target=\"_blank\">Cattle Panel Green House\u00a0<\/a>\u00a0has 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:<\/p>\n<ul>\n<li>Measure soil temperature<\/li>\n<li>Measure soil moisture<\/li>\n<li>Measure the air temperature inside \/ outside the green house<\/li>\n<li>Send the data to the web automatically<\/li>\n<li>Have built in future expansion possibilities i.e. turn a drip irrigation system on and off.<\/li>\n<\/ul>\n<p>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 <a href=\"http:\/\/ve6sar.northernsmiths.ca\/digital-controlled-solar-heater\/\" target=\"_blank\">Solar Heater Project<\/a>. I came across an EBay listing from\u00a0<span class=\"mbg-nw\"><a href=\"http:\/\/www.ebay.ca\/usr\/pcbdaince?_trksid=p2047675.l2559\" target=\"_blank\">pcbdaince<\/a>\u00a0for his type A soil temperature and moister unit.<\/span><\/p>\n<p><img decoding=\"async\" src=\"http:\/\/pcb.daince.net\/lib\/exe\/fetch.php?cache=&amp;w=899&amp;h=361&amp;tok=90f912&amp;media=soil_sensor:img_4046.png\" alt=\"img_4046.png\" \/><\/p>\n<p>It includes three DS18B20 1-wire temperature sensors, and four capacitive measurement areas. The link to information on this unit<\/p>\n<p><a href=\"http:\/\/pcb.daince.net\/doku.php?id=sensor_soil_2\" target=\"_blank\">http:\/\/pcb.daince.net\/doku.php?id=sensor_soil_2<\/a><\/p>\n<p>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.<\/p>\n<p>Please check schematic on\u00a0<a href=\"http:\/\/pcb.daince.net\/doku.php?id=da_sensor_1\" target=\"_blank\">http:\/\/pcb.daince.net\/doku.php?id=da_sensor_1<\/a><\/p>\n<p>Arduino class modified for measuring capacitance with this unit is at\u00a0<a href=\"http:\/\/pcb.daince.net\/doku.php?id=arduino_lib_dpcssoilsensor\" target=\"_blank\">http:\/\/pcb.daince.net\/doku.php?id=arduino_lib_dpcssoilsensor<\/a><\/p>\n<p>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)<\/p>\n<p>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.<\/p>\n<p>Now to save the data I already use <a href=\"http:\/\/www.hostgator.com\/\" target=\"_blank\">Host Gator<\/a>\u00a0for this page and a few others so my plan is to setup a database on that server to save the data to.<\/p>\n<p>I tried several ways to save data from and Arduino to a MySQL database including the <a href=\"https:\/\/launchpad.net\/mysql-arduino\" target=\"_blank\">MySQL Library<\/a> 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.<\/p>\n<p>Once I have the PHP code finalized I&#8217;ll post it here.<\/p>\n<p>The Arduino libraries that are required are:<\/p>\n<p><a href=\"http:\/\/pcb.daince.net\/lib\/exe\/fetch.php?media=source_code:arduino:library:dpcssoilsensor:dpcssoilsensor-1.0.0.zip\" target=\"_blank\">dpcsoilsensor<\/a><\/p>\n<p><a href=\"http:\/\/www.hacktronics.com\/code\/DallasTemperature.zip\">DallasTemperature Arduino Library\u00a0<\/a><\/p>\n<p><a href=\"http:\/\/www.hacktronics.com\/code\/OneWire.zip\">OneWire Arduino Library<\/a><\/p>\n<p>SPI Arduino Library (Included in the Arduino Software)<\/p>\n<p>Ethernet\u00a0Arduino Library (Included in the Arduino Software)<\/p>\n<p style=\"text-align: center;\"><strong>Arduino Code to come still fine tuning it\u00a0<\/strong><\/p>\n<p style=\"text-align: left;\">Here&#8217;s a picture of the completed unit.<\/p>\n<p style=\"text-align: left;\"><a href=\"http:\/\/ve6sar.northernsmiths.ca\/wp-content\/uploads\/2015\/09\/IMG_1310.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\" size-thumbnail wp-image-120 alignleft\" src=\"http:\/\/ve6sar.northernsmiths.ca\/wp-content\/uploads\/2015\/09\/IMG_1310-150x150.jpg\" alt=\"Green House Telemetry Unit \" width=\"150\" height=\"150\" \/><\/a> <a href=\"http:\/\/ve6sar.northernsmiths.ca\/wp-content\/uploads\/2015\/09\/IMG_1311.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\" size-thumbnail wp-image-121 alignleft\" src=\"http:\/\/ve6sar.northernsmiths.ca\/wp-content\/uploads\/2015\/09\/IMG_1311-150x150.jpg\" alt=\"IMG_1311\" width=\"150\" height=\"150\" \/><\/a><\/p>\n<p style=\"text-align: left;\">\n<p style=\"text-align: left;\">\n<!-- iframe plugin v.5.2 wordpress.org\/plugins\/iframe\/ -->\n<iframe loading=\"lazy\" src=\"http:\/\/northernsmiths.ca\/arduino\/ggraph.php\" width=\"100%\" height=\"500\" scrolling=\"yes\" class=\"iframe-class\" frameborder=\"0\"><\/iframe>\n<\/p>\n<div class=\"twttr_buttons\"><div class=\"twttr_twitter\">\n\t\t\t\t\t<a href=\"http:\/\/twitter.com\/share?text=Arduino+Green+House+Telemetry+Project\" class=\"twitter-share-button\" data-via=\"@ve6sar\" data-hashtags=\"\"  data-size=\"default\" data-url=\"https:\/\/ve6sar.northernsmiths.ca\/?p=113\"  data-related=\"\" target=\"_blank\">Tweet<\/a>\n\t\t\t\t<\/div><div class=\"twttr_followme\">\n\t\t\t\t\t\t<a href=\"https:\/\/twitter.com\/ve6sar\" class=\"twitter-follow-button\" data-size=\"default\"  data-show-screen-name=\"false\"  target=\"_blank\">Follow me<\/a>\n\t\t\t\t\t<\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Now that the Cattle Panel Green House\u00a0\u00a0has 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 &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/ve6sar.northernsmiths.ca\/?p=113\"> <span class=\"screen-reader-text\">Arduino Green House Telemetry Project<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[12,14],"tags":[],"class_list":["post-113","post","type-post","status-publish","format-standard","hentry","category-arduino","category-gardening"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4JDFz-1P","_links":{"self":[{"href":"https:\/\/ve6sar.northernsmiths.ca\/index.php?rest_route=\/wp\/v2\/posts\/113","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ve6sar.northernsmiths.ca\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ve6sar.northernsmiths.ca\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ve6sar.northernsmiths.ca\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ve6sar.northernsmiths.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=113"}],"version-history":[{"count":11,"href":"https:\/\/ve6sar.northernsmiths.ca\/index.php?rest_route=\/wp\/v2\/posts\/113\/revisions"}],"predecessor-version":[{"id":133,"href":"https:\/\/ve6sar.northernsmiths.ca\/index.php?rest_route=\/wp\/v2\/posts\/113\/revisions\/133"}],"wp:attachment":[{"href":"https:\/\/ve6sar.northernsmiths.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ve6sar.northernsmiths.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=113"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ve6sar.northernsmiths.ca\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}