Unconsistent power consumption

Hello,

I got several MKR 1400 and I'm experiencing big differences between the boards regarding consumption. The setup includes an antenna and a 3000mAh LiPo battery. With a very simple code I managed to bring down the current under 4mA in one board using gsmAccess.shutdown() and LowPower.deepSleep(). But the same code with the same battery, antenna and current meter gives no less than 12.5mA. A third board consumes 15mA. Any idea what can be the problem?

I set digital pins from 0 to 7 as outputs as well as analago pins from A0 to A6. I used digitalWrite to set all of them to HIGH except for pin 6 to LOW (where the LED is).

void setup() {

pinMode( 0 , OUTPUT );
pinMode( 1 , OUTPUT );
pinMode( 2 , OUTPUT );
pinMode( 3 , OUTPUT );
pinMode( 4 , OUTPUT );
pinMode( 5 , OUTPUT );
pinMode( 6 , OUTPUT );
pinMode( 7 , OUTPUT );
pinMode( A0 , OUTPUT );
pinMode( A1 , OUTPUT );
pinMode( A2 , OUTPUT );
pinMode( A3 , OUTPUT );
pinMode( A4 , OUTPUT );
pinMode( A5 , OUTPUT );
pinMode( A6 , OUTPUT );

digitalWrite( 0 , HIGH );
digitalWrite( 1 , HIGH );
digitalWrite( 2 , HIGH );
digitalWrite( 3 , HIGH );
digitalWrite( 4 , HIGH );
digitalWrite( 5 , HIGH );
digitalWrite( 6 , LOW);
digitalWrite( 7 , HIGH );
digitalWrite( A0 , HIGH );
digitalWrite( A1 , HIGH );
digitalWrite( A2 , HIGH );
digitalWrite( A3 , HIGH );
digitalWrite( A4 , HIGH );
digitalWrite( A5 , HIGH );
digitalWrite( A6 , HIGH );

bool connected = false;
while (!connected) {
Serial.println(" connecting"); delay(1000);
if ( gsmAccess.begin(SECRET_PINNUMBER) == GSM_READY) Serial.println(" gsm connected");
if ((gsmAccess.begin(SECRET_PINNUMBER) == GSM_READY) &&
(gprs.attachGPRS(SECRET_GPRS_APN, SECRET_GPRS_LOGIN, SECRET_GPRS_PASSWORD) == GPRS_READY)) {
connected = true;
} else {
Serial.println("Not connected");
delay(1000);
}
}

delay(3000);
gsmAccess.shutdown();

delay(3000);
LowPower.deepSleep();

}

void loop() {
}

I wrote an email to arduino support and I’m still waiting for their reply. I paste here the contents, it provides more details on my setup.

I have 28 units of Arduino MKR 1400. The setup of the test was:

  • no electronics connected to the MKR
  • the multimeter was in series in the positive pin of the battery
  • the battery was the same for all tests, a 3000mAh LiPo battery with 3.9V
  • the SIM card was always the same
  • the results of consumption were consistent with the same unit, the same MKR was always consuming the same power
  • all the tests were performed the same day
  • the consumption was measured after >1 minute after reset to ensure that it was sleeping.

Results of the tests:

  • 3 MKR consumed 4mA
  • 8 MKR consumed 6mA
  • 4 MKR consumed 8mA
  • 9 MKR consumed 12mA
  • 4 MKR consumed 14mA

All units were brand new. I received them a couple of weeks ago. I could not find any differences between them, not even in the GPRS module firmware version nor the date displayed on the module. We are still puzzled.

sleepGSM.ino:

#include "Secrets.h"

#include <MKRGSM.h>
#include <ArduinoLowPower.h>


// initialize the library instance
GSMClient client;
GPRS gprs;
GSM gsmAccess;



char nodeId[] = "SMK02";
char messageBuffer[200];

void setup() {


  delay(4000);

  pinMode( 0 , OUTPUT );
  pinMode( 1 , OUTPUT );
  pinMode( 2 , OUTPUT );
  pinMode( 3 , OUTPUT );
  pinMode( 4 , OUTPUT );
  pinMode( 5 , OUTPUT );
  pinMode( 6 , OUTPUT );
  pinMode( 7 , OUTPUT );
  pinMode( A0 , OUTPUT );
  pinMode( A1 , OUTPUT );
  pinMode( A2 , OUTPUT );
  pinMode( A3 , OUTPUT );
  pinMode( A4 , OUTPUT );
  pinMode( A5 , OUTPUT );
  pinMode( A6 , OUTPUT );
  
  digitalWrite( 0 , HIGH );
  digitalWrite( 1 , HIGH );
  digitalWrite( 2 , HIGH );
  digitalWrite( 3 , HIGH );
  digitalWrite( 4 , HIGH );
  digitalWrite( 5 , HIGH );
  digitalWrite( 6 , LOW);
  digitalWrite( 7 , HIGH );
  digitalWrite( A0 , HIGH );
  digitalWrite( A1 , HIGH );
  digitalWrite( A2 , HIGH );
  digitalWrite( A3 , HIGH );
  digitalWrite( A4 , HIGH );
  digitalWrite( A5 , HIGH );
  digitalWrite( A6 , HIGH );


  bool connected = false;
  while (!connected) {
    Serial.println(" connecting"); delay(1000);
    if ( gsmAccess.begin(SECRET_PINNUMBER) == GSM_READY) Serial.println(" gsm accessed");
    if ((gsmAccess.begin(SECRET_PINNUMBER) == GSM_READY) &&
        (gprs.attachGPRS(SECRET_GPRS_APN, SECRET_GPRS_LOGIN, SECRET_GPRS_PASSWORD) == GPRS_READY)) {
      connected = true;
    } else {
      Serial.println("Not connected");
      delay(1000);
    }
  }

  delay(3000);
  gsmAccess.shutdown();

  delay(3000);
  LowPower.sleep();

}

void loop() { 


}

Secrets.h:

#define SECRET_PINNUMBER     "3047" //3047 8469
#define SECRET_GPRS_APN      "orangeworld" // replace your GPRS APN
#define SECRET_GPRS_LOGIN    ""    // replace with your GPRS login
#define SECRET_GPRS_PASSWORD "" // replace with your GPRS password

Photo of the setup

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.