Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

Andrew Jawitz


Welcome to my Personal Landing Page! Here you can find information about my professional background, my latest blog posts and links to other projects and writings from around the web.

A DIY Flight Controller

GY 86Naze32nojtag.png

(Note-For a broad introduction to the most basic, critical components in a DIY Drone build see first this post at- https://cribstone.github.io/humblehacker/2015/08/11/DIY-Drone-Basics.html.)

Hardware

The Flight Controller (aka autopilot) functions as the robotic "brain" and as such is often the most expensive single piece of hardware in a drone kit (other than the RC Transmitter if one is not already owned). Pioneering open source projects like http://www.multiwii.com/ and http://ardupilot.com/ developed autopilot firmware for 8Bit MCUs like the popular Arduino. Most platforms at present have evolved into 32bit platforms and range from the $200 Pixhawk to the $15 CC3D. Most modern FCs (like the Flip32+ pictured below) will be based on an STM32 MCU (instead of an 8bit Arduino) and will include an accelerometer and gyroscope for self-stabilization plus a magnetometer/digital compass for navigation.

Flip32%25252B.jpg

A combination of all three sensors, called an IMU can also be found for minimal extra cost. Some FCs like the Naze32 'Acro' are purposely designed for manual control and lack a magnetometer. Such FCs will not have an autopilot capability so should be avoided by aerial mappers. (For a more detailed explanation of MCU hardware please see- https://cribstone.github.io/humblehacker/2015/08/13/The-DIY-Drone-Toolbox.html)

Firmware

While the hardware capabilities of the $200 Pixhawk and the $15 CC3D may be comparable, the software interface of the Pixhawk is significantly more accessible for a non-expert. For many, the $185 more than makes up for the learning curve of the latter device. With the list of open source autop ilot programs growing every day, simply finding a single platform to work with can be overwhelming enough to turn away many before they even start! For purposes of clarity, I will be focusing on only one platform, called Cleanflight, but for reference purposes I will also maintain the following list of Open Source Autopilot platforms-

Cleanflight

Cleanflight is a fork of another open source project called Baseflight which itself was created as a 32bit fork of the venerable MultiWii platform. (NOTE: I have covered the differences between the 32bit derivatives and the original 8bit code in the DIYDrone Toolbox post). The programming interfaces for both Baseflight and Cleanflight are in the form of a web-app in the Chrome browser and are much more accessible than earlier incarnations. Both have expansive support for different hardware including Naze32, CC3D etc…​ The major difference between the two is Cleanflight is developing much more rapidly and adding new improvements every week almost. As of this writing, the one major drawback is sparse support for adding GPS navigation by waypoint on a map. This is very likely to change however as the pace of development is accelererating.

A DIY Scratch-Built Flight Controller

The namesake of the original MultiWii was derived from the fact that the entire flight controller could be built using nothing more than recycled electronics from a Ninetendo Wii "nunchuck" controller and an Arduino "Pro Mini". Since that time, flight controllers have evolved into commercial products in their own right, and the old 8Bit MultiWii boards have evolved into more powerful boards like the popular Naze32. Nevertheless, I still see great value in the simplicity of the original DIY approach. Again, I elaborate in greater detail in the DIYDrone Toolbox post, but the evolution to 32bit MCUs made the DIY method much more complicated as it no longer utilized the hacker-friendly Arduino platform.

Luckily, I came across the following build thread at http://www.rcgroups.com/forums/showthread.php?t=2154329. The thread gives detailed instructions on how to build the equivalent of a Naze32 flight controller from scratch using a generic STM32 develepment board like http://www.newegg.com/Product/Product.aspx?Item=9SIA7BF2K27858&nm_mc=KNC-GoogleMKP-PC&cm_mmc=KNC-GoogleMKP-PC--pla--Eco+Gadgets-_-9SIA7BF2K27858&gclid=CjwKEAjwjYCvBRC99sSm_frioAwSJACrKuPCunmJxX9vZ2Mkz4tMRkr7J-p9sckZ41pr6rBf38wcFBoCpFDw_wcB&gclsrc=aw.ds[this one].

A Cleanflight or Baseflight HEX file can be flashed to the STM32 board using an FTDI adapter (connected according to the diagram)and the STElectronics Flash Loader Utility.

DIYNaze1stBoot.png

The all-important flight control sensors like the accel/gyro, barometric pressure sensor and magnetometer can then be added individually (for a total of $7) or via a combined IMU like the GY-86 ($15 or the GY-80 ($10. The sensors are then connected according to the following diagram-

DIYNazeProgramming.png

Once the firmware is successfully flashed, the board connects to the Cleanflight web-app as if it were a Naze32!


Discussions