Introduction: Aeroponics With Raspberry Pi and Humidity Sensor
This instructable will teach you how to install an Aeroponics system that is controlled by Raspberry Pi. Aeroponics is plant-cultivation technique that has the roots hanging and is suspended in the air. Nutrient solution is sent to them in form of a fine mist. Aeroponics is compatible with any type of planting and can be used any time in the year. Using Aeroponics has its benefits by saving water and space and has a cleaner environment that reduces the need for pesticides. The system uses mist in a closed environment to provide the plats with elements in order to survive. In this instructable, the group will be using strawberry plants. We will add a GrovePi board, humidity sensor, and relay to control the fogger. This GrovePi and starter kit has the GrovePi board, wires, relay, and temp/humidity sensor that we used for this project.
Step 1: Materials
Materials required for this instructable:
- 5 gallon bucket
- Black Spray Paint
- Clay beads
- Net pots
- Hole Saw
- Raspberry Pi Starter Kit
- Pond Fogger with transformer (needs to be a floater)
- Strawberry Plants (can be any type of plant)
- Grove pi starter kit
- Relay for raspberry pi (included in GrovePi starter kit)
- Nutrients for plants
- pH level tester and kit
Step 2: Painting the Bucket
This step is necessary if your bucket is a bright color (white, yellow, etc). With water in the container, the light allowed will affect the plants, and too much light can lead to unnecessary organisms that can grow in the container.You will need to paint the bucket with black spray paint completely for the best results.
Step 3: Developing the Lid
In this step, you will be creating holes in the lid for the net pots. It is recommended that you create five holes with the hole saw that is just big enough to hold the net pots that are equally spaced out and marked. You will then use the hole saw to make the holes, and finally, clean the holes once you are done, and hot glue net pots in place. You may need to paint the lid again after this step.
Step 4: The Fogger
This step consists of connecting the fogger and putting it inside the bucket. You will need to use the transformer to control power flowing from the outlet to the device(AC to DC). You will need to connect one end of the power switch to an outlet and the to the fogger. Once it is plugged in the fog will provide water for the roots.(You will need water in the bucket in order for the fogger to work.)
In order to connect to the relay, you will have to open up the wire going from the transformer to the fogger. Do NOT open the wire going from the wall to the transformer. You should see a red wire and a white wire once you remove some of the outer coating. Cut either one of the wires, strip the ends, and put each end into the relay. You'll need a small screwdriver to put the wires into the relay. If you're already put your plants in the pots, you might want to save this step for last so that you can keep the fogger running so that the plants don't die while you're working on the rest of the project.
Step 5: Programming
This step requires that you use Raspberry Pi, and the pictures provided shows how to program the Raspberry Pi. This will make the relay turn on/off when the humidity gets too low or too high.You need to attach the Grove Pi to the circuit board of the Raspberry Pi.
Turn off the Raspberry Pi and carefully place the GrovePi on top. Be careful not to bend any of the GPIO pins. Plug the relay into port D4 and the sensor into port D7.
The Python program is below:
NOTE: I HAD TO USE TABS TO MOVE CODE OVER BECAUSE INSTRUCTABLES STRIPS THE SPACES OFF. YOUR PYTHON IDE MIGHT NOT LIKE THE TABS AND YOU'LL HAVE TO REPLACE THEM WITH SPACES.
sensor=7 #sets the sensor port as D7
relay=4 #sets the relay port as D4
sys.stderr.write(“\x1b[2J\x1b[H”) #clears the screen
[temp, humidity]=grovepi.dht(sensor,1) #reads the sensor
print humidity #just a troubleshooting line
if humidity < 2450: #sets the threshold for turning fogger on or off, not calibrated
grovepi.digitalWrite(relay,1) #turn the fogger on
time.sleep(60) #wait 60 seconds
grovepi.digitalWrite(relay,0) #turn fogger off
print “Error” #catches errors and prints "Error" instead of crashing
If you have issues with your humidity sensor working, make sure that you have updated the firmware on your GrovePi. The sensor will not work without it. Instructions are here
Step 6: Adding the Plants
In this step, you will add the plants in the net pots. Make sure to wash the dirt off the roots enough to be put in the net pot. Once you are done washing, you will put a plant in each net pot and place enough clay beads around the plant, to fill the net pot and cover the roots.
Step 7: Final Product
Things to Remember:
Check your bucket daily to see if the water level is deeper than that of the depth of the fogger. A floating fogger makes this step almost unnecessary. Make sure to water the plants if they are starting to look dry, and add proper nutrients when necessary.