Project in progress
Lazy Indoor Garden

Lazy Indoor Garden © GPL3+

Spending 100 times more time fiddling with this contraption than I would have just watering plants.

  • 31,376 views
  • 23 comments
  • 117 respects

Components and supplies

About this project

This was my first project involving any kind of self written software or electronics design. This version of my indoor garden was surprisingly successful in yielding fruit from hot peppers, leafy flavorful herbs and even some tomatoes. I hope this helps in your projects in some small way.

Thanks!

-London



Code

LazyPlants v2Arduino
1. Controls lights on a timer.
2. Tells you when a plant isnt getting enough water from drip system.
3. Records temp and humidity to confirm fruiting temp for peppers


more to come

wifi monitoring of arduino with raspberry pi & web interface
PoE power and data transmission from soil sensors through home ethernet wiring mulyiplexed through 8 twisted pairs of cat5e
more lights & hydroponics!
#include <dht.h>
#include <LiquidCrystal.h>
#include <DS3231.h>

//Instantiate library objects
DS3231  rtc(SDA, SCL); 
LiquidCrystal lcd(8, 10, 7, 6, 5, 4); // RS, 
Time t;
dht DHT;
#define DHT11_PIN 9

//Light timer constants
int startTime = 6; //Integer hour in 24hr format to start lights
int endTime = 22; //Integer hour in 24hr format to cut the lights
int lights = 11; //light digital output pin

//Soil sensor constants
int lcdDelay = 3000; //delay time to refresh the lcd screen with new info
int analogDelay = 150; //delay time to resist EMF interference on analogRead() values
int sensors[] = {A0, A1, A2, A3, A4, A5}; //array of analog soil sensor pins
int sensorLen = 6; //integer length of sensors array
int drySoil = 400; //average sensor output value of known dried soil


//Arduino setup function
void setup() {
lcd.begin(16, 2); //Start lcd in 16x2 mode
Serial.begin(115200);//start serial output at 115200 baud rate
rtc.begin(); //init real time clock module
pinMode(lights,OUTPUT);//set light controller pin to output mode

//set analog pins to INPUT
for (int i = 0; i < sensorLen; i++) {
  pinMode(sensors[i],INPUT);
}
}


//main loop
void loop() {
//Declare local loop variables
String(hours);
String rightNow;
int temp_humi = DHT.read11(DHT11_PIN);

//reads in sensor values once per main loop iteration
int sensorVals[6]; //array to store sensor values
for (int i; i < sensorLen; i++){
 sensorVals[i] = analogRead(sensors[i]);
 delay(analogDelay);
}

//Get current time in HH:MM format
rightNow = rtc.getTimeStr(FORMAT_SHORT);

//Grabs hours then converts to integer for basic hour resolution light timing 
hours = rightNow.substring(0,2);
int hours_int = hours.toInt();

//Checks time and controls lights
if (hours_int > startTime and hours_int < endTime) 
{
  digitalWrite(lights,HIGH);
}
else 
{
  digitalWrite(lights,LOW);
}

//output to serial monitor for debugging
Serial.println("sensor values: ");
for (int i=0; i < sensorLen; i++) {
  Serial.println(sensorVals[i]);
}


//LCD panel
//loop through sensor values and warn if particular plant needs watering. 
for (int i=0; i < sensorLen; i++){
if (sensorVals[i] < 400){
lcd.setCursor(0, 0);
lcd.print("Moisture");
lcd.setCursor(8, 0);
lcd.print(i);
lcd.setCursor(9, 0);
lcd.print(": ");
lcd.setCursor(11,0);
lcd.print(sensorVals[i]);
lcd.setCursor(0, 1);
lcd.print("Needs Water!");
delay(lcdDelay);
}
else {
lcd.setCursor(0, 0);
lcd.print("Moisture");
lcd.setCursor(8, 0);
lcd.print(i);
lcd.setCursor(9, 0);
lcd.print(": ");
lcd.setCursor(11,0);
lcd.print(sensorVals[i]);
lcd.setCursor(0, 1);
lcd.print("Time: ");
lcd.setCursor(6, 1);
lcd.print(rightNow);
delay(lcdDelay);
lcd.clear();
   }
}
//Display temp and humidity after outputting sensor vals
lcd.setCursor(0, 0);
lcd.print("Temperature: ");
lcd.setCursor(12, 0);
lcd.print(DHT.temperature);
lcd.setCursor(0, 1);
lcd.print("Humidity: ");
lcd.setCursor(10, 1);
lcd.print(DHT.humidity);
delay(lcdDelay);
lcd.clear();

}

Schematics

Automatic indoor garden
This is an Arduino based plant life cycle controller
auto_garden_vHrwxKjIGf.fzz
Wiring Diagram
Wiring diagram png file
Schematicimage 1e6x8zoaop

Comments

Similar projects you might like

Smart Garden

Project showcase by patel Dipen

  • 40,928 views
  • 18 comments
  • 88 respects

Arduino Indoor Garden

Project tutorial by MEGA DAS

  • 51,338 views
  • 31 comments
  • 165 respects

The hydroMazing Smart Garden System

Project tutorial by Cory Potter

  • 36,086 views
  • 15 comments
  • 148 respects

Automatic Watering System

Project tutorial by PRosenb

  • 25,515 views
  • 21 comments
  • 75 respects

Arduino Irrigation System

Project tutorial by smana_00

  • 7,076 views
  • 0 comments
  • 24 respects

Automated Garden

Project tutorial by Thomas sxt

  • 26,896 views
  • 15 comments
  • 89 respects
Add projectSign up / Login