In order to get the temperature and humidity values, I will use a Bosh BME280 sensor.
https://cdn-shop.adafruit.com/datasheets/BST-BME280_DS001-10.pdf
It can be powered with 3V, and use I2C to communicate.
You can find sensor already mounted on a small PCB, with the pull up resitors already in place, so you just need to solder the pins.
As I am planning to use a power junction box as a housing for the ESP, I thought that I could fit this sensor into one of the cable screw plug. I used dense foam to isolate the sensor from the junction box.
Here is the result:
vendredi 12 mai 2017
Soil moisture sensor
Soil moisture sensors are used to know the amount of water that contains the soil.
Different types of sensors can be found: https://en.wikipedia.org/wiki/Soil_moisture_sensor
I have tried some cheap resistivity sensors of this kind:
However, the price is cheap but the quality also is. It is not resistant to water and the probe get oxidized quite fast.
So I decided to buy that a better build one, and had a look inside. It can be found on Aliexpress for about 3 euros.
This one can also be used to check the luminosity and the PH. I will use it only for soil moisture.
I will use the "gold" probe, which is made of 2 isolated parts (both "needle bottom" are wired together). The current will flow through the soil, from one to another part of the probe.
By reading the voltage with the analog pin of the ESP, we should be able to evaluate the resitance and so the humidity of the soil.
The internal sensor resistance is 900 Ohm.
VCC voltage will be 3V.
The ESP12 has only one analog pin.
If we want to read several analog sensors, then we need to use ADS1115 for instance, that gives 4 analog pins, and is supported by the ESP Easy firmware.
http://www.ti.com/lit/ds/symlink/ads1115.pdf
https://www.letscontrolit.com/wiki/index.php/ADS1115
The Analog digital converter range is from 0V to 1V, that will give a value between 0 and 1024.
http://www.esp8266.com/wiki/doku.php?id=esp8266_gpio_pin_allocations
I have tried with real condition, and when the soil is full of water, the value is around 800.
The voltmeter shows a value of around 0.85V when the probe is into a glass of water.
Later on, it is possible to edit the source code of ESP Easy and to remap the values if needed.
Different types of sensors can be found: https://en.wikipedia.org/wiki/Soil_moisture_sensor
I have tried some cheap resistivity sensors of this kind:
However, the price is cheap but the quality also is. It is not resistant to water and the probe get oxidized quite fast.
So I decided to buy that a better build one, and had a look inside. It can be found on Aliexpress for about 3 euros.
This one can also be used to check the luminosity and the PH. I will use it only for soil moisture.
I will use the "gold" probe, which is made of 2 isolated parts (both "needle bottom" are wired together). The current will flow through the soil, from one to another part of the probe.
By reading the voltage with the analog pin of the ESP, we should be able to evaluate the resitance and so the humidity of the soil.
The internal sensor resistance is 900 Ohm.
VCC voltage will be 3V.
The ESP12 has only one analog pin.
If we want to read several analog sensors, then we need to use ADS1115 for instance, that gives 4 analog pins, and is supported by the ESP Easy firmware.
http://www.ti.com/lit/ds/symlink/ads1115.pdf
https://www.letscontrolit.com/wiki/index.php/ADS1115
The Analog digital converter range is from 0V to 1V, that will give a value between 0 and 1024.
http://www.esp8266.com/wiki/doku.php?id=esp8266_gpio_pin_allocations
I have tried with real condition, and when the soil is full of water, the value is around 800.
The voltmeter shows a value of around 0.85V when the probe is into a glass of water.
Later on, it is possible to edit the source code of ESP Easy and to remap the values if needed.
Inscription à :
Articles (Atom)