ESP32/IoT B.Tech/Diploma Advanced

Flight Black-Box Motion Recorder System using ESP32 & BMI160

Flight Black-Box Motion Recorder System using BMI160 & ESP32 to track acceleration, rotation, vibration, orientation, free-fall, impacts

  • Suitable forB.Tech/Diploma ESP32/IoT students
  • Build time1-2 weeks
  • LevelAdvanced
  • Available atAjvika Labs, Kakinada

About this project

Overview
In this project, we will build a
Flight Black-Box Motion Recorder System
using
ESP32
and the
BMI160
IMU sensor. The
BMI160
is a highly integrated 6-axis motion sensor that combines a
3-axis accelerometer
and a
3-axis gyroscope
in a single compact chip.
The
ESP32–BMI160 Flight Black-Box Motion Recorder System
is a demonstration device designed to study and analyze
flight motion
. It can also be used as a functional prototype that mimics the behavior of real aircraft
black-box motion
monitoring systems.
The device continuously tracks
acceleration
rotation
, vibration, orientation, and key motion events such as
free-falls
and
impacts
. Data is visualized on an onboard
OLED screen
and a beautifully designed real-time
web dashboard
. This compact system works like a
mini flight recorder
, perfect for drones, RC aircraft, vehicles, or motion-analysis experiments.
Before moving ahead, you can take a look at some tutorials & a few projects built using the
BMI160 accelerometer
&
gyroscope
module:
DIY Pedometer using BMI160 ESP32
BMI160 ESP32 Interfacing Guide
BMI160 Arduino Interfacing Guide
BMI160 Raspberry Pi Pico Interfacing Guide
Bill of Materials
To build the Flight Black-Box Motion Recorder System, we need following components.
S.N.
Components Name
Quantity
Purchase Link

ESP32 Board

Amazon
AliExpress

BMI160 Accelerometer Gyroscope

Amazon
AliExpress

0.96" OLED Display

Amazon
AliExpress
Push Button Switch

Amazon
AliExpress
Resistor 1K

Amazon
AliExpress
3.7V Lithium-ion Battery

Amazon
AliExpress
Boost Converter Module

Amazon
AliExpress
Slide Switch

Amazon
AliExpress
BMI160 Accelerometer/Gyroscope Module
The
BMI160
is a high-performance, ultra-low-power
6-axis Inertial Measurement Unit (IMU)
that integrates a
3-axis accelerometer
and a
3-axis gyroscope
into a single compact package. Designed by Bosch Sensortec, it delivers precise motion, orientation, and vibration measurements, making it ideal for modern embedded systems. It supports
I²C/SPI communication.
Fig: Front & Back of BMI160
Technically, the BMI160 offers a wide selection of measurement ranges, including
±2g to ±16g
for acceleration and
±125°/s to ±2000°/s
for angular velocity. It features
16-bit output resolution
, excellent noise performance, and advanced power modes—from full operation at under
1 mA
to
3 µA
in suspend mode—making it well-suited for battery-powered applications. The sensor also includes a
1024-byte FIFO
two programmable interrupt engines
, and support for programmable sampling rates up to
1600 Hz
, enabling efficient data logging and real-time motion tracking.
With built-in features such as
step counting
motion detection
gesture recognition
, and
6D orientation sensing
, the BMI160 stands out as a versatile and highly capable IMU for robotics, mobile devices, augmented reality, cameras, toys, drones, and navigation systems.
Flight Black-Box Motion Recorder using ESP32 & BMI160
Lets build the hardware part of the Flight Black-Box Motion Recorder using ESP32 & BMI160. We will see the schematic, hardware, circuit etc and understand the system in detail.
Block Diagram of Flight Black-Box Motion Recorder
A
Black-Box Motion Recorder System
is a compact, self-powered device designed to capture, analyze, and visualize motion activity from moving platforms such as drones, RC aircraft, vehicles, or handheld devices. It continuously records
acceleration, rotation, vibration, orientation,
and
event-based motion
such as impacts or free-falls, allowing users to understand real-world dynamics, stability, and abnormal behavior.
Fig: Block Diagram of Flight Black-Box Motion Recorder
Based on the block diagram, the system consists of the following functional units:
Li-Po Battery → Buck-Boost Converter
– Supplies a stable 5V to power the device.
ESP32 Microcontroller
– Reads motion data, processes acceleration and rotation, detects events, and manages storage.
BMI160 IMU Sensor
– Provides 6-axis acceleration and gyroscope measurements.
OLED Display
– Shows real-time motion values, orientation, peaks, and diagnostics.
Push Button
– Allows page switching, reset operations, and calibration control.
Circuit Diagram/Schematic
First, let’s look at the hardware design of the
ESP32-based Flight Black-Box Motion Recorder System
, which captures motion data during flight and displays it on an OLED screen.
Fig: ESP32 BMI160 Hardware Design
In this system, the
ESP32
is the main controller that handles motion processing, orientation calculation, event detection, data logging, and Wi-Fi dashboard hosting. The
BMI160 IMU sensor
provides precise 3-axis acceleration and 3-axis gyroscope data required to analyze flight dynamics. The
OLED display
shows real-time motion parameters such as G-force, rotation, vibration, orientation, peaks, and diagnostic information.
Both the BMI160 sensor and the OLED display share the same
I²C bus
on the ESP32 (SDA and SCL pins). A
push button
connected to
GPIO 23
is used for page switching, resetting peaks, and entering calibration mode during startup.
Fig: Hardware Board (Top Side)
A
3.7 V Li-Po battery
powers the entire circuit. Since the ESP32 requires 5 V, a
buck-boost converter
is used to regulate the battery voltage to a stable 5 V. This converter must be adjusted to
exactly 5 V
before use, as many modules ship with a default output around 12 V.
Fig: Hardware Board (Bottom Side)
All components are mounted on a zero-PCB protoboard for a compact and durable assembly. Female headers hold the ESP32, OLED, and BMI160 modules in place, while a slide switch provides convenient on/off control.
PCB Ordering Online
To order the PCB, visit the
HQ NextPCB Official Website
and upload the Gerber file using the
Quote Now
option. You can then choose your required parameters, such as
Material Type, Dimensions, Quantity, Thickness, and Solder Mask Color.
HQ NextPCB
is making PCB prototyping more affordable for new users by offering
0.1$
total cost when PCB price ≤ $10 on your first PCB order. They also offer
$0
shipping cost when shipping cost ≤ $10. With this promotion, you can enjoy
free shipping
on your first order—no restrictions on size, layers, or quantity.
Here is the campaign detail:
Unlock $0.1 PCB Prototyping
. You can also use the DFM Analysis tool called
HQDFM
for PCB analysis.
Once all the details are filled in, select your country and shipping method. After confirming everything, you can place the order and wait for your boards to arrive.
Source Code/Program
Lets go the program/code of the Flight Motion Recorder System using BMI160 & ESP32. The following program turns the ESP32 + BMI160 + OLED into a
flight black-box motion recorder
with both an onboard display and a live web dashboard.
From the following lines in main.ino file, you need to change the WiFi SSID and Password. Replace it with your home network credentials.

const
char
*
WIFI_SSID
=
"******************"
;
const
char
*
WIFI_PASSWORD
=
"******************"
;
The code has two files main.ino file and webpage.h file. The webpage file is seperated from main code and integrated in the header file.
main.ino code

Technologies used

ESP32ArduinoRaspberry PiWiFiBLEOLEDAngularSPI

Hardware components

  • ESP32
  • Arduino
  • Raspberry Pi
  • OLED

Software & tools

  • Arduino IDE

What you get

  • Working project / hardware kit, tested before delivery
  • Complete source code with explanation
  • Project demo and guidance for your viva
  • Project report, PPT and IEEE paper support (on request)
Delivery & Payment
Delivery takes a minimum of two weeks from the date your inquiry is confirmed. Payment is in two parts: • 50% advance to start the project • Remaining 50% before delivery Note: • Documentation and PPT are not included by default • If you need documentation/PPT, it can be arranged for extra time and cost We'll confirm the exact timeline and cost with you after reviewing your requirements.