{"id":11333,"date":"2019-07-05T18:11:50","date_gmt":"2019-07-05T16:11:50","guid":{"rendered":"https:\/\/hesmid.nl\/test\/?p=11333"},"modified":"2019-07-05T18:11:52","modified_gmt":"2019-07-05T16:11:52","slug":"watering-plants-with-a-raspberry-pi","status":"publish","type":"post","link":"https:\/\/hesmid.nl\/test\/watering-plants-with-a-raspberry-pi\/","title":{"rendered":"Watering plants with a Raspberry Pi"},"content":{"rendered":"\n<p><a href=\"https:\/\/news.ycombinator.com\/item?id=20264911\">Ask HN: What do you do with your Raspberry Pi?<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Plant watering<\/h3>\n\n\n\n<p>The pi runs a reddit bot that reads the \nvotes, and can switch on a pump to water. It also collects data about \nsunlight, moisture, temp and humidity to help inform the decision about \nwatering. Despite many people&#8217;s preconceptions about the goodness of the\n internet, I must admit that they do a wonderful job caring for my \nplant!<\/p>\n\n\n\n<p>website: <a href=\"http:\/\/www.takecareofmyplant.com\">http:\/\/www.takecareofmyplant.com<\/a><\/p>\n\n\n\n<p>subreddit w\/ voting: <a href=\"http:\/\/old.reddit.com\/r\/takecareofmyplant\">http:\/\/old.reddit.com\/r\/takecareofmyplant<\/a> (also has a lot of info if you want to do it yourself)             <\/p>\n\n\n\n<p><strong>Similar project: <\/strong><\/p>\n\n\n\n<p>Raspberry pi is automatically uploading video of each watering to YouTube  (<a href=\"https:\/\/www.youtube.com\/channel\/UCtl442fLi6KAOowkw_w83rA\/videos\">https:\/\/www.youtube.com\/channel\/UCtl442fLi6KAOowkw_w83rA\/vid&#8230;<\/a>) and informing me with summary (incl. watering duration, soil moisture level, temperature, humidity, light level etc.).<\/p>\n\n\n\n<p>\nI&#8217;m using a cheap submersible water pump controlled via relay by a python script running on raspberry pi.\nWater pump is connected to a clear vinyl tube for water distribution to the plant.<\/p>\n\n\n\n<p>Availability of water level at source is checked by a non-contact liquid level sensor.<\/p>\n\n\n\n<p>Triggers\n for watering plant are defined as follows:\n1. There is water in tank \/ source (checked by non-contact liquid level \nsensor)\n2. Soil moisture level is below certain threshold (measured by 2 soil \nmoisture capacity sensors embedded in the plant)\n3. Watering duration is determined by current soil moisture level; \nPython script activates relay to run the pump for the right duration. \n4. Same python script also:\n&#8211; activates camera to record watering (+2s buffer to have all on the \nvideo) via usb cam connected to the pi (leveraging opencv lib) \n&#8211; uploads recorded video automatically to youtube channel (if pi has \ninternet connection)\n&#8211; summarizes watering event and sends me notification with link to the \nrecording and other helpful stats (temp, humidity, moisture level etc.)\n&#8211; saves all metrics to sqllite db for future reference<\/p>\n\n\n\n<p>Key parts I ended up using for the project:\n1. Water pump: <a href=\"https:\/\/www.amazon.com\/gp\/product\/B01LWXV7DE\/ref=ppx_yo_dt_b_asin_title_o03_s00?ie=UTF8&amp;psc=1\">https:\/\/www.amazon.com\/gp\/product\/B01LWXV7DE\/ref=ppx_yo_dt_b&#8230;<\/a><\/p>\n\n\n\n<p>2. Non-contact Liquid Level Sensor -XKC-Y25-NPN: <a href=\"https:\/\/www.amazon.com\/gp\/product\/B07D3246BH\/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&amp;psc=1\">https:\/\/www.amazon.com\/gp\/product\/B07D3246BH\/ref=ppx_yo_dt_b&#8230;<\/a><\/p>\n\n\n\n<p>3. Gikfun Capacitive Soil Moisture Sensor: <a href=\"https:\/\/www.amazon.com\/gp\/product\/B07H3P1NRM\/ref=ppx_yo_dt_b_asin_title_o03_s00?ie=UTF8&amp;psc=1\">https:\/\/www.amazon.com\/gp\/product\/B07H3P1NRM\/ref=ppx_yo_dt_b&#8230;<\/a><\/p>\n\n\n\n<p>4. Relay: <a href=\"https:\/\/www.amazon.com\/KeeYees-Channel-Indicator-Arduino-Raspberry\/dp\/B07L6J6FHH\/ref=sr_1_8?keywords=pi+relay&amp;qid=1561439704&amp;s=electronics&amp;sr=1-8\">https:\/\/www.amazon.com\/KeeYees-Channel-Indicator-Arduino-Ras&#8230;<\/a> (though I just bought my when visiting Fry&#8217;s)<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ask HN: What do you do with your Raspberry Pi? Plant watering The pi runs a reddit bot that reads the votes, and can switch on a pump to water. It also collects data about sunlight, moisture, temp and humidity to help inform the decision about watering. Despite many people&#8217;s preconceptions about the goodness of [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[309,146],"tags":[500,298,260],"acf":[],"_links":{"self":[{"href":"https:\/\/hesmid.nl\/test\/wp-json\/wp\/v2\/posts\/11333"}],"collection":[{"href":"https:\/\/hesmid.nl\/test\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hesmid.nl\/test\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hesmid.nl\/test\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/hesmid.nl\/test\/wp-json\/wp\/v2\/comments?post=11333"}],"version-history":[{"count":1,"href":"https:\/\/hesmid.nl\/test\/wp-json\/wp\/v2\/posts\/11333\/revisions"}],"predecessor-version":[{"id":11337,"href":"https:\/\/hesmid.nl\/test\/wp-json\/wp\/v2\/posts\/11333\/revisions\/11337"}],"wp:attachment":[{"href":"https:\/\/hesmid.nl\/test\/wp-json\/wp\/v2\/media?parent=11333"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hesmid.nl\/test\/wp-json\/wp\/v2\/categories?post=11333"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hesmid.nl\/test\/wp-json\/wp\/v2\/tags?post=11333"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}