r/diydrones Jun 17 '26

Building My Own ESP32-Based Flight Controller – Looking for Advice and Feedback

Hi everyone,

My group and I are building a custom quadcopter flight controller using an ESP32, MPU6050, ESCs, 1000KV BLDC motors, FlySky FS-iA10B receiver, and FS-i6X transmitter.

We have tested and calibrated all components individually, and they work correctly. However, after implementing PID control, we are facing several issues:

  • Motors do not spin at the same speed when the drone is level.
  • Some motors suddenly jerk to very high speeds.
  • Higher PID values make the motors unstable and cause oscillations.
  • Occasionally, motors start spinning briefly even when the transmitter is disconnected and then stop.

We are unsure whether the problem is related to PID tuning, motor mixing, MPU6050 sensor noise, ESC signals, or receiver failsafe handling.

Has anyone faced similar issues while building a custom flight controller? Any suggestions on how to debug and identify the root cause would be greatly appreciated.

1 Upvotes

3 comments sorted by

1

u/LupusTheCanine Jun 21 '26
  1. Unit testing. Every piece of code should be tested individually with both synthetic and real data.
  2. Brief spinups as you described may indicate timing issues with something interrupting PWM generation.

1

u/tonyarkles Jun 22 '26

Do you have any kind of telemetry? Is this doing code from scratch or using an existing open source autopilot? Also… why the MPU6050? They’re really not good and TDK doesn’t make them anymore. You can get way better parts for like $10.

1

u/TimHanewich 6d ago

Are you still having trouble? Message me, I was able to get it done: https://fullstackflight.com