Follow up: Temperature/Rain Sensor

Problem I: Short lifetime of rain sensor

The rain sensor only worked for like 1 1/2 months. Due to the current flow and the contact with water, the rain sensor built rust from electrolysis that damages the sensor. There are a couple of things one could do about it. The best way probably would be to complete turn off the sensor while not measuring. However, this would mean a new hardware part. I’ve decided to try increasing the lifetime, by reducing the operating voltage from 5V to 3.3V. This should already help. I simply did that by using the 3.3v pin instead of the 5v pin.

Problem II Battery was draining fast

Probably the biggest mistake I did was using a powerbank and connecting it to the ESP via USB. USB is ok if you want to flash the ESP, but not a good choice if you want to power the ESP. Reason for that is it has to transform the 5v to 3.3v with an internal regulator which consumes power (and a lot of other reasons as well).
I’m now using 3 AA batteries (1,2V each => 3.6V which is perfect for the ESP) and connect them directly to the 3.3V and ground pin of the ESP. This way I get theoretically months of runtime with a single charge

Problem III external node service as backend

Let’s face it, writing a node service to have historic data is nice, but definitely an overkill. What if you want to show more data? What if you want to slice and dice the data differently? There are way better solutions out there. The one I’ve decided to use is InfluxDB.

InfluxDB Dashboard
InfluxDB Dashboard

Problem IV too many wires

To be fair, this is more like an estetic problem, but none the less it always bothered me. I got rid of the wires and used a prototype board to place the ESP as well as the rain sensor control board onto it. The connection is now done using jumper instead of wires, which makes the whole design more clean and robust.

ESP Backside
ESP Frontside



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store