Grow Box

7/21/2016

A couple of weeks ago, our little wine cooler crapped out and I was tasked with the job of finding another use for the otherwise nice cabinet. I'm an avid gardener and like to start plants from seed, so I decided to create a seed starting box, AKA a growbox. I ordered the latest version Raspberry Pi from Amazon and started gathering parts from the junk box.

Most garden seeds need temperatures ranging from 85 to 95 degrees Fahrenheit so I would need a heating element and a fan to distribute the heat. I would also need some grow lights. I proceeded to strip the cabinet of the compressor, condenser and evaporator coil. In the back of the cabinet is a channel, essentially a plenum, where the old evaporator coil was installed. At the top of the plenum is a muffin fan, perfect for drawing heated air from the bottom of the plenum where the heating element would be located. I took a heating element from an old portable room heater and rewired the elements so they were in series rather than parallel. The result was a 100 watt more or less heater. If I had to do it all over again, I would use a light bulb because 100 watts was over kill and I have a bit of overshoot when regulating the temperature. This cabinet is only 15 inches wide, so a larger cabinet would accommodate this size heater. I'm able to regulate the temperature to plus or minus 1 degree, so I shouldn't complain.

I installed Raspian Lite and set up a LAMP server on my new Pi. I connected a DHT22 for temperature and humidity data and a 4 channel relay to drive the heater, heater fan, and grow light. Everything seemed to work, but when I added a couple of trays for pepper and tomato seeds, the humidity went straight up to 100 percent. Also, when the grow lights came on, the temperature quickly soared to over 100 degrees. Back to the workshop.

I reconfigured the lights so they were enclosed with a fan to keep the bulbs cool. I also installed a fan at the bottom of the cabinet to bring in air from the room so I could regulate humidity. This version works perfectly.

https://picasaweb.google.com/105088234600600222017/6311009278177759089#6311009280230147042
I wrote two Python scripts to control the growbox, One script continuously reads temperature and humidity and sends the data to the onboard MQTT broker and a remote MQTT broker that gathers the data and creates graphs so I can keep track of the performance. TheĀ other script controls the box itself, turning the heater and fan on when needed. When the temperature set point is reached, the heater is turned off and the fan continues to run for another 60 seconds. When the grow light start time is reached, the grow light and cooling fan (wired together) turn on and turn off after a set number of hours. Different plants have different light and heat requirements, so these are programmable. The second script also monitors the humidity and will turn on a fan at the bottom of the cabinet to draw in conditioned room air when the humidity is too high.

Recently I added the capability to have the grow box send Tweets every hour reporting the current temperature and humidity.

Everything is controlled by changing MQTT values with a smart phone running MQTT Dashboard. I opened a hole in my router so I can control everything anywhere I have Internet access.