ESP32 Mini EFIS

(ESP32 Mini EFIS: page created and last updated by Anthony Schott on December 4, 2026)

This page was designed and written to help you build a particularly compact, homemade artificial horizon. It is standalone, it works on its own, with no remote sensors. Its small form factor makes it suitable for even the most cramped instrument panels. It can also be used as a backup attitude indicator on an already well-equipped panel.

Its simple, quick, nearly plug-and-play assembly makes it especially accessible to beginners. No hard-to-find components, no complex circuit board to make and assemble. Just about a dozen wires to solder to connect a few preassembled, commercially available components. It’s an easy first step for anyone hesitant to take on a more complex build, such as the complete EFIS-EMS-ESP32. A simple first step into avionics, but one that’s serious, reliable, and very useful.

I built it with a great deal of help from this website and Benjamin, whom I’d like to thank again warmly. To better understand the project, I invite you to read the many articles on avionicsduino.com.

The goal of this project is illustrated in Video 1 below: 

Video 1: The Mini EFIS in Flight

The basic principle

You should explore the AvionicsDuino website, especially the AHRS page. My idea was to retrieve AHRS data via UART communication on the RX2 (pin 7) and TX2 (pin 8) ports of a Teensy 4.0 board running the AHRS_AvionicsDuino_V1.3 code, and display it on a screen to provide an artificial horizon.

In some photos, you’ll also see that I added a barometric pressure sensor (BMP388) so I can later obtain barometric altitude.

Hardware

To build this simple artificial horizon, you will need the following components (Fig. 1):

The mini-EFIS components. At the top are the IMU board and antenna; at the bottom are the Teensy board and GPS (in red).
Figure 1: The mini-EFIS components. At the top are the IMU board and antenna; at the bottom are the Teensy board and GPS (in red).

Figure 2 shows the wiring diagram.

Mini EFIS wiring diagram. On the left, the smart display powered by an ESP32-S3 microcontroller; in the center, the Teensy 4.0 board; and on the right, the sensors, IMU, and GPS.
Figure 2: Mini EFIS wiring diagram. On the left, the smart display powered by an ESP32-S3 microcontroller; in the center, the Teensy 4.0 board; and on the right, the sensors, IMU, and GPS.

Software

First, configure the NEO-M9N GPS using u-center, the free software provided by u-blox. Then program the two microcontrollers (Teensy and ESP32) separately, each with its own program, using the Arduino IDE.

Configuring the NEO-M9N GPS

Download the version of u-center software compatible with the NEO-M9N from this page on the u-blox website.

Detailed step-by-step instructions for manually configuring the GPS are available on a dedicated page on this website. However, you can also upload a ready-to-use configuration file directly to the GPS. Download this file by clicking the link shown in Figure 3, available on the AHRS page. Use version 4.04.

Link to the GNSS configuration file on the AHRS page.
Figure 3: Link to the GNSS configuration file on the AHRS page.

Next, connect the GPS board to the computer with a USB cable, launch the u-center software, set the communication speed to 921600 baud, then click “Receive Configuration” in the “Tools” menu to send the configuration. 4.04

The AHRS Teensy board

Add “Teensy” by Paul Stoffregen to the board manager (Fig. 4).

Adding the Teensy board manager to the Arduino IDE.
Figure 4: Adding the Teensy board manager to the Arduino IDE.

Then in the Tools menu, select Board, then in the Teensy menu, select Teensy 4.0 (Fig. 5).

Selecting the Teensy 4.0 board in the Arduino IDE
Figure 5: Selecting the Teensy 4.0 board in the Arduino IDE.

Next, install six libraries: Adafruit LSM6DS, Adafruit LIS3MDL, uNavINS, Eigen, units, and ublox.

The Adafruit libraries are available directly in the Arduino IDE (Fig. 6).

Adding the Adafruit LSM6DS and LIS3MDL libraries in the Arduino IDE.
Figure 6: Adding the Adafruit LSM6DS and LIS3MDL libraries in the Arduino IDE.

The other four libraries must be installed manually in the Documents\Arduino\libraries folder.

For reference, the original version of the uNavINS library is still available here.

A newer, modified version adapted for Teensy boards was posted on the PJRC forum (see post #759). For more information, see the AHRS page on this website.

These four libraries:

Libraries

are available for download here.

Extract the “AvionicsDuino_AHRS_3rdParty_Libraries.zip” file and copy the four folders to Documents\Arduino\libraries. The versions used are ubx.h version 5.1.0 and units.h version 4.1.1.

Make sure USB Type is set to “Serial” (Fig. 7).

Before uploading to the Teensy board, set USB Type to Serial.
Figure 7: Before uploading to the Teensy board, set USB Type to Serial.

The program to upload to the Teensy board is AHRS_AvionicsDuino_V1.3.ino, available for download here.

The ESP32-S3 board in the display module

Install the ESP32 by Espressif Systems board manager and just one library: LovyanGFX by lovyan03. Both are available directly in the Arduino IDE.

Then download the “EFIS MINIMALISTE – ESP32-S3 & LOVYANGFX” program from this GitHub repository:

https://github.com/Anthony37s/AHRS/blob/main/README.md?plain=1

Copy the text from the README.md file, paste it into a new sketch in the Arduino IDE, and then upload it to the ESP32 in the display module. The board type to use in the Arduino IDE is ESP32S3 Dev Module (fig. 8)

Select ESP32S3 Dev Module as the board type for the display.
Figure 8: Select ESP32S3 Dev Module as the board type for the display.

This will bring up the screen shown in Figure 9.

The mini EFIS display
Figure 9: The mini EFIS display.

It shows:

  • A sky pointer, along with 10°, 20°, 30°, 45° (white circle), and 60° markings.
  • The GPS signal required for the AHRS to initialize is displayed in the top-right corner of the screen.
  • Pitch lines at 5°, 10°, 15°, 20°, 25°, and 30°.
  • A yellow aircraft reference symbol.

The enclosure

It houses the hardware, as shown in Figure 10. It is 3D-printed and modeled to fit the cockpit. Power is supplied through the USB Type-C port on the display board’s ESP32-S3, which is connected to an aircraft USB port.

The Adafruit 4517 board is positioned so its three axes (X, Y, and Z) align with the aircraft in level flight.

Component layout inside the enclosure.
Figure 10: Component layout inside the enclosure.

Planned developments

Power through the aircraft’s 12 V electrical system.

GPS speed, GPS heading, GPS altitude and G-force indicator along the Z axis.

Barometric altitude and temperature with the addition of a BMP388 board (already visible in purple in Figure 10).

True airspeed (TAS) with the addition of a pitot tube and an outside temperature sensor.

Several of these improvements are already being tested, as shown in the video at the top of this page.

Tests are also planned to simplify the EFIS and reduce its cost:

– removing the Teensy board, assigning all tasks to the ESP32 board in the display,
– and replacing the NEO-M9N with a less expensive M8N GPS chip.

Feel free to leave comments and share your research and solutions that could help the community.

Leave a Reply

Your email address will not be published. Required fields are marked *

The maximum upload file size: 5 MB. You can upload: image, document, text, archive. Drop files here