Automated Dispensing System for Hydroponics

Summer '22

technical skills: Raspberry Pi, Hydroponics, Pump Control

This project involves development of a liquid dispensing system for a hydroponic growth system. The objective is to automate the operation so that an optimal amount of nutrients can be supplied to the plants using a system instrumented with sensors and actuators. The sensors are used to measure vital variables such as water conditions (pH, electrical conductivity), temperature, level, and flow; and actuators include pumps and valves to dispense specific volumes of solutions (acid, base, and nutrients). The system should automatically adjust electrical conductivity and pH. A user interface is required that shows gauges, graphs, and other widgets to view all relevant data on a single page

My responsibility for the project is working on the electrical and control of the project. First, based on the requirements of the projects, we have to source the pH and Electrical Conductivity sensors as they are the key aspects of the system. In addition, we also want the sensors to be industrial-graded, which can submerge into the liquid for a long time without calibration. Therefore, we decided to use DFRobot Gravity Analog pH Meter Pro kit(SEN0169) and SeedStudio Industrial EC sensor. These two cost the most of the budget (approx $300 in total), thus we have to optimize our cost for other part. After choosing the sensors, we decide to pick the Raspberry Pi 3B as our controller as the Pi is suitable for designing a GUI to showcase the value. However, since the sensors are analog and RPi does not have ADC integrated, we have to use an external one, which is ADS1115, a 12-bit ADC that can communicate via I2C. After that, we pick a set of 4 generic 12VDC Pumps from Amazon to dispense the liquid, one pair for pH solutions and the others are for nutrients solutions. The control of the pump will be done via set of relay as we do not need high speed pump, rather than just a quick dispensing every once in a while.

Moving on, after finished with the mechanical and electrical design, we start looking at the control and GUI for the RPi. The control of the liquid dispensing is simple. We first set the target pH value and EC value, as well as their upper and lower bounds. First we will control the liquid to dispense pH solution to meet the required pH value. Then we start dispensing the nutrients to our reservoir. By adding nutrients, we also change the pH value of the system so we will keep adding the nutrients until they either meet the required target or the pH are out of bounds. At this point, no nutrients will be dispensed and the pH will take over the control and regulate the pH value to the target value. As there are certain "lag" for the sensors to pick up the solution, we want the system to run and check every 5 minutes. This will also help reduce the work on the RPi.
Then for the GUI, we decided to use an open source GUI development for hydroponics called Mycodo(https://github.com/kizniche/Mycodo). This helps us reduce the time for software development as well as we can add extra required features to the GUI as well.

Overall, the project was delivered in a successful manner. We could have done a lot better if not for the budget constraints which limit our abilities to design a customize PCB as well as 3D printed a mounting box for the control system. Special thanks to my group mate: Preet, Simar and Sarab for the last 8 months of work!