One of the most in-depth embedded-systems research projects I worked on at Universitas Brawijaya was designing a microcontroller-based vehicle alignment (toe and camber) simulation system using the ESP32.
The system combines an MPU6050 accelerometer and gyroscope sensor for spatial orientation angles with an ADS1115 module (16-bit I2C ADC) for reading linear potentiometer voltage with millimeter precision.
The biggest challenge was filtering mechanical vibration noise while the sensors read dynamic angles. By applying a simple complementary filter on the microcontroller, the data sent via Wi-Fi/MQTT to the React dashboard became highly stable and responsive without lag.
// Kalkulasi Sudut Camber menggunakan ESP32 & MPU6050
#include <Wire.h>
#include <Adafruit_MPU6050.h>
#include <Adafruit_ADS1X15.h>
Adafruit_MPU6050 mpu;
Adafruit_ADS1115 ads;
float calculateCamberAngle() {
sensors_event_t a, g, temp;
mpu.getEvent(&a, &g, &temp);
// Hitung sudut kemiringan vertikal (Roll/Camber)
float roll = atan2(a.acceleration.y, a.acceleration.z) * 180.0 / PI;
return roll;
}Computer Engineering ยท FILKOM Universitas Brawijaya