Whitterm-220 2.0

Having used my clever serial terminal – the WT-220 – for a few years now, I’d identified improvements I wanted to make. I was never that pleased with the cobbled together electronics (based on what I had laying around and ability at the time) and with PCB fabrication accessible to hobbyists now thanks to China, I decided the main win would be a Raspberry Pi Hat.

The rear panel wiring made opening the thing up a dread, so this was the main item I wanted to fix. Thinking about how to simplify the connection between the Hat and the RPi, I came around to the idea of ditching the acrylic rear panel entirely in favour of PCB mount upright connectors – the PCB would be electronically and mechanically part of the design.

As with all good hobby projects, I got quite carried away with adding bells and whistles but the rear panel functionality and resulting WT-220 has been greatly improved overall. It was a nice slow burner project to fill time gaps moving to Switzerland at the start of the year. I enjoy these sorts of projects, cementing knowledge I’ve developed in professional work and exploring ideas one doesn’t always have time for.

WT-220 Rear Panel IO Hat


  • USB-C input for USB-PD high current (3 A) supply to RPi. LEDs indicate detected current profile from UFP. I2C lines made available to SAMD for playing with USB-C device modes.
  • MAX3232 RS232 transceiver provides RS232 level interface to RPi UART and SAMD UART.
  • SAMD21 microcontroller provides boot button control of RPi over I2C and buffered IO (2 0-10 V inputs, 2 OC outputs, 2 24 V inputs and 1 0-5 V output). Can be programmed over USB-C CDC-serial device or ISP.
  • Control of RPi power supply from SAMD. Off by default allows safe start up, only when power input suitable/ready.
  • DIP switch control of device UART connections (SAMD, RPi, RS232).
  • Board replaces laser cut acrylic back piece from original design – it is both electronically and mechanically integrated.
  • Lots of status LEDs ūüėÉ.


The original WT-220 with DC jack input going to buck-converter for 5 V wasn’t ideal. It was always frustrating attempting to find the right jack, the jack coming loose or if using Micro B USB, finding an adaptor to supply the > 2.5 A required by a RPi 3 B+ & screen – the worse thing was that if the supply was flaker, it might power up then brown out during use.

I had been wanting to implement a USB-C board in order to understand the interface, so this became the project. The great thing about USB-C is that the upstream device can provide information on the power available to the downstream device. By configuring the CC lines, one can set or detect what current is available and act on this. I opted to use a controller – the TUSB320 – to handle this, with LED indication of current mode detected.

Using the GPIO mode of the TUSB320 and LEDs, one can visually show the USB-C current mode. Here both LEDs indicate full 5 V/3 A. This could be read over I2C and the boot button restricted if power to low.

With the SAMD controlling the power supply to the Pi via a MOSFET swtich and I2C connection to the TUSB320, one can prevent boot up of the Pi until a suitable upstream supply is detected. For something like the WT-220, the LED indication is enough as I’m the only one using it. For a user consumer product however, this is great as it removes the ability to plug in any old phone charger and then the device appearing to not work properly.

Turns out I wasn’t the only one thinking down this path. Since developing this board and in the process of writing this post, the Raspberry Pi 4 has been released with a USB-C port replacing the Micro B. I’m not sure if the new Pi uses current mode detection to prevent start up like suggested above but it would be logical.


The SAMD firmware is pretty simple. As said, it controls the power to the Pi and then an I2C communication between the SAMD and Pi allows LED boot status and shutdown/power off control. See below for a basic (messy) state diagram.

Raspberry Pi maintains I2C link with uC once booted and acts on shutdown request from button press. The LED flashing routines were the most complex part of the firmware development!

The other thing the firmware does is provide interface to the buffered IO.

Raspberry Pi

I opted for Raspbian Lite rather than Arch for this updated build. The support for ARM 64 bit is better and the Lite variant still means I could install only what I wanted.

For the install, I used I3WM since it’s a keyboard based terminal. I then compiled and installed cool-retro-term for the CRT look.

The rest of the image is fairly standard, bar a few services I created and config scripts (all can be found in repo:

  • boot: Runs shell script that displays boot ascii logo.
  • i2c: Runs python I2C script (wt220-i2c.py) that configures case LEDs to act on RX/TX and then maintains link with I2C link with SAMD. Polls shutdown request state and acts on request by issuing system shutdown.
  • poweroff: Runs on shutdown.target and issues the final I2C shutdown command so that SAMD disables RPi 5 V.

Samsung Frame TV Oak Tripod Stand

Being part of a generation that doesn’t watch TV…except documentaries and films…and YouTube…as well, might as well watch it on a big screen. Got a TV, a Samsung Frame – designed to look like a picture frame.

It can mount flush to a wall or be mounted on an easel inspired stand, which Samsung sell separately for ¬£500.  I decided to have a go at making one myself.

The design is simple but required some thought and trigonometry, in order to get the TV mounted on the VESA mount just at the right position to rest on the joining platform. Photos speak for themselves. 

I planned to get the design CNC cut as I didn’t trust my carpentry skills. Finding someone who could cut planned Oak was difficult however (due to the work holding) and I decided plywood wouldn’t cut the mustard. Instead, I laser-cut templates of the DXF exports and traced them with them jigsaw. It turned out OK; only minor fettling and wood filler involved.

The finished article!

Chess Table

We needed a coffee table for our new house but had yet to find the right thing. I found this tired black circular table outside a neighbour’s house and was inspired to create a nice top for it.

Whitterm-220 Clever Serial Terminal

21/12/18 UPDATE: Hello to Hack a Day readers. This project was shared when I did it but re-posted recently. It is 2.5 years old and there are many things I would do differently. I am considering work on a IO board specific to the project (RS232 driver, GPIO break-out, proper RX/TX LED buffers and potentially internal LiPo UPS). Glad there is renewed interest in the project as I still use it day to day :).

30/06/19 UPDATE: I did what I was considering! See the updated WT-220 2.0 here

The Whitterm-220 (WT-220) is my latest project. It’s a clever terminal, in the sense that it aims to emulate the dumb terminals of the 80s but with the versatility of something produced now. The name comes from my inspiration for the project: failure to win a VT-220 on eBay. I decided it would be fun to make a homage to the VT-220, that would actually be useful – a not so dumb, or clever terminal – that would do more than simply parsing RS232 levels into Ascii characters.

Continue reading Whitterm-220 Clever Serial Terminal

Wooden Bits – Binary Clock

Wooden Bits Gif

I’ve been meaning to make a binary wall clock for a while and to also try out kerf bending with the laser cutter. What put me off creating kerf bends before I found OpenSCAD, was the manual creation of all the lines in the right places. It’s the kind of repetitive, uniform task computers were made to do.

Continue reading Wooden Bits – Binary Clock

Laser Cut Adaptable Wire Dispenser in OpenSCAD

I wanted a wire dispenser that wasn’t fixed in place so I could move it to where I was working. To my surprise, such a thing doesn’t exist (I couldn’t seem to find fixed ones either, other than using a kitchen towel rail). Keen to put my new found love for OpenSCAD to use, I set about making such a thing.

The `projection()` command in *OpenSCAD* allows one to easily create 3d objects that can be exported as 2d .dxf for printing
The `projection()` command in *OpenSCAD* allows one to easily create 3d objects that can be exported as 2d .dxf for printing

OpenSCAD really suits this type of design requirement; something that is going to need to scale user defined variables (the wire reel in this case). I didn’t want to create a design for 6 wire reels from a specific manufacturer, then find they change their spindle, or I decide I need more reels. It’s particularly hard scaling a laser cut box because of all the teeth/dents that slot it together. With a GUI based CAD program, you’d send hours fiddling around with the spacings/length or trying to create patterns – then still ending up with bits that don’t fit together! This is actually my second project in OpenSCAD that I’d bashed together quickly. I’ve got another more complex project to document too.
Continue reading Laser Cut Adaptable Wire Dispenser in OpenSCAD