Plant Cubed - a Fully Automated Garden Box

by I-have-an-idea in Circuits > Arduino

813 Views, 6 Favorites, 0 Comments

Plant Cubed - a Fully Automated Garden Box

Screenshot 2020-04-13 at 14.11.28.png
IMG_3426.JPG

This is my first Instructable. I hope you like it!

For this project, I created a fully functioning garden in a 1 foot cube, powered by Arduino Nano.

Supplies

  • Arduino Nano (or a clone/copy board), a breadboard or prototype board, and some jumper wires
  • Power source for Arduino
  • A relay for the circuit
  • 3-6 volt pump and about 3 feet of tubing/pipes
  • Around 3 feet of LED grow light strip lights
  • 2 aluminum trays- 12 by 10 inches
  • 10 inch poles (4 total)
  • Part of a window screen
  • 1 by 1 foot pieces of plywood (2 total)
  • Extension cord
  • Soil
  • Plants!

Putting Together the Frame

IMG_3405.JPG
IMG_3410.JPG
IMG_3412.JPG
IMG_3414.JPG

The first step is to construct the frame, which will hold everything in place.

First, cut two 1 foot by 1 foot pieces of plywood.

Next, cut four sections of piping 10 inches tall. (The pipe should be 1/2 to 1 inch thick.)

Finally, put together all of the parts.

  • First, attach the pipes to the bottom piece of wood (I 3D printed small holders for the pipes).
  • Next, put 4 screws in the top piece of wood near the corners. The screws should slide into the pipes. This way, the top can be removed if needed.

Setting Up the Trays

IMG_3400.JPG
IMG_3417.JPG
IMG_3416.JPG
IMG_3415.JPG

Two trays are needed for this process. One holds the water that is pumped through the system, while the other one holds the soil and plants. The water tray should be on the bottom.

The soil tray should have a few small holes in it so that the water can drain. I put a screen over the holes so that the soil does not fall through the holes, but the water can.

Light Source

IMG_3406.JPG
IMG_3407.JPG
IMG_3408.JPG
IMG_3413.JPG

For the lighting, I used 3 feet of LED strip grow lights. They came in the package with a AC plug, so I used a relay module to turn them on/off.

The lights go on the bottom of the top piece of wood.

The Pump

IMG_3427.JPG

In order to automatically water the plants, a pump is needed.

The pump needs a seperate power source, and will be controlled by the relay.

The Circuit and Code

IMG_3423.JPG
Screenshot 2020-04-13 at 13.12.44.png
IMG_3420.JPG
IMG_3419.JPG
IMG_3418.JPG
Screenshot 2020-04-13 at 13.03.12.png

After coming in, the AC power must be split 3 ways - The adapter for the Arduino Nano (a phone charger USB converter), the pump power, and the strip light power.

The circut -

  • Relay VCC ---> Arduino 5V
  • Relay GND ---> Arduino GND
  • Relay IN2 ---> Arduino D6 (strip lights)
  • Relay IN1 ---> Arduino D3 (pump)

The Code -

For the code, a 24 hour loop is needed where the pump turns on for a few seconds, then off again. This should happen a couple of times throughout the day. The lights should be turned on for around 12-16 hours, then turned off for the rest of the day.

//Code created by AW on 4/9/2020
//Last modified - 4/15/2020 by AW void setup() { pinMode(6, OUTPUT);//LED Relay digital pin pinMode(3, OUTPUT);//Pump Relay digital pin pinMode(LED_BUILTIN,OUTPUT);//onboard LED } void loop() { digitalWrite(6,HIGH);//turn strip lights on using relay digitalWrite(LED_BUILTIN,HIGH);//blink the on-board LED to show that the program restarted digitalWrite(3,HIGH);//test the pump delay(1000); digitalWrite(LED_BUILTIN,LOW);//blink the on-board LED delay(1000); digitalWrite(LED_BUILTIN,HIGH);//blink the on-board LED delay(1000); digitalWrite(LED_BUILTIN,LOW);//blink the on-board LED delay(4000); digitalWrite(3,LOW);//turn off the pump delay(7193000);//wait 2 hours (this delay + the delays since the beginning of the program = 2 hours) digitalWrite(3,HIGH); delay(5000); digitalWrite(3,LOW); delay(28795000);//wait 8 hours minus 5 seconds digitalWrite(3,HIGH); delay(5000); digitalWrite(3,LOW); delay(14395000); digitalWrite(6,LOW); digitalWrite(3,HIGH); delay(5000); digitalWrite(3,LOW); delay(35995000);//wait 10 hours minus 8 seconds }

Putting It All Together

IMG_3428.JPG

First, put the top piece of wood on top of the poles coming up from the bottom piece.

Then, put the trays in. The top tray should have dirt in it, the bottom tray should have water in it.

Last, put the plants or seeds in, plug in the garden, and watch the plants grow. (well, not immediately, it takes a while for plants to grow).

Thanks for checking out my Instructable!