DIY Pi zero flight controller

Hi All,

Looks kinda quite in here in the linux section. I’m working on building a DIY flight controller on a Raspberry Pi zero using the same components that are on Erle PXFMini in breakout boards.
I’ve compiled a realtime patched kernel os and I have compiled APM for the Pi using the documentation on the Erle robotics site. I’m looking for any documentation on APM running on Linux, can anyone point me in the right direction?

Thanks - Steve

1 Like

Hi Stephen,

try this Link .

Cheers

Once you get things working can you post your results. I am planning a similar build.

Thanks Linus, looked through most of those but they are mostly board specific. The bbb instructions were probably the most helpful but still ran into problems. Biggest problem I think was using make to build the apm. I ditched that and used waf. Probably the most useful info is in the waf instructions here:

Made progress tonight but I’m running into errors when starting apm, looks like the errors might be due to not having hardware connected up to the zero. Ordered a mpu-9250 breakout board so we’ll see if I get any closer when it arrives.

This is what I’m getting when starting apm

pi@barney-pi0:~/ArduCopter/bin $ sudo ./arducopter-quad
Raspberry Pi 1 with BCM2708!

Init APM:Copter V3.4-dev (7091daa1)

Free RAM: 262144
FW Ver: 120

load_all took 17us
0 0 0 DataFlash_File: buffer size=16384
▒ Q}▒No INS backends available
MPU9250: unexpected WHOAMI 0x0
Interrupted: Segmentation fault

I think it faults because of the MPU9250 not being found. Not sure what the “No INS backends available” is caused by, same problem with not being able to find the MPU9250?

Hi Stephen,

that is correct.
For the BBBmini you need at least one MPU9250 and a MS5611 baro breakout board connected else it will not work.

That BBBmini looks very interesting. What does it use for pwm to the esc’s? On this Pi I’m working on I’ll be adding a breakout board for a PCA9685 for the pwm. I think the max update rate for the PCA is 100hz though.

Hi Steve,

the BBBmini uses the Programmable Real-Time Units of the BeagleBone (Black or Green) for PWM.
Look here for Mirkos great documentation https://github.com/mirkix/BBBMINI

Cheers
Linus

Do you recommend one of the beaglebones over the other? I imagine that the built in bluetooth of the green would be nice, but think that you would want to use an external Wi-Fi module?

I have two beaglebone black and one BeagleBone Green and i like the green one the most.
It offers 2x Grove connectors (I2C and UART) on the back.

There is also the newer Beaglebone Green Wireless which i think is the best if you can live without wired ethernet.

It has 2 additional USB connectors and Wifi and Bluetooth 4.1 on board.

http://www.mouser.com/new/seeedstudio/beaglebone-black-vs-green/

Hello ,
You can check my Pi Zero - PXF Mini autopilot build here: http://diydrones.com/profiles/blogs/mini-zee-a-100-diy-smart-drone-with-the-pi-zero-and-apm

Very nice ppoirier, this is exactly what I’m working on.

Hello Steve,
how is your project? I’m also interested in FC Pi Zero.
I ordered these PCBs from the Matic Jovanovic’s project (http://spikey.si/how-raspberry-pi-zero-got-ardupilot-hopefully-flies/).
But I confess I’m confused about the connections and the shofts to be installed!

Hi Fabio

I actually ordered one of the bbbmini’s from Linus and abandoned the Pi
Zero project. I may come back to it some day.

@fabiopereira73 @steveb1475
Please note that this project is no longer active, the major reason being since 3.5 the PPM is broken.
Switching to BBBMINI is a good alternative to anyone interested building, you can read here that I have an equivalent project with a Pocket Beagle
https://discuss.ardupilot.org/t/pocketpilot-a-new-linux-fc-based-on-the-25-pocketbeagle/25253

@ppoirier
Great!
Can you tell me if it is possible to support the USB 4G LTE dongle?

Just like a RPI, if the driver and application can run on debian, it should not be a problem.

This product seem interesting : https://uavcast.uavmatrix.com/

so should I also install UAVcast?
Debian + Ardupilot + UAVcast?

Depends on what you plan to do
I suggest you start a new discussion in the forum because you will benefit ftom more inputs from other

Mission Planner with waypoints + Telemetry and Video by 4G LTE