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.

This project is sponsored by PCBWay. From concept to production, PCBWay provide cutting-edge electronic design solutions for global innovators, Including hardware design, software development, mechanical design, product testing and certification. PCBWayengineering team consists of experienced engineers in electronics, embedded systems, and product development. They successfully delivered hundreds of projects across industries such as medical devices, industrial automation, consumer electronics, smart home, and IoT.  

 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...

Read more »