bschwind / key-ripper

Apache License 2.0
235 stars 14 forks source link

key-ripper

A keyboard personalized for myself, designed in KiCad, with custom firmware written in Rust.

key-ripper feet macbook-keyboard usb-c

The story behind this board can be found in this reddit post.

I also gave a (time-constrained) talk on making this keyboard which you can view here. Sadly I didn't get to cover everything I wanted to talk about when it comes to embedded Rust, but I hope you find it entertaining.

Main Features and Requirements

Setup

Current Version (v0.3.1)

v0.3.1 PCBWay Production Files

Version v0.3.1 adds an ESD protector on the USB connector, and was kindly sponsored and manufactured by PCBWay.

pcbway-matte-black-rp2040

pcbway-matte-black-usb-c

v0.3

v0.3 JLCPCB Production Files

Version 0.3 adds some iterative hardware improvements over v0.2:

v0.2

v0.2 JLCPCB Production Files

Version 0.2 improves upon some of the issues in v0.1, with some intentional choices that could be seen as a downgrade:

Version v0.1

Version 0.1 works but there are some issues:

Version 0.1 uses Kailh hotswap sockets. Combined with the top plate, this is good for trying out different switches, but adds complexity in the build process. It requires more parts, and I had to 3D print 3.4mm M2 spacers.

v0.1 JLCPCB Production Files

PCB Front PCB Back

Production Files

For every PCB fabrication order, I make a github release and upload the files I used to make the order.

You can see a list of releases here.

Create a Gerber File

For most PCB fabrication shops, they expect gerber files, which are essentially files that describe the layout of pads/traces/geometry for each layer in a PCB. They also contain the drill locations if your PCB has any holes. All these layers should be placed in a directory and compressed to a zip file for uploading.

To create a gerber zip in KiCAD:

Note: Check the PCB vendor's website for special KiCAD instructions, as they sometimes prefer certain settings when exporting.

OSHPark can directly accept *.kicad_pcb files so you don't need to export gerbers when ordering there.

Create a Bill of Materials (for JLCPCB)

From the schematic viewer:

Modify the CSV file:

In general, try to use as many "basic parts" as you can from JLCPCB. Each "extended part" costs an extra 300 yen per board.

Create the Position File (for JCLPCB's pick-and-place machines)

From KiCad's PCB design tool:

Modify the CSV file:

When uploading to JLCPCB, you may need to modify the rotation values. It will show you red dots on pin 1 for the relevant components, as well as a red + for components with polarity, so double check against your silkscreen and placement. Positive rotation goes counter-clockwise, so if you need to rotate a part counter-clockwise one turn, add 90 degrees. Subtract 90 to rotate one turn clockwise, and modulo 360 degrees to keep the overall rotation value positive.

Firmware Debugging

Set the DEFMT_LOG environment variable.