SoilHumiditySensor: Difference between revisions
No edit summary |
|||
(8 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
|Picture=SoilHumiditySensor.png | |Picture=SoilHumiditySensor.png | ||
|Omschrijving=Investigation of soil humidity sensors | |Omschrijving=Investigation of soil humidity sensors | ||
|Status= | |Status=Completed | ||
|Contact=bertrik | |Contact=bertrik | ||
}} | }} | ||
Line 9: | Line 9: | ||
== Introduction == | == Introduction == | ||
This project is a simple soil humidity sensor that publishes the humidity over MQTT to the internet. | |||
A number of types of soil humidity sensors exist. | A number of types of soil humidity sensors exist. | ||
Many have the problem that the electrodes corrode. | Many have the problem that the electrodes corrode over time because of electrolytic effect. | ||
The one used in this project uses capacitance to measure soil humidity avoiding direct electrical contact between the electrode and the soil. | |||
== References == | == References == | ||
See this [https://youtu.be/udmJyncDvw0 video by Andreas Spiess] that compares a couple of types. | |||
== Hardware == | == Hardware == | ||
I got [https://nl.aliexpress.com/item/32882371718.html these capacitive ones] from Aliexpress. | |||
The electrodes themselves are covered in solder mask. | |||
I put heatshrink wrapping around the top part of the probe, to protect the electronics from moisture. | |||
It's connected to a Wemos D1 mini ESP8266 board, as follows: | |||
* probe GND (black) to Wemos D1 mini pin D5 | * probe GND (black) to Wemos D1 mini pin D5 | ||
* probe VCC (red) to Wemos D1 mini pin D0 | * probe VCC (red) to Wemos D1 mini pin D0 | ||
* probe AOUT (yellow) to Wemos D1 mini pin A0 | * probe AOUT (yellow) to Wemos D1 mini pin A0 | ||
This way, the wire with the 3-pin connector can simply be plugged into the Wemos D1 mini | This way, all connections on the Wemos D1 are right next to each other and the wire with the 3-pin connector can simply be plugged into the Wemos D1 mini without having to modify the cable. | ||
The software puts a low level on pin D5 (to emulate GND) and a high level on pin D0 (to emulate VCC). | The software puts a low level on pin D5 (to emulate GND) and a high level on pin D0 (to emulate VCC). | ||
The idea is that the current is low enough for this trick to work. | The idea is that the operating current of the probe is low enough for this trick to work. I havent actually measured this current. | ||
== Software == | == Software == | ||
Line 33: | Line 37: | ||
The software takes a measurement at a regular interval and sends it over MQTT. | The software takes a measurement at a regular interval and sends it over MQTT. | ||
The measurement value is a 'humidity percentage', with 0 representing a completely dry environment and 100 a completely wet environment. | |||
I don't know the optimal value yet, but typically my plants are at about 60%. |
Latest revision as of 20:03, 27 June 2019
Project SoilHumiditySensor | |
---|---|
Investigation of soil humidity sensors | |
Status | Completed |
Contact | bertrik |
Last Update | 2019-06-27 |
Introduction
This project is a simple soil humidity sensor that publishes the humidity over MQTT to the internet.
A number of types of soil humidity sensors exist. Many have the problem that the electrodes corrode over time because of electrolytic effect. The one used in this project uses capacitance to measure soil humidity avoiding direct electrical contact between the electrode and the soil.
References
See this video by Andreas Spiess that compares a couple of types.
Hardware
I got these capacitive ones from Aliexpress. The electrodes themselves are covered in solder mask. I put heatshrink wrapping around the top part of the probe, to protect the electronics from moisture.
It's connected to a Wemos D1 mini ESP8266 board, as follows:
- probe GND (black) to Wemos D1 mini pin D5
- probe VCC (red) to Wemos D1 mini pin D0
- probe AOUT (yellow) to Wemos D1 mini pin A0
This way, all connections on the Wemos D1 are right next to each other and the wire with the 3-pin connector can simply be plugged into the Wemos D1 mini without having to modify the cable.
The software puts a low level on pin D5 (to emulate GND) and a high level on pin D0 (to emulate VCC). The idea is that the operating current of the probe is low enough for this trick to work. I havent actually measured this current.
Software
See my github repository.
The software takes a measurement at a regular interval and sends it over MQTT.
The measurement value is a 'humidity percentage', with 0 representing a completely dry environment and 100 a completely wet environment. I don't know the optimal value yet, but typically my plants are at about 60%.