Rain Gauge creates stupid values

Hi all,

I bought a simple rain gaguge at AliExpress which most of you probably already know:
https://de.aliexpress.com/item/1000001838878.html

I have connected the device (green) to GPIO35 of my ESP32 and (red) to GND.
For configuration I have used exactly the code like provided in the other

I’ve also tried to use a sum up function like described here:

Especially the sum up function shows a linear rising value oder the day with values which would cause me to buy a boat rather than a Christmas tree…

It seems that the sensor always report similar values. The following values are recorded with the code from the first link here from the forum:
device/sensor/rainfall/state 1101.73
device/sensor/rainfall/state 1101.73
device/sensor/rainfall/state 1101.37
device/sensor/rainfall/state 1101.00
device/sensor/rainfall/state 1101.37

Any idea which can cause such issues?

I think what’s happening here is that the pin you chose does not actually have an internal pull-up resistor, but a pull-up resistor is crucial for this wiring to work. So, either use a different pin, or add an external pull-up resistor (see here for suitable pins: ESP32 Pinout Reference: Which GPIO pins should you use? | Random Nerd Tutorials).

2 Likes

That should generate a visible error in ESPHome too.

Untitled

Thank you very much for your hints. I have attached a 4,7K pullup and so war it did not rain and the value is 0.0.
I’m wondering on one thing: I have the same setup for a wind speed pulse input on GPIO34. There I did not see any issue (yet) …