Adafruit M0 Feather with RFM95 - Expected Power Consumption

Hi

I’m currently using the Adafruit M0 Feather with the inbuilt RFM95 Radio.

I am trying to keep the power as low as possible but I think my draw is quite a bit higher than should be expected. Basically, I am putting the SAMD21 chip into deep sleep and putting the LoRa to sleep but getting around 0.75milliamps consumption.

I think I should be getting about a tenth of this consumption but perhaps I am mistaken.

I am using the following code:

#include <LoRa.h>

// PINS //
#define CS_M0  8
#define RST_M0 4
#define INT_M0 3

const int FREQ = 915E6;

void setupRadio()
{
  LoRa.setPins( CS_M0, RST_M0, INT_M0);
  while (!LoRa.begin(FREQ)) {
 
  }
 
}


// the below is widely used to put SAMD21 chips to sleep
void mySleep()
{
bool restoreUSBDevice = false;
  if (SERIAL_PORT_USBVIRTUAL) {
USBDevice.standby();
  } else {
USBDevice.detach();
restoreUSBDevice = true;
  }
  // Disable systick interrupt:  See https://www.avrfreaks.net/forum/samd21-samd21e16b-sporadically-locks-and-does-not-wake-standby-sleep-mode
  SysTick->CTRL &= ~SysTick_CTRL_TICKINT_Msk;
  SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;
  __DSB();
  __WFI();
  // Enable systick interrupt
  SysTick->CTRL |= SysTick_CTRL_TICKINT_Msk; 
  if (restoreUSBDevice) {
USBDevice.attach();
  }
}

void setup() {

  setupRadio();
  delay(3000);
  LoRa.sleep(); // put the radio to sleep = 14ma
  delay(3000);
  mySleep(); // put the cpu to sleep = 0.75ma
}

void loop() {
  // put your main code here, to run repeatedly:

}

Any tips much appreciated.

Thanks

If I had one of these boards I would be asking the question in the Adafruit forums …

Will you be using this board on TTN ?

I did but they had no answer so I thought I would ask here.

Are there any other components that need to be turned off before sleeping the SAMD?

But I never said that, as we only talk about LoRaWAN on TTN here. Good luck.

I have the impression that adafruit sells convenience instead of “performance” (deep sleep).

The best with 32u4 is 0.15mA which is pathetic. Now I am at 7μA but without led, charging and with better LDO. All of their products have LDO not suitable for deep sleep, even the accelerometers!

Probably LDO and charging IC is your problem. Desolder them, or go to a different solution.

solved (well pretty much)!

stupid error by me - forgot to turn off the inbuilt LED. who knew LEDs used so much power!

now down to 80μA which im happy with.

1 Like

Hi Tjh1989uk, Could you please tell me which LoRa library are you using? I am using the “Radiohead library/ <RH_RF95.h>” from Adafruit and see that the command “LoRa.sleep” cannot help reduce the current draws.

Thats a LoRa point to point library.

Only support for TTN\LoRaWAN is provided in here.

If your having problems with the RadioHead library a better place to seek support might be the Arduino forums.