Skip to content

2.1.1 Mini Avionics Bay Breadboard Setup And Wiring

Overview

This project introduces students to avionics — the electronic systems that form the nervous system of a modern aircraft. Using an ESP32 microcontroller, an ultrasonic sensor (simulating an altimeter), a gyroscope/accelerometer (simulating an attitude indicator), and an OLED display, students build a functional instrument panel that mirrors the core flight instruments found in every cockpit. This is the first project in the Intermediate section.

Required Components

Item Quantity Notes
ESP32 development board 1 38-pin or 30-pin version compatible
Full-size breadboard 1 Must have power rails
Jumper wires (male-to-male) 20 Assorted colours – use colour coding
HC-SR04 Ultrasonic distance sensor 1 Simulates altimeter
MPU6050 6-axis gyroscope/accelerometer 1 Simulates attitude indicator (I2C)
SSD1306 OLED display (128×64, I2C) 1 I2C address: 0x3C or 0x3D
Red, Green, Yellow LEDs 1 each 3mm or 5mm with 330Ω resistors
Active buzzer (5V) 1 Active type only
330Ω resistors 3 One per LED
USB-A to Micro-USB cable 1 For programming and power

Step-by-Step Assembly

Lesson 1 – Breadboard Setup & Wiring

STEP 1 Breadboard Power Rail Setup
* Place ESP32 across the centre gap of the breadboard (pins on both sides) * Connect ESP32 3V3 pin → breadboard positive rail (red) * Connect ESP32 5V pin → a separate breadboard row (for ultrasonic sensor only) * Connect ESP32 GND pin → breadboard negative rail (blue) * Add a second GND jumper from the negative rail for redundancy
STEP 2 Ultrasonic Sensor Wiring
* Insert HC-SR04 into the breadboard * VCC → 5V row (HC-SR04 requires 5V – not 3.3V) * GND → GND rail * TRIG → GPIO 2 on ESP32 * ECHO → GPIO 4 on ESP32 * Verify against the Wiring Reference Table in Section 5
STEP 3 MPU6050 & OLED Display Wiring (I2C)
* Both MPU6050 and OLED use I2C — they share the same SDA and SCL lines * MPU6050: VCC → 3.3V; GND → GND; SDA → GPIO 21; SCL → GPIO 22 * OLED: VCC → 3.3V; GND → GND; SDA → GPIO 21; SCL → GPIO 22 * Both devices connect to the SAME two wires — this is how I2C works * Each device has a unique address so the ESP32 knows which to query
STEP 4 LED & Buzzer Wiring
* Insert one 330Ω resistor per LED into the breadboard * Red LED: resistor → GPIO 5; LED anode (long leg) to resistor; cathode → GND * Green LED: resistor → GPIO 18; anode; cathode → GND * Yellow LED: resistor → GPIO 19; anode; cathode → GND * Buzzer: positive leg → GPIO 23; negative leg → GND * Test: all three LEDs should light when GPIOs set HIGH in a test sketch

Power & Safety

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