Hello,
I need your knowledge and expertise on an MKR NB 1500 board. Because of my limited ARM Cortex programming knowledge, I would appreciate the structured answers.
The idea of the project is simple, a battery-powered DAQ system that will read and save data every hour and send it once a day. All the other time should be in sleep mode with all peripherals off-powered (if that's possible). I don't need all these Arduino facilitations (USB, battery charger, LEDs, etc.).
With all these in mind, I have modified the board accordingly. I desoldered the BQ24195L IC and the unnecessary LEDs. I connected the AP2112K LDO directly with the battery and uploaded a basic code to put the MCU in deep sleep mode and measure the current.
#include <Arduino.h>
#include <ArduinoLowPower.h>
void setup()
{
delay(3000);
// I/O PINS INITIALIZATION
for (uint32_t i=21; i>=15; i--) {
pinMode(i, INPUT_PULLUP);
}
pinMode(14, INPUT_PULLDOWN);
pinMode(13, INPUT_PULLDOWN);
pinMode(10, INPUT_PULLUP); // SPI - MISO
pinMode(9, OUTPUT); // SPI - SCK
digitalWrite(9, LOW);
pinMode(8, OUTPUT); // SPI - MOSI
digitalWrite(8, LOW);
pinMode(7, INPUT_PULLUP);
pinMode(6, OUTPUT); // BUILT_IN LED
digitalWrite(6, LOW);
pinMode(5, INPUT_PULLUP);
pinMode(4, INPUT_PULLUP);
pinMode(3, INPUT_PULLUP);
pinMode(2, INPUT_PULLUP);
pinMode(1, INPUT_PULLUP);
pinMode(0, INPUT_PULLUP);
pinMode(SARA_PWR_ON, OUTPUT);
digitalWrite(SARA_PWR_ON, LOW);
}
void loop() {
LowPower.deepSleep();
}
So, the power consumption has dropped to around 0,58 mA, which is too high relative to the MKR Zero's 123 uA using the same code. I have read all the datasheets and the sum of average power consumption should be way less.
What do you think it's going on, and what can I do to reduce the power consumption?