An Ebb n’ Flow Hydroponic Controller
Ebb and flow hydroponics is a form of hydroponics that is known for its simplicity, reliability of operation and low initial investment cost. Pots are filled with an inert medium which does not function like soil or contribute nutrition to the plants but which anchors the roots and functions as a temporary reserve of water and solvent mineral nutrients. The hydroponic solution alternately floods the system and is allowed to ebb away.
The ebb and flow process (aka flood and drain) consists of two discrete cycles. The flooding cycle, where the pots are filled with a nutrient solution and the drain cycle, where the pots are drained and the solution is returned back to a tank.
Multiple cycles per day can enhance the development of the plants and usually require some source of automation control.
I gave my shot more than a decade ago with a controller based on the PIC16F648A microcontroller. The system proved to be reliable enough and after been enclosed in a CNC machined case with a proper graphic overlay, it found its position on the shelves of a hydroponic store.
Although the code was written purely in asm (yes asm!) so I would not recommend anyone to replicate or extend it, it incorporates several features like contolling an HD44780 LCD, emulating I2C through bit banging, creating a user friendly multi-line menu, etc, that might worth to check at least out of curiocity. It seems that Microchip also found it interesting.
The code, the schematic diagram and the gerber files are available on GitHub. You can also buy a ready made hydroponic system that utilizes the controller from here.
HYDRO+
A digital hydroponic controller based on PIC16F648A microcontroller clocked @ 4 Mhz.
Code was written exclusively in ASM more than a decade ago, making it a legacy project at the early beginning. Code is no longer maintained.
Controls an LCD 16x2 - HD44780 through a PCF8574 I2C expander. LCD contrast is digitaly adjusted through PWM modulation.
Offers a fully functional multi line menu to navigate through the various functions.
Implements I2C communication protocol through bit-banging.
Keeps track of time and sets alarms by controlling the RTC DS1307 through I2C.
Offers a cycle timer and ten absolute timers for scheduling flood and drain cycles.
Controls two separate optocoupled inputs and outputs:
- Inputs are connected to the water float switches.
- Outputs utilize two 12v/220v - 10A DIN rail relays, for controlling the water pumps.