The Idea

Reinventing the wheel can be fun. Even if the wheel doesn’t work at the end, one inevitably learns a thing or two from the process. The idea behind this project is not particularly new or even useful, but nevertheless, it has enough challenges for me to make it an interesting experiment.

What I want to do is build a small drone (quadcopter) controlled entirely by Raspberry Pi (Model 2 or 3). That is, no pre-manufactured flight controller board. RPi will be responsible for communications, measurements, flight control, motor operations and video streaming.

The argument against using Raspberry Pi as a flight controller is that it’s not a dedicated board, but a general purpose computer that, by default, doesn’t even have a real-time kernel capable of guaranteeing the sort of responsiveness necessary to keep a copter in the air.

However, this has been done before. In addition to that, Raspberry Pi 2 and 3 are faster and come with a quad-core processor, which will allow me to offload the flight controller loop to a dedicated process, leaving the other cores to deal with the rest of OS tasks, communications, and video processing. To make things a little more interesting I want to see if I can implement the entire thing, including the flight controller bit, in Python. Can it be done? I think it might be possible, but only time will show.

Why not write the flight controller part in C? Of course it can be done and has been done many times before. Where is the fun in that? 🙂 Also, I think that if it can be done in Python, it might open up this sort of projects to a larger group of people, some of whom might not necessarily feel very comfortable coding in C, but feel at home in Python. In any case, this is just a learning exercise for me, so why not try for something different.

I have no experience building drones or developing complex multithreaded, multiprocessing applications in Python, so I have a steep learning curve ahead of me.

This blog is to record my progress, if any, to keep me motivated, and to share what I’ve learned with others, in case it helps with their projects. And perhaps you can contribute your thoughts and ideas to steer me clear of dead-end alleys and help me avoid stupid mistakes that I’m sure I will make.

As the code for the project will start shaping up a little, I will share it via github or similar platforms.

Wish me luck, share your thoughts and stay tuned for more details and updates.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *