I have setup a Sparkfun weather station. It is all working fine except for the tipping bucket rain gauge. It is connected to GPIO 25. The problem is the tipping bucket increments every hour or so even if the tipping bucket is disconnected (open Circuit).
I have found if I turn the power pack “off” and “on” the tipping bucket increments by 1 unit. I have changed power packs and even used a high quality regulated power supply with the same result. I have pin 25 dropped low with a 10k resistor to ground. In the arduino setup I have pin 25 set as an input.
When it is running on the Lipo battery with the USB connected it works perfectly with no incrementing on that pin.
I was thinking of disregarding the USB completely and just using the Lipo battery by connecting it directly to the 3V3 and GND on the ESP32. I could then use a a breakout board to charge the Lipo battery.
No need for a circuit diagram as it is very simple.
Pin 25 on the ESP32 Thing Plus is pulled low with 10k resistor to ground. The tipping bucket reed switch is connected to the top of the 10k resistor (pin25) and to 3V3.
I am wondering if it is being spiked when the LIPO battery is being charged from the ESP32 as it seems to occur more often at that time. When the LIPO was fully charged it only happened once in a 24 hour period.
Just a suggestion.
But have your considered switching GND rather than VCC through the tipping bucket.
10K pulldown is a pretty weak pulldown.
It would only require a small amount of current to trigger a change.
The triggering could just be noise in the power supply which would not happen using a LiPo.
The datasheet shows a 100K pullup with a 10pf cap to GND.