Automating a hydroponic system: Sensors and monitoring

Hydroponic systems benefit greatly from gathering more information as this gives the grower the ability to better diagnose problems and better understand the evolution of their hydroponic crops. Usually growers limit the information they gather to single sensor measurements carried out either at different points during the day or even only when nutrient solutions need to be changed. These measurements are often not recorded and are difficult to analyse in a wider context. Today I am going to talk about the automation of sensors in a hydroponic crop and the benefits this can yield you in the longer term. I will give you some advice regarding how to do this and will in a later post provide some practical steps to achieve an automatically monitored setup. Below you can see a picture of the output of my home hydroponic setup monitoring pH, EC, ORP, humidity, ambient and solution temperatures.

Automating sensors is not only having sensors that can take readings at predefined intervals but also making sure that the reading from these sensors are stored so that they can be used for analysis and diagnosis later on. Thankfully these days we have Arduino micro-controllers which are compatible with a wide variety of sensors that can be used for automated monitoring. We also have very cheap raspberry pi computers which we can use to store this information and build a database with our sensor information. Ideally we would like to monitor as many variables as possible but we are somewhat limited both by cost and the sensor capabilities of the Arduino micro-controllers. If you want to perform automated monitoring then you would definitely want to buy pH, EC, ambient temperature, solution temperature, humidity and carbon dioxide sensors. If you have more money or want to have more data then I would also advice getting a dissolved oxygen sensor and an ORP sensor. If you have a large grow room then you might want to place several CO2 and temperature sensors to properly monitor the entire crop. Here is a small shopping list with sensors and micro-controllers you could use for this:

Although the LCD shield isn’t really necessary for the setup it does allow you to write an Arduino program that displays readings right away. This is very useful as you can see readings as they happen within your hydroponic crop. The image below shows you how this looks like within my home hydroponic setup. In this setup I have all the sensors constantly taking measurements from the crop, which are displayed in this LCD screen. There is also a raspberry pi connected to this Arduino that records one measurement every 2 minutes. I don’t record measurements any faster since this would cause the memory usage to grow very fast within the Raspberry pi without any important gains in the amount of knowledge gained from the information taken.

It is also important to know that the sensors should be industrial quality sensors designed to be kept submerged all the time. For example the above ORP, dissolved oxygen and EC meters are not designed for being constantly submerged so after a while they will stop working and you will need to change them. However if you clean the sensors around once a week and cover the body of the sensor – especially where the cable goes out the back – with electrical tape you can significantly extend their service life. After they run out you can still use the interface to connect an industrial grade sensor. It is worth noting that all sensors can lose their calibration so you want to calibrate your pH/EC sensors at least once every month within this setup. Also when taking sensor measurements you will want to take the median of a large number of measurements (>100) in order to ensure better stability.

Within a followup post I will share the code I use for my automated home setup as well as some additional information dealing with the automatic use of peristaltic pumps to automatically adjust pH/EC and ORP. For a few hundred dollars automated monitoring can greatly increase your ability to understand your hydroponic crops.