What this lambda do? How I find this voltage?
How can I put this auto calibration on esphome?
auto calibration program
Instead of finding the value, can’t I get a LOW variable where it is substituted for each value below LOW and a HIGH variable where it is substituted for each value above that value?
Are these single wire sensors, similar to the DS18B20, allowing them to be chained together on a single ESP 32? Or, can you use more than one, using different GPIO pins?
You need to use one pin per sensor in this case.
You can use one sensor on every GPIO. Otherwise you could also use an add which communicates with I2C such as the ADS1115. You can hook up to 4 of the adc which can each measure 4 sensors.
This ymal is for ESP8266 or ESP32?
I think A0 pin is in ESP8266 and, attenuation: 11db is for ESP32 only
so I am confused.
please help… I have this board: ESP-12F_Relay_X2 | devices.esphome.io. As far as I can see, it has an unused ADC port (it’s the one I should use to connect the sensor?), but it is 0-1 V. Does this mean that I can’t connect the sensor directly to it?
How do you find the output voltages of the sensor? I used 1.25 and 2.8 as values in my yaml code, because these were the in the first post that I found that had yaml code for a capacitive soil moisture sensor. The sensor is working, but it reports 87% when submerged in water. The linearity may be way off because the dry voltage may be significantly higher than the 1.25v.
I’ve tried loading the ESP32’s web page at the IP address assigned to the device, but only get
Thank you.
Remove the calibrate section and then upload and watch what the voltage is when dry and then wet. Then apply those voltages to the calibration section
Thank you. I thought that it was probably something like that, but I was hoping that there was some way to display it so that the code only had to be rewritten once. Oh, well.
Is it possible with these soil moisture sensors to show both the voltage as well as the calculated percentage moisture?
I decided to add 2 capacitive sensors to an ESP32. They are still reporting voltage prior to setting the voltages in the linear calibration. Why does one of the sensors have a line without shading, while the second sensor has a shaded background?
see both chart , one is 1.5 to 3.0 and one is 2.55 to 2.70 so this is the reson
Thank you. I hadn’t noticed the difference in scale. The 2 sensors are on the same ESP32, so they were started at the same time. As I look at them now, after they have running for 3 weeks, they both have that “fuzziness,” and there aren’t any problems with the sensors.
Don’t get it. I’d just calibrated two sensors and these are the results:
100% wet (water or watered soil) → 0.28 V
0 % (dry soil or air) → 0.62 V
In my grow room with wet soil 0.78 V. This makes no sense.
//EDIT
Ok, found out that my sensors are light dependend. Here is a plot of the measured voltage under a light. With light on there is an offset of +0.2V and also there is more noise.
I give up. I have to ask you for help. I have spent hours trying to understand why. The ESP32 got connected easly, the capacitive soil moisture sensor works fine. When its connected and I measure the voltage on the analog pin and ground pin /with a meter/ - it shows changes (when in water and out). When I start collecting readings from sensor, its showing one and the same number - no change at all. When I disconnect the cable from the analog pin, the voltage changes, so suggests the pin is mapped correctly. So what is wrong?
The manual readings (when 5V supplied to the sensor) are between 1,2V and 2,6V. The max voltage shown by ESP32 is 1,088V. Is the analog pin limited to 1V readings?
ESP32V4-32D CH9102 / ESP32-WROOM-32D
[21:09:39][D][sensor:094]: 'Soil moisture voltage 1.1': Sending state 0.07500 V with 5 decimals of accuracy
[21:09:49][D][sensor:094]: 'Soil moisture voltage 1.1': Sending state 0.07500 V with 5 decimals of accuracy
[21:09:59][D][sensor:094]: 'Soil moisture voltage 1.1': Sending state 0.07500 V with 5 decimals of accuracy
[21:10:09][D][sensor:094]: 'Soil moisture voltage 1.1': Sending state 0.07500 V with 5 decimals of accuracy
(disconnected analog cable)
[21:10:19][D][sensor:094]: 'Soil moisture voltage 1.1': Sending state 1.08800 V with 5 decimals of accuracy
[21:10:29][D][sensor:094]: 'Soil moisture voltage 1.1': Sending state 1.08800 V with 5 decimals of accuracy
[21:10:39][D][sensor:094]: 'Soil moisture voltage 1.1': Sending state 1.08800 V with 5 decimals of accuracy
substitutions:
name: esphome-web-4b7c80
friendly_name: ESP32_1
esphome:
name: ${name}
friendly_name: ${friendly_name}
min_version: 2024.6.0
name_add_mac_suffix: false
project:
name: esphome.web
version: dev
esp32:
board: esp32dev
framework:
type: arduino
logger:
api:
ota:
- platform: esphome
improv_serial:
wifi:
ap: {}
captive_portal:
dashboard_import:
package_import_url: github://esphome/example-configs/esphome-web/esp32.yaml@main
import_full_config: true
esp32_improv:
authorizer: none
web_server:
port: 80
sensor:
- platform: adc
pin:
number: GPIO39
allow_other_uses: true
accuracy_decimals: 5
unit_of_measurement: '%'
filters:
- calibrate_linear:
- 0.32324 -> 100.0
- 0.69336 -> 0
name: "Soil moisture level 1.1"
update_interval: 300s
- platform: adc
pin:
number: GPIO39
allow_other_uses: true
accuracy_decimals: 5
name: "Soil moisture voltage 1.1"
update_interval: 10s
- platform: wifi_signal
name: "ESP32_1"
update_interval: 3600s
esp32_ble_tracker:
scan_parameters:
interval: 1100ms
window: 1100ms
active: true
bluetooth_proxy:
active: true
I have found my mistake… I have missed in my code: attenuation: auto