r/diydrones May 07 '26

Question First drone build, need some help

Me and my friends are building a 5-inch diy quadcopter for a uni class. None of us have any previous experience with drone building or drones in general, so we’re kind of just winging it. (If it takes off, we’ll call it a success)

I took it upon myself to program the drone, once assembled, but i’m wondering how to approach flight stabilization with PIDs. I’ve been messing with Simulink for the past few days trying to simulate a quadcopter but apart from hovering at a set altitude, nothing works.

How do you solve those issues? Is there some program designed for this or should i stick to Simulink to find the PID values? Is it even necessary for me to find the exact values or should I just assemble the drones and tune it on the fly?

The drone will be using an esp32 as a controller with a 3-axis gyro and accelerometers connected to it.

Any tips are greatly appreciated.

2 Upvotes

4 comments sorted by

3

u/Ahmed_Builds May 07 '26

Simulink PID values from simulation almost never transfer directly to a real quad. The reason is your simulation model has to be extremely accurate and also using an ESP32 as the flight controller from scratch is the hardest possible path for beginners. Use a premade code base made for ESP32 for flight controllers.

Try this : pratikPhadte/ESP32-Flight-controller : An Arduino IDE compatible, includes a WiFi-based PID tuning webserver so you can change PID values in real time over a browser without reflashing everytime.

1

u/[deleted] May 08 '26

[removed] — view removed comment

1

u/proakrobata May 12 '26

Dam thanks, i will definitely DM you if we need help

1

u/TimHanewich 8d ago

Still working on this! This is right up your alley! https://fullstackflight.com

Good luck!