GrOwn is a solar powered, Arduino controlled garden. The motivation behind it was a way to grow food without relying on the power grid, and a way to grow food in a self-contained environment protected from inclement weather. As a proof of concept, I hope that GrOwn shows the feasibility of growing food in any area that may be struggling due to disasters or lack of resources. This project relied heavily on an Arduino garden I had previously built, which you can find here. Many materials were reused, and many ideas were improved upon to create a much better working garden.
Step 1: Materials
The main materials were those which were used to build the frame, light system, watering system, and Arduino components. Those are listed below with each respective cost. The frame and associated parts were purchased from 80/20, while the Arduino shields were bought from Adafruit.
Aluminum T-slotted profiles (2 x 24", 2 x 21", 2 x 12") with counter bores drilled + anchors - $230
Hinges, screws, nuts, caps, and other odds and ends for frame - $40
Plexiglass (clear and black) - $100
Adafruit Data Logger Shield - $20
Adafruit RGB LCD Display kit - $25
LED grow lights - $30
Water pump kit - $30
Solar panel kit - $130
These were the main materials. Of course there were other associated costs, such as tubing, dirt, plants, etc., but they are too numerous to list. Overall the cost was between $600 - $700 with recycled parts when available. To build everything on I used a small table on wheels that I had lying around from the previous garden project mentioned.
Step 2: Assembling the Frame
Assembling the frame was self-explanatory with the correctly machined pieces. The anchors fit inside the counter bores and screw together to pull the pieces together as shown in the pictures. I could then slide 1/4" thick pieces of plexiglass into the channels to serve as the sides. The plexiglass was purchased from a local plastics company, where it was significantly cheaper than purchasing it from Lowes or Home Depot. I drilled holes in the bottom piece of plexiglass so that water could drain from the soil and essentially breathe. Later the corners and gaps between the plexiglass and aluminum frame were sealed with clear silicon paste so water wouldn't leak out.
Step 3: Lighting System
I attached hinges to the top of the frame and screwed aluminum bars onto them to hold the LED strips. This way I could lift the lights up and down to attend to the plants or just to get into the tank. The LED strips were secured to the bars with zip ties through holes drilled into the aluminum. To control them I used a digital pin from the Arduino to control a NTE 2395 MOSFET transistor. These transistors can handle the 1A drawn by the LEDs at 12V. In other words, the transistor acted as a switch connecting the LEDs directly to the 12V battery. Worth noting is the 4.7k pulldown resistor connecting the digital pin to ground. Without it the digital pin is a bit too noisy on startup and switches the transistors on. This resistor will fix this issue. The digital pin is also hooked up in series to the gate on the transistor with a 10k resistor.
These LEDs are high wattage red and blue LEDs because plants actually prefer these colors for optimum growing conditions. Normal LEDs don't have enough power to really help plants.
Step 4: Solar Panels and Battery
The solar panel kit included a charge controller to prevent overcharging on the battery. This is pretty important! For a battery I chose a 12V 18AH battery. I determined this would be sufficient to keep the lights on for 8 hours a day and the Arduino on indefinitely (it only draws 40mA anyways). The panels are 45W panels at max power, but realistically it is probably a bit lower than that. Regardless I can still get around 13.5 V in the shade which will charge the battery. The battery plugs directly into the V_in port on the Arduino. The Arduino voltage regulator can easily handle 12 V.
Step 5: Watering System
The watering system was relatively self explanatory. The kit was a replacement kit for windshield wiper sprayers, so it was a convenient choice with it being a 12 V motor, and it having ample pumping power. I used a tube splitter to split the water between two 360 degrees misters. The tube enters through a hole in the bottom sheet of plexiglass. To control the pump I used the same transistor as the lights (NTE 2395) with a digital pin. The pump speed is dynamically controlled with pulse width modulation (PWM) through loops in the main program to help spray as much area as possible. There is a diode hooked up in parallel with the transistor so that when the motor turns off it prevents any backwards current from the inductance of the electric motor. The diode allows a short so that the reverse current can flow through the motor and prevent it from flowing towards the Arduino and damaging it.
Step 6: RGB LED Screen and Wiring
I built a support out of plexiglass to mount the RGB LED screen. Beneath the support is all the wiring and Arduino. This lets us hide all of the messy wiring and give it a more minimalistic design. I made a simple plug out of female stacking headers to plug into the back of the screen through the plexiglass. This was just for the sake of modularity.
I used an LM34 temperature sensor and a photoresistor to monitor the temperature and how bright it is. Using this data the program will determine if the lights need to turn on our not. They were mounted into a slot cover in the frame using hot glue, where the wires ran down the channel to the Arduino.
As seen in the pictures, all the wiring plugged into a small breadboard. The wires from the lights and sensors were hidden inside the aluminum bar channels. The Data Logger shield, which allows me to keep track of time and save data to an SD card, plugged directly into my Arduino.
For safety, I inserted a switch on the 12 V battery side of things so if for any reason power needs to be disconnected it can be.
Step 7: Plants and Automation
I chose different kind of mint due to their ability to grow decent sized leaves without needing to get super tall. I chose spearmint, orange mint, and chocolate peppermint (it smells exactly like it somehow).
In the videos I show the lights turning on due to it being too dark, and the watering system in action. As of now the watering pump only turns on when I hit a button, but it is a simple addition to add into the program for it to only be watered at a certain time every day. The lights will only turn on if it is too dark and if it is between 8:00 am and 6:00 pm (i.e. they'll only turn on when the plants should be getting sunlight).
I've included the code as a txt file. There are a few things I would like to eventually add to the program, such as extending the functionality of the error subroutine and cleaning up the watering system section with a subroutine to name a couple. Feel free to use any part of the code! The libraries, like SD_master and RTClib_master, were downloaded from Adafruit's website. The temperature and light data is kept as a running average so the light system is less sensitive to changes such as a cloud passing by or cool breeze. I can insert an SD card into the data logger shield to record data. This can help me optimize the data, such as finding out the right light sensor value for when it's cloudy or sunny.
I hope the project can inspire other projects in less fortunate areas, and help others' access to food. The project could be scaled up in a fairly reasonable way with just a larger battery, water tank, garden enclosure, and lights. Improvements could be made in adding in relays with the transistors to prevent high current from flowing through the breadboard, or in memory optimization of the program.
If you have any questions please do not hesitate to message me! Big thanks to the open source example programs from Adafruit and Arduino! They helped solved many programming questions I had.