Automate the garden

Showing some more love to introducing my self and thanking all the ones who welcomed me :smiley: this is my current project to automate the garden

so far

35$ raspberry pi
15$ worth of material from home depot including the outlets.
8$ relay board
2.12$ according to my calculations some leftover computer power supply wires from old dead desktop computers…

if all goes well ill post up a better schematic :smiley:


Welcome @ct2003viper! I’m new too and been playing around with the Arduino for controls. I’m new to it but it’s been fun. Looking forward to seeing more of your setup.


Hello and welcome to OG!

Nice DIY build! It deserves its own topic…

I’ve moved your uploads to our server. Please preferably upload pics directly to Overgrow. See howto here:


Im very interested as well. What exactly are you automating - lights, humidity, heat, PH, EC, or?

Is the arduino acting as a timer or does it process sensor data or?

Are the outlets running 110 volts AC or some DC voltage or?

Whats the white plastic thingy with the vent holes?

How about the red gizmo with the two wires recessed into the right side wall?

Curious minds etc etc :slight_smile:


I think the plastic thingy may be a humidity/temp sensor :+1: it looks very much like the sonoff th16 sensor


Thank You @LemonadeJoe

@Larry3215 yes hopefully if all goes well this will be able to read Temp,Humidity,CO2,possibly release CO2 from a canister that would be epic … currently i have lighting and watering running smoothly via a crontab but i believe there is better ways in programming the lighting and watering system… I think PH & EC should be handled by human… they have sensors online of them but who knows how long they last in water… and that little gizmo is the male plug for the extension cord :smiley:

@Hashtree im right there with you on this i followed this page python on facebook and a few guys on a discord channel and what i can say is there helpful yet not lol none will help you code on there… just guide you in a direction to help you fix it currently i have to learn about tuples and how to access one for reading… smh im more of your avid mechanic that fixes no start issues not a programmer next step is Craigslist lol


I’ve had really good luck hiring programmers/devs/artists on Fiverr. It might be worth a shot :slight_smile:


no joke i checked them out last night starting at 5$ to talk business and prices goes up… anyhow the temp monitoring system now is working properly so far!


now the relay turns on and off when temp is 63=on


That box is a great idea to contain everything. The arduino was overwhelming at first but the more projects I tried the more it made sense. If you got the temp controls figured out I’m sure the other controls will fall into place as well.
looks like your making progress!


Where moving right along with the project took a break from it but Im just concerned with my wiring I’m using 16g wire because that’s the only one that fits the relays… but they handle 10Amp so that’s the baseline we have as far as drawbacks… I’m going to see if they have some beefer relays online… I believe if I’m not mistaken to my calculations if there is an electrician in here let’s confirm this…

Maybe 3 315s on one relay ?


Ok guys it’s been a while since I posted and not much progress on this project but here is a starter kit of parts you would need for the project…
So far, I have it programmed

Lights on and off one relay is
12Hr = pin 15 ---- SleepTimeL = 43200 Seconds
18Hr = pin 14 ---- SleepTimeL = 64800 Seconds

To edit the rest of the scripts you apply the same concept to the rest of the scripts to adjust time on and off also temperature remember that the temp is in Celsius so convert to F if that’s your standard.

Open python editor the part where the script says SleepTimeL = XXXXX import your time in Seconds for how ever long you want the relay to run for.

Watering schedule pin = 18
Mon, Wed, Fri for 300Sec = 5minutes always can be adjusted.

Temp Control pin = 4
Temp1 = on
Temp2 = off
You will edit these settings in python editor

Shopping List for amazon :slight_smile:


Raspberry pi

5v micro USB charger if you got a phone charger don’t bother buying one. Will work fine

MicroSD Card

GPIO Wires & Breadboard

Temp/humidity Sensor


Here is a zip file of all my scripts so far upload into home folder on raspberry pi. More info coming soon on how to trouble shoot issues.


Cool, thanks for posting the script. I just bough a pi so I can confuse myself now that i have the arduino down. I haven’t had a chance to try it yet but when I bookmarking this to come back to.


well Hash if it makes you feel any better i still get confuzzled with the pi i currently am looking to take a try with arduino seems a little easier than this i dabbled with it with my old 3d printer…


Thank you @ct2003viper any chance you have any updates to your setup or is this all working out. Really starting to look into this as a viable way of maintaining more plants with less attention lol.

1 Like

@Enjoi802 No nothing yet. Only thing I have done was got it to work in Fahrenheit opposed to Celsius… still on the drawing board i need to find someone good with programming a GUI interface so we can seamlessly adjust settings without editing code for the ones not tech savvy also make a backup end where it will always upload any crash reports so it can start where it left off… Using crontab works but not fail safe. My vision is to have a main box we work from that controls other small controller boxes on the network… so we can monitor multiple rooms :smiley:

import sys
import Adafruit_DHT
import RPi.GPIO as GPIO
import time

# initialize GPIO
GPIO.setup(18, GPIO.OUT)        
relay = 18

# read data using pin 4
sensor = Adafruit_DHT.DHT22
pin = 4

# set temps
temp1 = 67.9
temp2 = 72.0

#pull data from sensor

while True:
instance = Adafruit_DHT.read_retry(sensor, pin)

Temp = instance[1]
Temp = (Temp * 9 / 5) + 32

print (Temp)

if Temp <= temp1:
GPIO.output(relay, GPIO.LOW) # on
print("turning on relay")
if Temp >= temp2:
GPIO.output(relay, GPIO.HIGH) # out
print("turning off relay")

# Reset GPIO settings

Hello, I’ve reformatted your post. Check out MarkDown syntax for better formatting…


Well anyhow boys and girls we are under way just paid a programmer couple bucks to Nigeria and man progression! The guy I found absolutely great we are going to implement next a time-laps so we can see the lady’s get big :smiley:. So long story short this man is working in conditions of power outages every couple hours i got pictures of him buying gas at the gas station there for the Generator btw 30cents a Liter … He is using internet Hot-spot on cell phone to his laptop to communicate with me via Teamviewer and using VNC to tie into the Raspberry pi Truly amazing how we can perform these thing’s. The conditions he has to go threw on a daily amazes me. Trying to keep you guys up to date with everything :heart:


hey mate… congrats on your progress… im doing similar thing, but im going for multiple arduinos inside growbox (nodes), connected to one main esp32 (switch), and for multiple growboxes and room where they would be (more nodes) i would have one router - raspi - to have www control… im utilizing many open source projects, like PJON protocol for communication:, DRO-Matic for nutes controll:, Mycodo for overall control:, and of course Adafruit libraries for sensors, Matlab channel for process control explanation:, basically all i could get my hands on to make a solid product… i first made whole thing on Blynk platform:, which is very powerful platform to make IoT devices with nice mobile app, but since they pushed more of their business side, and less open source, and then released 2.0 version only for businesses, i went for different route, and to remake most of my things, and have offline interface via nextion screens and online via webpage, not an app… im nowhere near a programmer, im still on basic level of c++ and web languages, im electrician and am handy with tools, so i approached this with grow room design first, and then searched for solutions, and since there were many setbacks, and not enough knowledge (of control processes, desing of user friendly UI, grow room setup in general), i put my project on hold and decided to research the shit out of it until i go back to code… but i have a ton of info, some i already put here, other i can find for you, and share my experience working with arduino… ive mostly used arduino nano, cause its cheap, and there is ton of libraries for various sensors, but it has its limitations (8 bit controller with floating point simulator, so its very slow with lets say VPD calculation, which ive outsourced to my esp32), and arduino mega (handles 30 sensors without a sweat, but still 8 bit controller), so if you have a questions feel free to ask! also, about ph readings, youre right about probe being submerged, it has to be scientific grade to be allowed to be constantly submerged in a solution, and Atlas Scientific had one for 200$ (probe only, signal board is about 40$), but since many hydro users needed something less powerful but still resilient, they made cheaper probes with lesser resolution, consumer grade one has resolution and accuracy of +/- 0.1 and its 40$: and their lab one has resolution and accuracy of +/- 0.002 and its 80$, both can be submerged in a solution indefinitely… hope this helps you and gets you some good reading material, have fun and happy growing! <3

Edit: example pic of Blynk