Hackster is hosting Hackster Holidays, Ep. 7: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Friday!Stream Hackster Holidays, Ep. 7 on Friday!
Ms. Slaven
Published © GPL3+

Ebb and Flow Hydroponic Mini System

Grow your own lettuce, greens, and strawberries with a soil-less system that will give them just the right amount of nutrient rich water.

BeginnerFull instructions provided3 hours3,462
Ebb and Flow Hydroponic Mini System

Things used in this project

Hardware components

ELEGOO UNO R3 Board ATmega328P ATMEGA16U2 with USB Cable
ELEGOO UNO R3 Board ATmega328P ATMEGA16U2 with USB Cable
×1
ELEGOO 3PCS 400 tie-points breadboard, 4 power rails for Arduino Jumper Wire
ELEGOO 3PCS 400 tie-points breadboard, 4 power rails for Arduino Jumper Wire
×1
Elegoo Breadboard Jumper Wires - Ribbon Cables Kit
×1
16 x 2 LCD with Backpack
×1
5V 2 channel relay
×1
DC Micro Submersable Pump
×1
water sensor
×1
DC Power Supply
×1
1/4 inch Vinyl Tubing
×1
2 inch Net Pots
×1
Rockwool Hydroponic Plugs
×1
6 Quart Storage Bins
×2
Hydroponic Clay Pebbles
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Awl
Retractable Utility Knife
Wire Stripper & Cutter, 18-10 AWG / 0.75-4mm² Capacity Wires
Wire Stripper & Cutter, 18-10 AWG / 0.75-4mm² Capacity Wires

Story

Read more

Schematics

uploads2ftmp2f5c4d53f2-8151-420b-a47c-15ba41bd995f2fminiebbandflowschematic_m2C0XmRBnf.jpg

Code

Mini Ebb and Flow

Arduino
The code will tell the pump to turn on and off every 40 minutes. The sensor will check the water level every 5 seconds to determine if the pump needs to turn on.
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27, 16, 2); // 

int pump = 11; // pin that turns on the water pump
int sensorValue = 0; //value from water level sensor
const int analogInPin = A0; //pin that reads water level sensor
const int LCD = A5; 

void setup()
{
  lcd.init();//initialize the LCD
  lcd.init();//print a message to the LCD
  lcd.backlight();
  lcd.setCursor(2,0);
  lcd.print("Ebb and Flow");
  pinMode(pump, OUTPUT); // set pin 11 to an output so we can use it to turn on the pump 
  Serial.begin(9600); // set up communication back to serial monitor  lcd.init():
 
 
}

void loop()
{
  sensorValue = analogRead(analogInPin); // the value from water level sensor
  Serial.print("Sensor = "); // print on serial monitor
  Serial.println(sensorValue); // printing the value on serial monitor
  
  if(sensorValue <=60) // If below _ then turn pump, LED, and LCD on
  {
    Serial.println("pump should be running");
    digitalWrite(pump, LOW); // turn on the motor
    delay(2000);
    lcd.setCursor(4,1);
    lcd.print("Pump On");
   }

  if(sensorValue >=100) // If above _ then turn pump, LED, and LCD off
  {
    Serial.println("pump should be off"); //print on serial monitor
    digitalWrite(pump, HIGH);  // turn off the motor
    lcd.setCursor(4,1);
      lcd.print("Pump Off");
    delay(2400000); //wait 40 minutes
  }
  delay(5000);        // check sensor every 5 seconds
}

Credits

Ms. Slaven
1 project • 2 followers
I'm a Middle School Garden and Design Teacher.

Comments