Skip to content

Commit 2b8d571

Browse files
NEXUS: fix VBAT scale, Port C pinout, and ADC docs
Address hardware testing feedback from daijoubu: - VBAT_SCALE_DEFAULT 1100 → 320 (hardware-verified) - Port C connector pinout: pin 3 is SDA/TX (PB11), pin 4 is SCL/RX (PB10) - Clarify OG Nexus has no EXT-V input (Vin ADC only, unlike X/XR) - Update verification checklist with confirmed test results Co-Authored-By: Joshua Perry <josh@6bit.com>
1 parent cdb2976 commit 2b8d571

2 files changed

Lines changed: 27 additions & 23 deletions

File tree

src/main/target/NEXUS/README.md

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ For the Nexus-X and Nexus-XR, use the `NEXUSX` target instead.
3131
| Internal ELRS RX | None | RP4TD-M on UART5 |
3232
| PINIO1 (RX power) | None | PC8 |
3333
| UART1 pins | PA9/PA10 | PB6/PB7 |
34-
| Voltage input | 5-12.6V | 3.6-70V |
34+
| Voltage sense | Vin ADC only (5-12.6V) | EXT-V input (3.6-70V) |
3535
| Servo outputs | 5 | 7 default (9 max) |
3636
| Rotorflight target | NEXUS_F7 | NEXUSX |
3737

@@ -68,9 +68,12 @@ For the Nexus-X and Nexus-XR, use the `NEXUSX` target instead.
6868

6969
| Channel | Pin | Divider | Usage |
7070
|---------|-----|---------|-------|
71-
| BUS | PC2 | 320 | External battery voltage (mapped as VBAT) |
71+
| BUS | PC2 | 320 | Vin rail, 5-12.6V (mapped as VBAT) |
7272
| BEC | PC1 | 160 | 5V BEC rail monitoring |
7373

74+
Note: Unlike the Nexus-X/XR, the OG Nexus has no dedicated EXT-V
75+
high-voltage battery sense input. VBAT monitors the board input power.
76+
7477
### Connector Pinouts
7578

7679
**Port A (UART4 - CRSF receiver):**
@@ -88,8 +91,8 @@ For the Nexus-X and Nexus-XR, use the `NEXUSX` target instead.
8891
**Port C (UART3 / I2C2):**
8992
1. GND
9093
2. 5V
91-
3. SCL/TX (PB10)
92-
4. SDA/RX (PB11)
94+
3. SDA/TX (PB11)
95+
4. SCL/RX (PB10)
9396

9497
**ESC Header:**
9598
- Signal: PB6 (TIM4_CH1 PWM)
@@ -113,15 +116,17 @@ For a 5-channel elevon glider like the Kunai:
113116
- [x] MCU boots, LEDs active (PC14, PC15)
114117
- [x] USB CDC enumeration and iNAV CLI
115118
- [x] IMU (gyro + accel) detected and responding
116-
- [x] iNAV Configurator 9.0 connects, 3D model tracks board movement
117-
- [ ] Barometer (SPL06 on I2C1) — fixed bus assignment, needs retest
118-
- [ ] VBAT ADC (PC2) — fixed pin assignment, needs retest
119-
- [ ] BEC ADC (PC1) — needs test
120-
- [ ] Gyro alignment (CW90) — fixed, needs retest
121-
- [ ] All servo outputs — need test
122-
- [ ] CRSF receiver on UART4 — needs test
123-
- [ ] Blackbox logging — needs test
124-
- [ ] VBAT scale calibration with multimeter
119+
- [x] Gyro alignment (CW90) confirmed
120+
- [x] Accelerometer working
121+
- [x] Barometer (SPL06 on I2C1) working
122+
- [x] VBAT ADC (PC2) working (scale 320)
123+
- [x] All UART ports (1-4, 6) verified
124+
- [x] UART4 CRSF receiver working (TX/RX swap confirmed)
125+
- [x] DShot on all motor outputs
126+
- [x] Servo outputs working
127+
- [x] Blackbox logging working
128+
- [x] LEDs working
129+
- [x] I2C2 bus working
125130

126131
## Building
127132

src/main/target/NEXUS/target.h

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -129,19 +129,18 @@
129129

130130

131131
/* ---- ADC ---- */
132-
// From Rotorflight dump:
133-
// ADC_BEC = PC1, divider 160 (BEC 5V rail monitoring)
134-
// ADC_BUS = PC2, divider 320 (external battery voltage)
135-
// Map BUS voltage as VBAT for iNAV since that's the flight battery
132+
// OG Nexus has no EXT-V input (unlike X/XR which has a dedicated
133+
// high-voltage sense on PC0). Only two ADC channels:
134+
// ADC_BUS = PC2, divider 320 (Vin rail, 5-12.6V)
135+
// ADC_BEC = PC1, divider 160 (BEC 5V rail)
136+
// Map Vin as VBAT since it's the primary power input
136137
#define USE_ADC
137138
#define ADC_INSTANCE ADC1
138-
#define ADC_CHANNEL_1_PIN PC2 // BUS voltage (external battery)
139+
#define ADC_CHANNEL_1_PIN PC2 // Vin (input power rail)
139140
#define VBAT_ADC_CHANNEL ADC_CHN_1
140-
#define ADC_CHANNEL_2_PIN PC1 // BEC voltage (5V rail)
141-
// VBAT scale: Rotorflight vbus_divider = 320
142-
// iNAV scale = divider * ~3.44 (ADC ref / resolution factor)
143-
// Start with 1100, calibrate with multimeter
144-
#define VBAT_SCALE_DEFAULT 1100
141+
#define ADC_CHANNEL_2_PIN PC1 // BEC 5V rail
142+
// VBAT scale: hardware-verified value (divider ratio ~320)
143+
#define VBAT_SCALE_DEFAULT 320
145144

146145
/* ---- Sensors ---- */
147146
#define SENSORS_SET (SENSOR_ACC | SENSOR_BARO)

0 commit comments

Comments
 (0)