GyroForge — MPU6050 6-DOF IMU Fusion Sensor
About this project
GyroForge connects an ESP32 to an MPU6050 6-axis IMU using raw I2C register programming — no library. At startup the firmware wakes the chip from its default SLEEP state (PWR_MGMT_1 = 0x00), configures a 5 Hz digital low-pass filter (DLPF = 6), selects ±250 °/s gyroscope range (131 LSB per °/s) and ±2 g accelerometer range (16384 LSB per g), then collects 2000 gyroscope samples over two seconds with the sensor perfectly still to compute the zero-rate bias for all three axes. On each 10 ms read cycle a single 14-byte burst starting at register 0x3B retrieves all six axes plus the on-chip temperature sensor in one I2C transaction, eliminating the risk of reading AX and AY from different sample cycles. The bias-corrected gyro rates and accelerometer-derived tilt angles are fused by a complementary filter (α = 0.98): the gyroscope provides fast, accurate short-term rotation tracking while the accelerometer continuously removes long-term drift. The fused pitch and roll angles animate a CSS 3D rotating board model served by the ESP32's Wi-Fi AP at 192.168.4.1, alongside nine live sensor cards with bar-graph indicators. An SSD1306 OLED on the shared I2C bus shows pitch, roll, all six raw axis values, and die temperature without any connected device.
What you get
- Complete, commented source code
- Full components list with quantities
- Pin-by-pin wiring guide and connection table
- Step-by-step upload and testing guide
- Project report (.docx, IEEE style)
- Presentation slides (.pptx)