Inspiration
Drones look effortless when they hover, but behind that stability is a complex mix of sensors, control systems, and real-time computation. We wanted to challenge ourselves to recreate that from the ground up. By combining an ESP32, an MPU6050, and PID control, we set out to build a drone that can understand its orientation and surroundings and use that information to stay stable in the air. Our goal was to turn core robotics and control theory concepts into a real flying system.
What it does
Our project is a lightweight autonomous drone built around an ESP32 that focuses on stable hovering and position control using onboard sensors and computer vision. The drone continuously measures its orientation using an MPU6050 IMU and uses PID control loops to stabilize roll, pitch, and yaw.
How we built it
The drone uses an ESP32 microcontroller as the main flight controller. Orientation data is captured from the MPU6050, which provides accelerometer and gyroscope readings. These values are fused to estimate the drone’s current angle and orientation.
We implemented PID controllers to continuously adjust motor outputs and maintain stable flight. The PID loops compute corrections based on the difference between the desired orientation and the measured orientation from the IMU.
Challenges we ran into
One of the biggest challenges was tuning the PID controllers so the drone remains stable without oscillating or overcorrecting. At first we had trouble getting the drone in the air, as not all the motors would activate simultaneously. There was a lot of troubleshooting before we could evenly power the motors and transition to the PID feedback loop control system.
Accomplishments that we're proud of
- Building a working flight stabilization system from scratch on an ESP32.
- Successfully reading and interpreting MPU6050 orientation data.
- Implementing PID control loops for real-time motor adjustment.
- Designing a hybrid stabilization approach combining IMU data and computer vision
What we learned
Through this project we learned about flight control systems, sensor fusion, PID tuning, and the complexities of real-time control for drones. We also explored how computer vision can complement traditional IMU-based stabilization.
What's next for PJMK Drones
Future improvements include:
- Improved turbulence resistance capabilities
- Obstacle detection and avoidance
- Full autonomous navigation and waypoint control
- add a vision system using openCV and use it to estimate the position of the drone
Built With
- esp32
- mpu6050
- python
Log in or sign up for Devpost to join the conversation.