Hello everyone,
I’m currently testing deep sleep on my Xiao MG24. Right now I’m measuring around 1.9 µA on the BAT pin at 3.7 V, which seems perfectly fine. Every measurement was taken using a Power Profiler Kit 2, with nothing connected to the MG24.
However, as soon as I lower the voltage to 3.2 V or below, the current consumption suddenly jumps up to around 450 µA. I’m seeing the exact same behavior when powering the board directly through the 3.3 V pin.
I’m slowly running out of ideas and would really appreciate some advice. Most examples I’ve found here in the forum seem to test only with voltages around 3.7–3.8 V. That’s obviously fine, but since the board is designed for battery operation, I would expect it to work properly down to around 3.0 V without causing issues. Otherwise, you basically lose the last 25-30% of a LiPo battery’s capacity.
Once the voltage reaches around 3.3 V, the board drains the battery quickly due to the increased current consumption.
As far as I understand, the board uses a TPS62843 DC buck converter. From the datasheet, I would expect it to simply transition into pass-through mode as the input voltage approaches the output voltage, rather than causing such a large increase in power consumption.
So my question is: am I missing something here, or can someone confirm whether this is actually normal behavior? Alternatively, is there perhaps a hardware modification that would allow proper battery operation below 3.3 V?
For testing, I used the following code provided by user Citric:
#include "ArduinoLowPower.h"
#define CS_PIN PA6
#define CLK_PIN PA0
#define MOSI_PIN PB0
#define MISO_PIN PB1
#define READ_DATA 0x03
#define WRITE_ENABLE 0x06
#define PAGE_PROGRAM 0x02
#define SECTOR_ERASE 0x20
void sendSPI(byte data) {
for (int i = 0; i < 8; i++) {
digitalWrite(MOSI_PIN, data & 0x80);
data <<= 1;
digitalWrite(CLK_PIN, HIGH);
delayMicroseconds(1);
digitalWrite(CLK_PIN, LOW);
delayMicroseconds(1);
}
}
void writeEnable() {
digitalWrite(CS_PIN, LOW);
sendSPI(WRITE_ENABLE);
digitalWrite(CS_PIN, HIGH);
}
void setup()
{
//Serial.begin(115200);
pinMode(PA7, OUTPUT);
digitalWrite(PA7, LOW);
pinMode(CS_PIN, OUTPUT);
pinMode(CLK_PIN, OUTPUT);
pinMode(MOSI_PIN, OUTPUT);
pinMode(MISO_PIN, INPUT);
//SW
pinMode(PD3, OUTPUT);//VBAT
pinMode(PB5, OUTPUT);//RF_SW
pinMode(PD5, OUTPUT);//IMU
pinMode(PC8, OUTPUT);//MIC
pinMode(PA6, OUTPUT);//FLASH
digitalWrite(PD3, LOW); //VBAT
digitalWrite(PB5, LOW); //RF_SW
digitalWrite(PD5, LOW); //IMU
digitalWrite(PC8, LOW); //MIC
digitalWrite(PA6, HIGH); //FLASH
//Serial.println("Deep sleep timed wakeup");
writeEnable();
digitalWrite(CS_PIN, LOW);
sendSPI(0xB9);
digitalWrite(CS_PIN, HIGH);
}
void loop()
{
delay(10000);
digitalWrite(PA7, HIGH);
delay(500);
//Serial.printf("Going to deep sleep for 10s at %lu\n", millis());
// LowPower.idle(600000); //EM1 TIM wake-up
// LowPower.sleep(600000); //EM2 TIM wake-up
LowPower.deepSleep(600000); //EM4 TIM wake-up
}
I would be very grateful for any help or suggestions.