Power saving sketch with interrupt based sensors Mbili/LoRa

Hi,

We have been testing the Mbili (rn2483) together with TTN a lot but we want to have a more power efficient sketch which runs based on sensor interrupts.

Our experience is that an Mibili cannot run for years on a battery when using interval based sensor readings. The approach would be to sleep and only wakeup when a reading changes (open/close sensor).

Does anyone have a sample that is super power efficient?

I have an example here which enters sleep mode and uses and interrupt from the RTC to wake once a minute:

For it to work, you will have to ensure that the solder jumper SJ8 has been closed.

You can adapt this example to work with other interrupts (from external sensors etc) by changing the pin that the interrupt is attached to (the RTC is on pin A7).

I get an error
‘EveryMinute’ was not declared in this scope

I use the RTCtimer from Sodaq

That constant is defined in Sodaq_DS3231.h (the library for the clock). If you have this library already, please make sure that it is up to date. You will also need the Sodaq_PcInt library. The RTCTimer is a library for scheduling tasks.

Some of these are already available through the Arduino library manager.
For the rest, you can find the most up to date versions here:

tnx, removed the old library.
What is the minimum current use?
I cannot get below 500 micro A with this example

At the moment I can’t seem to get a good reading from the board I have.

However, I had some notes written down from early last year.
The Mbili with the ADC disabled was running at about 410 microamps.
The ADC disable saves about 80 microamps.
You can reduce this by another ~20 by disabling the brown out detection.

Having an SD card inserted seems to add an additional 200 microamps.

There is the possibility of reducing the standby current further by disabling
certain modules on the CPU.