Quadcopter Brain

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.

34 thoughts on “Quadcopter Brain

  1. 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.

    1. 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.

    1. 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?

      Cheers,
      Alan

      1. 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.

  2. >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.

    1. 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.

    2. 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.

      1. 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.

      2. 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!

        1. 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!

    1. 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.

      1. 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,
        FlyPhi

        1. 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.

          1. 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.

          2. 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.

  3. 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.

    https://www.sparkfun.com/products/8958

  4. 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.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.