The project successfully demonstrates the integration of graphical user interfaces, I2C sensors, and the ESP32-S3 microcontroller into a compact avionics instrument simulator.
The inspiration for this project comes from classical aircraft cockpit instruments used for navigation, orientation, and flight monitoring. In aviation, instruments such as the Artificial Horizon, Magnetic Compass, Altimeter, and Attitude Indicators play a crucial role by providing pilots with real-time information about the aircraft's orientation, heading, and altitude. The system is built around the CrowPanel 2.1-inch HMI ESP32 Rotary Display, which integrates an ESP32-S3 microcontroller, a 480×480 pixel IPS round display, a rotary encoder with push-button functionality, and expansion interfaces for external peripherals. These features make the module particularly suitable for the implementation of compact instrumentation and graphical control systems. The MPU6050 six-axis accelerometer and gyroscope module provides information about the pitch and roll orientation of the model. These measurements are processed and converted into graphical movements on the display. In addition, support for a QMC5883L/HMC5883L magnetic compass sensor was implemented to provide heading information for the compass instrument. Artificial Horizon Instrument: The first instrument implemented is the Artificial Horizon, also known as the Attitude Indicator. It displays a blue upper area representing the sky and a brown lower area representing the ground. The MPU6050 sensor continuously measures the pitch and roll angles of the model, and these values are used to dynamically rotate and shift the horizon line. A fixed yellow aircraft symbol remains centered on the display while the horizon moves relative to the aircraft, closely replicating the behavior of a real aviation attitude indicator. Additional visual elements include pitch reference marks, a horizon scale, a virtual runway representation, and a roll-angle indicator located at the top of the instrument. When the nose of the model is raised, the horizon moves downward on the display. Conversely, when the nose is lowered, the horizon moves upward. Rolling the model left or right causes the entire horizon to rotate accordingly. Magnetic Compass Instrument: The second instrument is a graphical magnetic compass. It consists of a circular compass card displaying cardinal directions and angular markings around its circumference. A fixed aircraft symbol is positioned at the center of the display, while the compass card rotates according to heading information obtained from the magnetic field sensor. Although the current implementation serves primarily as a simulator rather than a precision navigation device, it demonstrates the integration of a digital magnetometer via I2C communication and the graphical representation of heading information on a circular display. Altimeter Instrument: The third instrument is an analog-style aircraft altimeter inspired by traditional mechanical altitude indicators. It features a circular scale and two pointers similar to those found in a clock mechanism. The simulated altitude is initialized at 6300 feet and then dynamically changes according to the pitch angle measured by the MPU6050 sensor. Raising the nose of the model gradually increases the indicated altitude, while lowering the nose decreases it. The rate of altitude change is proportional to the measured pitch angle, creating a realistic simulation of aircraft climb and descent behavior. This approach demonstrates how sensor data can be transformed into meaningful aviation-style instrument indications without requiring an actual altitude sensor. Aircraft Attitude Visualization Screen:
A fourth display mode was implemented to provide a direct graphical representation of the MPU6050 measurements. This screen displays a simplified aircraft model that rotates according to the measured roll angle and moves vertically according to the pitch angle. This visualization serves both as a demonstration and as a diagnostic tool, allowing easy verification of sensor operation and aircraft orientation in real time. User Interface and Control: The rotary encoder integrated into the CrowPanel module is used for adjusting display backlight brightness through PWM control. The encoder push-button allows the user to switch between the different instrument screens, transforming the device into a multifunction avionics display. This approach provides an intuitive and practical user interface while requiring minimal external hardware. Software Architecture:
The software was developed using the Arduino framework for ESP32-S3. Graphics are rendered using the Arduino_GFX library together with a custom framebuffer implementation, enabling smooth drawing of circular instruments and dynamic graphical elements. The program structure is organized around multiple display modes, each represented by a dedicated drawing function. This modular approach simplifies future expansion and maintenance of the code. Additional instruments can easily be added by implementing new display screens and linking them to the existing menu system. Sensor acquisition, graphical rendering, user input handling, and display updates are executed in separate logical sections of the program, improving code readability and scalability. Conclusion: The project successfully demonstrates the integration of graphical user interfaces, I2C sensors, and the ESP32-S3 microcontroller into a compact avionics instrument simulator. This CrowPanel Display proved to be an excellent platform for this type of application thanks to its integrated circular display, rotary encoder, processing power, and expandability through external sensors.
Das Elektor Magazine gehört seit 65 Jahren zu den führenden Informationsquellen für Elektronikingenieure, Entwickler, Start-ups und Unternehmen. Unser Magazin wird von einer aktiven Community aus Elektronikingenieuren – von Studenten bis zu Profis – getragen, die mit Leidenschaft innovative Ideen entwickeln und teilen.
Für diese veröffentlichen wir jedes Jahr Hunderte von Beiträgen in Formaten wie Artikeln, Videos, Webinaren und weiteren Lernformaten. Unsere Mission ist es, Wissen auf jede mögliche Weise zu teilen und die Leser mit den neuesten Entwicklungen im Bereich der Elektrotechnik zu inspirieren.
Vielen Dank für Ihre Bewertung!
Kommentar hinzufügen
Vielen Dank für Ihre Bewertung!
Möchten Sie einen Kommentar mit Ihrer Bewertung hinterlassen? Bitte melden Sie sich unten an. Nicht gewünscht? Dann schließen Sie einfach dieses Fenster.
Diskussion (0 Kommentare)