Close

Week 3

A project log for Resinified Quad Copter

Raspberry Pi 3 and PXFmini Quad Copter running on resin.io

joeJoe 11/04/2016 at 13:450 Comments

This week I mounted the propellers and started to think about how to mount the electronics to the frame, one thing that became clear is how incredibly tight for space the frame is.

(Frame with propellers mounted)

To try and resolve this I decided to slim down the RPi3 by removing any unused connectors, I also removed the black plastic from a few GPIO pins so I can still get access to the serial port when the PXFmini is mounted.

(RPi3 with connectors removed)

(RPi3 with PXFmini mounted)

(RPi3 with PXFmini mounted)

(RPi3 with PXFmini mounted and serial connected)


To actually mount the RPi3 and PXFmini to the frame I plan to design some laser cut acrylic brackets.

To solve the errors thrown by Ardupilot when it starts up I moved away from using make to build the code and started using waf instead. Waf is the recommended way of building Ardupilot and comes with some good documentation which made the process a lot easier. Here is the relevant snippet from the dockerfile:

# Set the working directory
WORKDIR /usr/src/app

# Checkout ardupilot source
RUN git clone https://github.com/ArduPilot/ardupilot.git && \
    cd ardupilot && \
    git submodule update --init

# Checkout and build libiio source (ardupilot dependency)
RUN git clone https://github.com/analogdevicesinc/libiio.git && \
    cd libiio && \
    cmake ./ && \
    make all && \
    make install

# Install future (ardupilot dependency)
RUN pip install future

# Set the working directory
WORKDIR /usr/src/app/ardupilot

# Build ardupilot
RUN ./waf configure --board pxfmini
RUN ./waf --targets bin/arducopter-quad
Once I had made this change Ardupilot started up correctly without any errors. The next job is to get telemetry data from the RPi3 into the APM Planner software, I tried to do this using resin's public URL functionality but for some reason Ardupilot won't send telemetry data over port 80. To resolve this I stripped down resin-wifi-connect until I was left with just the code that enables and disables a hot spot on the RPi3. Next I connected up a 2 position switch to control the hot spot mode.
(Hot spot switch)



Finally I attempted to build an RT_PREEMPT kernel but I hit some difficulties as there is no patch provided for the kernel version resin uses. I plan to dig into this over the coming week. If your interested you can find the steps I used to attempt the patch on git.

Discussions