What You Will be Making
Vertical gardens are a great way to plant virtually anything you want without the need for any sort of land outside. This project is especially great for students that live in dorms or apartments and do not have access to any plot of land outside and still want to have the ability go grow their own produce or plants with their busy schedules. This project is also scalable so that it can be made as big or small depending on user requirements and preferences. This specific vertical garden contains soil moisture sensors that detects when your plants need more water and an LDR ( light dependent resistor) that detect when your plants need more water. It also includes a display that tells the user if the plants need anything.
What You Will Need
1. 1 Arduino Uno (or any microcontroller)
2. 2+ Soil Moisture Sensors (depending on how many tiers you want)
3. 1 LDR
4. 1 Breadboard (we used 2 but it can be done with 1)
5. 1 3 Digit Seven Segment Display ( we recommend using a bigger display)
6. 1 9 Volt Battery and Adapter / AC Power Cord for Arduino
7. Plenty of small conducting wires of varying types
8. 1 Computer with Arduino IDE installed (can be found here)
9. Access to a 3D Printer, modeling software(such as Fusion 360), and Slicer software (such as Cura)
Step 1: Connect the Soil Moisture Sensors to the Arduino
1. Using the pictures for reference, start by connecting the soil moisture sensors to the control unit that came with it.
2. Then, using the breadboard, connect the ground (GND) of the sensor to the ground pin on the Arduino, power (VCC) to the 3.3V pin on the Arduino, and the analog output(A0) to the Analog 0 (A0) pin on the Arduino.
3. Hook up the second soil moisture sensor using the same row on the breadboard for power and ground and use a different row for the analog output. In our case, we chose A1 on the Arduino to send the data for the second moisture sensor.
4. When plugged in, the lights on the control units for the soil moisture sensors should light up.
Step 2: Connect the LDR to the Arduino
1. Connect each pin of the LDR to a different row on the breadboard.
2. Connect the left pin to the 5V pin on the Arduino.
3. Connect the right pin to a free analog pin on the Arduino. (We chose A5).
4. In the same row as the right pin of the LDR, connect one end of a 10k resistor and connect the other end to an empty row.
5. Connect a wire from the row of the second end of the resistor to the other ground pin on the Arduino.
Step 3: Connect Your Seven Segment Display to the Arduino
Seven Segment Displays will vary in type and size so please consult the data sheet for your specific display for the correct pin out and type.
1. Plug your display into the breadboard using conducting wires or directly onto the breadboard itself.
2. Referring to the data sheet for the seven segment display, begin connecting segment pins to the corresponding digital pins on the Arduino. In our project pins 1-5 and pins 7,10, and 11 go get connected to the same numbers on the digital side of the Arduino.
3. Connect the corresponding digit pins to the Arduino in series with 1k resistors. In our example the digit pins were 12, 9, and 8.
4. This link is great for additional help and better explains how seven segment displays work. Link
Step 4: Program the Arduino
This next step will describe the basics of how to program the Arduino. You may need to adjust the code according to your specific plants and needs.
1. Download the Arduino IDE software that was mentioned earlier.
2. Download the Seven Segment library that is used to program the display. This can be found here.
3. Before programing the Arduino, add the seven segment library to the software by selecting Sketch, include library, and adding the library. This step is also explained in the link about how to connect the seven segment display
4. Copy the code from this document here into a new sketch in Arduino IDE.
5. You will need to customize all of the variables at the beginning of the code with the settings you chose and also set up the seven segment display according to the pin out and display time of your specific display. The variables ldrThreshold and moistureThreshold will also need to be adjusted depending on when you want the garden to alert you of the need for water or sunlight. This can be done by simply adjusting the numbers up or down until you find the right threshold. Generally the ldrThreshold that is in the code is probably okay for any application.
6. The rest of the code includes logic that reads the values from the sensors and displays the corresponding status depending whether or not it needs water or sunlight or both. If the sensors are all triggered ( meaning that both planters need water and it needs sunlight) it will display "All" meaning they all need something. If any combination of sensors need something, it will also display "All" due to the fact that we only had 3 digits to work with. If the garden just needs water, it will display "H20" and if it just needs sunlight it will display "Sun". If the garden doesn't need anything, the display will be blank.
7. Upload the code to the Arduino and test out all the sensors to make sure that they work with the display.
Step 5: Print the Vertical Garden
This step will describe how to print out the pieces that you will need for the vertical garden.
1. Download the STL files attached to this step as they will be the ones you need to print.
Garden Box: This is the planters that will hold whatever you decide to grow.
Garden Supports: These are the supports needed for the garden.
2. Open the STL files on a slicer and scale them to the dimensions that you need. In this project, we made each box 6in by 6in and 4in deep. The supports were 7in tall. Be sure make appropriately sized so that the planters boxes are not too big for the supports and that the pieces are not too big for whatever 3D printer you are using.
3. Add a 6-8mm brim to each print so that it sticks to the surface and use an infill of at least 20%.
4. send your sliced files to print and wait for them to finish. For this project, each box took about 26 hours and the supports took about 10 hours.
5. You will also need to create a box to hold all of the electronics. We used a failed planter box print but this part can be made much smaller and to your preferences.
You can print out as many garden boxes as you want and the corresponding number of supports to add as many tiers as you'd like.
Step 6: Final Assembly
Now it is time to put it all together.
1. Waterproof your garden by using any water sealant or wood glue. Just make sure it will not be harmful to plants.
2. Using the smallest drill bit you have, drill a few drainage holes into each planter box to make sure water doesn't just pool in the boxes.
3. Assemble the vertical garden by either using super glue or screws and washers. Super glue is the easiest method as all you have to do is just add glue to the supports and place them in each corner of the box and let it set and then glue the next box to the top of the supports. The picture at the beginning of this instructable is good for guidance.
4. Take the object printed to hold the electronics and attach it to the base of the garden.
5. Using electrical tape or hot glue, run the wires for the corresponding sensors up the garden and place them in the planters and attach the LDR to the side of the garden.
Now you are ready to start growing plants and flowers inside your own home.