Quadcopter brain


This project is the warm center of [Alan Kharsansky's] thesis in Electronic Engineering. It’s an all-in-one control board for a quadcopter. This is the second iteration of the board, the first version he actually etched himself. As you can see after the break the firmware is not quite ready for prime-time. But that doesn’t stop us from appreciating the design choices he’s made.

You can see the effort he made to keep the board symmetrical which will help when it comes time to balance the aircraft. At the center of the PCB is the jewel of the sensor array, a combination accelerometer and gyroscope. This location will help easy the trouble of designing PID algorithms to drive the four propellers. Also included in the sensor array is a magnetometer for navigation, and a barometric pressure sensor which can be used as an altimeter. There are four multipurpose connectors used to drive the motors and provide feedback to the boards. He also included two more sets of pads on the board (without their own connectors) in case he wants to add more motors in the future. The quadcopter can be controlled from a base station via the XBee module.



  1. Squirrel says:

    *sniff* it’s… so… beautiful… *sob*

  2. Ooo purdy :D

  3. Larppax says:

    Looks very nice. Would love to test this with ArduCopter software, maybe we see ported version someday. Onboard XBee is nice feature. For those who are interested of things like this, google for ArduCopter and Crius AIO.

    • Alan says:

      Hi Larppax!

      I really want to test it with Arducopter and MultiWii soon. Anyway, if anyone wants to port the arducopter to this board please let me know and I could send him a board to test it or something.

      Anyway, this board wasn’t designed to be used with a standard RC receiver that’s why there is an Xbee on the board. I starting a new version which will be possible to attach a standard RC receiver to it so it can fly with the regular RC hardware and software like ArduPilot. I think this new possibilite would be more usable than this first version with the Xbee and allow people with RC hardware to use it.

  4. Mike says:

    just a word of warning, the BMP085 will soon reach its end of life, we got an email from our parts supplyer saying Bosch sensortec has announced that the part will become obsolete.

    • Alan Kharsansky says:

      Thank you Mike, I received the DigiKey email yesterday, sadly I will have to look for a replacement for the next iteration (with some bug fixes too). Have you tried another alternative?


      • wifigod says:

        I have no personal experience with the chip, but I’ve seen others try to use the MPL115A1; it looks like it has a slightly different range. I’ve also seen people state that it was a little harder to work with in code to get the proper resolution they were looking for. Also, I see that Bosch is stating that the BMP180 is the successor to the BMP085; looks to be very similar with some increased noise filtering and slightly better precision.

  5. rasz says:

    >You can see the effort he made to keep the board symmetrical which will help when it
    >comes time to balance the aircraft

    Afaik quadcopters are inherently unbalanced designs (like modern fighter jets) and require computer stabilization. Asymmetrical board wont have any influence on balance.

    • Ren says:

      But doesn’t it make sense to balance the board around the sensor chip? This and placement of other weight (batteries, housing, etc) puts the sensors very close to Center of Gravity (CoG), none of the motors will have to work harder than the others to hover or lift which is the biggest power drain. Granted there will still be different efficiencies between motors even if they are closely matched, but it seems sensible to me to minimize other possible sources of imbalance.

      The Sikorski Sky Crane has its winch directly below the main rotor hub…for a reason.

    • Cynar says:

      The maths becomes a lot easier to do when the accelerometer and gyro are at the centre of rotation. It makes the translation and rotational measurements independent of each other.

      If the chip was off centre, any rotation would also cause translation of the chip, affecting calculations.

  6. biozz says:

    looks like a wonderful … brain … but im worried about the pointlessly heavy components

    • Gert says:

      Which components are those? I’m trying to ask an honest question, but feeling snarky since your statement is vague, and everything on that board seems to have a point.

      • willrandship says:

        My guess would be the Xbee or the MicroSD connector, and perhaps the power switch. You could get away with not having those, but they sure provide some nice features.

      • Andy7 says:

        I seriously doubt that saving any weight on this board would be of any benefit to a commonly sized quad. In fact putting all that on one board is already saving weight! My quad is about 1500g and the amount of power that it packs saving a few grams on components won’t make a bit of difference.

      • biozz says:

        you can go without many of those threw hole components like the power switch, many of the connectors including the JTAG, the xbee could be mounted better, you cna rid of those LEDs, you could use a better power regulator, you could use lighter connectors if you have to use them at all, and lighter PCB materials could be made
        for a device thats power is majorly dependent on weight you could take a little more time in reducing the weight … i mean look at that switch!
        sure on medium sized quads in a str8 line it wont make too much difference but when you start swinging it around every gram matters! i noticed this very early on with mine!

        • Alan says:

          Hello everyone,

          Gert was almost there. Without the Xbee, this board weights 38gr. As many people said here, the weight of the board is nothing compared to the battery or even the frame. And 38gr probes it. Anyway:

          - JTAG: Is it necessary for programming and debugging. This last thing isn’t possible over the aire with the radio.
          - Xbee: how would you mounted better? without connectors? In this way I have two benefits: 1) It can be easily replaced with a powerful xbee or even another transceiver, 2) It allow components to be soldered below of it (and they are there!)

          - Power switch: For the current requirements of this board (the Xbee is a power harvester) there are no available switches in this size that could handle more than 200mA easly. Of course you can put a smaller switch and drive it with a mosfet or something. But a wanted a hard switch and not to overstress the components of the board.

          All the other suggestions you made, LEDs, PCB materials, etc, are really appreciated but this board is for learning and training. You do want nice features like a big switch, leds, radios and nice conncectors when you are developing something that may have problems. If you want a ready to fly solutions, this board isn’t the one. You may take a look to the Parrot’s AR Drone PCB. That’s a tiny and really nice integrated solution http://www.expansys.com/i/b/b199966.jpg

          Kind regards!

    • Larppax says:

      My quadcopter that is made from cheap part and is fully working good quadcopter weights about 1.2 kilograms when ready to flight. It still has capacy of lifting around 500 grams (on 80% throttle). Weight of component means nothing.

  7. Valkyrie-MT says:

    Is there a circuit diagram for this thing anywhere? Who did the assembly of the components?

    • Alan says:

      I’ll post all the information of the board in a small website during this week. The assembly was made by a friend in Argentina who does this kind of awesome jobs.

      • FlyPhi says:

        Dear Alan,

        I was just wondering whether you could provide a link to this website you speak of? I am quite interested in trying to produce this board, if possible, as I am working with a group on a quadcopter project.

        Yours faithfully,

  8. Joejoedancer says:

    Couple questions. What does the XBee do? What is the price point for this controller?

    • MrX says:

      You are in the wrong site.

      • Joejoedancer says:

        No way! Also sounds like he using MATLAB for the firmware. Isn’t that a $10,000 software package?

        • MrX says:

          You sure are a smart guy! Do you really think matlab would run on a Cortex M3??? He is using FreeRTOS for the firmware and matlab for the simulation! Also, a quick google would have told you that XBee is the wireless stack and he is using for RF communication.

          • Brooks Moses says:

            I’ll just leave this link here: http://www.mathworks.com/embedded-code-generation/

            Actually, no, I’ll explain it: There is a MATLAB add-on for generating embedded-system-usable C code (which will run fine on an M3) from MATLAB code, so it is entirely possible to use MATLAB to produce the part of the firmware that handles the controller logic.

            As for price: MATLAB is quite cheap for students like the original poster, although the student license is pretty clear about “you can’t use this after you graduate”. For a normal license it’s $2400 for the base package (or was when I last got a quote), but the embedded code generator add-on is on the order of $10k or more.

            My impression is that, if you’re doing this kind of work on a typical engineering salary cost-per-hour rather than as a hobby, it’s well worth the price. Too bad that puts it well out of range for most of us.

          • Alan says:

            As MrX says: I’m using MATLAB only for the academic part of my thesis: simulation. The board is running FreeRTOS and was everything coded by hand. No MATLAB code generation was used. But this would be a really nice thing to test. The board is programmed on C, compiled using GCC (on the LPCXpresso whichis an Eclipse IDE). It could be programmed with anyJtag anyway, or even with the serial radio link or the USB port.

            The Xbee is for control and telemetry. There is no RC receiver interface on this board because I use it with my PC, but I’m doing the next version who will carry this feature to be used as a standar autopolit like MultiWii, arducopter, or similar.

  9. Toonces says:

    I haven’t seen anyone put a real ground proximity sensor in, either ultrasonic, IR, or laser. Here is a small one from Sparkfun that does 15cm to 150cm. Would be a nice SECONDARY sensor for altitude (the pressure one on here is subject to errors and may not be fast enough for autopilot). Since all things reflect the light different, the IMU mixed with the output of this should be considered, since if it goes to 0, it doesn’t mean you just crashed, could be an absorbent material that is not reflecting IR. It would be a nice hover sensor when you are near the ground to catch the system from crashing or holding altitude. If it has the power, than a cheap ultrasonic could do longer, and if money permits, a shortrange cheap laser rangefinder than can do < 10m or so.


  10. dandelion says:

    Nice FlightControl! Looks beautiful. Great job. With the ARM it has a whole leap of computing power.
    Did you already test the magnetometer? Is it influenced by the magnetic field created by the coil of the switching regulator? What is the operation frequency of the switching regulator? I also want to put a stepdown converter on my FlightControl, since I have also have high power consumption. I think if the field is not too big, it can be compensated by software. So I am very curious about your experiences.

  11. Would you be willing to release the schematics for the board? I’m very interested in assembling one of these boards since I’m already developing a M3 based quadcopter, this would allow me to move to the software part

  12. Muhammed says:

    guys , i need a detailed case study for a quadcopter development in both hardware and software using FreeRTOS ,,, any help ?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s