Micropython Flight Controller

A stabilization system for drones using a pyboard, a MPU6050 and a RC receiver

Similar projects worth following
The pyboard has a processor much better than commercial flight controllers, so we can made a flight controller similar or better written in python.

The is based is this link:

The is a modified version from here:

The is based from here:

To receive the PWM from the RC receiver, I took the code from here:

To control the speed controls, I take the code from here:

Here is the code:

  • 1 × pyboard micropython board
  • 1 × FrSky receiver 2.4 GHz receiver with telemetry
  • 1 × FrSky transmiter 2.4 GHz transmiter with telemetry
  • 1 × mpu6050 3-axis accelerometer and 3-axis gyroscope

View all 3 project logs

Enjoy this project?



tabshi wrote 11/16/2016 at 06:54 point

how about the robust?

  Are you sure? yes | no

wagner wrote 09/12/2015 at 14:42 point

The pyboard build-in accelerometer only have accelerometer.... The mpu6050 have gyroscope and accelerometer.   In the are commented the code for use the build-in accelerometer:

#accel = pyb.Accel()
imu = MPU6050()


#x, y, z = accel.filtered_xyz()
x, y, z = imu.get_xyz()


You only have to switch this commented lines.

The problem with the built-in accelerometer is that when you shake, it throw wrong data... I have checked the accelerometer documentation and it can determine shake movements, but this feature seems not implemented in the micropython pyboard.

The mpu6050 doesn't have problems with shake movements....

  Are you sure? yes | no

ðeshipu wrote 09/12/2015 at 09:34 point

But wait, doesn't pyboard have a build-in accelerometer already?

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates