Skip to main content

PXFmini

Download the OS image

Request the latest OS image for your Raspberry Pi Zero from Erle Robotics at:

http://erlerobotics.com/docs/Artificial_Brains_and_Autopilots/Operating_System_images/Debian.html

It’s a manual process, so expect to wait for a few hours or till the next business day to get a response. Be sure to enter the order number, which was issued to you when you purchased the unit from Erle.

Flash the OS to a uSD card

Follow the instructions on their site.

http://erlerobotics.com/docs/Artificial_Brains_and_Autopilots/Operating_System_images/Flashing_OS_images/Mac_OS.html

If you are on Mac:

# Find out you SD card device's name
df -h

# Unmount the whole disk (unlike BBB, you should unmount the whole disk).
# Change it to fit your SD card device's name.
diskutil unmount /dev/disk6

# Copy the disk image
gunzip -c /path/to/downloaded/image.gz | sudo dd of=/dev/rdisk6 bs=8m

Initial Setup

GUI Setup

For initial setup, you need a HDMI monitor, a USB hub, a USB mouse, a USB keyboard, and a USB power source.

Initial Boot

Insert uSD above to Pi Zero and boot by plugging it into a USB power source.

Vehicle Selection

Click on a vehicle icon on the screen and it should configure itself. It should reboot into a console instead of GUI and you are ready.

Initial Connection

NOTE: Since RPi Zero doesn't have a built-in WiFi (unlike RPi 3), remember to attach a Wifi USB dongle before booting. You probably need micro USB male to USB female adopter.

Connect via WiFi

ssh erle@10.0.0.1
# OR if you have rendezvous/zero-conf enabled and don't mind waiting for a while after boot:
ssh erle@erle-brain-2.local
# password is holaerle

OS Configuration

hostname

The image is the same for erle brain 2 and pxfmini and the hostname is set to “erle-brain-2” which is confusing as I also have ErleBrain 2.

sudo vi /etc/hostname

# Change hostname to pxfmini
pxfmini

sudo vi /etc/hosts

127.0.1.1       pxfmini

Network

Since my personal network is also 10.0.0.xxx, assign different network address

sudo vi /etc/network/interfaces

auto wlan0
iface wlan0 inet static
address 10.10.10.1
network 10.10.10.0
netmask 255.255.255.0
broadcast 10.10.10.255

sudo vi /etc/hostapd/hostapd.conf

ssid=pxfmini
hw_mode=g #2.4GHz
channel=9 #2.4GHz

sudo vi /etc/dnsmasq.conf

dhcp-range=10.10.10.2,10.10.10.2,24h
dhcp-option=3,10.10.10.1

APM configuration

If you change your network settings, you need to change apm.sh in the home directory too.

vi ~/apm.sh

# change wifi addresses in the following files.
wifi="10.10.10.2:6000"

sudo vi ~/ros_catkin_ws/install_isolated/setup-mavros-bridge-wifi.bash

rosrun mavros mavros_node _fcu_url:="udp://:6001@" _gcs_url:="udp://192.168.7.1:9000@192.168.7.2:6000"

Reboot

# reboot to make these changes effective
sudo shutdown -r now

Connnect from GCS

  1. Connect to the wifi hotspot created on RPi Zero.

    SSID: pxfmini (or whatever id you chose above) WiFi password: (whatever you specified above)

If you set it up correctly, it should assign you an IP address via DHCP. The WiFi hotspot is configured to accept only 1 client and all MAVLink packets will be forwarded there.

i.e. in my case, the

  1. Add udp 6000 to your GCS connection

  2. Voila!

Connectors

The JST GH connectors on PXFmini is different (reversed) from the other DroneCode boards. Pin #1 on GH connector should be VCC, but on current generation PXFmini, this is the GND. There’s a small triangle indicating pin #1 on the backside (the other side from the locking tab) of the connector. DO NOT use cables from Pixracer and other manufacturers.

PixHack also uses JST GH connector, but with totally different pin layout than the rest of DroneCode cables, so keep them clearly labled and separated.

Peripherals

No buzzer/External LEDs.

  • Use an I2C LED if you need externally visible LED.
  • Use audio output of RPi Zero and write custom app if you need a buzzer.

http://forum.erlerobotics.com/t/questions-about-erle-brain-2-erle-copter-diy-kit/808/7

References