Sunday, 6 December 2015

Day 6 - Acorn Electron with Raspberry Pi

This is day 6 of the Advent Calendar of USB keyboards. Today follows on from Day 2's Acorn Electron USB Keyboard, this time with an integrated raspberry pi.
Space is quite tight in the Electron, and I couldn't find a good place to fit in a model B sized Raspberry Pi without having to cut away a lot of the case. To avoid that, I went for the smaller model A+. This was before the release of the even smaller Raspberry Pi Zero, which would also be an option for future builds.
The A+ is a cut down version, smaller than the B/B+/2, but with less processor cores, less RAM, and without the combined USB hub and USB-LAN chip. The lack of the associated LAN jack and the double USB sockets makes it quite low profile. This is ideal for the Electron, where I used the limited space of the expansion port. The A+ was positioned so the HDMI connector faced outwards, this also gave access to the headphone / composite video jack, should that be required.
The model A+ only has a single USB port, and it needs to have several, at least one external, and one internally for the USB keyboard controller. I again raided my assortment of unusual USB hubs, and here I have a 4 port hub. It's short lead plugs directly into the Pi. It has 3 ports on one side, which will face out of the expansion slot, and one on the side to which the USB keyboard controller can be connected.
The microSD power connector is also on the edge of the Pi, but hidden behind the plastic of the case. That's fine by me as I am not a fan of those. The Pi is quite susceptible to voltage dropouts, and there are still too many poor quality phone chargers out there. I rarely use those to power the Pi. I used to fit 5V DC input jacks to my Raspberry Pi casemods, but now I usually have a DC-DC converter inside and a 12V input, which is far less critical (7V-16V). Here I can use a slight twist on that approach.
The Acorn Electron has an unusual power supply arrangement with an external 19V AC power supply, and a switch mode regulator inside which generates 5V and -5V for the Electron. This donor Electron still had a working power supply, so why not use that. I have left it in place and made an adapter cable to connect this to the Pi. It provides a nice stable 5V supply and can supply up to 1.5A which would be more than enough for the Pi and a few accessories.
The caps on there are high quality Nichicon brand, which is probably why it is still working, they all tested fine. Externally, the original 19V AC Electron power supply could still be used, but it works just as well with a 12V 1A DC  power supply which is more easily available.
The finished result all fits within the case of the Electron, from left to right, the USB keyboard controller, 4 port hub, Raspberry Pi model A+, and the original Acorn Electron switch mode power supply.

You can order an Acorn Electron USB keyboard from my Etsy store, I haven't listed the Pi version in the Etsy store, but contact me if you are interested.

UPDATE:
I have now switched the microSD card on here for RISC OS Pico

Tune in tomorrow to open another window on the Advent Calendar of USB keyboards.