A 3D printable, programmable, functioning USB keyboard in Star Wars style.
This is a Star Wars theme inspired device that you can connect to your computer and it will act as a fully functional HID keyboard.
Features:
In the source code you can define what keycodes will be sent when the buttons are pressed. Check for the Key definitions
section and update the values for your needs.
Useful sources:
This device acts as a HID keyboard when connected to your computer via USB. If the code is faulty there’s a chance that it will send random keycodes to your computer that can make uploading a fixed code impossible.
Safety switch to the rescue! If the safety switch is not pressed the keyboard will not send any keycodes to your computer, but keeps the code running on the Arduino, so you can keep it powered and upload new code to it.
ATmega32U4
chip that provides the required USB capabilities. This board is available in two variants, I used the 5V version.The following image shows how the buttons and LEDs are named both in the wiring diagram and in the code:
Note that not all parts are functional, some are greeblies.
You can see the wiring in the Fritzing file in the wiring
folder:
Notes:
H1
-H3
(horizontal) and the V1
-V2
(vertical) buttons are momentary buttons.Armed button
is a latching switch.LED V1
and LED v2
must be connected to PWM ports to be dimmable from code.You can see how I did the wiring in the photos folder.
You will need the following filament colors if you do not want to paint them:
Needless to say you can choose different colors or paint the parts.
The 3D printable models are available on Thingiverse and also on PrusaPrinters. I designed the model in Fusion 360 and published both the source files and exported them in STEP format so you can customize it to your needs.
No parts require supports, but you have to rotate some parts upside down and lay the case bottom part to the print bed.
You can print most parts with 0.3mm layer height, but I recommend printing the data port outer rims and the case bottom with 0.2mm. Because the parts are designed to snap fit to each other make sure your first layer width is dialed in correctly or configure elephant foot compensation.
The 3D printed parts are designed fit tight tolerance, they should snap fit together, though you may need a little glue to keep them in place.
The button caps are designed with a slightly larger tolerance, but if you still experience some friction when pressing the buttons you can sand their sides.
The labels are not part of the 3D models, I used David Occhino’s free Arubesh font to create them with my Silhouette Cameo and matte black vinyl. You can find the files in the labels folder.
Other sources for the Arubesh font:
You can create the stripes either with 3D printer, vinyl cutter or you can simply paint them.
It is very easy to create a HID device with the Arduino Pro Micro and there are many tutorials out there to get started:
Interestingly this board has a unique personality and reset is tricky:
When you create a HID device having a physical button that prevents the device to send messages to your computer is a MUST. Otherwise updating the device can be a PITA if your code is buggy.
The tactile momentary button is not ideal for a keyboard. It is not as comfortable as real keyboard keys and the box makes its clicking sound much louder.
You can spend many, many, many hours figuring out how to dress your thing Star Wars style using shapes, stripes and of course greeblies.
External USB-connected numberic keypads are surprisingly cheap.
This project was inspired by David E. Madison’s Building a DIY Stream Deck and The Smugglers Room. Thanks both for sharing their passion and knowledge with the community.
This project was created by György Balássy.