Twitter icon
Facebook icon
LinkedIn icon
Google icon
Reddit icon
StumbleUpon icon
Del.icio.us icon

Arduino GrowBox Controller

Added to IoTplaybook or last updated on: 10/03/2019
Arduino GrowBox Controller

Story

Arduino GrowBox Controller is available on GitHub. I finally shared, with GPL3 license, the firmware I developed in theese years for my GrowBox.

On my website, I already shared how I built my GrowBox, the modifications I made in time and plants growing pictures.

Thanks to Arduino Mega 2560 Rev.3, this open source firmware offers a small web server for configuration, data transmission to EmonCMS instance and data logging to SD card. CSV log files are downloadable from GrowBox Controller's web page.

 

Electronic boards in box
Electronic boards in box

Arduino GrowBox Controller uses DHT22 sensors for temperature and humidity reading, inside and ouside the box. DS18B20 are also used for a sample pot and ground temperature monitoring.

The Ethernet Shield allows for a remote configuration, as well as data visualization and logs download. This makes 20x4 LCD display redundant, but useful when you don't want to turn on your phone or tablet.

 

Current Parameters on the web server
Current Parameters on the web server

EmonCMS integration with Arduino GrowBox Controller allows us to keep an history and monitor trends, from everywhere. If you already use EmonCMS for energy monitoring applications, you can integrate in it too.

Since last year I growth only peppers, but during 2018 I growth tomatoes, courgettes, peppers (not the hot ones!), aubergines, watermelons and melons to plant in my vegetable garden. An earlier start since where I live summer is short and couldn't start from seed in the field. Also, eating tomatoes in June is awesome!

 

Implemented Functions on Arduino GrowBox Controller

Let's take a look at what this controller can do!

Environmental Parameters Control

GrowBox Temperature Control

It's possible to set heating thresholds:

  • Min Temperature: Under this threshold, heater will be activated
  • Max Temperature: Over this threshold, heater will be disabled

Humidity thresholds

It's possible to set humidifier thresholds:

  • Min Humidity: %RH Under this threshold, humidifier will be activated
  • Max Humidity: %RH Over this threshold, humidifier will be disabled

Ground/Sand Temperature

  • Min Ground Temp: The controller can activate heating if ground temperature is under this threshold (if internal temperature is under min threshold too)
  • Max Ground Temp: The controller will disable heating also if internal temperature requires heating. This is to prevent pot and radical damages

Lights Control

  • Start Hour: hour at which controller will turn on lights
  • Start Minute: minutes at which controller will turn on lights
  • Stop Hour: hour at which controller will turn off lights
  • Stop Minute: minutes at which controller will turn on lights

If we need to turn on the lights at 6:30 and turn off at 22:30, we will set:

  • Start Hour: 6
  • Start Minute: 30
  • Stop Hour: 22
  • Stop Minute: 30

This section is related to local network parameters.

  • IP Address: Static IP Address of your choice
  • Subnet Mask: Your Subnet Mask
  • Gateway: IP Address of your gateway
  • DHCP: Check if you need DHCP. Above configuration will be ignored.

Fans

Some lamps runs hot inside growboxes, so we can set different programs for "night" and "day".

Fans - Light ON

  • Duration: duration in minutes
  • Interval: interval between activations, in hours

Fans - Light OFF

  • Duration: duration in minutes
  • Interval: interval between activations, in hours

Real-Time Clock

Set your local time, to allow for accurate logs and to restart the program in case of mains failure.

Acquisition and Logging Frequency

I choose to keep these two parameters separated because controller can react fast (fast acquisition frequency) but we don't need all this data, so logging frequency is slow. With a faster logging frequency, we'll have bigger CSV files, more data transmission to EmonCMS and slower download time.

  • Sample Rate: sampling rate, in seconds. Controller can react faster
  • Transmission and Log Rate: minutes between CSV update and EmonCMS data transmission

PCB for Arduino GrowBox Controller

I started to design a "shield" for Arduino Mega, so you can connect Ethernet shield, relays and sensors easily. I used Eagle, and sources are available on GitHub.

 

Next Steps

This is the third year I grow my peppers (and other vegetables too), but I still miss some functions I will integrate in the future:

  • PID for heating, by using a solid state relay (SSR) to control heating element and increase energy efficency and temperature control
  • MQTT, to integrate this device in home automation systems or IoT platforms like ThingsBoard.io
  • NTP to set real-time clock and avoid errors
  • Preheating: start heating before turning off the lights to increase temperature stability
  • Irrigation with sample pot probe.

Hope you enjoy this project!

Share your growing!

Things used in this project

Hardware components

Arduino Mega 2560 & Genuino Mega 2560
Arduino Mega 2560 & Genuino Mega 2560
 
× 1

 Newark

 Adafruit

 Arduino Store

 CPC

Arduino Ethernet Shield 2
Arduino Ethernet Shield 2
 
× 1

 Newark

 Arduino Store

DHT22 Temperature Sensor
DHT22 Temperature Sensor
 
× 2

 Sparkfun

Adafruit Waterproof DS18B20 Digital temperature sensor
Adafruit Waterproof DS18B20 Digital temperature sensor
 
× 2

 Newark

 Adafruit

Arduino 4 Relays Shield
Arduino 4 Relays Shield
 
× 1

 Arduino Store

 store.arduino.cc

Grove - RTC
Seeed Grove - RTC
 
× 1

 seeed-studio

Software apps and online services

 
EmonCMS
 
   Emoncms.org

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)

 

Schematics

Arduino GrowBox Shield

Eagle schematic and pcb for the shield (not yet milled)

Yarosia / Arduino-GrowBox-Controller

This Arduino based GrowBox Controller offers a webserver for settings and live data, SD card logging, EmonCMS integration, Relay control for light, heater, fan and mist generator. — Read More

Latest commit to the master branch on 1-9-2019 - Download as zip

Code

Arduino GrowBox Controller

Arduino Firmware for GrowBox Controller

Yarosia / Arduino-GrowBox-Controller

This Arduino based GrowBox Controller offers a webserver for settings and live data, SD card logging, EmonCMS integration, Relay control for light, heater, fan and mist generator. — Read More

Latest commit to the master branch on 1-9-2019 - Download as zip

 

Credits

Michele Valentini

 Michele Valentini

 20 projects • 45 followers

From Pepper growing to CNC milling, i don't like to waste time sleeping.

 

 

Hackster.io

This content is provided by our content partner Hackster.io, an Avnet developer community for learning, programming, and building hardware. Visit them online for more great content like this.

This article was originally published at Hackster.io. It was added to IoTplaybook or last modified on 10/03/2019.