Hi @mattb1969 ,
Could you post your code to achieve ~ 110uA please? I am consistently getting ~ 550-600uA with a MKR zero using a Current Ranger. I started with the RTC example, tried both the rtc.standbyMode() and LowPower.deepSleep() calls : same result.
I am powering the board via a LiPo 3.7 V Batt on the batt. in JS2 connector with the Current Ranger in series.
I also call :
// detach USB so chip is asleep
USBDevice.detach();
and :
// Set digital pins to input to save on current drain
for (int i=0; i < 15; i++)
{
pinMode(i, INPUT_PULLUP);
}
#include <RTCZero.h>
#include <ArduinoLowPower.h>
/* Create an rtc object */
RTCZero rtc;
/* Change these values to set the current initial time */
const byte seconds = 0;
const byte minutes = 00;
const byte hours = 17;
/* Change these values to set the current initial date */
const byte day = 24;
const byte month = 11;
const byte year = 20;
void setup()
{
// Set digital pins to input to save on current drain
for (int i=0; i < 15; i++)
{
pinMode(i, INPUT_PULLUP);
}
pinMode(LED_BUILTIN, OUTPUT);
digitalWrite(LED_BUILTIN, LOW);
rtc.begin();
rtc.setTime(hours, minutes, seconds);
rtc.setDate(day, month, year);
rtc.setAlarmTime(17, 00, 20);
rtc.enableAlarm(rtc.MATCH_HHMMSS);
rtc.attachInterrupt(alarmMatch);
// detach USB so chip is asleep
USBDevice.detach();
rtc.standbyMode();
}
void loop()
{
//rtc.standbyMode(); // Sleep until next alarm match
LowPower.deepSleep();
}
void alarmMatch()
{
digitalWrite(LED_BUILTIN, HIGH);
USBDevice.attach();
}
Not sure why I am getting ~600uA with that. Any idea?
Thx.
L.