Grow Box

15 January 2018

When our wine cooler gave up the ghost, I didn't have the heart to just throw away such a nice looking carcass. I gutted the machine and cut out the top to accommodate a couple of CFL grow lights. I removed the evaporator and replaced it with the innards from an old space heater. I rewired the heating elements so they are now in series instead of parallel and put a hefty diode in series with the elements to greatly cut down on the power. In a sealed environment like this it doesn't take much power to maintain temperatures appropriate for a grow box. I kept in place a muffin fan in the plenum to distribute the heat.

On initial testing I found out that the humidity quickly rises to 100 percent when plants or seedlings are placed inside. I cut two holes in the bottom of the cabinet for ventilation. Over one hole I mounted a muffin fan to draw in fresh air and the other hole allows the cabinet air to escape.

I also discovered that the grow lights put out too much heat so they now reside in a sealed chamber with a dedicated fan that cools the lights whenever they are turned on.

The electronics consists of a Raspberry Pi 3, a BME280 temperature and humidity sensor wired to the I2C bus, and a 4 channel relay that controls the grow lights, the heater, heater fan and ventilation fan.

Initially I set up the Raspberry Pi with Raspian Lite and turned on the I2C bus. I installed a MQTT broker and wrote some Python scripts to control everything. To control the box and change settings, I used an app on my Android phone called MQTT Dashboard to change data on a few MQTT topics. All this worked just fine for a year, but without an elegant web interface, it was a little clumsy to operate.

In the mean time, I learned about Node Red and used it with great success for my Crawl Space ventilation project.

Here's a snapshot of the Node Red dashboard running on the grow box:

The Temperature and Humidity Set Points are controlled by a Slider and the set point gauges are set up in Compass style. The actual temperature and humidity readings are gauges set up in the default Gauge style. The indicators on the bottom of the screen are actually gauges set up in Donut style with a minimum reading of zero and a maximum reading of one. I changed the default colors to yellow for the grow lights, red for the heater, blue for ventilation and red for Over Temp and sensor timeout errors and blue for Under Temp. The Adafruit BME280 sensor was failing periodically so I added a Timeout feature to make sure the heater couldn't run if data stopped flowing in from the sensor. I've since replaced the sensor with one from DIYMALL (Amazon link) and it's rock solid.

Note: Twitter and Google keep changing their API so I no longer use the Twitter or Google Home nodes.

Here's what my flow looks like:

If you're interested in importing this flow into your Node Red installation, I'll send you the text file. I can also send the Python script that reads the BME280 sensor every 2 seconds and updates MQTT topics. As you can see from the flow, I rely heavily on MQTT to pass data around. Note the gb/temperature and gb/humidity topics are Retained so that the settings will survive a re-boot. As I recall, the nodes I had to install that were not part of the default installation are node-red-contrib-deadmanswitch, node-red-contrib-edge-trigger, node-red-dashboard, node-red-contrib-node-red-contrib-google-home-notify-volume-adjustable and node-red-contrib-timerswitch. There may be others, but I am old and easily confused (obscure Seinfeld reference).

This is my interface to the Raspberry Pi. There are 2 pins to supply 5 volts power, 4 pins for the I2C interface and 6 pins for the 4 channel relay.