Showing posts with label 3D Printing. Show all posts
Showing posts with label 3D Printing. Show all posts

Friday, August 18, 2023

ZX81 Bus Extender: The Expansion Board Solution

Leave a Comment
Adding expansion boards to the back of a ZX81 is always a slightly terrifying business, a fear compounded with each consecutive item tacked behind the little wedge.


The wobbly expansion of expansions is a near unsolvable problem when using off the (distant in time and space) shelf products, however, when building our own expansions there's really no need to suffer. What's the answer to the wibbly wobbly's? Why a decently designed Bus Extender board and case of course.


ZX81 Bus Extender with an Assortment of Add-ons

We're not embarking on a wheel-reinventing adventure here. The concept of a Bus Extender isn't a groundbreaking discovery; Over the past four decades, resourceful enthusiasts have crafted their versions for the ZX80 and 81. The only hiccup? Laying your hands on one. But behold the magic of our modern age: securing your very own Bus Extender is a breeze. A simple solution? Just place an order for a PCB at any of the numerous fabrication houses like JLCPCB, PCBWAY or AISLER. Now, of course, you'll need something to order, and lo and behold, we've got you covered with the ZX81 Bus Extender gerber files conveniently linked below. Your expansion dreams are just a click away!


Refer to http://www.zx81stuff.org.uk/zx81/hardware/MaplinExtender for details
Maplin Bus Extender Interface (available at one point in the UK)

The Extender boasts a well-thought-out design, strategically accommodating up to three expansion cards and further expansion possible behind (Think ZXpand or similar). Its layout incorporates a three row hole arrangement on the printed circuit board, with ZX81 BUS 1a duplicated twice, offering the flexibility to house either two-row expansion headers or card slots – you know, the same kind that snugly attach to your trusty ZX81. This Extender knows how to cater to your every expansion whim. You'll require at least one expansion header to attach the thing to a ZX81 or ZX80, and  additional headers of your own choosing for accomodate the expansion cards.


zx81 bus extender / expansion edge connetor
ZX81 Adventures 3x3 Bus Extender

Naturally, a bus extender isn't fully dressed without its cosy enclosure. Picture it nestled within a polished case, a snug retreat ensures seamless operation, cradling expansion cards of your creation. The case boasts an elegantly simple design, seamlessly complementing your ZX81's rear. Oh, and don't forget those rubber feet (12.5mm*12.5mm*3mm(L*W*H)) – they elevate both style and stability, and some M3 screws to hold it together.


zx81 bus extender / expansion edge connetor in 3d printed case
ZX81 Adventures 3x3 Bus Extender in Handy Dany Case with Cards

Project Files

If you find these files useful, flip me coffee or beer etc.





Read More

Sunday, September 06, 2020

Commodore Educator 64 Mini: Part 3

11 comments
Here we are at the final article in the Commodore Educator 64 Mini series and there are a surprising number of loose ends to tie off; very probably the reason why it's taken a while to actually get around to documenting them.

This article more or less sums things up and provides some instruction on how get the project up and running. If you haven't read Part 1 or Part 2, I'd suggest starting from the beginning so that it all makes sense.

All files required to build the Educator Mini are made available at the end of the post.

The Final Producst
The Final Product: The Commodore Educator 64 Mini

Fitting the Keyboard and Daughter Board

The keyboard is designed to sit quite firmly in the Educator case, it shouldn't require any glue but you may need to file and / or sand the 3D printed case lightly to gain that perfect fit.

The Raspberry PI Daughter Board and monitor cables should be fitted before placing the Raspberry Pi in it's Educator case, as there is not a lot of height to play with right up the back. Cabling running to the keyboard can be inserted at any time.


Raspberry Pi Daughter Board
Educator Min Keyboard to Raspberry Pi Daughter Board / Interface

When fitting the keyboard you need to pay attention to the labels at the header pins. The numbers and letters correspond with a similar arrangement found on the PI Daughter Board. As a plus, the naming scheme also matches that used on a real 64 keyboard.


Keyboard Fitted / back view
Commodore 64 Mini Keyboard fitted Snuggly: Pay attention to the jumper setting.

In addition there is a jumper setting to be made, for use in the Mini. A Jumper should be set across pins 1 & 2. The Jumper determines the behaviour of the Shift Lock key, unfortunately there are not enough free GIPO pins on the PI to take advantage of this feature for now.


The Educator Internals
Inside the Educator MIni

Finalising Model Styling

You'd have noticed by now that the Educator Mini 64 has a somewhat different set of stickers to Lorenzo's PET (much like the real thing really). I've made up a couple of additional mini replica decals to suit the 64, the most obvious of these being the BASIC reference panel.

The BASIC keyword panel is a fairly good approximation the original full sized version and depending on how good your eyes are and the resolution of the printers used to produce the decal sheet could well come in useful.

I've also included Lorenzo's decals for the back of the monitor and the Serial Number Name Plate for the sake of completeness.

Educator 64 Mini Decal Sheet, Including everything an old computer needs.

Getting the Educator Mini up and Running

RetroPie is normally your friend for an easy Linux retro solution. Disclaimer time, I decided not to use RetroPie for this build and went with a standard versions of Raspberry Pi OS (previously called Raspbian).

There are a number of reasons I'm using Raspbian, the main ones for me being,
  1. It's just simpler to get the keyboard working with the Vice emulator.
  2. I'm only intending to use Vice and Commodore Emulation on the Mini.
Of course your needs may vary, and what ever I've done is really only a suggestion.

Installing the Vice Emulator

Raspberry Pi OS does not include the Vice Emulator as a standard package, or even an optional downloadable package, so you'll need to install it manually. I simply followed the Installation guide on krystof.io 

Once Vice is installed you'll be wanting to add a configuration file to get the emulator looking and feeling right.

Run the following commands to create a sdl-vicerc config file:
mkdir -p ~/.config/vice
nano ~/.config/vice/sdl-vicerc
[C64SC]
MenuKey=293
MenuKeyUp=273
MenuKeyDown=274
MenuKeyLeft=276
MenuKeyRight=275
MenuKeyPageUp=280
MenuKeyPageDown=281
MenuKeyHome=278
MenuKeyEnd=279
WarpMode=0
Sound=1
SoundDeviceName="sdl"
SoundSampleRate=8000
SoundBufferSize=100
SoundFragmentSize=0
SoundVolume=100
SoundOutput=1
AspectRatio="1.000000"
SDLCustomWidth=480
SDLCustomHeight=320
SDLWindowWidth=480
SDLWindowHeight=320
SDLGLAspectMode=0
VirtualDevices=1
IECReset=1
CIA1Model=0
CIA2Model=0
VICIIVideoCache=1
VICIIDoubleScan=0
VICIIDoubleSize=0
VICIIFilter=0
VICIIModel=0
SidEngine=0
SidModel=0
JoyPort4Device=0
JoyDevice1=4
JoyDevice2=4
AutostartBasicLoad=1
AutostartPrgMode=0
DriveSoundEmulation=0
Drive8Type=1571
GlueLogic=0
ETHERNETCARTBase=56832
Acia1Base=56832
AutostartWarp=1
KeyboardMapping=1

Setting Up the keyboard

There are multiple was to of configuring a keyboard for use with the vice Emulator, I've chosen the path of least resistance. Feel free to delve deeper into the heavy customisation that Vice affords. That said intense configuring is a little above what's really required for what is essentially a very cute desk toy.

For the initial steps, we'll basically be following those documented in PJ Evens's MagPi issue 67 article on page 26, make some changes specifically for the Commodore Educator 64 keyboard.

1) install Libsuinput: From your home directory:
cd
sudo apt install get libudev-dev python-dev python-pip
sudo pip install wiringpi
cd git clone github.com/tuomasjjrasanen/libsuinput
cd libsuinput
./autogen
./configure
make
sudo make install
Add the following line to /etc/modules-load.d/modules.conf
uinput

2) Install Python-uinput: From your home directory:
cd
git clone github.com/
tuomasjjrasanen/pythonuinput
cd python-uinput
sudo python setup.py build
sudo python setup.py install

3) Install cbmscanner python scripts:  Download these scripts and uncompress the file. We'll mimic the original Magi Article and install them in a subdirectory off the home dir.
cd
wget  -P ~ "http://dasteph.com/cgi/pet/files/cbmscanner.tar"
tar -xvf cbmscanner.tar

4) Create a new Service: We need to setup a new service to run keyboard scanner on boot by creating a new config file.
sudo nano /usr/lib/systemd/cbmscanner.service
[Unit]
Description=Commodore 64 Keyboard Scanner
After=multi-user.target
 
[Service]
Type=simple
ExecStart=/usr/bin/python /home/pi/cbmscanner/cbmscanner.py
Restart=on-abort
 
[Install]
WantedBy=multi-user.target
sudo systemctl enable /usr/lib/systemd/cbmscanner.service

5) Configure Keyboard Layout: Edit the keyboard file and ensure we're setup for a US keyboard layout.
sudo nano /etc/default/keyboard
# KEYBOARD CONFIGURATION FILE
# Consult the keyboard(5) manual page.
 
XKBMODEL="pc105"
XKBLAYOUT="us"
XKBVARIANT=""
XKBOPTIONS=""
 
BACKSPACE="guess"
We can the reboot the Raspberry Pi, the keyboard should then work as intended.


All the Educator 64 Files to Download

Please be sure to refer back to the official  Commodore PET Mini site for the full build details and project history not covered in this series of blog articles.


See all entries for this project:  Part 1Part 2 and Part 3


Read More

Tuesday, June 09, 2020

Commodore Educator 64 Mini: Part 2

Leave a Comment
When I embarked on the Educator 64 journey I had no idea this would end up being my particular quarantine pass time. Who would have thought being stuck at home would be so useful.

So where are we up to? By the end of Part 1 I'd covered the printing of the Educator 64 Mini Case and very briefly mentioned sending a keyboard PCB of for manufacturing. This time around I'll get into the design of the keyboard and detail some additional modifications I've made to Lorenzo Herreras' Commodore PET Mini.


Mini Keyboards for Tiny LCDs

On the whole I've not diverted much from the general design of the Commodore PET MINI. The main inclusion is that of the working keyboard, I did however choose to make things slightly easier where possible in other respects.

As I was going to be ordering a PCB for the keyboard I decided I might as well design an extra PCB that would plug into the back of the LCD panel. Lorenzo's PET screen design has you dissecting a ribbon cable, then hand wiring the various bits to the back of the the Waveshare LCD screen. To much effort I thought, a nice little PCB would save all that hand rerouting trouble. I also thought mounting a reassuring yellow glowing LED at the back night add some CRT realism (or not, turned out you can't really see it once installed, oh well).

LCD Mounting PCB

I addition to the LCD mounting PCB I took the opportunity to deign and order a Pi Zero sized prototyping board which extended the pin header out and added had just enough space to the end of the board for some diodes and the like. The board was a bit of an after thought, although as it turned out I needed it.

Keyboard Design

There's no shortage of people out there hacking old Commodore 64s and making them work with modern equipment. One of the largest set of modifications to dead 64s is in the re-purposing of their keyboards for use with emulators.

To this end the schematics for the 64s keyboard are well know and have been pretty convincingly documented by Simon Inns on his page Waiting for Friday. Simon interestingly points out that the official Commodore Keyboard Schematic is wrong; that certainly spared me some confusion as not having a 64 myself I had nothing else to go by other than the published designs.

Commodore Educator 64 Mini Keyboard Circuit 

I made one minor change to the keyboard schematic; the inclusion of a jumper allowing the SHIFT LOCK key to be placed on the same Column as the Restore Key,  or in its normal state as an extra LEFT SHIFT key. On a Commodore 64 keyboard the SHIFT LOCK actually locks in place if pressed, this functionality isn't possible with the TAC switches I planned on using, so I opened the option to simulate that behaviour in software latter (This option wasn't to be, read on). 

With a known working layout for a Commodore keyboard to hand, all that need to be done was getting all to fit onto a 105x38mm PCB. As mentioned in Part 1 I'd found the perfectly sized switch in the KMR431G which has a footprint of 4.2mm x 2.8mm. The resulting layout mimics the design of a full sized Commodore keyboard. As there are to be no keycaps, Legends are printed on the PCB, some additional PCB styling gives the impression of a full space bar and a silk screened separator between the main keyboard and function keys implies the existence of the metal or plastic case shroud.

The Commodore Educator 64 Mini Keyboard PCB

Reading the Keyboard

My initial plan was to use an Arduino Proc Micro acting in HID mode for decoding the keyboard inputs and passing key presses onto the Pi. The other option I'd considered was procuring a Commodore USB Keyboard Kit from Tynemouth Software. Both of these methods required a spare USB port on the Raspberry PI, being that by this time I'd decided to us a Pi 3A+ for the project (which only has one port) I really didn't have a USB port to spare, particularly if I need to connect another device such as a joystick.

A long time ago for the AZ15 build I'd considered connecting a ZX81 matrix keyboard directly to a Pi, but thought the method a little to cumbersome and unreliable. What I couldn't find at the time was a good way of sending key presses back to the LINUX kernel, sure you could detect a keypad, but only in the active program doing the decoding, not much use for emulators. Fortunately time passes and things get developed and now there are off the shelf solutions.

Enter an article in The MagPi Page 25 by PJ Evans, where he describes, and provides many of the necessities required for reading a ZX Spectrum Keyboard directly, then injecting those key presses back into the LINUX kernel. This Sounded just the ticket for the Commodore Educator keyboard, All that's needed are some software libraries, libsuinput for handling the kernel injection, and wiringpi to run some keyboard scanning code. The only possible road block being the availability of enough free GPIO ports to handle the Commodore Keyboard.

Mapping Raspberry Pi GPIO pins to the Waveshare LCD and C64 Keyboard

At a minimum we need 17 free GPIO ports to read the c64 keyboard (without worrying about multiplexing), 8 Data lines, 8 Address lines and 1 for detecting the RESTORE key. In reality I has hoping for 18 spare GPIO pins so we could enable SHIFT LOCKing. After consulting the Waveshare LCD manual it appeared all requirements could be met, but appearances can be deceptive.

Out of 28 GPIO pins the LCD panel uses 8, leaving 20 pins. Not so fast, GPIO23 is taken when using analogue audio (which we need) and on testing I also found GPIO27 and GPIO22 also seemed to be in use by the LCD panel. That left 17 ports. However GPIO14 & 15 are used as serial lines, that's now down to 15 ports. Fortunately serial can be disabled in the /boot/config.txt file. Phew, we have just enough ports free without having to stuff around with multiplexing.

The rather messy prototyping Board full of Diodes

To get things moving along I wired up my prototyping PCB much as documented in The MagPi article, I adjusting the data and address lines (see earlier image above). I then downloaded the required zxscanner code by PJ Evens, modifying sufficiently to accommodate the C64 keyboard, the result a working keyboard.

Testing the tiny Commodore 64 Keyboard

That is of course just the start, I still need to go back though the zxscanner code and turn it into c64scanner code. As it stands zxscanner is just that, it's geared towards ZX Spectrum emulators, Commodore emulators such as Vice take a somewhat different path when mapping keys from PC-like keyboards and that is something we can tackle in Part 3.

Commodore Pet Mini
C64 Keyboard Installed and some final Decals Added to the Case

Until the next article here's a quick preview of the keyboard in action:




See all entries for this project:  Part 1Part 2 and Part 3




Read More

Saturday, May 30, 2020

Commodore Educator 64 Mini: Part 1

1 comment
What do you do with a new 3D printer, a governmental advised quarantine stay at home order and the freely available plans for a Commodore PET Mini build? Why build a Commodore Educator 64 with a functional keyboard of course.

Commodore Educator 64 - drawing by David A Stephenson 2020

Printing your own PETs.

A  little over a year ago Lorenzo Herrera launched the Commodore Pet Mini on the world, a very cute miniature PET model 8032 housing a Raspberry Pi. Nicely he also included all the 3D models and a full material list so you could build your own (and a lot of people have). 

This all looked like a really fun project, the only problem being I didn't have 3D printer.  Then quite unexpectedly and just before the world locked down the family presented me a with a Flash Forge Finder 3D printer for my birthday. Thanks Family!

And so the initial stage of building a PET (soon to become an Educator 64) Mini began in earnest.

The Making of a Model

While the PET mini is quite the functional beauty as is, what with its Pi core, tiny LCD screen and USB ports, it does almost criminally lack the most important part of an early home / office / school computer, a functional keyboard.

Before going to far along the process of 3D printing I first need to know if I could get a keyboard to fit into the PET Mini. I managed to find some very diminutive KMR431G surface mount TAC switches on Element 14, tiny but not tiny enough to build a full PET keyboard.

The KMR431G switches would just squeeze in nicely when arranged in a 64 style. As luck would have it the Case design of the PET 8032 (and Lorenzo's 3D model) is near identical to that of a Educator 64. For those that don't know, an Educator 64 is basically a Commodore 64 in a PET case sold primarily to schools; possibly making it the best 80s game playing school computer ever.

Educator 64 Mini Keyboard PCB
Educator 64 Mini Keyboard PCB

I'll cover the full details of the keyboard and how it's intended to work in Part 2: For now though I laid out a PCB that followed the C64 key mappings and sent it off for Fabrication. The important part being that I now had the measurements required to adjust the top half of the PET case to fit the keyboard. 

Case Adjustments to be Made

To fit the keyboard into the Mini I simply cutout the keyboard space from the original model and designed a shelf for the new keyboard PCB to sit on. Additionally I removed the magnet clips which would normally be located under a printed keyboard and replaced these with clips located on either side of the modified case design.

Lorenzo provides bottom case templates for Raspberry Pi 2/3's and for the 4. I had a Pi 3A on hand and further modified the lower case to fit that in place. The shorter Pi 3A board would came in handy later when cramming many additional keyboard wires into the case. 

Exploded View of the Commodore Educator 64 Mini Case.

Unfortunately the cases main top and bottom sections proved slightly too large for my printer. So I broke these down into separate components with some additional tabs put in place to make gluing them together convenient  and providing some structural strength. I also decided to divide the monitor stand into a bottom an top piece facilitating slightly easier 3D printing and finishing.


The other large-ish change I made to the original model was in redesigning the monitor frame, that part holding the LCD panel. This I made this slightly wider and a little less ovaloid in keeping with the source material. The clasp holding the monitor in place I also reduced in size considerably, minimising the likelihood of snapping an LCD panel accidentally. 

Printing and Finishing the Model

With all the adjustments made the model printed out quite easily. Finishing the the plastics took a little extra effort.

From other modelling activities I had a set of small files and sandpaper which went to good use. Quite a lot of time went into smoothing of the rougher areas and obvious layering from the 3D printing process. I wasn't intent on removing all traces of the printing technique, the model should reflect the process at least to some extent. 

Once sanded down and finished, the little Educator 64  parts were spray painted with a couple of colour combinations. The white panels being a mix of Tamiya TS-26 Pure White for the under layers and TS-7 Racing White for the finishing coats, lending a nice retro feel as the Racing White is slightly creamy in colour.

The black areas of the model were first painted in Citadel Lead Belcher, although any steel or silvery colour would be just as fine (It just happened to be the colour I had available).  The top coat is a Tamiya TS-6 Matt Black, applied relatively lightly, just enough to appear black while allowing the metallic undercoat to maintain some presence. All the components were then sealed with a Satin Spray varnish. The end result being really quite pleasing.

Commodore Educator 64 Mini based on the Commodore Pet Mini

Next Time: The Electronics

The Educator 64 fits together much as the PET mini. The major electronic components are pretty much listed at commodorepetmini.com. In Part 2 I'll attempt to go over how the keyboard is configured and how it works in conjunction with the original PET design.


See all entries for this project:  Part 1, Part 2 and Part 3

 
Read More

Wednesday, May 29, 2019

ZX-Key, External Keyboard For ZX81s and Other Micro Computers: Part 5

8 comments
The ZX-Key ZX81 Keyboard in Full Case

The Full Case For ZX-Keys

I've been promising a full keyboard case for the ZX-Keys ZX81 keyboard for a while, now at long last it is (almost) complete. Complete enough that have in my hands a freshly minted case fresh from Shapeways, and it looks gorgeous.

The Full Case builds on the Starter Case covered in the previous blog post, adding the top half and a bottom plate. As mentioned previously only the Starter case is really required, but for some smart good looks the top half is a must have. Of course for the sake of competness a bottom plate may also be attached.

Exploded Viw of the ZX-Keys Case Components
 The top half of the case is really where all the action takes place. The ZX-Keys mode indicator LEDs and reset switch are slightly recessed at the back, with some nice speed lines running either side, lending a retro 80s feel. A small hole is left open to the right of the case allowing a USB lead to be plugged in when using the keyboard with a PC or MAC. At the rear of the case the IDC connectors for serial out and direct connection the ZX-Key expansion interface are nicely flush.

ZX-Key ZX81 Keyboard - REar View
The Rear of the ZX-Keys Keyboard Case, Showing the Flush Mounted IDC Headers.
The whole unit is help together with 3mm diameter case bolts. A 6mm bolt and nut hold the centre of the base plate to the keyboard, all other bolts are 8mm in length and may be screwed firmly into to case holding the unit tightly in place.

ZX-Key ZX81 Keyboard - Side View
Right of the ZX-Keys Keyboard Case, with cutout for micro USB Access.
Attached to the inside of the top case is a sprew containing two Switch Cover components for mounting on the keyboards reset switch. The exact Switch Cover to be fitted on assembly depends on the micro switch found on the ZX-Keys PCB. A hollow stemmed version for use with long barreled micro switchs, or a flat bottom variety if shallow micro switch is in place. The Switch Covers should be placed inside the top shell the before assembly.

ZX-Key ZX81 Keyboard - Under Side View
ZX-Keys Base Plate and Mounting Bolts.
The only real issue I have with the beta case print is with the base plate. I found the plate to be a little flimsy, and it'll need to strengthening it before general release. Notably the grill like pattern on the base will be removed and made solid. Additionally the riser bars along inner sides will be widened to add a little extra rigidity.

The ZX-Key ZX81 Keyboard and Interface Card Connected to a ZX81
My ZX81, pictured with the complete ZX-Key Case and ZX-Keys Interface Card.
The ZX-Keys itself is for sale on Sell My Retro, At the time of writing there is one unit available, never fear more are on their way very soon. The Starter Case can be found on Shapeways., and the Full Case will be made ready for purchase there very soon.

Once I've completed work on the Full Case design a DIY Beginners Case for home 3D printing will also be made avaliable. The Beginners case will be based on the Starter Case design, although it will not be full compatible with the complete case units. All will be announced ASAP.

Update: All Case Parts are now avaliable for order from my Shapeways Shop.


See more entries for this project: Part 1Part 2Part 3Part 4, Part 5

Read More

Sunday, March 10, 2019

ZX-Key, External Keyboard For ZX81s and Other Micro Computers: Part 4

Leave a Comment
Some of you may have noticed that a batch of ZX-Key units went up for sale on Sell My Retro over the weekend. This has been a great achievement and would not have been possible without some much valued help. When I started this project I'd only intended to make a keyboard for myself but soon found a lot support and others desiring a modern mechanical keyboard implementation for 80s micro computers.

To that end I would very much like to thank Spencer Owen of RC2014 fame for his contributions and ZXkim81 for embracing the idea so fully that he's about to test out the first DIY kit version of the ZX-Key.

Now onto some more about the project so far.

Sundry ZX-Key Design Decisions 

This post is primarily centred around some design decisions on the Case for the Keyboard and the Selection of Key Switches.

Mechanical Key Selection

Selecting the right Mechanical switches for the keyboard was a slightly more difficult task than you might imagine; in the end I chose Gateron Yellows, a firm to medium weight linear switch. The reason for this is twofold, and all to do with how the ZX81 registers key presses.

The ZX81 can be somewhat sluggish in registering keystrokes. While this is normally quite fine when entering text with the membrane keyboard, moving to a mechanical keyboard makes this lack of speed somewhat more noticeable. This is the reason behind the use of a linear switch, over a clicky one such as MX Blues. While a real keyboard is far more tactile, the use of a clicky switch would give an undue impression that a ZX81 had actually registered the key press when in reality it hadn't.

Gateron Yellow Keyswitch, the Perfect Match for a ZX81 Keyboard

Related to the above;  the use a firm linear switch adds a certain amount of weight, possibly unconsciously slowing down the natural typing rate, bringing key strokes more into line with what a ZX81 expects. On testing I found Gateron Yellow switches a nice match to requirements, and the main reason for not going with the firmer MX black was in keeping the typing experience pleasant, particularly for people not used to (overly) heavily weighted switches.

A Case to Start

All keyboards need a case of some sort. The trouble here of course is that all bespoke keyboards require a very specific case, one that can end up being quite the expense. For the ZX-Key keyboard case my main goal was to first make it relatively affordable, and secondly I desired a design that could be upgraded over time.

Essentially the Starter case I came up with is more of a keyboard frame than a full case. The ZX-Key keyboard is screwed in place with some 3mm diameter 6mm long case bolts. Provision on the base has been made for standard 12 x 12mm rubber feet to stop the keyboard from sliding around on a table.
The ZX-Key  ZX81 Mechanical Keyboard in Starter Case
The ZX-Key Keyboard Mounted on the Prototype Keyboard 'Starter' Case
Also of note, the case has a gentle 2 degree slope from front to back for an easy typing angle. A higher angle felt a little exaggerated on such a small keyboard.

I've been using the initial prototype for some time now, and have found it provides quite a good level of rigidity. I did make a few errors on the original, mostly around spacing, and in the height of the lip around the keyboard PCB. All issues have been addressed and the fully revised version of the ZX-KEY Keyboard 'Starter' Case has been made  made available on Shapeways.

Bottom of the Prototype Keyboard 'Starter' Case
As alluded to, there will be 2 more case parts designed, a simple backing for underneath the keyboard and a somewhat more elaborate top half styled to suit a Sinclair product. However I felt it important to make these components entirely optional, particularity as larger 3D printed objects can become quite expensive.

Of course the case as a whole is entirely optional, and if you make your own then I would welcome seeing pictures.

Final Production Ready ZX-KEY Keyboard 'Starter' Case as Found on Shapeways

I will be releasing the complete set of case parts to Shapeways in the coming month or so, if you would rather wait for the complete unit.

See more entries for this project: Part 1Part 2Part 3Part 4Part 5


Read More

Thursday, December 31, 2015

Build Your Own AZ15

Leave a Comment
Why not round out the year be building your AZ15, the Raspberry Pi, Arduino and ZX81 keyboarded wonder of a mini computer.

There have been a number of requests asking where to get the case, all the parts etc, so after ironing out a couple of minor issues I've made the Case available on Shapeways, and below is detailed most of everything else you'll require to complete your own AZ15 project.

This little is adventure has always been about achieving a fun build in the spirit of  "just because it's possible I think I'll give it a go", so please  don't expect this thing to be a cheep enterprise (3D Printing the case is the largest single cost factor here). This project is a learning experience and one undertaken to just see what could be achieved with 3D printing, off the shelf Arduino components and some hard graft.

Before you rush of and purchase everything, keep in mind that this is also not a professional product and doesn't come with a warranty, though if you ask nicely I'll do my best to provide some help along the way, should you decide to give it a go.

Major Case Components List


These are the major components, the ones responsible for all the heavy lifting, style substance and the impress (or not) your friends bits at the heart of the AZ15. 

Major& Miscellaneous Parts Shopping List


Amount Part Type Properties
1 AZ15 Computer Case Main AZ15 Case to hold the Raspberry Pi2 and Keyboard Converter Board etc
1 AZ15 Computer Case Lid For a Complete case the lid component is also required
1 Raspberry Pi2 Specifically a Raspberry Pi2 is required to fit inside the AZ15 Case.
1 LeoStick Freetronics LeoStick (Arduino Compatible)
1 ZX81 Keyboard ZX8-KDLX - PCB replacement keyboard for ZX81. These can be purchase fully assembled or un-assembled depending on preference. There is also a ZX80 variant available, compatible with the AZ15 project, if you're feeling super retro. (some minor changes to Arduino code to match the layout may be required).
1 Rubber Feet Rubber Feet, Small Stick On, Size: 12 x 12mm- Height 6mm
1 Compact Right Angled USB Cable This goes inside the AZ15 case and connects the Pi to the Leostick. A 15cm length of cable should be plenty. I got one of these from Ebay.
1 Mini USB WIFI Dongle Optional, for plugging into the internal USB port.
1 Double Sided Tape Black Double sided tape for mounting the ZX81 Keyboard into the case keyboard tray.
1 Hot Glue Hot glue and glue gun, used to permanently attach LEDs to case.


Converter Board Components and Minor Case Furnishings


In this section is listed everything required to build the Converter Board. I've linked to the exact components I used in my original board for clarification. You should be able to match the linked components to you're local supplier if needed.

Shopping List


Amount Part Type Properties
1 Molex 22-02-3053 header - 5 pins hole size 1.0mm,0.508mm; row single; package THT; pins 5; form ♀ (female); variant variant 4; pin spacing 0.1in (2.54mm)
1 Molex 22-02-3083 header - 8 pins hole size 1.0mm,0.508mm; row single; package THT; pins 8; form ♀ (female); variant variant 5; pin spacing 0.1in (2.54mm)
4 Locking male header - 2 pins 2 Pin 0.1 Straight Locking Header - 2.54 pitch - Single; form ♂ (male); pin spacing 0.1in (2.54mm)
2 Generic male header - 14 pins hole size 1.0mm,0.508mm; row single; package THT; pins 14; form ♂ (male); pin spacing 0.1in (2.54mm)
4 Header with Crimp Pins - 2 pins 2 Pin 0.1 Header with Crimp Pins - 2.54 pitch (2.54mm). Connect LEDs and switch to Board
3 Red (633nm) LED color Red (633nm); package 5 mm [THT]; leg yes. Use hookup wire and Header to Connect to Board and Mounting in Case
1 LeoStick As above, don't panic, you don't require 2 of these. Assemble separately with female header at bottom. Plugs into J7 and J8
3 220Ω Resistor tolerance ±5%; package THT; bands 4; resistance 220Ω; pin spacing 400 mil
1 10kΩ Resistor tolerance ±5%; package THT; bands 4; resistance 10kΩ; pin spacing 400 mil
1 Round Pushbutton switching circuit SPST; default state Normally Open. Mounting hole 12mm
1 Hook Up Wire Various Colours, For connecting LEDs and Switch to Board via Headers
1 Heatshrink For isolating LEDs, prevent contact with Raspberry PI etc


Converter Board Assembly


ZX81 Keyboard Converter Board PCB Layout.
There is not a great deal to assemble on the
Converter Board, just a couple of resistors, pin headers and the Molex sockets, over all is a very basic solder job.

All the files required files for ordering a PCB from a fabrication house are contained in AZ15_PCB_layout.zip. Or do as I did, and use the same files to to create your own PCB. I outlined the basic process earlier in the blog. Extra details on construction of the Converter Board have also been documented previously.

Of course you'll nee the latest Arduino sketch to fuel the Leostick, and that can be found in the zx81usbkeyboard_20151.tar.gz file.

Components highlighted in bold green, under Properties, are not soldered / attached directly to the converter board. These components are for attaching via hookup wires and headers to the board, and are mounted in or on the AZ15 Case.

Assembly List


Label Part Type Properties
J1 Molex 22-02-3053 header - 5 pins hole size 1.0mm,0.508mm; row single; package THT; pins 5; form ♀ (female); variant variant 4; pin spacing 0.1in (2.54mm)
J2 Molex 22-02-3083 header - 8 pins hole size 1.0mm,0.508mm; row single; package THT; pins 8; form ♀ (female); variant variant 5; pin spacing 0.1in (2.54mm)
J3 Locking male header - 2 pins 2 Pin 0.1 Straight Locking Header - 2.54 pitch - Single; form ♂ (male); pin spacing 0.1in (2.54mm)
J4 Locking male header - 2 pins 2 Pin 0.1 Straight Locking Header - 2.54 pitch - Single; form ♂ (male); pin spacing 0.1in (2.54mm)
J5 Locking male header - 2 pins 2 Pin 0.1 Straight Locking Header - 2.54 pitch - Single; form ♂ (male); pin spacing 0.1in (2.54mm)
J6 Locking male header - 2 pins 2 Pin 0.1 Straight Locking Header - 2.54 pitch - Single; form ♂ (male); pin spacing 0.1in (2.54mm)
J7 Generic male header - 14 pins hole size 1.0mm,0.508mm; row single; package THT; pins 14; form ♂ (male); pin spacing 0.1in (2.54mm)
J8 Generic male header - 14 pins hole size 1.0mm,0.508mm; row single; package THT; pins 14; form ♂ (male); pin spacing 0.1in (2.54mm)
LED1 Red (633nm) LED color Red (633nm); package 5 mm [THT]; leg yes
LED2 Red (633nm) LED color Red (633nm); package 5 mm [THT]; leg yes
LED3 Red (633nm) LED color Red (633nm); package 5 mm [THT]; leg yes
LeoStick Arduino Assemble separately with female header at bottom. Plugs into J7 and J8
R1 220Ω Resistor tolerance ±5%; package THT; bands 4; resistance 220Ω; pin spacing 400 mil
R2 220Ω Resistor tolerance ±5%; package THT; bands 4; resistance 220Ω; pin spacing 400 mil
R3 220Ω Resistor tolerance ±5%; package THT; bands 4; resistance 220Ω; pin spacing 400 mil
R4 10kΩ Resistor tolerance ±5%; package THT; bands 4; resistance 10kΩ; pin spacing 400 mil
S1 Round Pushbutton switching circuit SPST; default state Normally Open. Mounting hole 12mm

Read More

Friday, November 27, 2015

Presenting the AZ15, a not Actuall Clone of a ZX81 Assembled

Leave a Comment
I was confident it would look pretty cool, yet once the case arrived (after some timely industrial action at customs and excise) my expectations were exceeded by far. It does in fact look damn amazing, this 3D printing thing and by extension Shapeways ability to turn home design into reality is brilliant.


As expected the surface on the final product is lightly rough to touch and has a non-gloss finish. It kind of reminds me of suede, if suede assumed a plasticky form. You can still see the layers where the object has been built up but that certainly doesn't detract from the looks of the AZ15 case. Invariably I couldn't wait to put it all together, and thus the beginning of the end phase ensued.

Firstly I gathered all the disparate parts together. Internally the case had the following items to be installed, a Raspberry Pi 2, the LeoStick and Converter board, a right-angled usb cable to connect to the LeoStick, a WIFI dongle, LEDs and the mode selector switch. The keyboard would sit nicely on the tray, with it's cable sliding through a gap provided at the upper right corner much, like on the original ZX81.


The Pi, USB cable and WIFI dongle were installed first. I was relived that this all fit exactly as planned, being that the AZ15 case was designed specifically to hide one of the USB port banks and thus give the appearance of one complete unit to the casual observer.


Next the LEDs were hot glued into position, the mode switch installed and the keyboard converter board were inserted. Working in the confined space was a little challenging but everything so far went in without to much difficultly. As I'd made the converter myself and therefore drilled the mounting holes by hand, the mounting points were designed to allow a little slip and slide for easy adjustment. The one thing I hadn't counted on was not being able to affix the bolt heads due to access issues at the far right corners, luckily for me the drill holes in the converter board are nice and tight, so the bolts screwed in and held the board firmly enough.


Time to plug in the brains of the keyboard ie. the LeoStick. It's all a tight little fit, leaving just enough room to smuggle in the cables coming directly from the keyboard. The keyboard was mounted with some doubled sided tape on the keyboard tray.


Flipping the case over, some handy dandy rubber feet are slotted into position to provide much needed non slipping action, necessary when typing on a keyboard of diminutive weight and size.


Now it was a simple matter of plonking the lid on, except that the plonking didn't quite plonk as one might have expected. Unfortunately I'd made the little tabs on the side of the lid slight to small, meaning that the lid slides about a little bit to much. The immediate solution was to use some tiny strips of double sided tape to hold the movable lid in position. At a later date I might opt to get the lid reprinted and permanently fix this relatively minor issue.


So that's it, time for some sitting back a marveling at my creation. I'm very pleased with the final look of the AZ15 case, and hopefully I've managed to do the original ZX81 design justice and possibly at least slightly amuse Rick Dickinson the creator of the ZX81's iconic looks.


Read More

Monday, November 09, 2015

Final Case Design Shipped to Shapeways

Leave a Comment
Az15 Raspberry Pi Computer / LeosStick Computer with ZX81 Keyboard
AZ15 Deign Impression
The final AZ15 case design has been shipped off to Shapeways for printing and the nervous wait for a tangible object to arrive in the post has begun. All being well, the physical product will work as designed; meeting all expectations generated by the on screen version of reality.

The case was designed using the modeler AC3D, I've been using this tool for various projects over a number of years (though never for a 3d printed model before), so am pretty comfortable using it. A Raspberry PI 2 / B+ model was sourced from Thingiverse to construct the case around. I can't locate the exact model I used now, however there are a number to chose from including this one by jayftee. It's always a bonus when somebody else has done the hard work of modeling and exacting object for you.

AZ15 Case Design, Side View
Some decisions taken early on that dictated the shape and size of the AZ15 case. The choice not to de-solder the USB and Ethernet ports from Raspberry PI 2 lent extensively to the final design. The PI 2 has four USB ports, and I've designed the case such that two of these ports are only available internally. This layout allows the Leostick to connect internally and invisibly to one of these ports, giving the overall external appearance of one complete unit. The other internally USB port could be used to house a WIFI or Bluetooth adapter.

AZ15 Case Design, Rear View
The choice of configuration for the USB ports has given a rather unique cut-out appearance at the back of the computer, a nice little design touch that also helps maintain a compact and tidy feel when external USB devices are plugged in at the side.

From the outset I hadn't intended to clone a ZX81 case, the original being a design classic in its own right. What I'm after is something reminiscent of a classic 80s microcomputer but with a contemporary feel. A kind of modern clone. Hopefully within the next week or so I'll find out just how successful I've been.


Read More