{"id":18216,"date":"2018-06-27T08:00:34","date_gmt":"2018-06-27T15:00:34","guid":{"rendered":"https:\/\/blog.digilentinc.com\/?p=18216"},"modified":"2023-01-09T12:47:33","modified_gmt":"2023-01-09T20:47:33","slug":"fpga-smart-watering-system","status":"publish","type":"post","link":"https:\/\/digilent.com\/blog\/fpga-smart-watering-system\/","title":{"rendered":"FPGA Smart Watering System"},"content":{"rendered":"<p>As someone who agonizes over the health of my lemon tree, a system that monitors the health of my plant is a dream come true. My office has no natural light, so I have a system of lamps to get the right amount of light, and sometimes the heater gets left on, so predicting the amount of water my lemon tree needs can be difficult.<\/p>\n<figure id=\"attachment_18218\" aria-describedby=\"caption-attachment-18218\" style=\"width: 554px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-18218 size-medium\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/15682612_1287755151244652_664141000_o-e1482433557170-554x600.jpg\" width=\"554\" height=\"600\" data-wp-pid=\"18218\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/15682612_1287755151244652_664141000_o-e1482433557170-554x600.jpg 554w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/15682612_1287755151244652_664141000_o-e1482433557170-768x832.jpg 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/15682612_1287755151244652_664141000_o-e1482433557170-945x1024.jpg 945w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/15682612_1287755151244652_664141000_o-e1482433557170.jpg 1536w\" sizes=\"auto, (max-width: 554px) 100vw, 554px\" \/><figcaption id=\"caption-attachment-18218\" class=\"wp-caption-text\">My multiple light set up for the lemon tree. So far it has yielded five baby lemons on the tree.<\/figcaption><\/figure>\n<p>Nothing is worse than coming into work and seeing that my lemon tree has dropped a bunch of yellow leaves, or even more heartbreaking, one of its baby lemons.<\/p>\n<figure id=\"attachment_18219\" aria-describedby=\"caption-attachment-18219\" style=\"width: 600px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-18219 size-medium\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/15696816_1287771137909720_1586645037_o-600x588.jpg\" width=\"600\" height=\"588\" data-wp-pid=\"18219\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/15696816_1287771137909720_1586645037_o-600x588.jpg 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/15696816_1287771137909720_1586645037_o-768x753.jpg 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/15696816_1287771137909720_1586645037_o-1024x1004.jpg 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/15696816_1287771137909720_1586645037_o-800x784.jpg 800w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/15696816_1287771137909720_1586645037_o.jpg 1535w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><figcaption id=\"caption-attachment-18219\" class=\"wp-caption-text\">A baby lemon casualty! It was only a few weeks old when it fell.<\/figcaption><\/figure>\n<p>Instructables user byoon <a href=\"http:\/\/www.instructables.com\/id\/Smart-Watering-System\/\">posted a project <\/a>created by a team of 4 students at California Polytechnic Institute. The project includes step by step instructions on creating an FPGA driven plant watering system. The system tests the soil moisture, air temperature, and light levels to water the plant when it&#8217;s needed.<\/p>\n<figure id=\"attachment_18222\" aria-describedby=\"caption-attachment-18222\" style=\"width: 600px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-18222\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/plantwatering-1-600x569.png\" alt=\"\" width=\"600\" height=\"569\" data-wp-pid=\"18222\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/plantwatering-1-600x569.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/plantwatering-1-768x728.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/plantwatering-1-800x759.png 800w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/plantwatering-1.png 854w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><figcaption id=\"caption-attachment-18222\" class=\"wp-caption-text\">The plant watering system instructable.<\/figcaption><\/figure>\n<p>In the Instructable they use a <a href=\"https:\/\/digilent.com\/shop\/basys-3-artix-7-fpga-trainer-board-recommended-for-introductory-users\/\">Basys 3 <\/a>board, Arduino board, breadboard, light sensor, moisture sensor, resistor, and temperature sensor.<\/p>\n<figure id=\"attachment_18223\" aria-describedby=\"caption-attachment-18223\" style=\"width: 600px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-18223\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/materials-600x553.png\" alt=\"\" width=\"600\" height=\"553\" data-wp-pid=\"18223\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/materials-600x553.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/materials-768x708.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/materials-800x738.png 800w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/materials.png 825w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><figcaption id=\"caption-attachment-18223\" class=\"wp-caption-text\">The materials list from the instructable.<\/figcaption><\/figure>\n<p>However, this project could be done with minimal modification with less hardware, and hardware that is much more compact. The Arduino is used solely for its analog to digital converters, which can be replaced with some of our <a href=\"https:\/\/digilent.com\/blog\/digilent-pmods-analog-to-digital-converters\/\">Pmods<\/a>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-18154\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/pmod-ad2-top.png\" alt=\"\" width=\"501\" height=\"348\" data-wp-pid=\"18154\" \/><\/p>\n<p>In addition, a much smaller FPGA board can be used. One of our Cmods, such as the <a href=\"https:\/\/digilent.com\/shop\/cmod-a7-breadboardable-artix-7-fpga-module\/\">Cmod A7<\/a> can be placed on a breadboard for a more compact design.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-15289\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/07\/new-product-cmoda7front-445x600.jpg\" alt=\"\" width=\"445\" height=\"600\" data-wp-pid=\"15289\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/07\/new-product-cmoda7front-445x600.jpg 445w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/07\/new-product-cmoda7front.jpg 460w\" sizes=\"auto, (max-width: 445px) 100vw, 445px\" \/><\/p>\n<p>The light sensor, photo-resistor, resistor, breadboard, and breadboard fires can all be found in the <a href=\"https:\/\/digilent.com\/shop\/analog-parts-kit-by-analog-devices-companion-parts-kit-for-the-analog-discovery\/\">Analog Parts Kit.<\/a><\/p>\n<figure id=\"attachment_17252\" aria-describedby=\"caption-attachment-17252\" style=\"width: 600px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-17252\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/10\/AnalogPartsKit-600x449.png\" alt=\"\" width=\"600\" height=\"449\" data-wp-pid=\"17252\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/10\/AnalogPartsKit-600x449.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/10\/AnalogPartsKit-768x575.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/10\/AnalogPartsKit-1024x766.png 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/10\/AnalogPartsKit-800x599.png 800w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/10\/AnalogPartsKit-1200x900-cropped.png 1200w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/10\/AnalogPartsKit.png 2000w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><figcaption id=\"caption-attachment-17252\" class=\"wp-caption-text\">A nice selection of general electronics.<\/figcaption><\/figure>\n<p>After listing the supplies they used, the team then goes through the design. First, they describe how the Arduino and FPGA communicate, and how they communicate with the sensors. They also go through the block design on the FPGA and Arduino.<\/p>\n<figure id=\"attachment_18226\" aria-describedby=\"caption-attachment-18226\" style=\"width: 580px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-18226\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/system-580x600.png\" alt=\"\" width=\"580\" height=\"600\" data-wp-pid=\"18226\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/system-580x600.png 580w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/system.png 714w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><figcaption id=\"caption-attachment-18226\" class=\"wp-caption-text\">The instructable contains an in depth analysis of the system design, including how the Arduino and FPGA communicate and the code in each board.<\/figcaption><\/figure>\n<p>They explain the code, including the communication with the I\/Os and state diagram. All parts are explained in great detail.<\/p>\n<figure id=\"attachment_18225\" aria-describedby=\"caption-attachment-18225\" style=\"width: 600px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-18225\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/fpga-design-600x434.png\" alt=\"\" width=\"600\" height=\"434\" data-wp-pid=\"18225\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/fpga-design-600x434.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/fpga-design-768x555.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/fpga-design-800x578.png 800w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/fpga-design.png 841w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><figcaption id=\"caption-attachment-18225\" class=\"wp-caption-text\">They also go over the state machine contained within the FPGA.<\/figcaption><\/figure>\n<p>Lastly, all the code is posted so that the project can be easily replicated.<\/p>\n<figure id=\"attachment_18224\" aria-describedby=\"caption-attachment-18224\" style=\"width: 600px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-18224\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/code-600x384.png\" alt=\"\" width=\"600\" height=\"384\" data-wp-pid=\"18224\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/code-600x384.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/code-768x492.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/code-800x512.png 800w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/code.png 856w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><figcaption id=\"caption-attachment-18224\" class=\"wp-caption-text\">They even attach the code they wrote.<\/figcaption><\/figure>\n<p>Check out<a href=\"http:\/\/www.instructables.com\/id\/Smart-Watering-System\/\"> byoon&#8217;s project<\/a> on Instructables. If you have an awesome project you&#8217;d like to share with us, comment below or post it in the project vault in the <a href=\"http:\/\/forum.blog.digilentinc.com\">Digilent Forum<\/a>. You never know, you might be featured on the Digilent blog!<\/p>\n<div class='watch-action'><div class='watch-position align-left'><div class='action-like'><a class='lbg-style6 like-18216 jlk' data-task='like' data-post_id='18216' data-nonce='ac068a413b' rel='nofollow'><img src='https:\/\/digilent.com\/blog\/wp-content\/plugins\/wti-like-post-pro\/images\/pixel.gif' title='Like' \/><span class='lc-18216 lc'>0<\/span><\/a><\/div><div class='action-unlike'><a class='unlbg-style6 unlike-18216 jlk' data-task='unlike' data-post_id='18216' data-nonce='ac068a413b' rel='nofollow'><img src='https:\/\/digilent.com\/blog\/wp-content\/plugins\/wti-like-post-pro\/images\/pixel.gif' title='Unlike' \/><span class='unlc-18216 unlc'>0<\/span><\/a><\/div><\/div> <div class='status-18216 status align-left'>Be the 1st to vote.<\/div><\/div><div class='wti-clear'><\/div>","protected":false},"excerpt":{"rendered":"<p>Check out this awesome plant watering project!<\/p>\n","protected":false},"author":18,"featured_media":18222,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4327,35],"tags":[1662,104],"ppma_author":[4466],"class_list":["post-18216","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-projects","category-fpga","tag-fpga","tag-project-2"],"jetpack_featured_media_url":"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/plantwatering-1.png","jetpack_sharing_enabled":true,"authors":[{"term_id":4466,"user_id":18,"is_guest":0,"slug":"kaitlyn","display_name":"Kaitlyn Franz","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/9276021eaa44781ce19f364cfca46ada25e1500769cf4803a095a5bae83c912a?s=96&d=mm&r=g","1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":"","9":"","10":""}],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/18216","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/comments?post=18216"}],"version-history":[{"count":1,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/18216\/revisions"}],"predecessor-version":[{"id":29513,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/18216\/revisions\/29513"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/media\/18222"}],"wp:attachment":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/media?parent=18216"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/categories?post=18216"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/tags?post=18216"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=18216"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}