This is a multicopter flightcontroller that is basically a copy of Joop Brokkings YMFC-AL brokking.net. Adapted for use with VisualStudio, VisualGDB and the STM32CubeMX utillitys.
The goal is to develop a multicopter flightcontroller that can be interfaced with a raspberry pi and is highly customizable.
This flightcontroller is using a pid controller and the mpu6050 for stabilized flight and automatically leveling the quadrocopter.
Like mentioned, this flightcontroller uses the same hardware as the YMFC-AL from Joop Brokking. So here is the list:
- STM32F103C8T6 Microcontroller
- FlySky 6 Channel transmitter
- MPU6050 Sensor
- A Battery and a Buck converter
- ESCs and Motors
Here is shortly described, how the STM32 and the sensors are supposed to be connected:
- Battery -> Buck converter for providing 5V power
- 5V Power -> LDO for providing 3.3V power (not necessary)
- PA0 -> PPM output of the transmitter
- PB11 -> SDA line of the MPU6050
- PB10 -> SCL line of the MPU6050
- PA9 -> RX of an FTDI board (for debug output)
- PB1 -> ESC front left (CW)
- PB0 -> ESC rear left (CCW)
- PA7 -> ESC rear right (CW)
- PA6 -> ESC front right (CCW)
- PA13 -> JTAG SWIO
- PA14 -> JTAG SWCL
- PB13 -> LED
- PB12 -> LED
Every chip can be powered by 5V power.
The Project files are for use with the aforementioned tools. So VisualStudio 2019 with the VisualGDB plugin and the STM32CubeMX for startup code generation. To program the STM32 just connect it via JTAG and hit run in VisualStudio. Connect a Serial to USB adapter to see the Output of the Gyroscope and ESC speeds.
The Flightcontroller calibrates the Gyroscope at the start. So make sure it is placed on level ground and is not moved for the first few seconds. To start the flight put the left stick of the transmitter in the down left position, to stop it in the down right position. Reference Joop Brokkings website for further information.