pixhawk + Raspberry pi Zero w

hi guys,

trying to set up my rpi zero w with pixhawk as per these insructions: http://ardupilot.org/dev/docs/raspberry-pi-via-mavlink.html

did a quick test to see if I get power by connecting power via usb to pixhawk ONLY and I don't seem to get anything.

am I assuming the wiring from a "large" raspberry pi would be the same for the zero?

to  clarify I have connected the +5v but no power being drawn.

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –


  • Awesome, thanks a ton!

  • Hey, it's actually super simple.  Take a normal usb2 cable, cut in half, take the small plug half and strip the outer sheath where you cut it.  You'll end up with something like this:


    Then just connect the + and - from your BEC to the black and red wires of that bit of the usb cable.  Really simple, and gives your raspberry some protection from spikes, reverse polarity, incorrect voltage etc.

    Can the Data wires of a USB cable power a LED?
    I got a USB wire from an old mouse and the wires were soldered to the circuit as: Green - D, Orange - C, Blue - V and White - G. Assuming orange was…
  • Thanks again fnoop, helpful as always. I don't suppose you have any info on the usb  cable conversion?

  • Most of us are amateurs-in-learning :) (I certainly am).  You can buy a 5v BEC from any drone/hobby shop, as long as it does 2-3a that will take care of anything a raspberry is likely to consume.  A lot of PDB (power distribution boards) for your ESCs these days have 5v BECS as well that will power a raspberry.  Yes a zero is powered through the GPIO pins the same as any other raspberry, so should work.  Make sure you have the right pins connected (!) and you have the ground connected.

    If you can, power the raspberry through the USB as it has polyfuses and other protection that the GPIO power rails don't have - it's a little safer for the raspberry, but a bit harder to wire up as you have to cannibalise a USB cable.

  • Well thanks for that fnoop, anything that can cause a catastrophic failure is obviously not a good idea, do you know if there is an official or advised way to power the pi3? As I'm struggling to catch your drift with powering from bec (as you can tell I'm no pro)

  • Firstly the telem2 port in that diagram is a lower power port, the telem1 port is 'high power' as detailed here: 


    but can still only handle up to max 1a and is still not a good idea to go up that high - and a raspberry can easily exceed that if you push it (max cpu, wifi, anything plugged into usb) particularly if powered directly through the 5v rail which has no limiting, unlike the usb.  If you're just using a pi zero on it's own then you should be fine most of the time, as it draws a lot less power.  I think that doc page was created back before the raspberry had quad cores, wifi etc which consume a lot more power.

    The main problem is if you draw too much power then you will affect the voltage available to the pixhawk itself and risk suffering a brownout, where the voltage drops to a point that the pixhawk can no longer function.  Then your craft drops out of the sky.

    So it's strongly recommended to power anything significant from a separate power source.

    Telemetry / Serial Port Setup — Copter documentation
  • Fnoop, first time I've heard this, can you explain a little? I've powered a pi3 this way before but didn't know it was a bad idea. Are you able to explain your setup?

  • That's terrible insane advice - never power the raspberry from the pixhawk.  That's an error in the docs and should be fixed.  Power the raspberry from a BEC or USB, separately.

  • So after some research the wiring is the same for rpi3 and zero, has anyone got the zero to work?

  • MR60

    The image is meant for a RPI3, not a RPI zero. That might be the issue.

This reply was deleted.


DIY Robocars via Twitter
RT @chr1sa: Just a week to go before our next @DIYRobocars race at @circuitlaunch, complete with famous Brazilian BBQ. It's free, fun for k…
DIY Robocars via Twitter
How to use the new @donkey_car graphical UI to edit driving data for better training https://www.youtube.com/watch?v=J5-zHNeNebQ
Nov 28
DIY Robocars via Twitter
RT @SmallpixelCar: Wrote a program to find the light positions at @circuitlaunch. Here is the hypothesis of the light locations updating ba…
Nov 26
DIY Robocars via Twitter
RT @SmallpixelCar: Broke my @HokuyoUsa Lidar today. Luckily the non-cone localization, based on @a1k0n LightSLAM idea, works. It will help…
Nov 25
DIY Robocars via Twitter
@gclue_akira CC @NVIDIAEmbedded
Nov 23
DIY Robocars via Twitter
RT @luxonis: OAK-D PoE Autonomous Vehicle (Courtesy of zonyl in our Discord: https://discord.gg/EPsZHkg9Nx) https://t.co/PNDewvJdrb
Nov 23
DIY Robocars via Twitter
RT @f1tenth: It is getting dark and rainy on the F1TENTH racetrack in the @LGSVLSimulator. Testing out the new flood lights for the racetra…
Nov 23
DIY Robocars via Twitter
RT @JoeSpeeds: Live Now! Alex of @IndyAChallenge winning @TU_Muenchen team talking about their racing strategy and open source @OpenRobotic…
Nov 20
DIY Robocars via Twitter
RT @DAVGtech: Live NOW! Alexander Wischnewski of Indy Autonomous Challenge winning TUM team talking racing @diyrobocars @Heavy02011 @Ottawa…
Nov 20
DIY Robocars via Twitter
Incredible training performance with Donkeycar https://www.youtube.com/watch?v=9yy7ASttw04
Nov 9
DIY Robocars via Twitter
RT @JoeSpeeds: Sat Nov 6 Virtual DonkeyCar (and other cars, too) Race. So bring any car? @diyrobocars @IndyAChallenge https://t.co/nZQTff5…
Oct 31
DIY Robocars via Twitter
RT @JoeSpeeds: @chr1sa awesomely scary to see in person as our $1M robot almost clipped the walls as it spun at 140mph. But it was also awe…
Oct 29
DIY Robocars via Twitter
RT @chr1sa: Hey, @a1k0n's amazing "localize by the ceiling lights" @diyrobocars made @hackaday! It's consistently been the fastest in our…
Oct 25
DIY Robocars via Twitter
RT @IMS: It’s only fitting that @BostonDynamics Spot is waving the green flag for today’s @IndyAChallenge! Watch LIVE 👉 https://t.co/NtKnO…
Oct 23
DIY Robocars via Twitter
RT @IndyAChallenge: Congratulations to @TU_Muenchen the winners of the historic @IndyAChallenge and $1M. The first autonomous racecar comp…
Oct 23
DIY Robocars via Twitter
RT @JoeSpeeds: 🏎@TU_Muenchen #ROS 2 @EclipseCyclone #DDS #Zenoh 137mph. Saturday 10am EDT @IndyAChallenge @Twitch http://indyautonomouschallenge.com/stream
Oct 23