Go Down

Topic: Power consumption in deep sleep (Read 1 time) previous topic - next topic

Halflifo

Is there anyone who tried to minimize the power consumption of the SAMD21 based arduinos?  I made it go in deep sleep, and I disable every possible RUNSTDBY bits I could find, but it still consumes 3 milliamps based on my multimeter while sleeping. That is a really high value, is it not? An other interesting detail is, that if I instert wire.begin in the startup code, the power consumtion drops (1,7mA).

Code: [Select]

void writeRegisters()
{
  SYSCTRL->XOSC32K.bit.RUNSTDBY=0;
  USB->HOST.CTRLA.bit.RUNSTDBY=0;
  SYSCTRL->OSC32K.bit.RUNSTDBY=0;
  SYSCTRL->OSC8M.bit.RUNSTDBY=0;
  SYSCTRL->DFLLCTRL.bit.RUNSTDBY=0; 
  SYSCTRL->DPLLCTRLA.bit.RUNSTDBY=0;
  SYSCTRL->BOD33.bit.RUNSTDBY=0;
  SYSCTRL->VREG.bit.RUNSTDBY=0;
  GCLK->GENCTRL.bit.RUNSTDBY=0;
  SYSCTRL->VREG.bit.RUNSTDBY=0;
  TCC0->CTRLA.bit.RUNSTDBY=0;
  SERCOM0->USART.CTRLA.bit.RUNSTDBY=0;
  SERCOM1->USART.CTRLA.bit.RUNSTDBY=0;
  SERCOM2->USART.CTRLA.bit.RUNSTDBY=0;
  SERCOM3->USART.CTRLA.bit.RUNSTDBY=0;
  SERCOM4->USART.CTRLA.bit.RUNSTDBY=0;
  SERCOM5->USART.CTRLA.bit.RUNSTDBY=0;
  SERCOM0->SPI.CTRLA.bit.RUNSTDBY=0;
  SERCOM1->SPI.CTRLA.bit.RUNSTDBY=0;
  SERCOM2->SPI.CTRLA.bit.RUNSTDBY=0;
  SERCOM3->SPI.CTRLA.bit.RUNSTDBY=0;
  SERCOM4->SPI.CTRLA.bit.RUNSTDBY=0;
  SERCOM5->SPI.CTRLA.bit.RUNSTDBY=0;
  ADC->CTRLA.bit.RUNSTDBY=0;
  DAC->CTRLA.bit.RUNSTDBY=0;
  AC->CTRLA.bit.RUNSTDBY=0;
  TCC0->CTRLA.bit.RUNSTDBY=0;
  TCC1->CTRLA.bit.RUNSTDBY=0;
  TCC2->CTRLA.bit.RUNSTDBY=0;
  USB->HOST.CTRLA.bit.RUNSTDBY=0;
  USB->DEVICE.CTRLA.bit.RUNSTDBY=0;
}


I also modified the RTC library to use the ultra low power internal 32k oscillator. Here is the startup code.

Code: [Select]

{
  delay(10000);                           
 
  for (int i=0; i<15; i++) pinMode(i, OUTPUT);
 
  Wire.begin();

 
  analogReference(AR_INTERNAL1V0);         
 
  rtc.begin();
  rtc.setTime(hours, minutes, seconds);
  rtc.setDate(day, month, year);
 
  rtc.setAlarmTime(00, 00, 20);           
 
  rtc.enableAlarm(rtc.MATCH_HHMMSS);     
  rtc.attachInterrupt(ISR);               
 
                   
  writeRegisters();                     
   SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;
  __WFI();                             
}

NeilE

Hi,

Just trying to clarify the antenna situation.

The spec says it has a 2db but then it also says you must use an external antenna.

Over short range 2db will be fine.

Do I actually HAVE to attach an external?

Thanks

MITEL

Hi,

Just trying to clarify the antenna situation.

The spec says it has a 2db but then it also says you must use an external antenna.

Over short range 2db will be fine.

Do I actually HAVE to attach an external?

Thanks
We are slightly OT.
There is no PCB antenna on board, so you need something external.
However, I received the MKR WAN already with an external antenna, it was in the package (I think it refers to it -a dipole). With the original antenna I was able to reach a gateway 27km far, so not bad at all (I suppose because the gateway has an excellent antenna).

NeilE

Thanks, and apologies for being OT (newbie error).

Just bought some Siretta Quad Band externals. Will report back on results.

NeilE

Hi Halflifo,

I have been experimenting with you register settings and found much the same result.

However if you leave PIN 11/12 as floating (i.e. dont set them to OUTPUT) my current drops to 1.16mA.

No idea why, just trial and error.

Can't seem to get better than that though. I suspect it is the muRata chip taking the power now rather than the SAMD.

Anyone managed to get below that yet?

sslupsky

@NeilE I have exactly the same current 1.16mA.  I also suspect the Murata firmware is not sleeping the module.  Other people using the Murata module with other firmware have reported sleep currents of 2uA for the module.

sslupsky

For others following this thread or the other threads on this forum related to deep sleep power consumption for the MKRWAN1300, there is a hardware problem with the current version of the MKRWAN1300 that prevents it from achieving a sleep current below 1.15mA.  Arduino has confirmed there will be a board revision that will correct the problem.

zuyang

For others following this thread or the other threads on this forum related to deep sleep power consumption for the MKRWAN1300, there is a hardware problem with the current version of the MKRWAN1300 that prevents it from achieving a sleep current below 1.15mA.  Arduino has confirmed there will be a board revision that will correct the problem.

Thanks for the update, looking forward to the hardware revision.

Also, I wonder where I can get the latest update on this issue.

NeilE

Hi,

Looking at the part number now showing on this website (Code: ABX00017-B) is this the new revised board? Or are we still waiting?

Thx

jchen747

Hi,

  I also have the same deep sleep current issue. I wonder if you fix it out?

  Also, when I put deep sleep code in the loop and use RTC to wake it up. The SAMD21 chip only wakes up for 1 time, then never wake up by RTC. Do you know what cause that?

Go Up