Saturday, November 17, 2012

More Fun

  It's been a while since I posted last, so here's a quick one for me to tell about where my quadcopter is and introduce my next project.

  My current quadcopter is flying well.  It has proved quite durable as I started at zero with 'copter flying experience and this one has shrugged off most of my silly mistakes.  I have a lot to learn, but it has been a great learning tool so far.

  Now on to my next adventure.  Arduino announced about a month ago that they were coming our with a 32 bit ARM based board called the "Due" that would be roughly code compatible with the 8bit processors.
Arduino Due

  This got me thinking about using one for a multi-copter controller.  This new processor is roughly 20 times faster than the 16Mhz Arduino pro mini that I am currently using.  This is wild over-kill as my current program runs at a 400Hz control loop, which is generally considered optimal.  One of the items that killed my inertial position tracking idea was that the processor was not accurate enough when using decimal numbers (32bit float).  The Due supports decimal numbers that use twice as many bits (64 bit double).  This doesn't give me an number that is twice as accurate, but one that is ~50 million times more accurate.  This means it may be possible to on the Due to perform 50 million operations before you have the magnitude of  error of doing one operation on my old processor.  That is over simplifying it a bit, but the point is that the reduction in error is huge.  The other factor that killed inertial position tracking was the low accuracy of the sensors.  Nothing has changed on that front, so I won't be putting a huge amount of time into trying to resuscitate IPT.  That wont stop me from developing a platform that might be able to take advantage of better sensors as they come out.
  One of the pains I had when using my old processor was that it ran on 5v and its I/O ran on 5v.  This was awkward as all of the modern sensors are designed to run on 3.3v.  Adapting between the two voltages is not too hard, but it was inconvenient.  The new Due is natively a 3.3v processor so no conversion will be required.
  After thinking about the Due and how I could use it for multi-copters, it occurred to me that using one right out of the box would generate an ugly wire nest when routing all of the connections.  I looked around to see if there was a shield that could be attached to the Due to reduce that mess, but nothing really had what I wanted.  I wanted all of the major I/O busses exposed with adjacent power and ground so all of the wires needed for a sensor could all be pulled from the same spot on the board.  I wanted to be able to plug in all of my R/C receiver channels and motor ESC's into 3 pin headers.  So I decided to design my own shield.  The first version of the shield is complete and being made by a board fab service.  I should have it in my hands in a week and a half.  I have called it the Due MIOS (Multi-copter I/O Shield)  Below is a picture.

My Arduino Due multi-copter I/O shield 
  All of the Due's pins have solder terminals brought in from the edges in case I need to attach a wire to them.  I am not a fan of mounting the sensors directly to a shield, so that is why it only breaks out the I/O busses.  This way I have the flexibility to mount the sensors where I think they make sense in the frame while placing the Due in an convenient location.  This also makes this board's usage very flexible as it could be used for almost any type of robotic control or data collection application.  Servos could be attached to the motor locations and then be used to control anything.  The resistors that are located next to the R/C input area are used to divide the incoming signal and convert it from 5v to 3.3v (this will prevent the receiver from damaging the inputs in the Due by providing too strong of a signal.)
  I have plans to improve this shield.  I want to go to surface mount resistors (I already have the regular wire resistors, so that is why this version has through holes.)  I want to add LED lights that can used to indicate the machine's status (calibrating, standby, armed, etc...).  I want the MIOS to power the Due in the future, as currently it is not hooked up that way because the official page for the Due notes that it could be damaged when powering it through the 5v pins.  I will look into it more closely and see if there is an easy alternative.  In any case, the motor ESC's are used to power the R/C receiver.

  In addition to the Shield, I've been contemplating building a multi-rotor for doing camera work or first person video flying.  I have sketched up an initial design to allow me to think about how I would go about it. Since I can machine all of the components myself, making it would be relatively cheap for me.  Besides, I enjoy designing, building and programming... maybe even more than flying.  Below is an very early version of my design.

My early hex-copter design

  I am debating between sticking with four motors or going to six like is show in the above picture.  I am also contemplating giving the motors a small amount of "up-angle" to increase the natural stability of the copter.  This copter will have much longer legs to provide room for hanging stuff under the frame.  The green disks represent the area covered by a ten inch (250mm) propellor, which is the largest I would consider for this frame.  I think 8in or 9in (200mm or 225mm) will be more realistic.

  That is all for now.  Let me know if you have any questions.

  Thanks for reading and please sign up on the right if you want to be automatically notified when I post more updates.



  1. Wow, loved the idea.
    I think Massimo Banzi(one of the creator of Arduino) said that the Arduino Due was a better approach to a multi-copter, since it has a more powerful processor.

    I'll keep following this project(I was planning in doing a multi-copter with arduino due, too).

    Just one question: what is the software that you'll use in the arduino? Arducopter? Or you're writing one yourself?


    1. For basic flight, the Atmel 328 is a very good option, but more power definitely opens up a lot of options for more complex processing of the sensor data.

      I have written my own multi-copter software from the ground up (see my previous posts). I have done it as an self educating project, and I have learned a great deal since starting this last spring. I wish you the best with your project when you start it.