Hi there,
(I just started with some easy automation with Home Assistant) is there any way to have a calibration feature in Home Assistant for future calibration? These capacitive sensors run out of calibration really quickly… I was wondering about an easy way to calibrate them for the UI.
Thanks!
It looks like your sensor measures much lower voltage than 1.3 V for wet. How did you get your calibration? You can fix the range by using the following lambda, but you should fix your calibration first.
- lambda: |
if (x < 0) return 0;
else if (x > 100) return 100;
else return (x);
You forgot that the Wemos boards have an external converter to put the 0.0-1.0 V range and spread it between 0.0-3.3V of real voltage.
So you need first a multiply filter of 3.3.
Then there’s the question which voltage the sensor is running at: I gpt some of the 2.0 Version. They can either run at 3.3 V or 5 V. Depending on the supplied voltage for VCC on them they’ll likely have a different voltage at the analog output.
thanks a bunch this works for me using an esp32 and a capacitive soil moisture sensor. just had to remove all the stuff below attenuation line to get the raw readings to get my 0 and 100 values. I have a question about the filters - median : window_size: 7 send_every: 4 send_first_at: 1" first what do these values correspond to? is this a timing thing where it skips sending data? I am using my esp 32 in a constant power environment so it should not need to sleep or worry about updating too much.
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 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.
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. 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.