Archive STM32 firmware to legacy/stm32/: - src/, include/, lib/USB_CDC/, platformio.ini, test stubs, flash_firmware.py - test/test_battery_adc.c, test_hw_button.c, test_pid_schedule.c, test_vesc_can.c, test_can_watchdog.c - USB_CDC_BUG.md Rename: stm32_protocol → esp32_protocol, mamba_protocol → balance_protocol, stm32_cmd_node → esp32_cmd_node, stm32_cmd_params → esp32_cmd_params, stm32_cmd.launch.py → esp32_cmd.launch.py, test_stm32_protocol → test_esp32_protocol, test_stm32_cmd_node → test_esp32_cmd_node Content cleanup across all files: - Mamba F722S → ESP32-S3 BALANCE - BlackPill → ESP32-S3 IO - STM32F722/F7xx → ESP32-S3 - stm32Mode/Version/Port → esp32Mode/Version/Port - STM32 State/Mode labels → ESP32 State/Mode - Jetson Nano → Jetson Orin Nano Super - /dev/stm32 → /dev/esp32 - stm32_bridge → esp32_bridge - STM32 HAL → ESP-IDF docs/SALTYLAB.md: - Update "Drone FC Details" to describe ESP32-S3 BALANCE board (Waveshare ESP32-S3 Touch LCD 1.28) - Replace verbose "Self-Balancing Control" STM32 section with brief note pointing to SAUL-TEE-SYSTEM-REFERENCE.md TEAM.md: Update Embedded Firmware Engineer role to ESP32-S3 / ESP-IDF No new functionality — cleanup only. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
209 lines
6.4 KiB
Markdown
209 lines
6.4 KiB
Markdown
# Jetson Orin Nano Super Power Budget Analysis
|
||
## Self-Balancing Robot — 25W Envelope
|
||
|
||
Last updated: 2026-02-28
|
||
Target: Operate within 25W SoC power envelope (MAXN 25W mode)
|
||
|
||
---
|
||
|
||
## Power Modes
|
||
|
||
Jetson Orin Nano Super supports multiple NVPModel power modes:
|
||
|
||
| Mode | ID | CPU | GPU | TDP |
|
||
|------|-----|-----|-----|-----|
|
||
| **MAXN** | 0 | 6× A78AE @ 1.5GHz | 1024-core Ampere | **25W** |
|
||
| 15W | 1 | 6× A78AE @ 1.2GHz | 1024-core Ampere | 15W |
|
||
| 10W | 2 | 4× A78AE @ 1.2GHz | 1024-core Ampere | 10W |
|
||
| 7W | 3 | 4× A78AE @ 0.8GHz | 1024-core Ampere | 7W |
|
||
|
||
For this robot, we target **MAXN 25W mode** — a significant upgrade from the previous Nano 10W budget.
|
||
|
||
```bash
|
||
# Check current mode
|
||
sudo nvpmodel -q
|
||
|
||
# Set 25W MAXN mode
|
||
sudo nvpmodel -m 0
|
||
|
||
# Set 15W mode (thermal / battery save)
|
||
sudo nvpmodel -m 1
|
||
|
||
# Monitor power in real time
|
||
sudo tegrastats
|
||
# or via jtop
|
||
sudo jtop
|
||
```
|
||
|
||
---
|
||
|
||
## Component Power Budget
|
||
|
||
### SoC (Jetson Orin Nano Super Module)
|
||
|
||
| Component | Idle (W) | Load (W) | Peak (W) | Notes |
|
||
|-----------|----------|----------|----------|-------|
|
||
| CPU (6× A78AE) | 1.5 | 6.0 | 8.0 | ROS2, SLAM, Nav2 |
|
||
| GPU (1024-core Ampere) | 0.8 | 5.0 | 7.0 | Depth processing, DNN inference |
|
||
| LPDDR5 RAM (8GB) | 0.4 | 0.8 | 1.0 | |
|
||
| NVMe SSD (M.2) | 0.2 | 0.5 | 0.8 | Map storage, rosbags |
|
||
| Video encoder / ISP | 0.0 | 1.5 | 2.5 | 4× IMX219 ISP processing |
|
||
| **SoC Subtotal** | **2.9** | **13.8** | **19.3** | |
|
||
|
||
### Peripherals
|
||
|
||
| Peripheral | Idle (W) | Active (W) | Peak (W) | Interface | Notes |
|
||
|-----------|----------|------------|----------|-----------|-------|
|
||
| RealSense D435i | 0.3 | 1.5 | 3.5 | USB 3.1 | Peak during boot/init |
|
||
| RPLIDAR A1M8 | 0.4 | 2.6 | 3.0 | USB (UART adapter) | Motor spinning |
|
||
<<<<<<< HEAD
|
||
| ESP32 bridge | 0.0 | 0.0 | 0.0 | USB CDC | Self-powered from robot 5V |
|
||
=======
|
||
| ESP32-S3 bridge | 0.0 | 0.0 | 0.0 | USB Serial (CH343) | Self-powered from robot 5V |
|
||
>>>>>>> 291dd68 (feat: remove all STM32/Mamba/BlackPill references — ESP32-S3 only)
|
||
| 4× IMX219 cameras | 0.2 | 2.0 | 2.4 | MIPI CSI-2 | ~0.5W per camera active |
|
||
| **Peripheral Subtotal** | **0.9** | **6.1** | **8.9** | | |
|
||
|
||
### Total System (from Jetson 5V barrel jack)
|
||
|
||
| Scenario | SoC (W) | Peripherals (W) | **Total (W)** | Margin vs 25W |
|
||
|----------|---------|-----------------|---------------|----------------|
|
||
| Idle | 2.9 | 0.9 | **3.8** | +21.2W |
|
||
| Nominal (SLAM + cameras) | 13.8 | 6.1 | **19.9** | **+5.1W ✅** |
|
||
| Peak (DNN + all sensors) | 19.3 | 8.9 | **28.2** | **-3.2W ⚠️** |
|
||
|
||
---
|
||
|
||
## Budget Analysis vs Previous Platform
|
||
|
||
| Metric | Jetson Orin Nano Super | Jetson Orin Nano Super |
|
||
|--------|------------|------------------------|
|
||
| TDP | 10W | 25W |
|
||
| CPU | 4× Cortex-A57 @ 1.43GHz | 6× A78AE @ 1.5GHz |
|
||
| GPU | 128-core Maxwell | 1024-core Ampere |
|
||
| RAM | 4GB LPDDR4 | 8GB LPDDR5 |
|
||
| AI TOPS | ~0.5 | 67 |
|
||
| Nominal load | 11.4W (over budget) | 19.9W (5W headroom) |
|
||
| Cameras | 0 CSI | 4× IMX219 CSI |
|
||
| Storage | microSD | NVMe M.2 |
|
||
|
||
**The Orin Nano Super has 2.5× more thermal headroom at nominal load.** No aggressive power-gating needed for normal operation.
|
||
|
||
---
|
||
|
||
## Power Compliance Strategy
|
||
|
||
### Nominal Operation (SLAM + cameras) — ✅ Within 25W
|
||
|
||
At 19.9W nominal, we have 5W headroom. No mitigation required for normal robot operation.
|
||
|
||
### Peak Operation (DNN inference) — ⚠️ Briefly exceeds 25W
|
||
|
||
When running DNN inference (e.g., object detection) simultaneously with full sensor suite:
|
||
|
||
**Mitigation 1: Thermal throttling (automatic)**
|
||
The Orin's DVFS will automatically throttle CPU/GPU when temperature exceeds threshold.
|
||
No explicit action needed — the Orin handles this gracefully.
|
||
|
||
**Mitigation 2: Switch to 15W mode during high-load phases**
|
||
```bash
|
||
sudo nvpmodel -m 1 # 15W mode: reduces peak to ~22W
|
||
sudo nvpmodel -m 0 # return to MAXN when cooling
|
||
```
|
||
|
||
**Mitigation 3: RPLIDAR motor gating**
|
||
Stop RPLIDAR motor between scan cycles: saves ~2.2W average.
|
||
Handled automatically by `rplidar_ros` driver via DTR line control.
|
||
|
||
**Mitigation 4: Camera resolution reduction**
|
||
For compute-heavy phases, drop from 640×480 to 424×240 per camera: saves ~0.6W.
|
||
|
||
---
|
||
|
||
## CSI Camera Bandwidth
|
||
|
||
4× IMX219 cameras at 640×480@30fps:
|
||
|
||
| Parameter | Value |
|
||
|-----------|-------|
|
||
| Per-camera raw bandwidth | 640×480×30×10bpp = 92.16 Mb/s |
|
||
| Total 4 cameras | ~369 Mb/s |
|
||
| MIPI CSI-2 capacity (Orin) | 40 Gb/s total (2× 4-lane) |
|
||
| ISP processing overhead | ~1.5W (all 4 cameras active) |
|
||
|
||
**CSI bandwidth is well within capacity.** The Orin Nano Super's ISP handles 4 cameras simultaneously.
|
||
|
||
---
|
||
|
||
## Input Power Requirements
|
||
|
||
### Jetson Orin Nano Super Power Input
|
||
| Spec | Value |
|
||
|------|-------|
|
||
| Input connector | 5.5mm / 2.5mm barrel jack |
|
||
| Input voltage | 5V DC |
|
||
| Recommended current | ≥6A (30W supply for headroom) |
|
||
| Absolute max | 5.25V |
|
||
|
||
> **Use a 5V 6A supply minimum.** A 4A supply may brownout under DNN peak load.
|
||
|
||
### Robot Power Architecture (Recommended)
|
||
|
||
```
|
||
LiPo 4S (16.8V max)
|
||
│
|
||
├─► DC-DC Buck → 5V 6A ──► Jetson Orin barrel jack (30W)
|
||
│ (e.g., XL4016E1)
|
||
│
|
||
<<<<<<< HEAD
|
||
├─► DC-DC Buck → 5V 3A ──► ESP32 + logic 5V rail
|
||
=======
|
||
├─► DC-DC Buck → 5V 3A ──► ESP32-S3 + logic 5V rail
|
||
>>>>>>> 291dd68 (feat: remove all STM32/Mamba/BlackPill references — ESP32-S3 only)
|
||
│
|
||
└─► Hoverboard ESC ──► Hub motors (48V loop)
|
||
```
|
||
|
||
Using a 4S LiPo (vs 3S previously) gives better efficiency for the 5V buck converter
|
||
at Orin's higher power draw.
|
||
|
||
---
|
||
|
||
## Real-Time Monitoring
|
||
|
||
```bash
|
||
# Live power telemetry (tegrastats)
|
||
sudo tegrastats --interval 500
|
||
|
||
# Key fields:
|
||
# POM_5V_IN X/Y — total input power (current mW / average mW)
|
||
# POM_5V_GPU X/Y — GPU power
|
||
# POM_5V_CPU X/Y — CPU power
|
||
|
||
# Interactive monitoring (jtop — recommended)
|
||
sudo pip3 install jetson-stats
|
||
sudo jtop
|
||
|
||
# Log power to file
|
||
sudo tegrastats --interval 1000 --logfile /tmp/power_log.txt &
|
||
|
||
# Parse log
|
||
grep "POM_5V_IN" /tmp/power_log.txt | \
|
||
awk '{for(i=1;i<=NF;i++) if($i=="POM_5V_IN") print $(i+1)}' | \
|
||
awk -F'/' '{sum+=$1; count++} END {print "Avg:", sum/count/1000, "W"}'
|
||
```
|
||
|
||
---
|
||
|
||
## Summary
|
||
|
||
| Metric | Value |
|
||
|--------|-------|
|
||
| Target envelope | 25W (MAXN) |
|
||
| Nominal (SLAM + 4 cameras) | ~19.9W |
|
||
| Peak (DNN inference) | ~28.2W (briefly) |
|
||
| Compliant scenario | All sensors + SLAM (no DNN) |
|
||
| Recommended PSU | 5V 6A (30W) |
|
||
| Power mode | nvpmodel MAXN (Mode 0) |
|
||
| Upgrade from Nano | +150% TDP, +13,300% AI TOPS |
|