Project in progress
Double Plant Watering

Double Plant Watering © GPL3+

Another plant watering system, now with a light sensor, 4 LEDs, silent pumps, and memory.

  • 1,744 views
  • 0 comments
  • 12 respects

Components and supplies

Necessary tools and machines

09507 01
Soldering iron (generic)

Apps and online services

About this project

This is an other version of a double plant watering system. We can see a photo resistor and 4 LEDs for the sunny hours indicator.

Two silent pumps that comes from solar fountains.

A 5V supecapacitor, it's optional but it can store the data if the power goes off for short period of time.

The rest is more or less the same: recycled plastic water bottle, water tubes, two transistors bc368, 1k resistors, 2 diodes, an usb cable, a breadboard, Arduino pro mini, this time I used a 3, 3V 8mhz version, that seems more energy efficient.

How It Works

In the dark, Arduino goes to sleep, consuming few micro Amps, in sunny day it wakes up and starts counting and displaying the sunny hours.

Every sunny hour Arduino turns on an led, if 4 leds are turned on, it starts watering the plants, 3 seconds of watering for the right plant and 2 seconds for the left one, you can change this value in the code for your own plants.

What happened if there are less than 4 sunny hours?

The Arduino remembers it and waits for other sunny hours for watering.

I hope this can inspire you, I want to special thanks Fabio Cardoso for the great idea to wait sunny hours. Have a nice day!

Code

Double plant watering 3Arduino
#include <LowPower.h>          //sleep library

byte ldrPin=6;                 //ldr at pin 6       
byte led1=2;                   //led1
byte led2=3;                   //led2
byte led3=4;                   //led3
byte led4=5;                   //led3
byte pump1=7;                  //pump1 at pin 7
byte pump2=8;                  //pump2 at pin 8
int tempo1=3000;               //pump1 3 seconds of watering
int tempo2=4000;               //pump2 4 seconds of watering
byte light=0;                  //variable light
int i=0;                       //time variable


void setup()                   //at the start:
{
pinMode(ldrPin,INPUT);         //ldr input
pinMode(pump1,OUTPUT);         //pump1 output
pinMode(pump2,OUTPUT);         //pump2 output
pinMode(led1,OUTPUT);          //led1 output
pinMode(led2,OUTPUT);          //led2 output
pinMode(led3,OUTPUT);          //led3 output
pinMode(led4,OUTPUT);          //led4 output
digitalWrite(pump1,LOW);       //both pump turned off
digitalWrite(pump2,LOW);
digitalWrite(led1,LOW);        //led1 off
digitalWrite(led2,LOW);        //led2 off
digitalWrite(led3,LOW);        //led3 off
digitalWrite(led4,LOW);        //led4 off
}

void loop()                    //cycle:
{
  light=digitalRead(ldrPin);   //read light
  if(light==HIGH)              //if there is the sun:
  {
   i++;                        //increase seconds
   
   if(i>=450)             //turn led1 on after an hour
   {
   digitalWrite(led1,HIGH);   
   digitalWrite(led2,LOW);
   digitalWrite(led3,LOW);
   digitalWrite(led4,LOW);
   }
   if(i>=900)             //turn led2 on after an other hour
   {
   digitalWrite(led1,HIGH);
   digitalWrite(led2,HIGH);
   digitalWrite(led3,LOW);
   digitalWrite(led4,LOW);
   }
   if(i>=1350)            //turn led3 on after an other hour
   {
   digitalWrite(led1,HIGH);
   digitalWrite(led2,HIGH);
   digitalWrite(led3,HIGH);
   digitalWrite(led4,LOW);   
   }
   if(i>=1800)             //turn led4 on after an other hour
   {
    digitalWrite(led1,HIGH);    //turn led1 on
    digitalWrite(led2,HIGH);    //turn led2 on
    digitalWrite(led3,HIGH);    //turn led3 on
    digitalWrite(led4,HIGH);    //turn led4 on
    digitalWrite(pump1,HIGH);   //turn on pump1 
    delay(tempo1);              //wait some time
    digitalWrite(pump1,LOW);    //turn off pump1
    digitalWrite(pump2,HIGH);   //turn on pump2
    delay(tempo2);              //wait some time
    digitalWrite(pump2,LOW);    //turn off pump2
    digitalWrite(led1,LOW);     //start with led off
    digitalWrite(led2,LOW);     //start with led off
    digitalWrite(led3,LOW);     //start with led off
    digitalWrite(led4,LOW);     //start with led off
    i=0;                        //reset seconds
   }   
  LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF); //sleep 8s
  }
  else                          //if there is dark:
  {                             
  digitalWrite(led1,LOW);       //all led off
  digitalWrite(led2,LOW);
  digitalWrite(led3,LOW);      
  digitalWrite(led4,LOW);  
  LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF); //sleep 8s
  }
}

Schematics

Schematic
Double plant watering 3 2hvzilzazz

Comments

Similar projects you might like

Double Plant Watering 2

Project in progress by adamneareva

  • 7,748 views
  • 22 comments
  • 28 respects

Home Plant Watering System

Project tutorial by Alexander

  • 15,204 views
  • 2 comments
  • 42 respects

An Urban Plant Watering Solution

Project tutorial by James Yu

  • 17,325 views
  • 15 comments
  • 50 respects

Plant watering alarm system with arduino

Project tutorial by Giannis Arvanitakis

  • 3,401 views
  • 1 comment
  • 5 respects

Arduino Double Plant Watering Robot

Project showcase by adamneareva

  • 1,858 views
  • 2 comments
  • 4 respects
Add projectSign up / Login