How I Developed the Scout Flight Controller, Part 9: A Lesson in Persistence

Tim Hanewich
3 min readSep 19, 2023

--

This article is part of a series documenting the development of a custom quadcopter flight controller from scratch. For a list of the other related articles, please refer to the introductory article found here.

In the previous articles in this series on how I developed a custom quadcopter flight controller from scratch. While my explanations were direct, to the point, and simplistic, getting to this point was anything but simple. This was by far the hardest engineering challenge I have faced to date — software engineering, electrical engineering, and aviation engineering. This project forced me to use all of the skills I have been honing for the past several years and then pick up many news ones.

I’m thankful for this challenge as I learned a tremendous amount throughout this process — a lot of which I will continue to use in my future projects. However, there were many times I doubted I would ever be able to finish this project successfully during its duration.

I would never call this an easy task, and this video shows why:

Scout’s Development

I started developing the Scout Flight Controller on April 29, 2023. I worked diligently on this project, starting from scratch, and built from ground up until, 70 days later, Scout took its first successful flight:

In the 70 days of development, I made 1,194 commits (code changes/updates/tweaks) to the Scout software code repository. That is an average of 17 commits per day!

During that process, I completely re-wrote the Scout flight controller software from scratch 3 times! During its development, I constantly asked myself the question if I was writing the Scout flight controller software on the wrong platform. Is something as inexpensive and underpowered as the Raspberry Pi Pico, with its 133 MHz processor, sufficient for running a PID controller adjustment loop at 250 times per second? Do I need the “luxury” of an operating system like Linux for multi-threading? If so, I should instead be building this on a full microcomputer like the Raspberry Pi Zero W.

I would flip back and forth between targeting development for the Raspberry Pi Pico Microcontroller (written in MicroPython) and the Raspberry Pi Microcomputer (written in Python). While the two are obviously very similar, there are major differences in implementation logic that must be addressed. Additionally, the entire architecture changes as you gain/lose the benefit of things like multi-threading.

Fortunately, I was able to squeeze enough performance out of the Raspberry Pi Pico and architect the code in a way that handle all required functions of a flight controller.

A Lesson in Persistence

Despite all the challenges, setbacks, headaches, doubts, and more, I’m proud and thankful that I continued with this project. Please do not, in any way, think that this was an easy or simple feat. This took me a lot of time to figure out. If you decide to use this series (and others) as a tutorial/guide for building your own drone or flight controller software, be patient with yourself. I hope that, by following the steps and code I provide in this guide, you’re able to fair much better than I did.

But if you aren’t, be patient with yourself. You’ll learn so much during this project — the process is just as valuable as the destination! Afterall, if the destination of having a functioning drone is actually more important to you, just buy one from DJI.

What’s next?

I’m incredibly proud of the Scout Flight Controller. While it is, in many ways, my greatest technical achievement, it is severely lacking in features to many modern-day consumer drones like those made by DJI.

In the next chapter, I will list some of the areas that I will be improving on in my next iteration of quadcopter flight controller software!

--

--