MINI-Zee: a $100 DIY smart drone with the Pi Zero and APM

I finally received my Raspberry Pi Zero,  just in time to get into the DIY challenge of building a smart drone with the Pi Zero and APM under 100$. I called this project: MINI-Zee

How this can be done?

Well first of all, thanks to Victor and the team at Erle Robotics for releasing the plans and software of their PXFmini.  This is a real inspiration for building my own board, because all the parts are available at a cheap price and are relatively easy to assemble and interconnect using through-hole breadboard, providing you are very experienced with this type of build.  Thanks to Mirko as well, for having introduced a real DIY autopilot project that allows us to experiment with a fully working and well supported BeagleBone  based  ArduPilot  Cape called the BBBMINI.

Bill of Material (US$ - Transport & taxes excl.):

Raspberry Pi Zero                                      5.

MPU 9250 (SPI 9 dof IMU)                         8.

MS 5611 (SPI Baro)                                   9.

PCA 9685 (16 channel PWM Servo Driver)  5. 

3.3 v. regulator                                          1.

BEC 3 amps                                             3.

Breadboard, Resistors, Connectors, Misc.   7.

                                               AutoPilot:  38.

HobbyKing Spec FPV250 V2 Quad Copter

ARF Combo Kit - Mini Sized FPV         60. 

                                                     Total:  98.

*This is Banggood price; I had an ADAFRUIT –PWM on hand, and I really recommend going with ADAFRUIT, because of all the effort  they put on making a great tutorial and drivers for this product. Note: Just like Erle , the USB WIFI, GPS and the Radio Control are excluded.


A) Hardest part: Get a  RASPBERRY PI ZERO (Where is my Zero site)
B) Hardware - See BOM
C) Board Schematics : Erle pxfmini
D) Board Software: Erle pxfmini

E) LOAD LATEST Raspbian-Jessie

Disable serial Login (Allow GPS on serial Port)
Enable , I2C, SPI , Serial
Disable Console = Auto Log on a shell

Load Test Result: TEST: T: 0 ( 1136) P:80 I:500 C: 100000 Min: 16 Act: 31 Avg: 32 Max: 157

G) MAKE ArduCopter

Special MINI-ZEE release:
1) The MPU 9250 is mounted on the Z-Axis, so we need to change : 

, _default_rotation(ROTATION_YAW_270)  = to ROTATION_NONE

2) The PCA9585 has no external clock, and the ESC are connected to ports 1-2-3-4, so we need to change: 

static RCOutput_PCA9685 rcoutDriver(PCA9685_PRIMARY_ADDRESS, true, 3, RPI_GPIO_27);      -to-

static RCOutput_PCA9685 rcoutDriver(PCA9685_PRIMARY_ADDRESS, false, 0, RPI_GPIO_27);

H) Fly the MINI-ZEE == Add these to /etc/rc.local

#wait till network is up and DHCP assigned address

while ! ifconfig | grep 192.168.2. >> /home/pi/bootlog; do
echo “no network, waiting…” >> /home/pi/bootlog
sleep 5
echo “Starting ArduCopter” >> /home/pi/bootlog

sudo /home/pi/ardupilot/ArduCopter/ArduCopter.elf -A udp:192.168.gcu-address:14550  -B /dev/ttyAMA0 > /home/pi/startup_log &

exit 0


Thanks to the damping platform, the vibration level is within specs. Video is available for anyone interested..;-)


This project took about 20 hours to complete. As you can see, I really enjoyed  doing some hardcore DIY to demonstrate that it is still possible to build your own flight controller from a Linux Based system.  I do not recommend to try this as a first project, but if you are interested, get a BBBMINI, this is the best introduction to DIY  and if you want to fly a Raspberry Pi Zero, it is much  easier to buy a PXFMINI.

Views: 18881

Comment by Matic Jovanovic on July 25, 2016 at 4:21am


Great work

I have one question tho, why do you need PCA9685?


Comment by Patrick Poirier on July 25, 2016 at 4:36am

Thank You 

There are 2 reasons:

A) This build is based on the pxfmini that has a lot of similarities with the Navio, and both are using the PCA9685 for PWM.

B) There is no consensus in the community as if the RPI can generate stable PWM using its own resources  (see some discussion here: PIGPIO ) . So instead of going on the unknown I decided to stick with 2 generation of working autopilots and adapt the pxfmini code for my particular build.

Comment by Matic Jovanovic on July 25, 2016 at 4:38am


thanks for taking the time to answer

regards, Matic

Comment by Patrick Poirier on July 28, 2016 at 2:42pm

Here is release 2 of the Mini_ZEE

I finally received the RPI Zero with Camera and decided to upgrade the motors as well.

Still need some adjustments since the camera induces some noise on the GPS and now the Wifi Dongle need its own power. 

Comment by Alex Wright on July 29, 2016 at 5:32am

@patrick poirier, Would you be able to show some detailed pictures of the board with the mpu9250 and ms5611 attached? I would also like to see how connections to the pca9685 as well. I have just also received my pi zero and would like to build a board for my skyhero anakin frame. I have the tubular frame not the clubman.

Comment by Patrick Poirier on July 29, 2016 at 6:02am

Hello Alex,

I looked at the anakin frame, it is a nice construction, a fast stm32f3  autopilot with CLEANFLIGHT might make a great racer.  I am a little skeptical about the possibility of fitting the RPI + Cape on it because, if you look at my pictures, total height is about 4cm excluding damping platform. You can certainly eliminate the platform and reduce the overall height by using a different model of headers connectors (look here ) or soldering the modules directly on board, thus making repair quite impossible.  By the way, the PCA9685 is connected with short servo leads and it is sitting in the base with the receiver. 

Anyway, if you are interesting in building it, do not hesitate to ask for help :-)

Comment by Alex Wright on July 29, 2016 at 6:16am

@patrick poirier I use the bbbmini as well and have soldered imu directly to the pcb and with the socket. I preferred the lower height of the board with the imu and baro soldered directly to it. I have used my beaglebone black and navio2 on a voodoo quads vdq250 frame and never used any dampening platform. I will also be attempting to use ardupilot with my xu4 using the same modules for the time being the mpu9250 and ms56111 and the PCA9685

Comment by Patrick Poirier on July 29, 2016 at 6:24am


If you really want to squeeze it the max, you could install both the mpu9250 & ms5611 on the bottom side of the board (providing you set the correct rotation in the HAL file) & mount the PCA9650 module on top (can even reduce this module size by cutting the unused connector space).

Comment by Alex Wright on July 29, 2016 at 6:32am

i have plenty of room if I use a proto hat with the imu's connected. I could then like you, move the pca9685 closer to my power distribution board. What about voltage reading? Are you planning on integrating the ADC1115 as well?

Comment by Patrick Poirier on July 29, 2016 at 12:15pm

Not for the moment ,

I have to get a decent video downlink to my Tower GCS, and it requires the right mix of resolution, frame rate and processing power (I'm already at 69% on this single core) and not getting the wlan/usb saturated otherwise it might get really ugly, like a kernel panic... . I have to get the camera and the flat cable EMI to a much lower level because the GPS is loosing sync, so it needs shielding without adding too much weight ... fun .. fun ... fun :-)


You need to be a member of DIY Drones to add comments!

Join DIY Drones

© 2020   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service