Skip to content

Power Management

The Wireless Tracker supports multiple power sources with automatic switching.

Power ModeMinTypicalMaxUnit
Type-C USB (≥500mA)4.75.06.0V
Lithium battery (≥250mA)3.33.74.2V
5V pin (≥500mA)4.75.06.0V
3V3 pin (≥150mA)2.73.33.5V
OutputMax CurrentNotes
3.3V Pin500 mARegulated output
5V Pin500 mAUSB powered only
Vext Pin350 mAPowers TFT + GNSS
ModeUSB PowerBattery Power
Wi-Fi Scanning100 mA74 mA
Wi-Fi Access Point150 mA111 mA
Bluetooth Active102 mA75 mA
GNSS Active120 mA89 mA
LoRa TX @ 14 dBm200 mA148 mA
LoRa TX @ 17 dBm220 mA163 mA
LoRa TX @ 22 dBm240 mA178 mA
LoRa RX Only80 mA59 mA
Deep Sleep2 mA15 µA

The Wireless Tracker includes an integrated battery management system:

  • Charging: Automatic when USB connected with battery attached
  • Protection: Overcharge, over-discharge, short circuit
  • Switching: Automatic USB/battery source selection
  • Monitoring: Battery voltage readable via GPIO1 ADC
#define VBAT_ADC_PIN 1
#define VBAT_CTRL_PIN 2
float getBatteryVoltage() {
// Enable ADC voltage divider
pinMode(VBAT_CTRL_PIN, OUTPUT);
digitalWrite(VBAT_CTRL_PIN, LOW);
// Read ADC
int rawADC = analogRead(VBAT_ADC_PIN);
// Disable voltage divider to save power
digitalWrite(VBAT_CTRL_PIN, HIGH);
// Convert to voltage
// Formula: VBAT = ADC_Reading × (3.3V / 4095) × 4.9
float voltage = (rawADC / 4095.0) * 3.3 * 4.9;
return voltage;
}
int getBatteryPercent() {
float voltage = getBatteryVoltage();
// Simple linear approximation
// 4.2V = 100%, 3.3V = 0%
int percent = (int)((voltage - 3.3) / (4.2 - 3.3) * 100);
return constrain(percent, 0, 100);
}
VoltageStateApproximate %
4.20 VFull100%
4.00 VHigh80%
3.80 VMedium50%
3.60 VLow20%
3.40 VCritical5%
3.30 VCutoff0%

The ESP32-S3 supports ultra-low-power deep sleep mode:

#include "esp_sleep.h"
void enterDeepSleep(uint64_t sleepTimeUs) {
// Disable peripherals
digitalWrite(GNSS_PWR_PIN, LOW); // V1.1
digitalWrite(TFT_LED_PIN, LOW);
// Configure wakeup
esp_sleep_enable_timer_wakeup(sleepTimeUs);
// Optional: wakeup on button press
esp_sleep_enable_ext0_wakeup(GPIO_NUM_0, LOW);
// Enter deep sleep
esp_deep_sleep_start();
}
void setup() {
// Check wakeup reason
esp_sleep_wakeup_cause_t reason = esp_sleep_get_wakeup_cause();
switch (reason) {
case ESP_SLEEP_WAKEUP_TIMER:
Serial.println("Woke from timer");
break;
case ESP_SLEEP_WAKEUP_EXT0:
Serial.println("Woke from button");
break;
default:
Serial.println("Normal boot");
break;
}
}

For faster wake with moderate power savings:

void enterLightSleep(uint64_t sleepTimeUs) {
esp_sleep_enable_timer_wakeup(sleepTimeUs);
esp_light_sleep_start();
// Execution continues here after wakeup
}

GPIO3 controls the Vext rail that powers the TFT display and GNSS module:

#define VEXT_PIN 3
void enableVext() {
pinMode(VEXT_PIN, OUTPUT);
digitalWrite(VEXT_PIN, HIGH);
}
void disableVext() {
digitalWrite(VEXT_PIN, LOW);
}
#define TFT_LED 21
void setBacklight(bool on) {
digitalWrite(TFT_LED, on ? HIGH : LOW);
}
// PWM dimming (optional)
void setBacklightBrightness(uint8_t level) {
analogWrite(TFT_LED, level); // 0-255
}
  1. Disable unused peripherals: Turn off Wi-Fi, Bluetooth, GNSS when not needed
  2. Use deep sleep: 15µA vs 74mA is a 5000× improvement
  3. Reduce LoRa TX power: 14dBm uses 25% less current than 22dBm
  4. Lower GNSS update rate: 1Hz vs 10Hz reduces average current
  5. PWM the display: Dimming backlight saves significant power
  6. Batch operations: Wake, collect data, transmit, sleep