Hardware: add LiPo battery + power-path charger

BQ24075 (single-cell charger + power-path SYS): USB present -> powers
device + charges cell; USB absent -> battery takes over seamlessly.
System rail becomes SYS (~3.0-4.2V battery domain); existing converters
already accept it (3.3V is buck-boost RT6150B so survives sag). MAX17048
fuel gauge on I2C1 for SoC on OLED. Power budget updated (~200-400mA
from SYS, charge limited to ~500mA on USB 2.0). ~5-8h on a 1500-2000mAh
cell. Connection table, BOM, risks, build order updated.

NOTE: hardware/netlist.net still references +5V rails; needs the SYS/
BQ24075/BAT/MAX17048 nets added — regenerate on request.
This commit is contained in:
2026-08-21 17:27:22 +02:00
parent dfd79eb2e3
commit 2d9c201a12
+74 -44
View File
@@ -18,20 +18,16 @@ architecture this hardware serves.
## 1. Block diagram ## 1. Block diagram
``` ```
USB-C 5V ──┬── 3.3 V buck ── RP2040 + W25Q16 flash + RM2 module (CYW43439, BLE/WiFi) USB-C 5V ── BQ24075 (charger + power-path) ── SYS (~3.0-4.2 V)
│ │ │ │
│ ├── PIO0 SPI ── RM2 (CYW43439 gSPI, Pico-W pinout) LiPo cell (charge/discharge) ├── 3.3 V buck-boost ── RP2040 + flash + RM2
│ ├── USB DP/DM ── (USB-MIDI composite, CDC+MIDI) │ ├── +12 V boost ──┐
│ ├── UART0 ──── MIDI TRS in (6N138) / out │ ├── −12 V inverter┤ CV op-amps (±12 V) ── 4× stereo TRS
│ ├── I2C0 ───── Pimoroni RGB Keypad (buttons) MAX17048 fuel gauge (I2C) └── 4.096 V/2.048 V refs ── DAC ── diff-amp → ±10 V
│ ├── SPI0 ───── Pimoroni RGB Keypad (APA102 LEDs) │
│ ├── SPI1 ───── 8-ch 16-bit DAC (CV outs) RP2040: PIO0 SPI ── RM2 | USB DP/DM ── USB-MIDI composite | UART0 ── MIDI TRS
│ ├── I2C1 ───── 64×32 SSD1306 OLED I2C0 ── keypad | SPI0 ── keypad LEDs | SPI1 ── DAC | I2C1 ── OLED + fuel gauge
│ └── GPIOs ──── 4× tact buttons (UI) GPIOs ── 4× tact + charge-status LED
│
└── ±12 V rails (boost + inverter) ── CV op-amps ── 4× stereo TRS (8 CV/gate)
│
4.096 V ref ── DAC (0-4.096 V) ── op-amp gain ×4.88, offset −10 V ── ±10 V ── 1 k + bidir TVS ── TRS tip/ring
``` ```
## 2. RP2040 pin map ## 2. RP2040 pin map
@@ -56,17 +52,27 @@ driver and our firmware work unchanged) and our existing keypad wiring.
No conflicts; GP14/15 (USB) and GP23-25/29 (CYW43) kept clear of everything else. No conflicts; GP14/15 (USB) and GP23-25/29 (CYW43) kept clear of everything else.
## 3. Power tree (USB-only, with CV boost) ## 3. Power tree (USB + LiPo battery with power-path)
- USB-C 5 V → polyfuse + ESD → **VBUS_5V**. - USB-C 5 V → polyfuse + ESD → **VBUS_5V** → **BQ24075** charger/power-path IC.
- VBUS_5V → **3.3 V buck** (RT6150B-33GQW) → RP2040, RM2, flash, DAC VDD, - VBUS present → device runs from VBUS *and* charges the cell; SYS output
OLED, pull-ups. is the system rail.
- VBUS_5V → **+12 V boost** (TPS61088 + LC filter) → +12 V CV op-amp rail. - VBUS absent → battery powers SYS seamlessly (no glitch).
- VBUS_5V → **−12 V inverter** (TPS63700 + LC filter) → −12 V CV op-amp rail. - **SYS rail (~3.0-4.2 V)** — the battery-voltage domain, the new system input.
Both rails feed the bipolar CV op-amps. Low current (~20 mA each), LC-filtered. - SYS → **3.3 V buck-boost** (RT6150B-33GQW — already a buck-boost, so it
- **4.096 V reference** (REF3040AIDBZ) for the DAC, and a **2.048 V mid-ref** holds 3.3 V through the whole SYS range, including battery sag) → RP2040,
(buffered divider or REF2040) for the bipolar offset — NOT the 3.3 V rail RM2, flash, DAC VDD, OLED, pull-ups.
(too noisy for 1 V/oct pitch). - SYS → **+12 V boost** (TPS61088) → +12 V CV op-amp rail (input 3.0-4.2 V
when on battery is fine; just draws more current at low voltage).
- SYS → **−12 V inverter** (TPS63700) → −12 V CV op-amp rail.
- **4.096 V reference** (REF3040AIDBZ) and **2.048 V mid-ref** (REF2040) —
powered from +3V3 (post-buck, clean), NOT from SYS (sags with battery) or
the 3.3 V rail directly (too noisy for 1 V/oct pitch).
- **LiPo cell** (single, 3.7 V nominal, ~1500-2000 mAh, integrated protection
PCB) on BAT. Charge rate set by BQ24075 PROG pin (~500 mA to stay within USB
2.0; raise if using USB-C 1.5/3 A).
- **MAX17048 fuel gauge** (I2C1, shared with OLED) → battery state-of-charge
on the OLED + low-battery warning in firmware.
**Power budget (BLE-only):** we use Bluetooth only, never WiFi TX. The cyw43 **Power budget (BLE-only):** we use Bluetooth only, never WiFi TX. The cyw43
driver must load the WiFi firmware to bring up BT (BT-only init isn't supported driver must load the WiFi firmware to bring up BT (BT-only init isn't supported
@@ -79,17 +85,20 @@ yet), but WiFi never transmits → power stays at BLE levels, not WiFi-TX levels
| DAC8568 | ~2 mA | ~2 mA | | DAC8568 | ~2 mA | ~2 mA |
| OPA4192 ×2 (quiescent) | ~9 mA @±12 V | ~9 mA | | OPA4192 ×2 (quiescent) | ~9 mA @±12 V | ~9 mA |
| OLED SSD1306 | ~20 mA | ~40 mA | | OLED SSD1306 | ~20 mA | ~40 mA |
| ±12 V rails load (op-amps + DAC out) | ~20 mA @12 V → ~50 mA @5 V (×2 converters, ~85% eff) | ~60 mA @5 V | | ±12 V rails load | ~20 mA @±12 V → ~60 mA @SYS (×2 converters, ~80% eff) | ~75 mA @SYS |
| MIDI out LED (brief) | — | ~15 mA @3.3 V | | MIDI out LED (brief) | — | ~15 mA @3.3 V |
| **Total from 5 V** | **~180-230 mA** | **~330-380 mA** | | **System draw from SYS** | **~200-260 mA** | **~340-400 mA** |
Fits USB 2.0 (500 mA) with headroom; USB-C default (900 mA) is comfortable. Battery life: a 2000 mAh cell at ~250 mA avg → ~7-8 h (peak BLE + display); a
If WiFi TX were ever enabled, RM2 spikes to ~350 mA and the total approaches 1500 mAh cell → ~5-6 h. SYS sags to ~3.3 V at end of discharge, all converters
~650 mA — stay BLE-only or require a USB-C 1.5 A/3 A source. stay in regulation. When USB present, SYS = charge voltage (~4.2 V max); charge
current limited to ~500 mA by default to respect USB 2.0 (battery tops up in
~3-4 h for a 1500 mAh cell).
Rationale: USB-only power (single cable, no external PSU) while delivering Rationale: USB *or* battery operation via one power-path IC; the existing
bipolar ±10 V CV via two small low-current rails. The LC filters + dedicated converters already accept the SYS voltage range (buck-boost on 3.3 V is the key
Vref keep pitch clean. — a plain buck would drop out near end-of-discharge). BLE-only keeps the budget
comfortable; WiFi TX would push ~600 mA peak and halve battery life.
## 4. CV analog section (4 stereo = 8 channels, bipolar ±10 V) ## 4. CV analog section (4 stereo = 8 channels, bipolar ±10 V)
@@ -161,6 +170,9 @@ Host PCB responsibilities (from the RM2 datasheet):
| Mid-ref | REF2040AIDBZ (or buffered divider) | SOT-23 | 2.048 V bipolar offset reference | | Mid-ref | REF2040AIDBZ (or buffered divider) | SOT-23 | 2.048 V bipolar offset reference |
| Calib | 8× trimpot (e.g. 3296W) | THT/SMD | per-channel gain/offset trim | | Calib | 8× trimpot (e.g. 3296W) | THT/SMD | per-channel gain/offset trim |
| MIDI opto | 6N138 | DIP-8 / SMD | MIDI in isolation | | MIDI opto | 6N138 | DIP-8 / SMD | MIDI in isolation |
| Charger | BQ24075DRCR | MSOP-10 | single-cell LiPo charger + power-path (SYS pin) |
| Fuel gauge | MAX17048G+T10 | TDFN-8 (or bare module) | LiPo SoC over I2C1 (optional) |
| Battery | LiPo 3.7 V, 1500-2000 mAh | cell w/ protection PCB | integrated DW01/FS8205A protection |
| 3.3 V reg | RT6150B-33GQW | QFN | buck-boost, 800 mA, Pico-proven (TPS62A01 alt) | | 3.3 V reg | RT6150B-33GQW | QFN | buck-boost, 800 mA, Pico-proven (TPS62A01 alt) |
| +12 V boost | TPS61088 | QFN | 5→12 V, low-noise + LC filter | | +12 V boost | TPS61088 | QFN | 5→12 V, low-noise + LC filter |
| −12 V inverter | TPS63700 | SOT-23-6 / QFN | 5→−12 V, low-noise + LC filter (LM2611 alt) | | −12 V inverter | TPS63700 | SOT-23-6 / QFN | 5→−12 V, low-noise + LC filter (LM2611 alt) |
@@ -183,10 +195,19 @@ Host PCB responsibilities (from the RM2 datasheet):
3. **Custom RP2040 bring-up** — needs a SWD header + Picoprobe; USB bootloader 3. **Custom RP2040 bring-up** — needs a SWD header + Picoprobe; USB bootloader
only works after first flash. only works after first flash.
4. **64×32 OLED UI** — tight; menu must be paginated and minimal. 4. **64×32 OLED UI** — tight; menu must be paginated and minimal.
5. **Boost current budget** — RM2 TX spikes + 8 CV op-amps + two converters on 5. **Boost current budget** — RM2 TX spikes + 8 CV op-amps + two converters;
a single USB 5 V/500 mA port is tight; BLE-only keeps it ~330-380 mA peak BLE-only keeps the system draw ~340-400 mA peak from SYS, plus up to ~500 mA
(fits), but specify USB-C 5 V/900 mA for headroom. battery charge from USB → USB-C 5 V/900 mA-1.5 A recommended (USB 2.0 500 mA
6. **RM2 antenna keepout** — follow the datasheet keepout; the one layout only if charging paused or BLE-only/low charge rate).
6. **Battery sag at end-of-discharge** — SYS can sag to ~3.3 V; the 3.3 V path
must be a buck-boost (RT6150B is) or it drops out. Fuel gauge drives a
low-battery warning in firmware; cut off at ~3.3 V to protect the cell.
7. **Charge thermal** — BQ24075 thermal-regulates; keep it away from the CV
references / DAC and away from the LiPo for thermal separation.
8. **LiPo shipping / safety** — LiPo cells have shipping (UN3481) and safety
considerations; use a protected cell, add a charge LED, follow charge-IC
layout guidance.
9. **RM2 antenna keepout** — follow the datasheet keepout; the one layout
constraint the radio imposes. constraint the radio imposes.
## 10. Build order (hardware) ## 10. Build order (hardware)
@@ -194,7 +215,8 @@ Host PCB responsibilities (from the RM2 datasheet):
1. Schematic (this doc is the spec). 1. Schematic (this doc is the spec).
2. RM2 module footprint + antenna keepout. 2. RM2 module footprint + antenna keepout.
3. RP2040 + flash + USB + SWD. 3. RP2040 + flash + USB + SWD.
4. Power (3.3 V buck, +12 V boost, −12 V inverter, 4.096 V + 2.048 V refs). 4. Power (BQ24075 power-path + LiPo, 3.3 V buck-boost, +12 V boost,
−12 V inverter, 4.096 V + 2.048 V refs, MAX17048 fuel gauge).
5. CV analog (DAC + difference-amp + offset + trim + bidir protection + TRS). 5. CV analog (DAC + difference-amp + offset + trim + bidir protection + TRS).
6. MIDI TRS circuit. 6. MIDI TRS circuit.
7. OLED + buttons. 7. OLED + buttons.
@@ -222,6 +244,9 @@ at `hardware/netlist.net`.
| U8 | DAC8568 | 8-ch 16-bit SPI DAC | | U8 | DAC8568 | 8-ch 16-bit SPI DAC |
| U9, U10 | OPA4192 | quad RRO op-amp ×2 (8 CV channels) | | U9, U10 | OPA4192 | quad RRO op-amp ×2 (8 CV channels) |
| U11 | 6N138 | MIDI-in optocoupler | | U11 | 6N138 | MIDI-in optocoupler |
| U12 | BQ24075 | single-cell LiPo charger + power-path |
| U13 | MAX17048 | LiPo fuel gauge (I2C) |
| BAT1 | LiPo cell | ~1500-2000 mAh, integrated protection |
| DISP1 | SSD1306 | 64×32 OLED (I2C) | | DISP1 | SSD1306 | 64×32 OLED (I2C) |
| J1 | USB-C | 5 V + USB data | | J1 | USB-C | 5 V + USB data |
| J2 | 2×3 header | SWD (Picoprobe) | | J2 | 2×3 header | SWD (Picoprobe) |
@@ -234,16 +259,21 @@ at `hardware/netlist.net`.
| D1–D8 | bidirectional TVS | CV output protection | | D1–D8 | bidirectional TVS | CV output protection |
| R_cal1–R_cal8 | — | per-channel calibration (see §4) | | R_cal1–R_cal8 | — | per-channel calibration (see §4) |
### Power nets ### Power nets (with battery power-path)
``` ```
J1.VBUS ── FB1 ── +5V J1.VBUS ── FB1 ── VBUS_5V
+5V ── U3 (RT6150B-33) ── +3V3 VBUS_5V ── U12 (BQ24075 VBUS) ; USB input to charger/power-path
+5V ── U4 (TPS61088) + L1 LC ── +12V BAT1 ── U12 (BAT) ; LiPo cell
+5V ── U5 (TPS63700) + L2 LC ── −12V U12 (SYS) ── SYS rail (~3.0-4.2 V) ; system supply (USB or battery)
+3V3 ── U6 (REF3040) ── VREF4V096 SYS ── U3 (RT6150B-33) ── +3V3 ; buck-boost: holds 3.3 V across SYS range
SYS ── U4 (TPS61088) + L1 LC ── +12V
SYS ── U5 (TPS63700) + L2 LC ── −12V
+3V3 ── U6 (REF3040) ── VREF4V096 ; refs from clean +3V3, not saggy SYS
+3V3 ── U7 (REF2040) ── VMID2V048 +3V3 ── U7 (REF2040) ── VMID2V048
GND = J1.GND, all return paths U13 (MAX17048) SDA/SCL ── I2C1 (shared with OLED) ; fuel gauge
U12 (STAT) ── U1.GPIO16 ; charge status (→ LED + firmware)
GND = J1.GND, BAT1.GND, all return paths
``` ```
### RM2 radio (Pico-W-compatible gSPI) ### RM2 radio (Pico-W-compatible gSPI)