Zoe is now running my split cluster gather + process code for the RaspiCam video macro-blocks.  She has super-bright LEDs from Broadcom with ceramic heatsinks so the frame doesn’t melt and she’s running the video at 400 x 400 px at 10fps.

The results?:

And this peops, is nearly a good as it can be without more CPU cores or (heaven forbid) moving away from interpreted CPython to pre-compiled C*.  Don’t get me wrong, I can (will?) probably add minor tweaks to process compass data – the code is already collecting that; adding intentional lateral motion to the flight plan costs absolutely nothing – hover stably in a stable headwind is identical processing to intentional forwards movement in no wind.  But beyond that, I need more CPU cores without significant additional power requirements to support GPS and Scanse Sweep. I hope that’s what the A3 eventually brings.

I’ve updated everything I can on GitHub to represent the current (and perhaps final) state of play.

* That’s not quite true; PyPy is python with a just in time (JIT) compiler. Apparently, it’s the dogs’ bollocks, the mutts’ nuts, the puppies’ plums. Yet when I last tried, it was slower, probably due to the RPi.GPIO and RPIO libraries needed. To integrate those with pypy requires a lot of work which up until now has simply not been necessary.


The new Pi Zero with camera requires the latest Raspian version from the 10th May.  The RPIO.PWM code throws an obscure error with this kernel.  The RPIO.PWM library appears to not be managed by the original author, and currently, I don’t understand this error so cant’ fix it.  Deadlock.

Using Zoe’s SD card on Phoebe’s A+ also shows the same problem so it’s a change in the kernel, meaning further development on Phoebe can no longer pick up the latest code.  I’m worried that when the A3 is released later this year, I’ll be forced to use the latest kernel for it and the same RPIO.PWM problem will rear it’s ugly head and prevent further kernel upgrades on Phoebe too.

The only plus for the moment is that I can continue current development on Phoebe based on the January jessie to add the LEDDAR and compass function; in addition, by disconnecting the motors from the ESCs, Phoebe stops whining when there’s no PWM signal meaning I can do development / testing indoors.  Next stop is replace the ground facing camera and URF with the LEDDAR.

Feeding frenzy

My hunger to shop has just been sated: 2 new Pi Zeros + the new 8 mega pixel camera module + the Zero camera cable + Unicorm HAT and diffuser plate.

Yes, you heard me right, the latest Pi Zeros now have a camera slot.

One Zero is for showing off at the next Cotswold Jam, along with the new higher-resolution 8 megapixel camera module.  Perhaps set up as a tiny onesie cam?

The other is for Zoe – and maybe another camera too, once I’ve overcome the problem with WAPping the latest jessie, the use of which is mandatory if I want to use the new higher-res camera with her purely for FPV videos.  The new camera slot points horizontally which is great for retaining the low profile of the Pi Zero.

The unicorn and diffuser are mostly just for playing with on my main Pi.

Next frenzy will start when they launch the A3 which I’ll be transferring Phoebe to for the extra CPU cores and processor speed needed for the two LiDAR units I’ll eventually be installing.

Until then, I’ll be working on repaying my overdraft!

Zoe the Zero – 2 – Initial Installation

First step is to flash your (at least) 8GB micro SD card with the latest Jessie.  Currently that’s the 2015-11-21 version.

To setup a PiZero, because it only has one USB port, you need a powered (at least) 4 port USB hub, a mini HDMI to HDMI adapter, and a micro USB to USB A adapter.  With that you can set up a PiZero with keyboard, mouse, WiFi dongle and screen, and so get it connected to the internet.

Once connected the next step is to change the various bits of system configuration:

  • expand file system
  • set minimal GPU memory as she’ll be headless
  • christen her – zoe in my case
  • enable I2C
  • boot to console login prompt
  • overclocking – mine seems happy in Turbo mode @ 1GHz! – CPU temperature showing 38.4 degrees
/opt/vc/bin/vcgencmd measure_temp

I’ve found the only way I can guarantee each of these steps works is to reboot between each.

Next step is to update the code to the latest

sudo apt-get update
sudo apt-get dist-upgrade

Next install the various tools required

sudo apt-get install i2c-tools python-smbus python-dev

Next install the RPIO library – ignore the build warnings

git clone https://github.com/metachris/RPIO.git
sudo python setup.py install
cd ..

If you are installing onto a RPi B2 (the 4 core), then you need to replace the RPIO/source/c_gpio/cpuinfo.c with this one before building:


Next install my performance enhanced GPIO library from GitHub

git clone https://github.com/PiStuffing/Quadcopter
cd Quadcopter
tar xvf GPIO.tgz
cd source
touch *
cd ..
sudo python setup.py install
cd ..

I think that’s everything.  Next step is to get and populate the pHat – it’ll be a couple of weeks before I get hold of this, so don’t hold your breath for the next update.

Zoe the Zero – 1

I have a PiZero.

I have my eyes on a fantastic frame, ESC, motor, prop kit due for release in December at less than £100 (speculative) – more on that when it’s available.

How could I resist bringing Zoe back.  First step is a new custom PCB designed for the Drotek 10DOF MPU-9250 + MS5611 breakout. Here’s my sketch to be Eagled and made.

Zoe the Zero PCB layout sketch

Zoe the Zero PCB layout sketch

I’ll keep blogging “Zoe the Zero” posts, as there’s plenty to do prior to the frame being released onto the market.  And no, I will not be naming that frame until I have one in my grubby hands given the madness of the PiZero release.

Please don’t start your build based on this set of blogs until I’m complete; I’ll be updating the blog each time I achieve the next step successfully, and at any point, one of those steps may go very wrong. Also do consider other costs before you start – while the PiZero and frame together should be less than £100, there’s probably another £100 in battery, charger and PCB build costs. Oh, and the net result is still just a semi-autonomous quadcopter – only as good as Phoebe is currently – caveat emptor.

Pi Zero – first impressions

For a headless robotics platform for Phoebe and Chloe, it’s nigh on perfect.  I have no idea how the A+ PCB has been shrunk by a factor of two, while providing the same function with more memory. It’s also really thin due to shrunk / removed connectors. And more flexible by not preinstalling the GPIO connector and leaving that up to the user to best fit their application. There’s really nothing more to say*; for the next generation quadcopter, it’s amazing.

However, for a fully fledged desktop computer, I’d still go for the RPi2.  Although the Pi Zero is only £4 compared to the Pi2 at £30, once you’ve thrown in the necessary USB and HDMI adapters (£4), a 4-way powered USB hub for keyboard, mouse and WiFi (£12 for a decent branded one) and perhaps a USB ethernet adapter (£8), you’re looking at £28 total.  For the extra £2, the RPi2 gives you all that along with double the memory (1GB) and 4 CPUs too!

*Being picky, there is more to say – because the Pi Zero fails miserably to fulfil the super cheap desktop role, I’d rather pay more for a Pi Zero as a better headless robotics platform, and get a 1GB, 4-core version. Also, even for the headless usage, you still need the powered USB hub to give you keyboard, mouse and internet access for all the initial configuration and app installation. But at least that’s a one-off – a single hub can be used to install however many Pi Zeros you want. And as always, in my rats nest of spares I have a couple of 10-port USB hubs kicking around.

A spoiled spoiler

So the spoiler in yesterday’s photo was another quadcopter flight controller to the left of the keyboards, pending the release of a fantastic new range of quadcopter frames which is being launched next month.  More on that once I’ve got my grubby mitts on one.

But that A+ controller has now been flushed down the pan with the launch of the Raspberry Pi Zero, smaller than an A+, double the memory and just as powerful in every other way.  I really have know idea how they halved the size of the PCB and yet kept all of the function.  And it’s £4 (yes, that’s not a typo, four quid for a computer that runs Linux happily!), and free if you buy this month’s copy of the MagPi magazine.

So I now need to redo the design for the beret board, to shrink it down to the Pi Zero size!

If you’re in the neighbourhood, pop down to the Cotswold Raspberry Jam in Cheltenham on Saturday and see the Pi Zero for yourself!