Introduction: Smart Planter

The idea of this project was to build a smart planter for Comp 3012 robotics final project, I chose this for a project as i enjoy plants and gardening in the summer and wanted a starting point for a larger project that i may complete in the summer. The idea of this project was to create a way to monitor and plants off a robotic feedback loop, the idea was to monitor the soil water content and pump water into the soil when the plant needed water. I also add an lcd screen read out to the project along with many different sensors, in the end my smart planter read and displayed: the temperature, water level of catch basin, moisture level of two plant/soil areas, and light level.

Step 1: Components Required:

  • 1x arduino board
  • 1x Lcd module
  • 1x 10k potentiometer
  • 1x breadboard
  • 3x moisture sensors
  • 1x LM35 temperature sensor
  • 1x Adafruit light sensor
  • 1x 12v water pump
  • 1x 12v power source (battery pack shown)
  • 1x 5v trigger relay
  • 1x male positive and negative BNC connector
  • 1x female positive and negative BNC connector
  • 3x containers (self made shown)
  • 2x sections of water tubing
  • 1x Water
  • 1x Soil
  • 1x plant

Step 2: Wiring Diagram

In this wiring diagram i have used 9v instead of 12v and a motor instead of a pump as these options were unavailable, I also have used a temperature sensor in place of the adafruit light sensor and IR sensors to represent the moisture sensor. These substitutes should be fine and representative of the real sensors as they are both 3 wire grd, vcc, and signal out, as well as being analog.

Step 3: Check the Moisture Sensors

The ones that i bought have a range from 1023 to 0 when connected to 5v and 677 to 0 when connected to 3.3v. The sensors also read from high to low, ie high(1023) is no moisture and low(200) being in water.

Step 4: Basic Reading in and Print Out

Program the arduino to read in the analog value from the moisture sensor at the desired time intervals, at this time i also programmed in a print out to the serial monitor/plotter.

Step 5: Build or Acquire Your Containers

I built my containers out of 20 gage steel as i wanted to keep and use my project after this class. The idea for the containers was to have three separate containers interconnected through piping and sensors, first a water basin, then a container for the board and all the sensors plus the lcd screen for read out, and third the planter container.

Step 6: ​Setup and Test the Lcd Screen and Print Out of the Moisture Sensor

Step 7: Container and Component Setup

Start adding the arduino and breadboard to the middle container at this time i added the water basin sensor, the lcd screen and the 10k potentiometer for the lcd screen.

Step 8: Hooking Up Stuff

hook up all the stuff you just added to the container, as i made the container out of metal i wanted to make sure i was not grounding and shorting anything on the metal container, to prevent this i added washers to the electrical boards as to add an air gap between electronic and metal container.

Step 9: Water Pump Test

Test the water pump to see what spout is the inlet and the outlet, for this you will need a 12v power source as that is the voltage of the pump though i tired running mine with 9v and it seemed to also work, you will also need a quick connect and disconnect this is where the male and female BNC connectors come in handy. It is also important to prime the pump before testing it, you should never test a water pump without water in it doing so can cause damage to the pump.

Step 10: Adding Stuff

Add the other sensors (temperature, light, and both soil moisture sensors) to the containers and arduino, test the print out through the lcd screen and the serial print out, at this point i also set some of the sensors on a 1-8 scale for water level in the basin and moisture level of the soil for readability this can be done by subtracting 1024 from the 1023 read out and dividing by 100

Step 11: Water Pump Wiring

Wire and plumb in the water pump, the 12v power source, and the 5v trigger relay. I kept the negative wiring for the water pump and 12v power source connected to the quick BNC connectors for testing as if something went wrong when testing the trigger of the pump it out be easy to pull the plug and shut the pump down.

Step 12: Water Pump Trigger

Program the trigger of the 12v power source through the 5v relay trigger based off of soil moisture levels, as the pump is quite strong you will want to set this for a very small amount of time and test to get the right level watering. I did not get to finish this step but plan to during the summer when i have a little extra time. Add soil to your planter container, setup and plug in all your sensors and water line.

Step 13: If I Had More Time

Refine, when i get some extra time i would like to refine my programming to make use of proper function calls and setup instead of having everything in a big loop, i would also program in a self correcting water check, and slightly tweak the design of the boxes.

Step 14: Code Explanation and Code Source

The code is actually pretty simple it's a basic setup of pins for all the sensors and the lcd screen, read in of the analog values from those pins, and a print out to the serial monitor/plotter a ong with the lcd screen in side the loop. If i had more time i would have also programmed in the trigger for the water pump and plan to in the summer.