Nicola_Favole-02ERIK BONOSO
Published © GPL3+

Eco Smart Plant

An automatic system to grow a plant.

IntermediateFull instructions provided814
Eco Smart Plant

Things used in this project

Hardware components

Relay Module (Generic)
×1
Breadboard (generic)
Breadboard (generic)
×1
water pump
×1
DHT11 Temperature & Humidity Sensor (4 pins)
DHT11 Temperature & Humidity Sensor (4 pins)
×1
capacitive soil moisture sensor
×1
Incandescent Lamp, 5 V
Incandescent Lamp, 5 V
×1
LDR, 5 Mohm
LDR, 5 Mohm
×1
Alphanumeric LCD, 16 x 2
Alphanumeric LCD, 16 x 2
×1
Stepper Motor, Mini Step
Stepper Motor, Mini Step
×1
Slide Switch
Slide Switch
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

3D Printer (generic)
3D Printer (generic)
Multitool, Screwdriver
Multitool, Screwdriver
screw
Hot glue gun (generic)
Hot glue gun (generic)
Drill / Driver, Cordless
Drill / Driver, Cordless
plastic bottle
plant and ground

Story

Read more

Custom parts and enclosures

Box Design

This is the design of the box that we have used

Schematics

Circuit diagrams

this is circuit diagrams that we used

Code

ECO SMART PLANT CODE

Arduino
this is the code for that the soil moisture sensor knows when wettingthe plant (the percentage of humidity change according to the plant) and whit the 5v pump itwets it when the humidity is lower than the threshold.
whit a ldr it measures the brightness, so when you turn on the lamp i front of the ldr, the stepper motor is actived and make the tend go up, when the lamp is turned off, the opposite effect occurs.
there is also a temperature sensor, that measures the temperature.
all values above results are shown on an lcd screen, the values have been mapped so that they are in percentage.
#include <Stepper.h>
#include <LiquidCrystal.h>
#include "DHT.h"
#define DHTPIN 10
#define DHTTYPE DHT11   
DHT dht(DHTPIN, DHTTYPE);
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
const int stepsPerRevolution = 2052;
Stepper myStepper(stepsPerRevolution, 6, 8, 7, 9);
int relaywaterpump = 13;
int humiditysensor=0;
int humidityreal=0;
int photo=0;
int luce=0;
int mem1=0;


void setup() {
 pinMode( relaywaterpump,OUTPUT);
 Serial.begin(9600);
 lcd.begin(16, 2); 
 dht.begin();
 myStepper.setSpeed(10);
}

void loop() {
  humiditysensor=analogRead(A1);
  humidityreal= map(humiditysensor, 1023,0,0,100); // map the value to have they in %
  float T = dht.readTemperature();
  photo=analogRead(A0);
  luce= map(photo, 1023,0,0,200);// map the value to have they in %
  delay(200);
    lcd.setCursor(8, 1);// write the valor in lcd
    lcd.print("Luce:");
    lcd.print(luce);
    lcd.print("%");
    lcd.setCursor(0, 1);
    lcd.print("Um:");
    lcd.print(humidityreal);
    lcd.print("%");
    lcd.setCursor(2, 0);
    lcd.print("Temp:");
    lcd.print(T);
    lcd.print(" C");
    delay(300); 
if(humidityreal <= 50){ // if the humidity is low turn on the pump
digitalWrite(relaywaterpump, HIGH);
delay(500);
}
else { // if the humidity is high turn off the pump
  digitalWrite(relaywaterpump, LOW);
  delay(500);
}
 if (luce>=40 && mem1==0){// if the light is high and the memory=0 turn on the stepper motor 
    myStepper.step(stepsPerRevolution);
    mem1=1;
    delay(500);
}
 if(luce<40 && mem1==1){// if the light is low and the memory=1 turn  the stepper motor upside down
    myStepper.step(-stepsPerRevolution);
    mem1=0;
    delay(500);
 }
}

Credits

Nicola_Favole-02
0 projects • 0 followers
ERIK BONOSO
0 projects • 0 followers

Comments