Shahmir Khan's custom GrowBox automation software suite.
This is an arduino software designed to automate the control of and indoor growing environment. It provides a control webpage accessible over LAN/WLAN, timer functionality, and water drainage functionality.
This is just what I used, the code could easily be adapted to work with different setups
-
NodeMCU 1.0 ESP-12E (Or ESP8266)
-
Arduino Mega (Or any arduino that have enough output pins for your application)
-
16 Channel Relay module (Or any relay module, max is 16channels)
-
16x Wall outlets (Or however many you want, max is 16)
"Drain Pump" = D5 pin on ESP8266 board, Stays on for 30s after being triggered (Will be moved to a pin on the MEGA in the future)
Pin 2 on MEGA board
"Runoff Pumps" = Pin 1 on MEGA board, Stays on only while the trigger is held
The automatic drainage functionality is implemented by supporting up to 2 water sensors and associated pumps. These pumps will automatically turn on when their associated sensor is triggered. The trigger activates when the associated pin is brought LOW to ground.
Any of the wall outlets and relays in the system can be used for this functionality. The user simply has to assign a name to one of the wall outlets on the web interface. Assigning the name "Drain Pump" (without quotations"") will give that wall outlet the "Drain Pump" functionality. Similarly, assigning the name "Runoff Pumps" (without quotations"") will give the "Runoff Pumps" functionality to that wall outlet.
The web interface was kept simple to reduce memory size so that it could fit onto the NodeMCU ESP-12E microcontroller.