Close

Rain Gauge 'Memory Block' Implementation

A project log for Low Power High Accuracy Weather Station

'Professional' wind instruments are mounted high on a pole in an exposed location with LoRa data transmission

Tegwyn☠TwmffatTegwyn☠Twmffat 04/30/2019 at 12:020 Comments

After a bit of head scratching, I realised I'd need to charge the capacitor from another pin via a diode or else when the pin goes low again, the charge will be lost back to the MCU. I was also worried that the act of reading the capacitor using the analogRead() function would also discharge the device and it took a bit of trial and error to select a capacitor that was big enough such that it did not discharge too quickly. In an ideal world it would not discharge at all, until it rains, of course.

The other thing that caused slight confusion was the 'sharp' saw tooth pattern on the 'scope until I realised that the same thing was happening - the 'scope probe was also absorbing charge from the capacitor:

The two low flat spots in the graph above show where I tested the rain gauge. It works!
Since the capacitor selected is 10 micro Farads, the energy wasted can be calculated:
Energy Stored in a Capacitor formula - RF Cafe... and the average power, and average current = 3.2 uA ....... Nothing to worry about! It's probably more like 1.0 uA due to the fact that the capacitor does not discharge to zero unless it rains.

Discussions