Introduction
Introduction Statistics Contact Development Disclaimer Help
2018-02-26
__M_a_k_i_n_g__y_o_u_r__o_w_n__k_e_y_b_o_a_r_d______________________
got my first mechanical keyboard 1 and a half years ago. I got me
60% Vortex Pok3r III with LED backlighting and MX-Clear switches.
ll in all it is a nice keyboard, I used it happily. However the
ustomisation it offers is both a blessing and a curse. The good
hing about it is, that it requires no flashing tool and can be done
n the fly by typing keys on the board using a special programming
ode. The bad thing about it is, that there is no tool to read this
ustomisations back out for backup. So when you have to reset the
eyboard which happened 3 times to me you loose all your nifty
ustomisations.
o I did some research about building your own mechanical keyboard
nd it has been a wild ride ever since. It turns out making your own
eyboard is pretty easy. And there is even a wide variety of open
ource designs available to choose from.
__What's_in_a_keyboard?_____________________________________________
keyboard mainly consists of:
Keyswitches
A plate
A case
A controller / A PCB
Some LEDs / diodes
Keycaps
eyboard switches come in two basic "shapes" which refers to their
ootprint on the PCB / plate: Cherry style switches (MX) or Alps.
X-Switches are by far the most commonly used ones when it comes to
eycaps. I haven't tried alps yet, so I cannot tell you anything
bout them. Another (rather expensive) outlier are TOPRE switches
hich is an advanced topic if you want to build a board yourself.
nother parameter for switches are the forces need to activate the
witch and whether there is a tactile or audible actuation point. To
istinguish them the switches are referred to by color.
- Linears: Red, Black - Tactile: Brown, Clears - Clicky: Blues
o far I have tried blues, reds, clears and browns. Blacks are on a
rototype. Also note that Cherry clones may have different color
odings, such as Gateron or Zealios switches. To get a feeling for
he switch types either try them on a keyboard from a friend or a
hop or get a keyswitch tester, which is a 4x4 numpad like case that
ncludes several different types of switches. If you have decided on
switch type, decide on the case.
ou got a couple of options:
CNC'ed cases, those are hard to make youself unless you have access
to a CNC Mill. Those are around 50->100 EUR or more depending on
the type and material.
3D Printed cases: Those are rather cheap in comparison. Some models
like the crazy dactyl keyboard can only be made with 3D printed
parts.
Sandwhich cases: Either made from steel with standoffs or wood /
acrylic layers or a combination thereof. That may be the cheapest
option if you have access to a laser cutter.
o you see, a local fablab is key to keeping the price tag down to a
inimum :)
he innards of the keyboard consists of the switches being connected
hrough some diodes to a microcontroller. The diodes are there to
revent ghosting effects. The microcontroller used on mosed boards
s a cheap and easily available Atmega32U4, which contains a USB
ontroller that will do the communication for us. If you want a
ireless board there are bluetooth enabled Atmega boards that can do
he comms for you.
f you don't want to wire the keyboard matrix yourself you can get a
CB. There are quite a few open source designs for PCBs out there
hat require you to solder on the switches, diodes and a cheap
ontroller (Atmega32U4 in one of its dev board variants). Or you buy
resoldered PCBs as a kit.
did hand-wire most of my built boards, it turns out that it is easy
o do, it is easy to debug and easy to fix. A PCB approach on the
ther hand means that you can save some height on you building, since
ou don't need as much space below the plate. Also the PCB acts as a
tabilizer so it might be a sturdier build.
hanks to technomancy's Atreus hand-wiring guide I tried to hand wire
y boards. The Atreus is also the first board that I built and it is
till one of my favourite daily drivers.
s for the controllers used there are a wide range of arduino pro
icro clones out there, most of them featuring a usb micro connector.
have seen a clone with usb mini connectors as well! Or you can get
he Teensy which is of better quality but also twice the price of an
rduino clone.
__How_does_a_keyboard_actually_work?________________________________
lectronically a keyboard is a simple circuit consisting of a lot of
witches and a microcontroller. The microcontroller checks which of
he switches are pressed and generates a scancode for the operating
ystem. This scancode is then translated to a key event depending on
he selected layout of the OS.
ow since a microcontroller does not have one input pin for each
ndividual key, the keys are wired as a so called matrix. In the
atrix keys are arranged in columns and rows. Each row and each
olumn is wired together and connected to one pin. Maybe it helps if
ou imagine the matrix as a coordinate grid, with the rows and cols
n the axis. The microprocessor then checks periodically where on
he matrix a circuit is closed (the key switch is pressed). That way
single compination of row/col pins can identify the exact key that
as been pressed.
ow as electricity is a funny thing the effect of ghosting may be a
roblem when certain combinations of keys are pressed in the matrix.
or a better explanation see here[]. To prevent this diodes are
oldered in either rowwise or columnwise. The firmware on the
ontroller needs to know this to scan the pins in the right
irection.
hat's all there is to it! The rest of the magic happens in a big
tate machine on the microcontroller.
__Tooling___________________________________________________________
or the cases you need 2D/3D design tooling. I used FLOSS, which
eaves me to: OpenSCAD, FreeCAD, Inkscape and VisiCut.
or the sandwhich case you can download a lot of cases as SVGs which
ou can use to feed to VisiCut for cutting on your fablab's laser
utter. For a orthogonal planck build I used OpenSCAD to model the
VG files and I like the procedural approach for that.
or 3D-printed cases you can either use OpenSCAD or FreeCAD to design
our case or use a STL file off of thingiverse.
or the firmware you can use the QMK keyboard firmware which has the
ost features implemented, including speaker support or a midi
eyboard, and also features a lot of predefined layouts and board
ypes. But there are also a lot of other firmwares available, or you
an build your own matrix scan software.
o flash and build the software you need a gcc-avr toolchain and
vrdude / dfu-programmer depending on the bootloader of your
ontroller.
nd of course you need a multimeter, a soldering iron, wires, a flush
utter, a self adjusting wire stripper and a multimeter for debugging
our soldering joints.
__Lessons___________________________________________________________
ne of the tricks I have learned for hand wiring is that you make a
ittle loop with the wires around the pins before soldering them on.
hat will result in a secure physical connection and you won't be
ble to rip off the wire again (well normally anyway).
lso designing a case is non-trivial if you want some extras. While
t looks shiny in OpenSCAD, the laser cutter adds kerf, the arduino
lonse may come with different headers, sizes, pcb thickness...
crylic tends to snap easily.
o what I want to tell you probably is: Expect to fail, expect to be
on perfect, there are things that will go wrong in your build and
hat's the chance to learn something. Still works for me and it is a
umbling experience. Also expect to fix broken stuff, even act as if
he newly built thing will break as soon as you finish! Then when
hings break I can tell myself "oh, sure, of course it breaks, let's
ee whether I can fix it".
f you get annoyed at some failure, back off, do something different,
ave a break. Then think about your options.
guess this is all a good general approach to things but during this
ctivity with physical things (which I don't do often enough) this
ll became clearer to me.
__Farewell__________________________________________________________
o I hope now you have some starting point to get your own first
uild done. Let me know how it went!
You are viewing proxied material from vernunftzentrum.de. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.