I work in a Remote Rain Gauge Project.A switch produces pulses (mm of rain). I develop a code for the Electrón using a interrupt in D2 pin and send the data every 15 minutes.
I need to improve the battery life, the STM32 micro have a LPTIM(low power timer ) would be used to count external pulses in sleep mode.
I looking for some code in particle comunnity without exit.
I realy apprecciate any help.
Thanks in advance
I gave you a possible solution in this thread, before I saw this double post:
For an Electron w/ tipping bucket rain gauge:
Stop mode (pin + time with SLEEP_NETWORK_STANDBY) = 6 mA
Stop mode (pin + time) = 3 mA
You can normally sleep @ 3 mA, and then switch to NETWORK_STANDBY during the rain event (interrupt starts firing).
After the rain event is over, go back to (pin + time) @ 3mA.
If you need lower current than that for the Electron, I believe an external counter is best.
1 Like
The STM32F205 on the Electron/E Series does not have LPTIM. Only the STMF4xx and some other models do.
1 Like