We had to test our data platform — the app, the cloud, and all the rest of it — with some real data. To do that we’ve put together a miniature SensorBox for greenhouse. The thing consists of a microcontroller and a lot of sensors: temperature, humidity, EC (electrical conductivity) of the solution used to feed the plants, etc. Ph and EC are the ones that required the most thought, so I decided to write an article about them.

EC and Ph probes (the bits that go in the water) typically can’t be read directly with a microcontroller. They require an analogue circuit to drive them, pick up the signal and boost into range where a microcontroller’s ADC can measure it. We tested several pieces of kit before we settled on our current setup, and decided to share the experience.

DFRobot Sensors

These guys make a huge selection of various Arduino shields, boards and sensors, and their kit is of high quality. We’ve now been using their parts for almost a year in several projects, operating 24/7. We stumbled upon them while looking for EC and Ph sensors.

They sell probe and the circuit together, moderately priced, at~ £45 for PH and ~ £60 for the EC kit. They work well, and most importantly all of their kit is well documented! The Ph sensor outputs voltage linearly proportional to the value it is measuring— so if the voltage registered is 0, Ph is 0, if the voltage is max, Ph is 14, etc. Reading the values is nice and easy.

To get values for EC you have to use a formula but nothing too complicated there. It also compensates for variations in temperature. You can literally copy-paste code from their Wiki and it will work.