Close

Case design considerations

A project log for Pro Trinket USB Keyboard

A USB keyboard for custom shortcuts based on the Pro Trinket and Pro Micro

stefan-lochbrunnerStefan Lochbrunner 04/06/2015 at 00:270 Comments

First off... here, have a rough sketch of what the device looks like:

for the umpteenth time...

... as if I hadn't used it enough already ;)

TLDNR: SoB case templates on GitHub.

Seriously though, some thoughts on the case design:

As far as I can tell the most common ways to mount a rotary encoder are to solder it on top of the PCB (like all the modules found on eBay) or to directly mount it to the case.

When combining it with buttons though, the first option is problematic because the body of the encoder is higher that the buttons. This results in the buttons not protruding far enough through the acrylic (blue stripe, roughly 2.5mm thick) as illustrated in this image:

Of course this would have worked for the thinner tin case I used for the prototype but then the problem is that the threaded part of the shaft can't be shortened. This is also the case if the encoder is mounted to the case directly (the second possibility), as shown here:

Another downside of this is that it requires two separate PCBs. Therefore I went with a third option that I haven't really seen anywhere else, which is to mount the encoder to the PCB. This leaves only the movable part of the shaft protruding through the acrylic:

This is where the hole in the center of the rotary encoder footprint on the PCB, that I mentioned before, comes into play. The encoder can then be connected to the same footprint as if it was mounted on top. However, bending the pins upward can cause them to break off (as you can see on the left of the rotary encoder) but that's an easy fix. It's also important to make sure that the pins are not shorted to the body of the encoder. If the rotary encoder shaft is still too long in this configuration it can be easily shortened such that the knob sits just barely above the acrylic.

That was a lot of text and three quite similar pictures (...again, with the reuse of images...) for something that is quite obvious I guess...

Anyway, for the the actual acrylic case I ordered custom laser cut pieces from Seeeds Fusion service for the top half and the blank DP8080 case for the bottom. I didn't run the numbers but maybe ordering custom cut pieces for the bottom would be cheaper than the blank cases since it's a less complex job. However, with the blank case I also get the screws and the standoffs so I don't have to buy them separately.

To design the case I followed DPs guide with some exceptions:

As you can see in the above image (and the files on GitHub), I made the openings for the buttons large enough to fit around the body of the button in case I want to use only 5mm high tact switches instead of the shown 8mm high ones.

Discussions