I decided to buy the RabbitEngineering.com domain to showcase (and perhaps sell?) future projects. You can have a look at some build photos there, and pick up some merch (t-shirts and whatnot).

The B’s in the logo are supposed to look like two sets of rabbit ears sideways (see it?) in honour of the bunnies. The typography was designed so that it works as a positive and negative space (i.e. it can be cut from a shape as well as printed).

A larger project I want to complete is a standalone computer, in 1980s style – complete with external storage, controller and screen. Top priority for this project is innovative and appealing design. I decided to begin with the controller (mouse replacement).

I decided to not use a mouse or trackball – those are not innovative enough; instead, I decided to model my controller on a well-established interface that is not used in computing, but popular in some areas of aviation – the HOTAS throttle. This is an example, from the McDonnell Douglas F-15 fighter:

The throttle is used to control the thrust of the engines by moving it forwards and backwards, but in the 1960s cockpit designers, realizing that a pilot’s hand needed to rest on the throttle for most of a flight, began to add controls for common functions – RADAR settings, the air brake, radio selectors, etc. This was done by adding first buttons to the throttle, and later 4 and even 5 way digital joysticks, in places where the fingers rested naturally.

I decided to use the throttle as the basis of my design. I wanted to keep the physical design minimalist and geometric, so I first settled on a simple cylinder with a flattened base. I 3D printed out test form in white PLA, and marked with sharpies where my fingers rested (this is a good technique for noting required adjustments to 3D printed parts).

Immediately a problem became apparent – the top part, where the fingers curl around the form, was too wide, leading the hand to be overextended and uncomfortable. Back to OpenSCAD. The tube was at least not wasted – I now use it as a pencil holder on my workbench.

For the next form, I narrowed the top, but kept the base wide for stability – in essence, the new form is a triangular prism with spheres for vertices. Again, I printed in white PLA and marked where the fingers naturally lay using sharpies.

Front view:

Left view (where the thumb rests, and the control for the mouse cursor will be):

Right view:

Once that was done, it was time to measure the locations of all the buttons and transfer them into OpenSCAD to begin modelling the complete shape. The final controller would have the following electronic components:

  • A two-axis analog joystick to control the cursor (for compactness, I used the part used in the Nintendo PSP, which is available at Adafruit). Controlled by the thumb.
  • A 5-way digital joystick for left click (depress the joystick), mouse wheel up and down, and scroll page left and right (also from Adafruit). Controlled by the index finger.
  • 6mm tact switch for middle click. Controlled by the middle finger (from Adafruit)
  • 6mm tact switch for right click. Controller by the ring finger (from Adafruit)
  • A TeensyUSB 2.0 programmed as a USB keyboard and mouse as the HID interface. The teensy can be programmed with Arduino libraries, but is much more compact and has better USB device emulation (you can also get these from Adafruit).

A new technique I wanted to try on this project was to have plywood inlays in plastic parts. On the Nespoise I had mixed black PLA and plywood to a very nice effect, but I wanted to try and hide the edge of the plywood this time. Because OpenSCAD lets me export to STL which is consumed by both Makerware (for printing PLA) and CamBam (for CnC cutting), I thought it would be fairly straightforward to do. Here is the shell from the outside (minus buttons):

The shell consists of an upper and a lower half, joined by two #6 imperial screws. The top half is the complex part, with the buttons/joystick openings, screw posts, and hinges:

Internally it’s more compact that any other project I’ve worked on – to ensure all the parts deconflict correctly, I rendered a number of strange cross sections (OpenSCAD makes this very easy). Here are some of the more interesting ones:

I had never worked with hinges and only had limited experience with moving parts like d-pads, so I decided to make test prints of just these areas. Turned out this was a good idea, as the tight tolerances I originally put in caused annoying sticking of the parts.




 Once all the bugs in the top half were resolved, it was time to print the complete shell. This required the use of supports which I don’t often use, and I ended up with some untidy/incomplete areas in the print (for example, one screw post only printed halfway before breaking down). Given it was a 5 hour print, I decided I could live with the bugs, especially given they were all inside the body (the external surface was smooth). I then glued/screwed the switches and joysticks in, and got ready to wire them in place.

I then spent some time programming the firmware for the Teensy. It’s better to do the bulk of this before final assembly, because you might discover short circuits, bad switches, or other hardware related bugs during programming, and you want to avoid having to disassemble the project to resolve those.

Here are all the plastic parts (with most of the electronics) ready to test.

I then cut the plywood inlays and they snapped nicely into place, and I added a little superglue to ensure they stayed in place. Time to add the remaining electronics before further testing. Here are some views of the top half ready to close – it is a tight fit.

Here are all the parts labelled. For the power light, I used the “natural PLA lens with logo bezel” trick I invented for the NESPo and used in the NESPoise, this time with the Rabbit Engineering logo.

On the bottom half I added two 1 Oz fishing weights, to make the controller feel more solid on the table. I wanted to avoid users from mistakenly moving it around as they would a mouse. The extra weight plus rubber non-slip feet makes it adhere to the table surface nicely.

Time for final assembly – here it is next to the second form:

Now to test it for usability. I found the cursor speed needed some tweaking, so I made some changes to the firmware. Teensy makes this a simple and painless process.

Here are some views of the completed controller, showing the power light illuminated:

Here it is in use, to give an idea of how the hand fits:

You can grab all the files to make your own at Thingiverse.




When the Xbox team launched the Xbox One, they all got a special edition of the Xbox One which was white and stated “I MADE THIS”. Here’s your chance to say you also made an Xbox One! And you won’t have to fork out $3000 on EBay either.

Download the files to print your own from Thingiverse.


I recently picked up an Atari 1200XL from a guy at work, and got into the mood to return to new mini machines. Instead of the 1200XL (which was a bit of a bomb), I decided to do the far more popular 800XL. And of course you need some media, so I did the Atari 1050 disk drive also.

As usual, you can pick up the files to print your own at Thingiverse.


20 Mini NES for SRGE

I’ve been working on a great early registration incentive for the Seattle Retro Gaming Expo (SRGE2014). Folks who register early stand a chance to win one of 20 mini NES machines. I’ve never mass produced any of the minis (the most I did was two each of the Xbox One and C-64), so it was bound to be a new experience.

It was a slog – people often ask if I sell my minis, and this experience did not make me want to start. Well, it did a little I guess. But it took a very long time to make just 20 of these. Here are some photos of the journey.

And so we begin printing…

At one point I ran out of white PLA. There was this much left on the spool after ending a five hour print. If I had run out before finishing the print, all those hours would have been wasted. Phew!

And then the spraying. One advantage of this project is that I got lots of spraying practice – I’m pretty good at that now. But my lungs are probably the colour of retro computer plastic by now.

Each mini NES has 9 parts, so the batch of 20 needed printing close to 200 pieces. Here are a batch of parts sprayed and ready to assemble:

Gluing together some controllers. Doing the buttons (not pictured here) took a lot of tweezer work.

Gluing and clamping…

Here is a little pile of them…



Once all done, they are ready to bag. I decided to put a little insert into the bag with the SRGE logo and some info on the machine.

Here is a baggie, ready to go.

And here are the baggies, ready to go!

And on April 30 we will pull the winners from our virtual hat! If you’d like a chance to win one of these, register for a weekend pass for SRGE2014 before April 30!


#1stworldproblems – I have a lot of very old joysticks. Too many? No, don’t be silly, no such thing. This hoarding habit is related to my collection of 80s and 90s flight sim paraphernalia in general.

It’s not too bad owning a lot of old flight sim software, because you can just crank up an emulator like DosBox or VICE and enjoy your clunky old untextured polygons. But using your retro flight sim hardware is not quite so easy. You can get an adaptor that allows you to use even the more complex joysticks such as the Thrustmaster FCS, but they have two problems: (1) They only convert PC 15 pin joysticks, and not the Atari/Commodore 9 pin digital sticks and (2) where’s the fun in that? Anyway, what I really wanted was a converter that:

  1. Accepted 9 pin and 15 pin joysticks, including those using the CH Flightstick Pro and Thrustmaster FCS hat switch standards
  2. Accepted two retro joystick simultaneously to allow for joystick/throttle/rudder combos
  3. Converted an analog 15 pin joystick into digital output (for use with emulated 8 bit games)
  4. Converted a digital 9 pin joystick into analog USB joystick (for using digital joysticks with PC sims)
  5. Converted a digital 9 pin joystick into USB mouse input
  6. Accepted arbitrary switches and converted them into joystick buttons for creating new custom input devices (like my previous Strike Fighters 2 radar/armament panel project)

That’s a tall order – this will need to be a microprocessor based project (my first). My first instinct was to use the Arduino Leonardo, which I really like and already have some experience with, but a couple of things put me off – it’s light on memory (2.5k), which limits growth potential for code; it has few digital inputs (20) and although it can be HID-configured as a joystick, it’s not trivial to make it be simultaneously a HID joystick, mouse and keyboard. Plus, it’s physically pretty big. Instead, I went with the Teensy++ 2.0, which uses the AT90USB1286, an 8 bit AVR running at 16MHz. It has 128k of flash, 8k of RAM, 40 digital inputs, 8 analog inputs, and more importantly, it can be easily configured as a Joystick (6 axis, 32 buttons), keyboard and mouse on the same HID device. It’s the size of two postage stamps, and costs $24. And it’s manufactured in the garage of an adorable Portland couple. Perfect.

First thing was to work out the electronics and firmware. For the two analog devices (15 pin joysticks), I would accept one as a full flight stick (i.e. 3 axis plus hat switch plus 4 buttons), and the other would be two axes and four buttons (I only have six output axes after all) – this one would be used as a throttle and/or rudder pedals. This step was fairly easy – get the pinout for a PC joystick, and then remember that PC joysticks use their potentiometers as voltage dividers – this means you need to add a 100kΩ resistor between the Teensy pin and ground:

This is required for each axis. The buttons are a simple case of connecting the Teensy’s digital pin to ground. The hat switches are a bit more complex, because CH Products and Thrustmaster came up with quite different ways of implementing those – more on that in this post. Now for the digital devices (9 pin joysticks), which are very simple – the joystick just connects the input to ground. I decided to expand slightly from the Atari standard by allowing two buttons (like the Commodore Amiga used). Here is the pinout. I also added a 37 pin input to expose all 32 buttons for a custom devices – it surfaces one pin per button, plus one for +5v and one for ground.

Those are the device inputs. In order to implement the various modes for the device, I also needed to add some support inputs:

  1. For each digital device input, a ‘gain’ potentiometer to scale the amount of output on the mouse/joystick.
  2. Because the digital and analog devices share joystick axis outputs, a switch to inhibit the digital devices (otherwise you get interference between them)
  3. A switch to select joystick/keyboard mode output on digital device 1
  4. A switch to select joystick/mouse mode output in digital device 2
  5. A switch to select if analog device 1 uses Thrustmaster FCS or Flightstick Pro hat switch
  6. A switch to select if analog device 2 outputs keyboard or joystick signals
  7. A reset button (needed to reprogram the Teensy).

I also decided to add LEDs to indicate the whole box was live (plugged in), and another to show if the digital devices were inhibited. When you lay all that over the Teensy’s pins, this is what you get:

Note that not all the Teensy’s pins are surfaced on its two side edges – some are in the center of the board. Once all that was locked, I soldered 0.1″ pitch headers on some perf board, and plugged the Teensy in (like a shield). I then got to soldering headers for all the plugs and switches. At this point it is worth pointing out that this is project that used a lot of soldering – somewhere around 400 points. Here I was taking a hand-cramping break:

This took several evenings, because I decided to go slow and test each set of connections as I finished them. As there was a lot of cables in a  small space, I would not be able to reach every spot at the end to fix issues.

Notice how I added little labels to connections – this is because I wanted to easily be able to determine which switch connected to which part of the board. When the rat’s nest was all wired up, it would not be possible to visually trace the connections.

As I added physical connections to the board, I updated the firmware to expose the functionality. The code itself was fairly straight forward, and didn’t require a lot of bells and whistles (I did add some code to automatically detect when an analog device was unplugged which I am very chuffed with).

So much for the electronics – now on to the enclosure. I decided to keep the design simple; it would look avionics panel like and hardcore – I took inspiration from the great Cockpits of the Cold War. Last time I tried this, I used a large decal to add the captions to the panel; but after a couple of years, the decal corners have lost their glue, and are peeling slightly. I would avoid that this time by using a sheet of acrylic, with a printed overlay behind it. I also wanted the enclosure to have a clamp so that I could attach it to my desk, and flip switches without it sliding around. Here is the OpenSCAD render of the final design:

The clamp would be the difficult part, so I started on that. The original plan was to have one large, monolithic 3D printed PLA clamp piece (in yellow above), and then have another printed PLA part – essentially a threaded bolt – that would screw upwards to attach the clamp to the desk. Unfortunately that did not work, because the clamp and bolt had to be printed in different orientations which led to the threads sticking horribly. Because the clamp part took a little over 5 hours to print, I decided I wanted to keep that. So I switched to a #6 steel threaded rod and built an adapter for the clamp. This consisted of a tube that holds a steel nut in the hole of the clamp, sandwiched between two flat parts which are glued (using Super Glue/Cyanoacrylate) in place. Here is the tube with one half of the sandwich (the nut is already embedded in the tube):

And here it is sandwiched and glued into the clamp:

This wheel is what applies pressure to the bottom of the desk. It also has an embedded nut which accepts the threaded rod:

The enclosure body is just two simple flat U-shaped halves glued together with the help of some interior straps. Here is the whole thing (probably around 12 hours of printing in all these parts):

The back of the enclosure would be 1/8″ MDF (sprayed black), while the face plate would be 1/8″ acrylic. The faceplate really was the key to the whole thing. To ensure the profiles for the plugs, switches and buttons were the right size, I first did a trial run on MDF (which costs around 15% compared to acrylic) on the CnC router. Amazingly, I got the sizes right on the first try:

Then came the real cuts – I am not a fan of cutting acrylic on the CnC because the plastic melts and sticks to the router bit, slowly increasing it’s diameter, which leads to inaccurate cuts. Apparently you can get around this by increasing cutting speeds, but I have not yet gotten that to work for me. Another way to solve that would be to buy a laser engraver, but I don’t really want to drop $11k to improve my plastic parts by 10% or so (hardly seems worth it when you put it that way, Dave). Here is the acrylic, still with the blue adhesive protector in place. Actually turned out pretty well:

Once that was done, it was time to design the faceplate art (which labels all the switches, etc). I used OpenSCAD’s projection() function to export the outlines as DXF to Inkscape. Once there, I used the miso font to finish up the art:

I printed the art on my regular printer. Now onto the cutting. This had to be done carefully as the plugs have no bezel, so the edges of the cut would be visible. I used a plain old Exacto knife with a new blade and a lot of patience:

And then add in all the switches and plugs. This is actually the most fun part of the project, because you start to see the interface take shape. You need to be careful not to scratch the acrylic while you do this (which of course I did, but luckily it was a small one):

Instead of using regular screws, I decided to use some Hex-headed 3mm screws, which give a nicer aircraft panel-like look.

You’ll remember that part of the design was two LEDs – one to show if the device is live, and another to show if the digital devices have been inhibited. One of the pictures I saw in the Cockpits book showed indicator lights where the text itself lit up – this was very cool and I decided to replicate that. I 3D printed some housings for the LEDs in natural PLA (which is translucent). This is basically a square cone with the LED at the apex, and a transparency with the caption text at the base. I painted these (except for the base) using silver enamel paint to prevent the light from leaking out of the back of the housing. The entire thing is then attached to the face plate with two screws:

The effect is very cool – while the LED is off, the text is barely legible, and then really lights up in the color of the LED when it is turned on. I will be using this trick in future projects. Here is the entire enclosure coming together:

Next I hot-glued glued the perf to the back plate using some 3D printed standoffs (needed to provide space for the cables beneath). I also, as is my wont, signed the plate with my bunny sketch. You should be aware that when you make your own, this is an optional step:

I decided to done one last round of thorough testing before trying to stuff everything in the enclosure. There are many, many cables in this project:

Here you can see how the LED housing is bolted to the faceplate (top center of the plate):

It’s actually kind of hypnotic trying to see where all the cables connect. You can see why it was important to label everything before we got to this stage:

And here I am testing the mouse functionality – the Atari stick is actually moving the mouse cursor around. Very cool!

I also found a number of bugs around how the switches were labelled relative to what the code actually did (e.g. in the image above, the switches are set to use joystick mode, but the code was actually running in mouse mode). I also found one short circuit which nulled out one of the analog device axes. It always amazes how some bugs manage to hide till the bitter end.

Once everything was tested, it was time to compress it into the enclosure. I had to unplug everything, bolt the back plate (with electronics now attached) to the body, and then re-plug everything in (using tweezers) inside the enclosed space. In order to get everything to fit, I pre-folded some of the ribbon cables so that they collapsed in predictable ways as you squished them in. Then finally I grabbed an Allen key and bolted the faceplate in place:

Looks pretty good. Here it is with the desk clamp fitted, and running – notice how the light housings give you nice illuminated text captions (the red LED is brighter than the green):

I did some final testing by setting up Strike Fighters 2 to use the device, plugged in my Thrustmaster Top Gun Platinum stick, jumped in an Israeli Mirage IIIC, and started a huge furball with some Syrian MiG-21s. These two aircraft are very well matched, so there was a lot of stick pulling and grunting, but I got away with two kills before I ran out of ammo and had to run home with bingo fuel. Fantastic! My next round will be to set up Dos Box and use my CH Flightstick Pro to play through the US Navy Fighters Crimea campaign again.

This was a difficult project for sure – large 3D prints, lots of electronics/soldering and firmware coding on top of it all. But being able to use all my old controllers again makes it totally worth it. Total cost in parts was probably around $40 (the only “expensive” piece is the Teensy – the rest is plugs, switches and ribbon cable). If you’d like to make your own, you can get all the STL files as well as the source code for the firmware at Thingiverse.

During the 1990s, as flight simulators began to gain popularity with PC gamers, several companies started producing dedicated flight simulation joysticks. One of the cool features of these sticks was the hat switch – a four direction digital mini joystick which was operated by the thumb (usually used to control the view direction). The problem faced in designing such a joystick was how to encode the hat positions given the shortage of pins in the standard 15 pin PC gameport. Essentially, the PC’s gameport has enough pins for two joysticks each with two axes and two buttons (pinout here). Many of these joysticks used three axes already (aileron, elevator and throttle), and all four buttons, which left very little to encode the hat on.

Reading the hat switch of a classic PC joysticks on a modern microprocessor/dev board such as the Teensy USB or Arduino is fairly easy – there are only two major solutions you need to support (depending on the type of stick you want to read).

Thrustmaster FCS method – encode the hat in the fourth axis

The Thrustmaster FCS was the first PC flight stick to include a hat switch.The Thrustmaster Top Gun stick works the same way (it is essentially a re-branded FCS).

Thrustmaster encodes the hat position on the second Y axis (pin 13 on the plug). Moving the hat switch in any direction sets a particular resistance which can be easily read on one of the analog pins of the Teensy USB or Arduino (use analogRead(), which will return a value from 0-1023). The following table defines buckets for each hat position (High and Low are the top and bottom values you can expect the pin 13 analogRead() to be):

CH Products Flightstick Pro method – encode the hat using button chords

The second method of encoding hat switch positions was defined by CH Products for their Flight Stick Pro. It was used by several other sticks, such as the Suncom F-15 SFS, and the Logitech Wingman Extreme.

In this design, moving the hat switch produces multiple button presses simultaneously (i.e. a chord). A side effect of this is that these joysticks do not support pressing more than one of the regular buttons together – doing so produces a ghosting effect where the lowest numbered button wins. For example, if you press buttons 1 and 3 simultaneously, only button 1 registers; and if you press buttons 2, 3 and 4 simultaneously, only button 2 registers. The following table shows the chords that are produced by pressing the hat switch in each direction (the absence of a defined chord means the hat is in the center position). You will need to intercept these chords to use in your project:


Get every new post delivered to your Inbox.

Join 162 other followers