Make your Raspberry Pi faster

I have heard many people (including yours truly) say that the Raspberry Pi should be faster than it is.  In it's Mk 3 form, with all cores firing it ought to be a lot of performance for the price, but many of us are strangling the performance, often without even realising what we are doing.

Here's some simple tips to getting the best performance:

Power it properly

Just because the Pi has a micro-USB connector for power doesn't mean you should use some ancient phone charger to power it.  This board needs a stable five volts at around two amps to operate properly, and even more under heavy compute loads.  Most small plug pack supplies will struggle to sustain one amp.  Try to draw a higher current and the output voltage will almost certainly droop (drop slightly).

When this happens, you might see a "lightning bolt" on the monitor (if you have one connected") or notice "undervoltage" messages on the console.  Then the Pi detects an undervoltage condition, it scales back the CPU, robbing your performance.

The solution is to invest in a decent quality adapter such as the M8820 from Altronics.  For permanent installations I usually fit a small closed-frame switchmode supply.  You want something rated 30W or greater, and they aren't really that expensive.

I also try to avoid powering other devices from the USB ports on the Pi.  If you need a number of USB devices, consider a powered hub.

SD Performance

The only storage the Raspberry Pi has by default is the SD card it booted from.  These are not the fastest media out there to start with, but cheap ones can be many times slower than high transfer rate cards from the major vendors.

To be fair, we shouldn't be relying on high I/O rates with a Raspberry Pi anyway, but a relatively small price premium gets a higher speed card, and that can mean a much shorter boot time.

Keep Your Cool

Here's an experiment:  Run a very compute-intensive job on a Raspberry Pi and put your finger on the big chip in the middle.  You will notice it can get uncomfortably hot.  The Raspberry Pi kernel implements a thermal governor, which will throttle back the CPU if a predetermined temperature is exceeded.  A small heatsink on the CPU can delay this problem, or eliminate it altogether depend on the workload and external environment.

The only problem with adding a heatsink is that it may foul any add-on HAT boards you install, so be careful.

You could add an external fan, or even liquid cooling if you want, but the latter at least is probably a little excessive.

Memory Sharing

If you are running your Raspberry Pi and not using graphics or gpu-based mathematics (it is possible, but that's another article), consider reducing the amount of memory shared with the GPU.  This is configured with raspi-config

I hope these hints help you to get the most of your Raspberry Pi board.

A "Proper" Robot

It seems to be that this time each year I introduce a new project, and 2019 not going to be any exception.

My projects have become increasingly complex in recent years, and whilst I am still spending a lot of time on autonomous vehicles, according to feedback I have received, it is time to launch something that most enthusiasts could build if they wish.

So, what does the list of requirements look like this time?  I am still drawing this one up, so as usual, you can follow the build and watch it evolve.  For now, here is what I have decided:

  • The finished cost needs to be less that $A300.  Before you groan and say that it's way too expensive, Auric cost about eight times that amount, and is still not done.  I'm going to use off-the-shelf parts, especially from those low-cost marketplaces.  You can use upscale parts if you want, but you don't need to.
  • Use a Raspberry Pi as the controller, and integrate all motion control.  The code for the autonomous vehicles was in C++, which is not as popular these days as languages such as Python.  I/O capacity is not a problem with the Model 2 and later boards either.
  • Allow the use of a middleware platform such as ROS.  I have done it all myself in the past, but that's a lot more work.  Using something like ROS allows builders more flexibility, and opens up applications such as Amazon's RoboMaker
  • Be compact, and tough.  I envisage this particular platform being used for teaching, so it needs to be small enough to be portable, but able to withstand a rough and tumble life.
  • Look like a robot.  OK, so I grew up in the 60's and 70's when movie and TV robots had a certain style about them.  I'm chasing a scaled-down version of those motorised rubbish bins.
To make it easier for others to build, I am also sharing the mechanical design via my OnShape account.  You can access the drawings with a free account at:

The base plate, render in OnShape CAD

The only question for now, is what to call it.  A proper robot needs a proper robot name.  Leave your suggestions as a comment.

Life with Deep Racer - Part 2

 An Update on AWS Deep Racer

OK, so AWS Summit Sydney has been run and won.  Not by us however, but there are few interesting tidbits to report:

The console is now widely available

This is actually pretty big news, because:
  • The console ties together Robomaker, SageMaker and everything else you need in a convenient package
  • There are actual examples of functions included
  • It seems to stay running now

There is new firmware for the car

Also important; this includes a rolling update for the Ubuntu base as well as the Deep Racer specific bits.  WiFi connection seems more reliable now as well.

Our car has a new look

Since my employer (Versent) was generous enough to send me to Re:Invent last year (where I got the Deep Racer), I thought it appropriate to deck it out in the company colours, and it was well-received at Summit last week.

Wasting your and my time

I had a really interesting experience recently which I hope might enlighten others as much as it did me: I was approached (via LinkedIn) by ...