Found this on another forum. Spreading the info to make the world a better place.
Soil moisture sensors - Tensiometers or Capacitive sensors
There are several ways to measure soil moisture levels. Cheapest and least reliable is a resistance based sensor. These measure the electrical resistance of the soil. If more water is present then it's easier for the electricity to flow. Unfortunately these tend to corrode over time. This can be reduced by using the sensor only in short bursts and using an alternating current, but still I found them unreliable.
Easier and better ways of doing this are by using a capacitive moisture content sensor or a tensiometer.
A capacitive sensor measures the capacitance difference due to the dielectric constant of water being different from that of air and soil. After calibration you get a percentage figure which gives you the amount of water between completely dry and waterlogged.
You can build these yourself from metal plates/foil like this:
http://www.instructables.com/id/Building-a-Capacitive-Liquid-Sensor/
Or get ready versions like these:
https://www.tindie.com/products/miceuz/i2c-soil-moisture-sensor/
http://www.vegetronix.com/Products/VH400/
Although the latter uses a slightly different technique, but it's similar.
A tensiometer measures the suction of the soil on a water filled ceramic sensor head. The sensor returns a pressure level. 80mbar is usually a good level to keep the moisture level, but obviously the soil isn't constantly at the same moisture level.
Blumat sells these things, but they cannot be connected to a data logger. So instead I decided to make my own.
A picture of some home made sensors together with a Blumat Digital sensor:
![1588175707828.png](/data/attachments/3651/3651397-ce104cb3aef6c3d6124a5ac1ed53cad8.jpg)
The sensor needs to measure a negative pressure and I wanted something that I could connect to a Blumat watering tube. The only sensor that fit my requirements was the Freescale MPXV5050VC6T1. It measures a pressure between -50KPa (-500mbar) and 0KPa and returns an analog signal between 0.1V and 4.6V. Exactly the right range for hooking up to an Arduino.
The construction consists of two pieces:
1) The housing
2) The pressure sensor module
The whole thing taken apart:
![1588175807340.png](/data/attachments/3651/3651398-cff9c44344ccebd853a7593cf64f33b4.jpg)
The housing is made from PVC piping glued together with a Lactacyd mini bottle cap which just happens to have the same thread as a Blumat sensor tube. I intend to some day make a 3D printed housing for these, but for now I'm growing in hydro so not sure if and when I will get to that![Smile :) :)](/styles/smilies/icon_smile.gif)
Picture of the housing in white PVC up close:
![1588175819729.png](/data/attachments/3651/3651399-6b9c203cba33ca56c9de9ee32e9ca95d.jpg)
The module is basically a simple connection from the sensor to a stereo headphone jack. I attached that to a bit of proto board which I cut out to fit in the PVC pipe.
Picture of the sensor module perched on a cap:
![1588175826934.png](/data/attachments/3651/3651400-c537be90fa5f62877a069099fba27e02.jpg)
A bit of Arduino code for converting the analog voltage into a pressure value:
Code:
In my datalogger code I also added a smoothing algorithm. The sensor is read every second and these values are averaged over a minute. This minute average is then logged. Not that it mattes much, but I like the more graph clean lines it gives.
A graph of the tensiometer data from two sensors (2 plants) show how quickly the plants start taking up water after the lights are switched on:
![1588175835705.png](/data/attachments/3651/3651401-896a60c8af88370b8799dff8c948e9a0.jpg)
The charts shows low transpiration during the night and within 15 minutes after lights on, the plant is taking up water at full capacity.
The drop around the 160 minute mark is where the plants were watered. This causes the tensiometer pressure values to drop.
Soil moisture sensors - Tensiometers or Capacitive sensors
There are several ways to measure soil moisture levels. Cheapest and least reliable is a resistance based sensor. These measure the electrical resistance of the soil. If more water is present then it's easier for the electricity to flow. Unfortunately these tend to corrode over time. This can be reduced by using the sensor only in short bursts and using an alternating current, but still I found them unreliable.
Easier and better ways of doing this are by using a capacitive moisture content sensor or a tensiometer.
A capacitive sensor measures the capacitance difference due to the dielectric constant of water being different from that of air and soil. After calibration you get a percentage figure which gives you the amount of water between completely dry and waterlogged.
You can build these yourself from metal plates/foil like this:
http://www.instructables.com/id/Building-a-Capacitive-Liquid-Sensor/
Or get ready versions like these:
https://www.tindie.com/products/miceuz/i2c-soil-moisture-sensor/
http://www.vegetronix.com/Products/VH400/
Although the latter uses a slightly different technique, but it's similar.
A tensiometer measures the suction of the soil on a water filled ceramic sensor head. The sensor returns a pressure level. 80mbar is usually a good level to keep the moisture level, but obviously the soil isn't constantly at the same moisture level.
Blumat sells these things, but they cannot be connected to a data logger. So instead I decided to make my own.
A picture of some home made sensors together with a Blumat Digital sensor:
![1588175707828.png](/data/attachments/3651/3651397-ce104cb3aef6c3d6124a5ac1ed53cad8.jpg)
The sensor needs to measure a negative pressure and I wanted something that I could connect to a Blumat watering tube. The only sensor that fit my requirements was the Freescale MPXV5050VC6T1. It measures a pressure between -50KPa (-500mbar) and 0KPa and returns an analog signal between 0.1V and 4.6V. Exactly the right range for hooking up to an Arduino.
The construction consists of two pieces:
1) The housing
2) The pressure sensor module
The whole thing taken apart:
![1588175807340.png](/data/attachments/3651/3651398-cff9c44344ccebd853a7593cf64f33b4.jpg)
The housing is made from PVC piping glued together with a Lactacyd mini bottle cap which just happens to have the same thread as a Blumat sensor tube. I intend to some day make a 3D printed housing for these, but for now I'm growing in hydro so not sure if and when I will get to that
![Smile :) :)](/styles/smilies/icon_smile.gif)
Picture of the housing in white PVC up close:
![1588175819729.png](/data/attachments/3651/3651399-6b9c203cba33ca56c9de9ee32e9ca95d.jpg)
The module is basically a simple connection from the sensor to a stereo headphone jack. I attached that to a bit of proto board which I cut out to fit in the PVC pipe.
Picture of the sensor module perched on a cap:
![1588175826934.png](/data/attachments/3651/3651400-c537be90fa5f62877a069099fba27e02.jpg)
A bit of Arduino code for converting the analog voltage into a pressure value:
Code:
#define VSS 5.0
int sensorValue = analogRead(pin);
float voltage = sensorValue * (VSS / 1023.0);
//Transfer MPXV5050V vout to value
// VOUT = VSS x (0.018 x P + 0.92)
// Multiply by 10 for mBar/hPa
Tensio = -( voltage/ VSS - 0.92) /0.018 * 10;
In my datalogger code I also added a smoothing algorithm. The sensor is read every second and these values are averaged over a minute. This minute average is then logged. Not that it mattes much, but I like the more graph clean lines it gives.
A graph of the tensiometer data from two sensors (2 plants) show how quickly the plants start taking up water after the lights are switched on:
![1588175835705.png](/data/attachments/3651/3651401-896a60c8af88370b8799dff8c948e9a0.jpg)
The charts shows low transpiration during the night and within 15 minutes after lights on, the plant is taking up water at full capacity.
The drop around the 160 minute mark is where the plants were watered. This causes the tensiometer pressure values to drop.