# Power System

## Decision: IP5389 Power Bank Board (Preliminary)

All-in-one power management PCB. Replaces separate charger module, BMS, and boost/buck converter with a single board.

## Why This Approach

| Requirement | IP5389 Solution |
|------------|-----------------|
| Charge lithium cells safely | Built-in CC/CV with cell balancing |
| Battery protection | Overcharge, overdischarge, short circuit, thermal |
| Output usable voltage | USB-C PD (5V, 9V, 12V, 15V, 20V) |
| Wall power input | USB-C input from any charger |
| Charge while using | Passthrough charging |
| Repairable | Bare PCB, cells are replaceable 18650s |

## How It Works

```
USB-C wall charger → IP5389 board → 18650 cells (3S or 3S2P)
                       ↓ (passthrough)
              USB-C PD output → OPi3B (5V) + peripherals
```

One board, one cell pack, one output cable to the SBC. No separate modules to wire together.

## Key Specs (varies by specific board)

- Cell config: 3S–6S (most common: 3S or 4S)
- Output: 45W–100W USB-C PD
- Input: USB-C (bidirectional port)
- Protection: overcharge, overdischarge, short circuit, thermal
- Price: $8–15 bare PCB

## OPi3B Power Context

The Orange Pi 3B draws ~3-5W under load (vs OPi5's ~8W), which simplifies the battery system:

- Lower peak current means the IP5389 board doesn't need to push its limits
- A smaller cell pack (3S vs 3S2P) may suffice
- Less heat generated, less thermal management needed
- The OPi3B's 5V/3A input spec is well within what a USB-C PD board can provide

## Cell Configuration

TBD — need to select specific board first. Likely 3S (3 cells in series) or 3S2P (6 cells, pairs in series). 3S2P with quality 3000mAh cells gives ~6000mAh at 11.1V nominal.

## Salvaged Battery: Not Usable

K501U battery (B31N1429, 4240mAh, 11.4V, 3S) assessed and rejected:
- Integrated BMS is paired to the laptop mainboard
- Most laptop BMS boards lock when removed from their system
- Not worth the effort to hack around
- Low capacity (4240mAh) doesn't justify the risk

## Alternative Approaches Considered

### Discrete Module Stack (TP5100 + 2S BMS + Buck Converter)
- Three separate modules, more wiring
- TP5100 charger (2S, 2A) + 2S 10A BMS + 5V/4A buck converter
- ~$10 in modules, works well but more complex assembly
- Backup plan if IP5389 board has issues

### Commercial Power Bank (decased)
- Buy a power bank, remove plastic shell, integrate bare PCB + cells
- Zero design work but constrained to whatever cell layout the bank uses
- Passthrough charging not guaranteed on all models

### UPS HAT (Waveshare / DFRobot)
- Designed for Raspberry Pi, works via USB output with OPi3B
- Premium price for unused GPIO header
- Capped at 5V output, no 12V rail without extra boost converter

## Safety Notes

- Always use 18650 cells with matching capacity and age in parallel pairs
- Fuse between board output and SBC (5A automotive blade fuse recommended)
- No puffy, warm-at-rest, or sub-2.5V cells — ever
- Match cell count to board specs (3S board = exactly 3S, don't mix)

## TODO

- [ ] Select specific IP5389 board model with verified reviews
- [ ] Confirm cell count (3S vs 3S2P)
- [ ] Verify passthrough charging on selected board
- [ ] Order board + cells
- [ ] Test charging and output before case integration
