A Quadcopter Controlled By A Pi Zero

Flight controllers for quadcopters and other drones are incredible pieces of engineering. Not only do these boards keep an aircraft level, they do so while keeping the drone in one place, or reading a GPS sensor and flying it from waypoint to waypoint. The latest of these flight controllers is built on everyone’s favorite $5 computer, the Raspberry Pi Zero.

The PXFmini controller and autopilot shield is the latest project from Erle Robotics that puts eight servo outputs on the Pi, barometer and IMU sensors, a power supply, and all the adapters to turn the Raspberry Pi Zero into a capable flight controller. Since the Pi Zero will have some computational horsepower left over after keeping a quadcopter level, there’s a possibility of some very cool peripherals. Erle Robotics has been working with depth cameras and Lidar on more than a few drones. This makes for some interesting applications we can only imagine now.

The schematics for the PXFmini are open source in the best traditions of the RC and drone community and will be available soon. You can check out a video of the FXPmini flying around an office below.

57 thoughts on “A Quadcopter Controlled By A Pi Zero

  1. So a $75 board ( with $10 in parts ) can make your $5 Pi zero do what a $35 opensource autopilot can do… Why?? If you use a APM2 it even exposes mavlink on a uart where you can control everything about the autopilot from the Pi.

      1. There seems to be some large, unmarked chip on the side of male angled pins; they mention ability to run Dronecode autopilot so my bet is on some STM32 as slave doing most dirty work

          1. I know what you are talking about, but not everyone on this board knows the truth. Erle should keep up the good work, and there are bigger fish down the road for Erle that is not for everyone on this board.

      2. Hi Aleks,

        There’s no real problem at running (soft) real time tasks in Linux embedded boards when programmed appropriately. Have a look at github.com/beaglepilot/beaglepilot for previous work. I’d also recommend reviewing how autopilots are implemented in microcontrollers (they have scheduler, as their microprocessor counterparts do, and they miss deadlines, many actually).

        1. You have a very real problem, though, if the kernel crashes. An embedded mcu with a proper watchdog is far less likely to lock up in the first place, and can quickly recover if it does.

      3. SO images provided by Erle Robotics are customized, the kernel is modified with the real time patches to give priority to the autopilot. Maybe there are people who doesn’t believe that a microprocessor can fly a drone. Nowadays there are companies like google or Intel pushing really hard to the real-time kernel[1]. Also APM is really strong about Linux autopilot.

        Maybe it’s time to give a try with a linux autopilot ;)

        [1] http://news.softpedia.com/news/real-time-linux-project-now-sustained-by-google-ibm-intel-and-more-493686.shtml

    1. Will 35$ have Linux with dozen MB of RAM and clock cycles free, so that I can plug there a camera and use it form Python level and make it do stuff? IMO this is what sells this project

          1. I looked on aliexpress and there is mix of Naze32/Flip32 clones equipped with Atmega64, STM32F103, STM32F303…
            How can one control it form another onboard computer? I found nice “MavLink Tutorial for Absolute Dummies” but on hardware is it enough to plug in instead of RD transciever, or can Naze32 listen for commands over UART?

      1. How far? I was just guessing, I didn’t actually add up the parts. I know there’s more in the PCB and miscellaneous stuff but now that I look up the parts I don’t think I’m that far off though…




        I was simply pointing out that the APM could also be used to create a linux autopilot. Mavlink is intended to be controlled over a uart which would be perfect for this scenario. Why recreate the whole autopilot?

    2. Umm, no, the Pi can do a lot more.

      I have never seen an autopilot board for sale that can have an integrated camera running computer vision software. Have you?

      Erle’s board is designed with a Pi Zero footprint, but the connector on the Pi B+ and Pi 2 B are the same.

    3. what can we use. i kind of seen that as i looked lol. people taking advantage for sure i hope it dont sell.

      on another not i need something for flight control. I will get pi zero anyway i think but arduono or raspberry build on the cheaps what i need.

      Im thinking just get the naze32 board for a fiver but then i think but i can have a pi zero and all those possabilities for for 6quid so im like lolz wtf do i do?

      Can I wire escs to the zero? see i want to know what options there is for escs all in 1 units.

      I believe weve reached a syage in tech were you can do what you like for next to nothing. amazing things like the oi zero prove that. When money allows im do hole house car and everything out. its that time and we live once.

      Any esc and flight control solutions please kik me on rixsta or any test ideas. think a company should be all over this already some are and milking it. they wont sell thiugh.

  2. Whats so special about this apart from its form factor to plug into a RPi Zero

    Looks like a bog standard FMU board, and it seems to contain a MCU though mention what it is.

  3. To answer the comments posted above, the value of this board is that it sells for about half of what other commercial autopilot shields for single board computers like the Raspberry Pi or the BBB sell. It’s also smaller, and fits the Pi Zero which is at least 6 times cheaper itself than the non-zero Pies and other SBCs. It doesn’t sound very impressive if you’re not up to date on the current autopilot boards market, but it’s a step forward. One reason this board is nice is that it has software support in upstream Ardupilot repos and also will be familiar to the users of previous Erle Robotics shields.

    To give you some context, the SBC-based flight controllers are the future and the Ardupilot project is clearly steering in that direction. The APMs were great but it had its limitations and stopped being supported by the live software projects about a year ago. Pixhawk, the NuttX-based APM successor is likely to go the same way at some point although that may still be a long time away.

    Now all that said I myself fly a Raspberry Pi-based flight controller without using any pre-made shield. If you can solder and do some programming, these shields don’t provide many features that you can’t have by connecting all of the RC peripherals such as sensors, ESCs, the Rx, the GPS and the servos, directly to the Raspberry Pi’s pins. Those shield’s MCUs handle stuff like PPM/SBUS/PWM input decoding, PWM signal generation and 3.3V – 5V level shifting. Those are nice features but the first can be solved (and partially already is in upstream Ardupilot code) by abusing the broadcom on-chip DMA, and for the level shifting, you just have to be lucky or consciously select peripherals that tolerate or use 3.3V, or are I2C-capable such as some new ESCs. It’s also nothing that a $1.5 arduino clone couldn’t do.

  4. Timely as always. My interest is using fixed wing planes, quadcopters, or even kites to make accurate and current maps for environmental monitoring. Kites are their own beast, but with planes and quads, it would be nice to have a Raspberry Pi, or some SBC of some kind running Linux, doing high level control (head to next way-point, trigger the camera, head for home before battery runs low, etc.). Do any flight controllers offer an interface over a USB-port that would give enough feedback and allow for that kind of control? Honestly, I’d be happy to pay for the PXFmini if it offered this…and was price-competitive with alternatives.

        1. Fair enough, but is there a simple high-level interface and place to plug in some code to use that interface? If there was an equivalent of the Arduino’s setup() and loop(), the hacker community would go nuts.

      1. Thanks! All I needed was that little push to dig into this a bit. Aerial mapping is well-travelled ground for the ArduPilot crowd, as one would expect. People were doing what I aim to do back in 2013. So there is plenty of experience to draw on.

    1. No it’s not, 3 blades are less efficient then 2 blades but they can provide more thrust in a smaller diameter, I use a ZMR250 and i could put 3 blades on it and make it a bit faster, but at the expense of my 6 minute max fly time. It’s not worth it to me.

  5. Pretty classic that the schematics are coming soon, sounds like every other kickstarter. People should lead with the schematics sometimes I think, you get good feedback. I think these schematics are pretty predictable. In fact I might imaging that it is using one of the MCUs from another open drone controller. If someone has a couple days it wouldnt take long to whip this board together. What i am interested in is how the manage the power reliability for the Pi. Id like to see what they are doing for the Pi power supply. I don’t see any big inductors on the board or regulators, not sure how they will be powering the Pi 2 reliably. Maybe they arnt powering it??

    They probably are using a slave chip, at the moment it is really more efficient for the Pi. Really the PRU on the BBB is always better suited for single board computer robot control (check out there other boards). Sure the Pi Zero is tiny and cheap but its not well suited.

    1. This is not a Kickstarter here, it is a product they sell in their own shop. And Erle Robotics has pretty good records at making their hardware design files available, check their PXF2 Github repo: https://github.com/erlerobot/PXF2

      I think they are only holding the schematic until the board is released in order to keep a small advantage over future clones.

      BTW, the PXF Mini looks like a stripped-down version of their PXF2 Raspberry Pi hat / BBB cape, so I bet the big chip on it is just a PCA9685 16 PWM I2C chip, as they are using the same IMU and barometer sensors and same ADC. And the PXF is heavily based on the PixHawk, which in turns, etc.

      IMHO, using even a small STM32F103 instead of the PCA9685 to generate the PWMs and use the STM32 built-in ADC to handle the power supply monitoring would be a much cheaper and expandable option.

      I think that the 69€ price tag is rather expensive given the low PCB part count and compared to the small FC available around here (Naze32…), but much cheaper than the high-end Pixhawk and clones at 100+ €. I am waiting for PXF Mini clones to appear to lower this price, should not be much more than 30€, I guess.

      And don’t forget that this PXF Mini shield / hat / cape not only works with the Raspberry Pi Zero, but also with plain Raspberry Pis, Raspberry Pi 2, Orange Pi, Banana Pi, Odroid-C1 and Odroid-C1+ because they all use the same expansion connector pinout!

      1. > IMHO, using even a small STM32F103 instead of the PCA9685 to generate the PWMs and use the STM32 built-in ADC to handle the power supply monitoring would be a much cheaper and expandable option.

        Yes, with that you could imagine a failsafe autopilot in the STM in case linux crash.

        1. Would be the best approach in my opinion, but there is no harware available on the market (specially for power distribution and monitoring and also for RC servo output) …… maybe a nucleo board with mems expansion board on the top

        1. Please consider lowering the price: I can get all the components on AliExpress for < 20€ in single quantity… Even if not everybody is able to route a PCB and make a board, I fear that PXF Mini clones will appear very soon at a cheaper price if copycats think it is worth it.

        2. Any updates.
          Deffinately needs to be cheap. Id say 5 bucks delivered.
          A esc solution cheap too.
          What Id do if money was no object, id make these 2 priorities and undercut every similar product appropriately. Buy in amounts were they end up cheap or better still find systems that have them as parts and add. Need to be tiny a reliable with all options.

          Please do it. it makes sense.

  6. Hi Julien,
    There’s a good reason why we didn’t released them up front but bear with us, they’ll be released. Feedback is something that will be more than welcome. We’ve previously released versions of the PixHawk Fire Cape (PXF) and the PixHawk Fire Cape 2 (PXF2) (available at http://erlerobotics.com/docs/Artificial_Brains_and_Autopilots/Autopilot_shields/PXF_2.html) so please, give us some credibility. We got no feedback so far but we are still hoping someone will provide it at some point.

  7. In terms of hacking this is really cool. In terms of drones I find this superfluous. If the Pi contained all the sensors, fine. But if one needs an expensive shield in addition, any advantage is lost. Basically they just made another FC without a main processor. Good job. It’s not that smart an idea to mix flight control and periphery on the same chip anyway. I’d also contest the fact that FCs are engineering marvels. The software is pretty neat, yet not a marvel, but the hardware is fairly standard.

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.