Custom PC, Issue 166

Custom PC Issue 166Readers of my regular Hobby Tech column this month will find a BBC micro:bit-driven tutorial alongside two reviews covering the remarkable Raspberry Pi Zero W microcomputer and the fascinating Delete by Paul Atkinson.

The idea for the tutorial came about while working on a chapter of my upcoming Micro:bit User Guide, and seemed like a perfect fit for the readers of Custom PC Magazine: turning the low-cost yet extremely flexible micro:bit into an addressable USB-connected 5×5 LED matrix and having it display current CPU load in a constantly-updating bar graph. Naturally, the same technique could be used to graph almost anything.

The secret lies in MicroPython’s REPL, an interactive interpreter which can run on the micro:bit and accept commands via the USB serial port. By switching the micro:bit into REPL mode, it can be slaved to another system over USB. The result: the entire program code, written in Python using the serial, time, and psutil libraries, exists purely on the host machine. A quick bit of Blu-tack later, and my monitor was wearing a CPU monitor which worked even when the display was off.

The Pi Zero W, meanwhile, was a device to which I had been looking forward for quite some time. An upgraded version of the original £5 Raspberry Pi Zero microcomputer, the Pi Zero W differs in only one respect: it has a built-in radio module, the same BCM43438 as found on the far larger and more expensive Raspberry Pi 3.

While the addition of the radio module, which offers Bluetooth, Bluetooth Low Energy, and 2.4GHz Wi-FI connectivity, almost doubles the price of the Pi Zero W to £9.60, it’s money well spent. In almost every Pi Zero project I have built, I’ve ended up using a USB OTG adaptor and low-cost USB Wi-Fi dongle to add network connectivity, and having it on-board – even at a slightly higher cost compared to a USB-connected solution – makes life considerably easier.

Finally, Delete. Billed as “a design history of computer vapourware,” Paul Atkinson’s coffee table book is packed with high-quality photographs – and, for the rarer machines, the occasional rescaled JPEG exhibiting unfortunate compression artefacts – covering machines from an upgraded Sinclair QL to a bright yellow IBM that never left the drawing board. Each comes with pages on its history, with interview subjects detailing features and failures alike, and while not all machines were strictly vapourware few are likely to have a place in the average vintage computing collection. In short: if you like old computers you’ll like Delete, which is available now from Amazon and other bookstores under ISBN 978-0857853479.

As always, you can read the whole column and a whole lot more by picking up Custom PC Issue 166 from your nearest supermarket, newsagent, or electronically via Zinio and similar services.

Custom PC, Issue 165

Custom PC Issue 165This month’s issue of Custom PC Magazine marks a milestone: four years since I started writing my Hobby Tech column. To celebrate, three reviews spanning its five pages: the Ryanteck RTk.GPIO, the Kitronik Micro:bit Inventor’s Kit, and the Pimoroni GPIO Hammer Header – the only piece of electronic equipment I’ve ever reviewed installed with a hammer.

First, the RTk.GPIO. The brainchild of Ryan Walmsley, interviewed back in Issue 129, the RTk.GPIO is designed to bring all the joy of the Raspberry Pi’s general-purpose input-output (GPIO) header to any PC with a free USB port. A surprisingly sizeable red-hued circuit board, the RTk.GPIO includes a Pi-compatible 40-pin GPIO header with pin-out on the silkscreen. A quick pip install of the Python library later, and you can pretty much take any RPi.GPIO program and have it run natively on your Windows, Linux, or macOS machine.

Perhaps the biggest power of the RTk.GPIO is in assisting with the development of software for Pi add-ons, using the extra computing power of a desktop or laptop to make your life easier then allowing you to transfer your program to a real Raspberry Pi with minimal changes once complete. Its only real downside, in fact, is price: it’s more expensive than picking up a Raspberry Pi Zero and turning it into a USB device, though undeniably smoother to use.

The Kitronik kit, meanwhile, is one of a range of add-ons I’ve been playing with for my upcoming Micro:bit User’s Guide. Based around a GPIO expansion board for the micro:bit’s edge connector, the kit comes with mounting plate, solderless breadboard, jumper wires, and all the components you need to work through the included full-colour tutorial book – plus, in the version I picked up, the micro:bit itself, though the kit is also available without for those who already have the BBC’s miniature marvel.

In the years I’ve been playing with hobbyist electronics, I’ve seen these kits go from the most hastily thrown together things to extremely polished collections of hardware – and Kitronik’s kit definitely sits at the right end of that spectrum. There are nits to be picked, such as the lack of a handy plastic parts box for storage and no use of the lovely breadboard overlay sheets that make the Arduino-centric ARDX kit so easy to use, but it’s hard to imagine someone buying the Kitronik kit and being disappointed.

Finally, the GPIO Hammer Header. I’ve long been a fan of Pimoroni’s products, but the Hammer Header is by far both the simplest and the smartest I’ve seen. Designed for anyone who has purchased a Raspberry Pi Zero and wants to make use of the unpopulated GPIO header but who doesn’t fancy firing up a soldering iron, the kit makes use of cleverly-shaped pins which can make a suitable electrical connection purely mechanically.

The kit gets its name from the acrylic jig used for installation: assemble the jig with the Pi Zero in the middle, then give it a few sharp raps with a hammer to push the pins home. Male and female variants are available, allowing you to quickly install headers on both the Pi Zero and compact pHAT add-on boards, and to my surprise both installed quickly, easily, and without a single poor joint – and in a fraction of the time of soldering all 40 pins by hand.

For all this, and more, pick up the latest Custom PC Magazine from your nearest supermarket, newsagent, or digitally via Zinio or similar services.

The MagPi, Issue 43

The MagPi Issue 43It’s a special week for the Raspberry Pi Foundation: it’s celebrating its fourth birthday with the launch of the new Raspberry Pi 3. It’s a special day for me, too: the latest MagPi magazine boasts a total of thirteen pages of my content, including the cover splash: a detailed and thorough look at the new model.

Boasting on-board Wi-Fi (a community request since the original model launched four years ago), Bluetooth 4.1, Bluetooth Low Energy, and a faster 64-bit ARMv8 processor, the new Pi 3 is a bit of a beast. My cover feature for the magazine begins with a look at those behind it with a double-page spread featuring interviews with project co-founder Eben Upton and the Foundation’s director of hardware and the man responsible for circuit design James Adams – and a massive thank-you to both for sparing the time to talk to me at one of their busiest ever periods!

The feature then moves on to a look a the board itself, with a hero photo of the board spread across another two pages. Each major feature of the board, from the shiny new 64-bit BCM2837 system-on-chip (SoC) processor to the BCM43438 radio module – which required me to get out the microscope in order to capture its markings – has a call-out with close-up photography and an explanation of how it has changed since the Raspberry Pi 2.

Next up is a benchmark spread, which required me to come up with a detailed suite of tests. After some experimentation, I settled on a selection of classic benchmarks – SysBench CPU in single- and multi-threaded modes, Linpack with and without NEON support, Whetstone, Dhrystone, SysBench memory read and write, Ethernet throughput, Quake III Arena timedemo performance, and power draw at load and idle. As an added bonus, I also came up with a way of measuring general-purpose input-output (GPIO) performance under Python, writing a simple benchmark to toggle a pin on and off as quickly as possible and measuring the speed with a frequency counter connected to the GPIO header.

The next double-page spread looks at helping the reader get started with the new device. I walk readers through modifying an existing Raspbian installation to boot on the Pi 3 by editing config.txt, setting up the Wi-Fi module, enabling true OpenGL acceleration on the graphics processor, and how to write programs to get the best performance on the Pi 3. Sadly, I was unable to explain how to use the Bluetooth 4.1 and Bluetooth Low Energy features, as software support was not available at the time of writing.

The spread then ends with a look at five things you could do with a Pi 3 in order to take advantage of the new features and boosted performance. My work for the magazine continues, though, with a review of the Proster VC99 multimeter and Pimoroni pHAT DAC, before coming to a close with a one-page news piece regarding the production status of the popular Raspberry Pi Zero – helping to explain why it has been so difficult to get hold of and settling concerns that it may be bumped to the back of the production queue now the Pi 3 is out.

All 13 pages of my content, and plenty of other stuff by people who aren’t me, are available from your nearest supermarket or newsagent, or as a free PDF download under a Creative Commons licence from The MagPi’s official website.

Custom PC, Issue 151

Custom PC Issue 151In my latest Hobby Tech column for Custom PC, I take a look at the Pi Zero-specific pHAT family of add-on boards from local electronics wizards Pimoroni, review the Guitar computer-on-module from China’s LeMaker, and show readers how to enhance a Raspberry Pi with a simple reset-stroke-power switch.

Firstly, the pHATs. The launch of the Raspberry Pi Zero, reviewed in last month’s Hobby Tech, brought with it the opportunity for Pi experts like Pimoroni to come out with some add-on devices matching the same form factor – which is, unsurprisingly, exactly what the company has done. The result is a family of, at the time of the review, three tiny add-on boards: the Explorer pHAT, Scroll pHAT, and pHAT DAC. Each comes with unpopulated GPIO, giving the user the option of soldering on the bundled female header for the ability to easily remove the device or soldering it directly to a Pi Zero to make an ultra-compact electronic sandwich.

The Explorer pHAT is the most versatile of the bunch, adding 5V outputs, inputs, analogue inputs, and even a pair of motor control channels to the Pi’s otherwise feature-light 3.3V GPIO header. The Scroll pHAT, meanwhile, features some bright white LEDs in a 5×11 matrix and comes with software for scrolling messages. Finally, the pHAT DAC is an ultra-compact digital to analogue converter capable of playing back 192KHz 24-bit audio via a pre-fitted 3.5mm jack or optional pair of RCA jacks. In short: there’s a little something for everyone.

The Guitar is LeMaker’s follow-up device to what was previously known as the Banana Pi – and, like its predecessor, LeMaker is taking design cues from the Raspberry Pi Foundation. This time, it’s made a Compute Module-alike: a small SODIMM-layout computer-on-module which comes bundled with a break-out board to access its various features. Considering the high price of the official Compute Module, I had high hopes for the budget-friendly Guitar – and I’m pleased to say that it mostly didn’t disappoint.

Finally, the reset switch tutorial. A variant of the tutorial I prepared for The MagPi tailored specifically to the Custom PC audience, it walks the reader through adding a simple switch to any Raspberry Pi – but focusing on the new Zero – in order to quickly reset the device in the event of a crash. As an added bonus, it also allows you to power the Pi on from a shut-down state.

All this, plus a bunch of stuff written by people other than me, can be yours in Custom PC Issue 151. Either pick up a physical copy from wherever magazines congregate, or snag it digitally via Zinio or similar distribution services.

The MagPi, Issue 42

The MagPi Issue 42This month’s instalment of The MagPi, the official magazine of the Raspberry Pi Foundation, includes a short project I created upon request from editor Russell Barnes: soldering a reset switch to a Raspberry Pi Zero.

While part of a feature on projects specifically for the Zero, the reset switch mod is actually applicable to any modern Raspberry Pi. It makes use of the RUN header, which when shorted out causes the processor on the Pi to act as though the power has been briefly cut. The result: an instant hard reboot, even if you’ve found a way to crash the system hard. The header also doubles as a remote power switch: if the Pi is powered off but plugged into a live power supply, shorting the RUN header will begin the boot process.

Attaching a switch to the reset header is as simple as soldering two pins, but the audience of the magazine spans the gamut from absolute beginner to highly-qualified engineer. As a result, a very specific angle was chosen for the tutorial: introducing someone to the art of soldering, using the simple two-pin reset switch as a less daunting entry point than the significantly larger GPIO header soldering project found back in Issue 40.

As always, the tutorial includes plenty of photography taken in my home studio. For much of the work I do, I’ve found my Nikon 40mm macro lens to be indispensable; the only time it typically leaves my camera is if I’m doing portraiture or low-light photography (in which case it’s replaced by an f1.8 50mm prime lens) or if I need wide-angle or telephoto shots (15-35mm and 70-300mm lenses respectively) during event coverage.

The tutorial, plus various exciting Pi-related things written by people other than myself, can be found gracing the shelves of supermarkets and newsagents throughout the country, or can be downloaded free of charge from the official website under a Creative Commons licence.