05
Zephyrus Gyro Wiring
Wire an MPU6050 to the I2C bus, resolve pin conflicts and verify the AHRS with the serial log.
I2C pin selection
The default Zephyrus I2C pins are GPIO4 (SDA) and GPIO5 (SCL). On the PWMP7 v1.0 those are fine; on v1.1 GPIO2/GPIO5 are not broken out, so Zephyrus uses GPIO1 (SDA, CH2) and GPIO3 (SCL, CH3). Always check the silkscreen against the pin map — GPIO4 is hard-reserved for the SX1280 radio interrupt and must never be repurposed.
Wiring the GY-521
| GY-521 | Receiver |
|---|---|
| VCC | 5V rail (onboard regulator makes 3.3V) |
| GND | GND |
| SDA | GPIO1 (CH2) — or GPIO5 on v1.0 |
| SCL | GPIO3 (CH3) — or GPIO2 on v1.0 |
| AD0 / INT / XDA / XCL | leave open |
The GY-521 carries its own 4.7 kΩ pull-ups and an AMS1117-3.3V regulator: feed it 5V, it makes its own 3.3V and the logic levels auto-match. Four wires total, no trace cutting, no extra regulator.
Calibration & verification
The Mahony AHRS self-calibrates the gyro bias at boot — keep the airframe still for the first second after power-up. Verify the sensor is alive via the serial log: pitch/roll should track the airframe when you tilt it, and the crest rudder should oppose a manual roll (right roll → rudder corrects left). If the bus hangs at boot, you've landed on a reserved pin — re-check the map and move to the correct CH2/CH3 pair.