LPTIM Timer- Counter on Sleep for Rain Gauge


#1

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


Sleep mode - counter during sleep
#2

I gave you a possible solution in this thread, before I saw this double post:


#3

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.


#4

The STM32F205 on the Electron/E Series does not have LPTIM. Only the STMF4xx and some other models do.

03%20AM