Skip to content

2.5.2 Cockpit Instrument Panel Tft Display And Faceplate Prep

Step-by-Step Assembly (Continued)

Lesson 2 – TFT Display & Faceplate Prep

STEP 4 TFT Display Wiring (SPI)
* The ILI9341 uses SPI — a faster protocol than I2C, needed for screen refreshes * VCC → 3.3V; GND → GND * SCK → GPIO 18; MOSI → GPIO 23; CS → GPIO 5; DC → GPIO 4; RST → GPIO 2 * Note: GPIO 2 is shared with GPS TX — if conflict arises, reassign RST to GPIO 15 * Install the Adafruit ILI9341 and Adafruit GFX libraries * Run the display test sketch: screen should show colour bands and text
STEP 5 Faceplate Design & Mounting Layout
* Sketch the instrument layout on paper using the Panel Layout Table (Section 5) * Mark positions on the faceplate: attitude indicator (centre top, largest), altimeter (left), heading (right) * Cut display window in faceplate; dry-fit the TFT behind the opening * Mark mounting holes for ESP32, breadboard, and GPS antenna window * Do not glue anything yet — confirm all wiring reaches before fixing components

Lessons 3–4 – Software Integration

STEP 6 Install Libraries & Sensor Sketches
* Install via Arduino Library Manager: Adafruit_BMP280, MPU6050_light, QMC5883LCompass, TinyGPS++, Adafruit_ILI9341 * Test each sensor with its individual example sketch before combining * Confirm: BMP280 reads altitude in metres; MPU6050 returns pitch and roll; QMC5883L returns 0–360° heading; GPS returns lat/lon
STEP 7 Upload the Integrated Cockpit Code
* Open the cockpit_panel.ino sketch from Kit 7 USB drive * Review the code structure: sensor reading loop → data processing → TFT draw function * Identify the complementary filter section: it combines gyroscope and accelerometer to prevent attitude drift * Upload to ESP32; confirm all 5 instrument values appear on the TFT display * If any reading is missing, check that the corresponding library is installed and the correct I2C address is set
STEP 8 Compass Calibration
* Open Serial Monitor; enter calibration mode as described in the kit sketch * Wave the unit in a slow figure-8 pattern for 30 seconds to capture the magnetic field range * Save calibration offsets; verify heading reads within ±15° of a reference compass * Keep compass module at least 5 cm from the ESP32 and any other electronics

Lessons 5–6 – Faceplate Assembly & Testing

STEP 9 Mount Components on Faceplate
* Secure TFT display behind the faceplate window using M2 screws or foam tape * Mount ESP32 and breadboard on the rear of the faceplate using double-sided tape * Route and bundle all wiring; secure with zip ties * GPS antenna must be on the top surface of the panel and face upward for best signal * Label all wire bundles with a marker: I2C, SPI, UART, Power
STEP 10 Full System Test
* Power on the panel; verify all 5 instruments display simultaneously * Complete the Test Verification Table (Section 6) * Take the panel outdoors for 90 seconds — confirm GPS acquires a fix and position is displayed * Tilt the panel: confirm attitude indicator updates; rotate: confirm heading updates * Each student produces a labelled wiring diagram of the complete circuit