Plant Monitoring and Care - Using the Intel Edison

by CJA3D in Living > Gardening

10575 Views, 68 Favorites, 0 Comments

Plant Monitoring and Care - Using the Intel Edison

5488901ed535cf25510000d1.jpeg
5473357ec6ba5df883000001.jpeg
Plant Care using the Intel Edison

Winter is here!! follow this instructable to monitor and create an auto control plant watering system for your house plants using the Intel Edison.

Monitor the following environmental variables using Xively.com to keep your plant healthy through the winter

  • Temperature
  • Soil moisture value
  • Light value

Xively.com is a platform as a service built for the internet of things (IoT),using which you can use to monitor sensor values like the one's mentioned above.Here is the feed URL for my house plant, click the URL below to check how it is doing at this moment.

https://xively.com/feeds/167450243

In addition if you plan to go on a vacation to a tropical place or visit your folks for the Holidays, add the following auto control plant watering system by using a pump to water the plant based on the Soil moisture value.

Things You'll Need

54734a77d535cf51f7000020.jpeg
15243113074_9565abacc5_z.jpg

Things you'll need to create the monitoring circuit

  • Intel Edison
  • 12V power supply
  • Micro USB cable to program the Edison
  • Laptop with Intel's version of the Arduino IDE
  • Jumper wires
  • 10K Resistor
  • Breadboard
  • Soil Hygrometer detection module

Electronic components you'll need for the Watering system

  • Peristaltic Liquid Pump
  • Bottle/Jar of water
  • Power tail switch/relay
  • Electrical tape
  • Breadboarding wire
  • 12V power adapter

Adding the Edison on the Expansion Board

15233920524_abe62e2d1d_z.jpg
15233945204_1c8cdf78d9_z.jpg
15670216429_f3b1def355_z.jpg

Unbox the Intel Edison from the package

Add the 4 pegs to raise the expansion board off the table as shown in the picture above

Snap the Edison in the slot,you should here a click sound.

Add the nuts to the screws which came with the package

Note: For more details about the Edison refer to the following pdf https://communities.intel.com/docs/DOC-23139

Connecting Laptop to Edison

15668977440_cad8f85cb4_k.jpg

Connect the power adapter as shown in the picture above

And connect the micro USB cable to the micro USB that is close to the power supply

As soon as you connect the Edison board go to Finder(Mac)/My Computer(Windows) and you should Edsion in the similar way if you would have connected a USB drive.For windows you may have to install the drivers.

Once done flip the Switch in the in the direction of the micro usb connector ,you need to do this for the Serial port to show up in the Arduino IDE

Downloading the Arduino IDE

Screen Shot 2014-11-22 at 11.33.24 PM.png

Download Intel's version of the Arduino IDE from the following link

https://communities.intel.com/docs/DOC-23242

Click the download link based on the type of Operating system you are using , in my case its a Mac.

Unzip the file

And click on the dmg file.

Note:

For details on the Windows setup refer to the following link https://communities.intel.com/docs/DOC-23147

You may also need to flash the image on your Edison board depending on where you got your board from, follow this youtube video in the link above.

Testing the Setup Using a Simple Blink Sketch

Screen Shot 2014-11-23 at 12.01.15 AM.png
Screen Shot 2014-11-23 at 12.02.04 AM.png
Screen Shot 2014-11-22 at 11.57.32 PM.png
15854526031_babdf0c4b6_z.jpg

Open the newly installed Arduino IDE

Select the Tools > Board >Intel Edison

Then select Tools > Serial Port > /dev/cu.usbmodem2413 (in case of window it will be a COM port)

Now to upload the sample blink sketch File >Examples >01 Basics >Blink

Once the sketch is upload successfully you should see an LED blink just at the right of the Edison on the expansion board.

Note : Even if you have an existing Arduino IDE, ensure that you download and use the version from the link in the previous step

Calibrating the Hygro Soil Sensor

15673734347_64fab0d90d_z.jpg
15239835153_de105a6f7a_z.jpg
15859598575_626a2734c5_z.jpg
15673587089_c6c7860d08_z.jpg
Screen Shot 2014-11-23 at 9.56.21 AM.png

Before you upload the final sketch you will need to make a note of the Soil Hygrometer sensor value
that is ideal for your plant, which means that your plant has enough water ..

Download the sketch attached to this step and upload it to the Edison using the Arduino IDE.

Use the Serial Monitor to make a note of the following values which will help you calibrate the Hygrometer sensor

  1. Value of the sensor in a glass of water (in my case the values between 45 and 50)
  2. Value when not in water, at this point you may want to adjust the values by turing the pot using a screw driver.(ideal value between 700 - 750)
  3. Value in the plant before it is water (value for the plant )
  4. Value of the plant once it is watered.

Breadboarding the Circuit

15672419210_fdf46614c0_z.jpg

Follow the circuit digram above to bread board the circuit which will Monitor the following

-Temperature Sensor connected to A0 on the expansion board

-Hygro Soil Sensor to A1

-Photo Cell to A2

Creating the App on Xively.com

547335b4c6ba5d34f5000096.jpeg
xively2.png

Before uploading the code the Arduino code to the Intel Edison you will need to create an App on Xively.com .

To get started register with you basic details at

https://xively.com/signup

Once you have completed the registration you will receive 2 emails, on which will contain the activation link for your account.

Once you login, under the Develop section add new device by clicking on (+ Add Device), give a Device name and select the device as private/public.

Make a note of the Feed Id and API key because you will need these details modify the sketch attached in the next step in the Arduino IDE.

Also make note of the Feed URL which you can give to friends and family.

Modify the Sketch

Screen Shot 2014-11-23 at 8.27.22 PM.png

Download the sketch attached and open it using Arduino IDE

You will need to modify the following lines of code in the sketch

  • Xively APIKEY
  • Xively FeedId
  • Xively USERAGENT
  • Network SSID - this is your Wifi router name
  • Network Password - Wifi router password
  • Time in seconds that you want to post an update to xively.com

Upload the Sketch Attached and Check on the Serial Monitor

Screen Shot 2014-11-23 at 9.52.16 PM.png
Screen Shot 2014-11-23 at 11.18.34 PM.png

Once you have made you modification , upload the sketch to the Intel Edison by connecting micro USB cable to your laptop and the micro USB closest to the power supply.

Check the Serial Monitor that everything looks ok

In addition login to your xively.com account and got Develop tab

You should observe 3 channels show up , that is

  • Hygro Soil value
  • Light value from Photocell
  • Temperature in Fahrenheit

Adding a Pump to Automatically Water the Plant

15679200499_4b5d42a497_z.jpg

If you are planing to go on a vacation and dont want to depend on your neighbor to come and water your plant , add a pump to the circuit to trigger when the Hygro Soil value goes low.

You will need a couple of trials and errors to decide on

  • the ideal Hygro Soil value to start running the pump
  • and decide the amount time required to water your plant.

Pump - Circuit Digram

15245813253_61de524fd5_z.jpg
Testing Peristaltic Liquid Pump using Intel Edison

Before you complete the circuit connect the power tail to the pump and then connect the it to the wall socket.

Now connect the Edison expansion board to the power supply.

And to determine the time taken to water the plant run a test as shown in the video by connect the red wire to the 5V edge of the breadboard and use the same cup that you used to water the plant before the circuit was build.

Make a note of the time in seconds and then connect red wire coming from 1+in of the power tail switch to pin 13 of the expansion board

Upload the Sketch

Screen Shot 2014-11-24 at 12.27.06 AM.png
Screen Shot 2014-11-23 at 10.51.11 PM.png
15865675945_dcd483d8b2_b.jpg

Just before you next manual watering cycle make a note of the hygro soil sensor value from xively.com, this is something that you will have to modify in the sketch uploaded above in addition the time taken to water you plant In my case i choose my soil moisture value as 165 and my watering interval to be 3 minutes .

Upload the sketch attached using Arduino IDE.

Run a quick test by lifting the hygro soil sensor from the soil as shown in the picture above, and check that the pump is triggered.

Tips

In addition you can add more power tail switches/relays to

  • turn on an electric heater if the temperature drops in your house while you away
  • and based on the lighting requirements of your plant use another relay to switch on and off spotlight bulb.

It is a good idea to use a tupperware container to enclose your Intel Edison and other parts of the circuit.

To get more details about the Edison refer to
https://communities.intel.com/docs/DOC-23139