Skip to content

2.5.1 Cockpit Instrument Panel Breadboard Setup And I2C Sensors

Overview

This project is the electronics capstone of the Advanced section. Students integrate four sensors — barometric pressure, gyroscope/accelerometer, compass, and GPS — into a single ESP32-powered cockpit display that renders five flight instruments simultaneously on a colour TFT screen. The result is a functional glass-cockpit panel that mirrors the Primary Flight Display (PFD) found in modern commercial and general aviation aircraft. Every design decision — from sensor placement to I2C address management to display layout — reflects real avionics engineering practice.

Required Components

Item Quantity Notes
ESP32 development board 1 Kit 7 – 38-pin version
BMP280 barometric pressure & temperature sensor 1 I2C; address 0x76 or 0x77
MPU6050 6-axis gyroscope/accelerometer 1 I2C; address 0x68
QMC5883L 3-axis compass module 1 I2C; address 0x0D
NEO-6M GPS module with antenna 1 UART; 9600 baud
ILI9341 TFT colour display (2.4–3.2 inch, SPI) 1 240×320 px; 3.3V logic
Faceplate (3D-printed or foam board) 1 Kit 7 or student-fabricated
Full-size breadboard 1 Kit 4
Jumper wires (male-to-male and male-to-female) 30 Assorted colours
5V USB power bank or LiPo + boost converter 1 Kit 4 or teacher-provided
Zip ties, double-sided tape, M2 screws Set Kit 7

Step-by-Step Assembly

Lesson 1 – Breadboard Setup & I2C Sensors

STEP 1 Power Rail & ESP32 Setup
* Place ESP32 across the centre gap of the full-size breadboard * Connect 3.3V pin → red power rail; GND → blue power rail * Connect a second GND from a different ESP32 GND pin for redundancy * Do not connect GPS or display power yet — add one sensor at a time
STEP 2 Wire All Three I2C Sensors
* BMP280: VCC → 3.3V; GND → GND; SDA → GPIO 21; SCL → GPIO 22 * MPU6050: VCC → 3.3V; GND → GND; SDA → GPIO 21; SCL → GPIO 22 * QMC5883L: VCC → 3.3V; GND → GND; SDA → GPIO 21; SCL → GPIO 22 * All three share GPIO 21 and GPIO 22 — each has a unique I2C address * Run the I2C scanner sketch and confirm all three addresses are detected: 0x76/0x77, 0x68, 0x0D * If any address is missing, check that sensor's SDA and SCL connections
STEP 3 GPS Module Wiring (UART)
* GPS module uses UART — not I2C — so it uses different pins * GPS TX → ESP32 GPIO 2 (ESP32 receives GPS data) * GPS RX → ESP32 GPIO 3 (ESP32 can send commands to GPS) * GPS VCC → 3.3V (check module datasheet — some require 5V) * GPS GND → GND * Take the unit outdoors; open Serial Monitor at 9600 baud; confirm NMEA sentences appear within 90 seconds

Power & Safety

For safety instructions and power requirements, please refer to Safety Notes.