An Arduino Controlled Quadrocopter

Sunday, 15th August 2010 - Michael Halls-Moore - 4 Comments

In a previous post, I outlined that I wanted to build a high-altitude weather balloon in order to familiarise myself with microcontrollers (especially the Arduino). It turned out that a friend of mine was also experimenting with them. He was building a light-following robot. After a few beers we got chatting about how it would be cool to work on an Arduino project together. The weather balloon seemed somewhat complicated for a first go, so after a bit of brainstorming we came up with the idea of building a quadrocopter.

Here are some slick example videos of quadrocopters in action:

Not really knowing much about quadrocopters, we decided that we would learn as we went along. We figured it would be best to follow some sort of guide and then adapt it to suit our own needs. The AeroQuad project provides a fantastic starter tutorial on how to build a "simple" quadrocopter. We devoured the guide, the circuit diagram and the parts list and eventually ordered this set of components (which is not complete yet):

Our first goal was to get the motors turning. We initially thought this would be an hour's work, hooking up the Arduino to the ESC and then the motor. We naively assumed that a full DC voltage of 5V would have the motor turning at full RPMs and that it would linearly scale down to 0V. In reality, these speed controllers are far more sophisticated and are designed to take a Pulse-Width-Modulated signal from an RC receiver.

After some extensive searching on the interwebs, we found a post explaining the type of signal received by the Turnigy ESCs. On our third evening (!) of tinkering we managed to hack together a piece of Python code which created a replica signal in software and sent it to the Arduino, just to actually get the motors turning. This was a big step for us!

After this "proof of concept" we became quite keen to build the frame of the system. My friend found a fantastic place to begin construction called London Hackspace, which is essentially a place for like-minded peeps to hang out and create cool stuff. Check out their site for more info.

We made use of the toolshop at the Hackspace to construct the arms holding the motors. At the moment the quad uses PVC tubing which may turn out to be a little heavy - this is something we need to check. Thankfully, it is straightforward to swap it out. The central section uses an electrical junction with four pipe holders attached. It will work perfectly as a mount for the project box, which will ultimately store the brain of the system.

Currently we are configuring the XBee wireless devices to communicate with each other and had some minor success with that last week. Once they are fully configured, we will begin sending gyro/acceleration information from the Arduino/protoshield to a laptop and interpret it via Python. Eventually, we will need to code up a PID controller in order to stabilise the quad.

I'm not going into too much detail here as I plan to write up the entire process in a big post/ebook format. I will be adding more posts/photos as we continue with the build though. Stay tuned.

4 comments ... read them below or add one
  • 14th November 2010
    9:00 am

    so cool .. loved this :-)

  • 15th November 2010
    7:07 am

    Thanks David.

    Ryan and I are making good progress with the copter. We're roughly halfway through. The hardware is mostly complete, although we have a long software stretch ahead of us!

  • Naveen
    2nd March 2012
    11:48 pm

    Hi you have done a great job. I am like u new to this so can you please help me out i need how to code the ESC to turn the motors. What softwares i need to use can you please mail me. I am waiting for your reply help me

  • 4th April 2012
    2:06 am

    Do you have a Facebook fan page for your site?