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.
HobbyKing Spec FPV250 V2 Quad Copter
ARF Combo Kit - Mini Sized FPV 60.
*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
F) LOAD RT-PREEMPT
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 :
CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_PXFMINI
, _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
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 &
I) FIRST FLY LOG:
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.
@Alex , I just checked on the Mission Planner wiki and this is using a bootloader to connect and upgrade, so we cannot upload a linux based autopîlot with mission planner.
@patrick you are able to get apm binaries for a linux board through mission planner? I believe that mission planner only works like that with the pixhawk and other boards where a "firmware" is upgraded. I could be wrong though
Take a look at this , it shows different options to access without using additional devices.
Actually I never tried using Mission Planner to upload code. I prefer getting control on each and every steps.
Thanks for the comment.
is it possible to update the APM stack with Mission Planner over usb?
I plan on not having Wifi on mine :)
I have mine already built, just waiting for ADS1115 to arrive.
Great stuff btw, really!
Hi, initial thought is to use code: https://github.com/HefnySco/MultiWii_DUE with modifications for sensor ..
Yes technically it is indeed a better design. Raspilot did an autopilot that is quite like this: http://raspilot.io/
The problem -for me- is the difficulty of building a prototype that encompass too many news things to integrate and master (like PX4 stack - Nuttx - STM32 development), for a feature that I might never have to use anyway.
Hi, Alex, the next project is clone Arduino Due for DronPi... future...
If not too late I would go with an stm32 for io as that would allow you more flexibility with pwm output. The pca9685 will work fine but i believe all outputs run at the same frequency
Great Stuff Radioelf
I just looked at your blog, and it is getting ready to fly :-)
Let me know once you get a beta release , I would be interested to build.
Hi, PCB mount (DronPi).. Raspberry Zero + ArduPilot... https://github.com/radioelf/DronPi ...