> ## Documentation Index
> Fetch the complete documentation index at: https://docs.researchanddesire.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Battery and Power

> Battery monitoring, charging, and power management for RADR

This guide covers RADR's battery system, charging, and power management features.

## Battery System

RADR uses a lithium battery with intelligent monitoring:

| Component          | Description            |
| ------------------ | ---------------------- |
| Battery Type       | Lithium Polymer (LiPo) |
| Fuel Gauge IC      | MAX17048               |
| Charging Port      | USB-C                  |
| Charging Indicator | Hardware LED           |

### MAX17048 Fuel Gauge

The MAX17048 is a precision fuel gauge that provides:

* **Battery Percentage** — Accurate state-of-charge reading (0–100%)
* **Battery Voltage** — Real-time voltage measurement
* **Low Battery Alerts** — Programmable threshold notifications

<Info>
  The fuel gauge uses proprietary algorithms to accurately estimate remaining battery life, compensating for factors like temperature and discharge rate.
</Info>

## Battery Indicator

The battery status is displayed in the status bar at the top of the screen:

| Level    | Approximate Range |
| -------- | ----------------- |
| Full     | 90–100%           |
| High     | 60–89%            |
| Medium   | 30–59%            |
| Low      | 10–29%            |
| Critical | 0–9%              |

<Warning>
  When battery reaches critical levels, save your session and charge RADR to avoid unexpected shutdown.
</Warning>

## Charging

### USB-C Charging

RADR charges via the USB-C port located at the top of the device, next to the power switch.

* Connect any standard USB-C cable
* Compatible with USB chargers, power banks, and computer USB ports
* Charging works while RADR is powered on or off

### Charging Indicator

A hardware LED indicates charging status:

| LED State | Meaning                        |
| --------- | ------------------------------ |
| LED On    | Charging in progress           |
| LED Off   | Fully charged or not connected |

<Note>
  The charging LED is separate from RADR's software-controlled RGB LEDs. It's controlled directly by the charging circuit.
</Note>

<Note>
  RADR relies on the hardware charging LED rather than software-based charging detection. This provides more accurate and reliable charging status indication.
</Note>

### Charging Tips

<Tip>
  For fastest charging, use a USB charger rated for 5V/1A or higher.
</Tip>

<Tip>
  You can use RADR while charging, but charging may take longer during active use.
</Tip>

## Power States

RADR has several power states:

### Active (Connected)

* Display on, backlight active
* Bluetooth connected to a device
* LEDs active
* Highest power consumption

### Active (Idle)

* Display on, backlight active
* Bluetooth scanning or in menu
* LEDs in idle pattern
* Medium power consumption

### Sleep Mode

* Display off, backlight off
* Bluetooth disabled
* LEDs off
* Very low power consumption
* GPIO wake enabled

### Power Off

* All systems off
* No power consumption
* Requires power switch to wake

## Deep Sleep Mode

Deep sleep provides significant power savings when you're not using RADR but want quick access later.

<Info>
  Technically, RADR uses "light sleep" mode internally rather than true deep sleep. This provides more reliable button wake-up while still achieving very low power consumption. The user experience is the same—the device appears off until a button is pressed.
</Info>

### Entering Sleep Mode

1. From the main menu, select **Sleep**
2. RADR performs the shutdown sequence:
   * Disconnects any connected devices
   * Plays the shutdown buzzer sound
   * Turns off the display backlight
   * Clears all LEDs
   * Enters deep sleep

### Wake Sources

The following buttons can wake RADR from deep sleep:

| Button              | GPIO    |
| ------------------- | ------- |
| Under-Screen Center | GPIO 39 |
| Under-Screen Left   | GPIO 38 |
| Under-Screen Right  | GPIO 40 |

Press any of these buttons to wake RADR. The device performs a full restart.

### Sleep vs Power Off

| Feature           | Sleep Mode       | Power Off    |
| ----------------- | ---------------- | ------------ |
| Power consumption | Very low         | None         |
| Wake time         | \~2 seconds      | \~5 seconds  |
| Wake method       | Button press     | Power switch |
| State preserved   | No               | No           |
| Use case          | Between sessions | Storage      |

<Tip>
  Use sleep mode during sessions with breaks. Use the power switch for extended storage.
</Tip>

## Power Management Tips

### Maximizing Battery Life

1. **Use sleep mode** — When taking breaks, put RADR to sleep instead of leaving it idle
2. **Lower brightness** — The display backlight is a significant power consumer
3. **Disconnect when done** — Active Bluetooth connections use more power
4. **Power off for storage** — Use the physical switch for extended storage

### Monitoring Battery Health

* Check battery percentage periodically in the status bar
* Charge before sessions to avoid mid-session interruptions
* Don't let the battery fully deplete frequently

### Charging Best Practices

* Use quality USB-C cables
* Charge in moderate temperatures (avoid extreme heat/cold)
* Any standard USB charger works (5V)
* Fully charge before first use

## Specifications

| Parameter          | Value              |
| ------------------ | ------------------ |
| Operating Voltage  | 3.3V (regulated)   |
| Charging Voltage   | 5V USB             |
| Deep Sleep Current | \< 100μA           |
| Active Current     | Varies by activity |

## Troubleshooting

<AccordionGroup>
  <Accordion title="Battery percentage seems inaccurate">
    * The fuel gauge may need calibration after extended storage
    * Fully charge, then fully discharge once to recalibrate
    * Battery readings stabilize after a few charge cycles
  </Accordion>

  <Accordion title="RADR won't charge">
    * Try a different USB-C cable
    * Try a different USB power source
    * Ensure the USB-C port is clean and undamaged
    * Check that the charging LED illuminates when connected
  </Accordion>

  <Accordion title="Battery drains quickly">
    * Check if you're leaving RADR in active/idle state
    * Use sleep mode when not actively controlling a device
    * Active Bluetooth connections consume more power
    * Older batteries may have reduced capacity
  </Accordion>

  <Accordion title="Won't wake from sleep">
    * Press and hold an under-screen button for 2-3 seconds
    * Try the power switch if buttons don't respond
    * Ensure the battery isn't completely depleted
  </Accordion>
</AccordionGroup>
