loading

This is a great project for kids that are new to Arduino using the Edison expansion board. This project would be a great addition to an upper elementary, middle school, or high school course in earth science, environmental engineering, or conservation.

This project uses the Intel Edison Module, Arduino expansion board for Edison, one Moisture Sensor, an RGB 16*2 LCD Display, one Power Supply (9 Volt Battery), one USB Cable, and Jumper Wires.

The function of the Plant Moisture Detector is to give a visual indication using an RGB LCD Display as to whether or not your plant is in need of water.

Step 1: Step 1: Function of the Plant Moisture Detector

The moisture will give a visual indication using an RGB LCD

Display as to whether your plant is in need of water.

Step 2: Step 2: What You Need

Intel Edison Module

Arduino expansion board for Edison

Moisture Sensor

RGB 16*2 LCD Display

Power Supply (9 Volt Battery)

USB Cable

Jumper Wires

In this project we are using the Grove Moisture Sensor with the Grove Base Shield. The code is Arduino.

Step 3: Step 3: the Connections

Connect the power supply to the Edison board and connect the

USB cable between your PC and connector J16 on the Edison board. It will take 15 to 20 seconds to boot up. After boot up, stack the Grove Base Shield in the expansion slot of the Edison. Connect the moisture sensor to analog pin A0. Connect the LCD Display to one of the I2C ports.

Step 4: Step 4: Programming

Using Arduino 1.6.6, establish your serial port connection

to the Edison.

The control code is as follows:

/* This program is use to monitor the moisture in the soil of a potted plant.

* It uses the Grove - Moisture Sensor and Grove RGB Backlight LCD.

* When the moisture level falls below 300, the display will change color to yellow

* and display a message "Needs Water".

* When the moisture level is above 300, the display is green and displays the message

* "Looking Good".

*

*/

#include

#include "rgb_lcd.h"

rgb_lcd lcd;

int colorR = 0;

int colorG = 255;

int colorB = 0;

int sensorPin = A0; // select the input pin for the potentiometer

int sensorValue = 0; // variable to store the value coming from the sensor

void setup() {

// declare the ledPin as an OUTPUT:

Serial.begin(9600);

// set up the LCD's number of columns and rows:

lcd.begin(16, 2);

lcd.setRGB(colorR, colorG, colorB);

// Print a message to the LCD.

lcd.print("Monitor Moisture");

delay(1000);

}

void loop() {

// read the value from the sensor:

sensorValue = analogRead(sensorPin);

delay(1000);

if (sensorValue < 300) {

colorR = 200;

colorG = 150;

colorB = 0;

lcd.setRGB(colorR, colorG, colorB);

lcd.setCursor(0, 0);

lcd.print("Needs Water ");

lcd.setCursor(0, 1);

lcd.print("sensor = " );

lcd.println(sensorValue);

}

if (sensorValue >= 300) {

colorR = 0;

colorG = 255;

colorB = 0;

lcd.setRGB(colorR, colorG, colorB);

lcd.setCursor(0, 0);

lcd.print("Looking Good ");

lcd.setCursor(0, 1);

lcd.print("sensor = " );

lcd.println(sensorValue);

}

delay(100);

}

Step 5: Step 5: Run the Code

Compile and upload the Plant Moisture Control Code to the

Edison. Insert the moisture sensor into the soil of your plant.

<p>It's good application for the plant caring. </p>
<p>Really cool! I love monitoring things like this! </p>

About This Instructable

770views

8favorites

License:

More by DAJedu:Kids Plant Moisture Detector 
Add instructable to: