LED Plant Hydration Tracker
Sick and tired of not knowing when to water your plants? Well, here is your solution! This battery-powered circuit with LEDs lets you know exactly when you should be watering your plants. With a simple switch of light colors, you stay informed on just how hydrated your plant is. The best part is, this Instructable can be customized to each individual plant hydration need, anywhere from succulents to vibrant flowers. This is the setup for a circuit with two different sensors.
Supplies
- Arduino UNO or similar computer
- 2 LEDs of different colors
- 1 Soil Moisture Sensor
- Breadboard
- 220 Ohm Resistors
- Male-to-male wires
- Plant!
Gather Materials
The first step in any project is to gather your materials. All of these can be found on Amazon for a decent price and quick shipping!
Set Up Code
Next the computer needs to be coded using Arduino coding software. This code is from Eli the Computer Guy and the "goodMoisture" values can be changed based on the plant, with the lower values meaning that the soil is more saturated with water. Below is the code.
#define soilSensor1 A0
#define soilSensor2 A1
#define greenLED1 6
#define redLED1 7
#define greenLED2 8
#define redLED2 9
int goodMoisture = 300;
void setup() {
pinMode(greenLED1, OUTPUT);
pinMode(redLED1, OUTPUT);
pinMode(greenLED2, OUTPUT);
pinMode(redLED2, OUTPUT);
Serial.begin(9600);
}
void loop() {
int sensorValue1 = analogRead(soilSensor1);
int sensorValue2 = analogRead(soilSensor2);
Serial.print("Sensor 1 = ");
Serial.print(sensorValue1);
Serial.print(" Sensor 2 = ");
Serial.println(sensorValue2);
if (sensorValue1 < goodMoisture){
digitalWrite(greenLED1, HIGH);
digitalWrite(redLED1, LOW);
} else {
digitalWrite(greenLED1, LOW);
digitalWrite(redLED1, HIGH);
}
if (sensorValue2 < goodMoisture){
digitalWrite(greenLED2, HIGH);
digitalWrite(redLED2, LOW);
} else {
digitalWrite(greenLED2, LOW);
digitalWrite(redLED2, HIGH);
}
delay(1000);
}
Assemble Parts
Once the code is on the Arduino, follow the setup above to get your soil moisture sensor! This circuit is built for two different soil moisture sensors so you can use it on two different plants or different areas in the same planter.
Finishing Touches
Once you have everything set up and tested, then get your plant and get ready to go! You can put the LED lights anywhere, but I chose to put them inside a translucent box beneath my plant. You can use whatever color LEDs you want for this project and change the setup based on each plant.