I’m trying to achieve minimal power consumption in Deep Sleep mode on AMB82-Mini (RTL8735BDM), but I’m getting **70 mA (0.07A)** instead of the expected **~4.6 mA** according to the official documentation.
**Hardware:**
- Board: AMB82-MINI (Seeed Studio)
- Chip: RTL8735BDM
- Power supply: USB (5V)
**Expected consumption (from official docs):**
- RTL8735B module isolated: 32.78 µA
- AMB82-MINI board (5V on V_USB): ~4.6 mA
- AMB82-MINI board (USB): >10 mA
**Actual consumption:**
- Deep Sleep mode: **70 mA** (measured via USB)
## Test Results
### Visual Test (LED Indicator)
I added a green LED test to verify Deep Sleep activation:
**Behavior:**
1.
Green LED blinks for 5 seconds before Deep Sleep
2.
Green LED **completely turns off** when entering Deep Sleep
3.
System wakes up after 60 seconds (LED blinks again)
**Conclusion:** Deep Sleep **IS WORKING** - the LED test confirms it.
### Power Consumption Measurements
**Measurement method:**
- Ammeter connected in series with USB power supply
- Board powered via USB (5V)
**Results:**
- Normal mode: ~200-500 mA
- Deep Sleep mode: **70 mA** (stable, doesn’t change)
**Problem:** 70 mA is much higher than expected 4.6 mA.
## Code
Here’s the current firmware:
```cpp
/*
* Deep Sleep test with LED indicator
* Based on official PowerMode examples
*/
#include “PowerMode.h”
#include <WiFi.h>
// Wake up by AON Timer
#define WAKEUP_SOURCE 0 // AON Timer
// AON Timer settings
#define CLOCK 0 // 0: 100kHz (minimum consumption), 1: 4MHz
#define SLEEP_DURATION 60 // seconds
uint32_t PM_AONtimer_setting[2] = {CLOCK, SLEEP_DURATION};
#define WAKUPE_SETTING (uint32_t)(PM_AONtimer_setting)
void setup() {
Serial.begin(115200);
delay(2000);
Serial.println(“\n========================================”);
Serial.println(“DEEP SLEEP TEST”);
Serial.println(“========================================\n”);
*// Configure green LED for test*
pinMode(LED_G, OUTPUT);
digitalWrite(LED_G, LOW);
Serial.println(“[LOG] LED test: green LED will blink before Deep Sleep”);
Serial.println(“[LOG] In Deep Sleep, LED should completely turn off”);
Serial.println(“[LOG] Disabling all peripherals…”);
*// 1. Disable WiFi*
WiFi.disconnect();
delay(100);
Serial.println(“[LOG] Peripherals disabled”);
Serial.println(“[LOG] CLOCK = 0 (100kHz)”);
Serial.println(“[LOG] SLEEP_DURATION = 60 sec”);
Serial.println(“\n[LOG] Normal mode - measure consumption”);
Serial.println(“[LOG] Green LED blinking - this is normal mode”);
Serial.println(“[LOG] Waiting 5 seconds before Deep Sleep…”);
*// Blink green LED before Deep Sleep*
for (int i = 5; i > 0; i–) {
Serial.print("[LOG] Remaining: ");
Serial.print(i);
Serial.println(" sec");
*// Blink LED: 3 times quickly*
for (int blink = 0; blink < 3; blink++) {
digitalWrite(LED_G, HIGH);
delay(100);
digitalWrite(LED_G, LOW);
delay(100);
}
delay(700); // Rest of the second
}
Serial.println(“\n[LOG] Final blink before Deep Sleep…”);
*// Final blink: 5 times quickly*
for (int i = 0; i < 5; i++) {
digitalWrite(LED_G, HIGH);
delay(150);
digitalWrite(LED_G, LOW);
delay(150);
}
*// Turn off LED before Deep Sleep*
digitalWrite(LED_G, LOW);
delay(200);
Serial.println(“\n[LOG] === ENTERING DEEP SLEEP ===”);
Serial.println(“[LOG] Green LED should COMPLETELY TURN OFF now!”);
Serial.flush();
delay(500);
*// Initialize Deep Sleep (correct syntax: 3 parameters)*
Serial.println(“[LOG] Initializing PowerMode…”);
PowerMode.begin(DEEPSLEEP_MODE, WAKEUP_SOURCE, WAKUPE_SETTING);
Serial.println(“[LOG] PowerMode.begin() completed”);
Serial.flush();
delay(500);
Serial.println(“[LOG] Calling PowerMode.start()…”);
Serial.println(“[LOG] If Deep Sleep works:”);
Serial.println(" - Green LED will TURN OFF");
Serial.println(" - No more logs for 60 sec");
Serial.flush();
delay(1000);
*// Disable Serial before Deep Sleep*
Serial.end();
delay(200);
*// Enter Deep Sleep*
*// In Deep Sleep, LED should completely turn off*
PowerMode.start();
*// If Deep Sleep didn't work, code will continue*
delay(3000);
Serial.begin(115200);
delay(1000);
Serial.println(“\n[ERROR] Deep Sleep DID NOT WORK!”);
Serial.println(“[ERROR] Green LED still on - Deep Sleep not working!”);
Serial.println(“[ERROR] Consumption will be ~70-100 mA instead of ~4.6 mA”);
Serial.println(“[ERROR] Check logs above for diagnostics”);
*// If Deep Sleep didn't work - LED will be on*
digitalWrite(LED_G, HIGH);
}
void loop() {
*// If Deep Sleep worked, code will start from setup() after wakeup*
*// If not - this loop will execute*
static bool error_logged = false;
if (!error_logged) {
Serial.println(“[ERROR] loop() executing - Deep Sleep didn’t work”);
Serial.println(“[ERROR] Green LED blinking - Deep Sleep NOT working!”);
error_logged = true;
}
*// Blink LED if Deep Sleep didn't work*
digitalWrite(LED_G, HIGH);
delay(500);
digitalWrite(LED_G, LOW);
delay(500);
}
```
## What I’ve Tried
1.
Used correct `PowerMode.begin()` syntax (3 parameters, as in official examples)
2.
Set `CLOCK = 0` (100kHz for minimum consumption)
3.
Disabled WiFi before Deep Sleep
4.
Added LED test - confirms Deep Sleep is working
5.
Proper sequence: `begin()` → `flush()` → `end()` → `start()`
6.
Removed GPIO configuration (was causing issues)
## Analysis
### Why 70 mA instead of 4.6 mA?
**Possible causes:**
1. **USB power supply measurement:**
- USB-to-Serial converter (CH340) remains active: ~20-30 mA
- Voltage regulators: ~5-10 mA
- Power LED: ~1-2 mA
- Other board components: ~5-10 mA
- **Module in Deep Sleep:** ~4.6 mA
- **Total:** ~35-55 mA from board components + 4.6 mA module ≈ 70 mA
2. **Board components not powering down:**
- USB controller stays active when powered via USB
- Voltage regulators have quiescent current
- Power LED is always on
3. **Measurement point:**
- Measuring through USB includes all USB-related components
- Need to measure at VCC pin (3.3V direct) for accurate reading
## Question
**Is 70 mA consumption normal for Deep Sleep when powered via USB?**
**Or is there a way to reduce it further?**
**According to the documentation:**
- Module isolated: 32.78 µA
- Board with 5V on V_USB: ~4.6 mA
- Board with USB: >10 mA (but doesn’t specify exact value)
**My measurement shows 70 mA** - is this expected for USB power, or is there something wrong?
**For battery operation, should I:**
1. Use external 3.3V power on VCC pin (not V_USB)?
2. Accept that USB power will always consume ~70 mA in Deep Sleep?
3. Is there a way to disable USB components programmatically?
## Additional Information
- **Arduino SDK version:** 4.0.9
- **Board package:** realtek:AmebaPro2:Ameba_AMB82-MINI
- **PowerMode library:** Included in board package
- **Measurement tool:** Digital ammeter in series with USB power
## Expected vs Actual
| Mode | Expected (docs) | Actual (measured) | Status |
|------|----------------|-------------------|--------|
| Normal | ~53-55 mA | ~200-500 mA |
Normal (depends on activity) |
| Deep Sleep (USB) | >10 mA (not specified) | **70 mA** |
Is this normal? |
| Deep Sleep (VCC 3.3V) | ~4.6 mA | Not tested |
Need to test |
## Request for Help
1. **Is 70 mA normal for Deep Sleep with USB power?**
2. **How to achieve <10 mA in Deep Sleep?**
3. **Should I use external 3.3V power on VCC pin for battery operation?**
4. **Is there a way to disable USB controller programmatically?**
Thank you for your help!