]> git.armaanb.net Git - atreides.git/blob - assembly/assembly.tex
Add guide for lacquering.
[atreides.git] / assembly / assembly.tex
1 \documentclass{article}
2 \title{Atreus Keyboard Assembly}
3 \date{ }
4 \usepackage{graphicx}
5 \usepackage{geometry}
6 \usepackage{wrapfig}
7 \newgeometry{margin=3cm}
8 \begin{document}
9 \setlength{\parindent}{0cm}
10 \maketitle
11 \section{Prerequisites}
12
13 In order to assemble your keyboard, you'll need your kit plus a few
14 other tools. The kit should contain these parts and a few spares:
15
16 \begin{itemize}
17 \item Case (top plate, switch plate, spacer, bottom plate)
18 \item Sandpaper
19 \item Finishing wax (mixture of beeswax and mineral oil)
20 \item Diodes (42)
21 \item Key switches (37 tactile or clicky, 5 red)
22 \item A-Star Micro controller
23 \item Printed circuit board (PCB)
24 \item Machine screws and nuts (8 each, 16mm M3 size)
25 \item Key caps (40 normal, 2 long)
26 \item USB micro cable
27 \item Rubber feet
28 \end{itemize}
29
30 You'll also need to have these on hand:
31
32 \begin{itemize}
33 \item Brush for applying finishing wax (a toothbrush will do)
34 \item Soldering iron and solder (thin solder and an iron with a sharp tip)
35 \item Wire cutters
36 \item Rags or paper towels to lay the parts down on during construction
37 \end{itemize}
38
39 \vspace{1em}
40
41 The latest version of this document can always be found
42 online.\footnote{http://atreus.technomancy.us/assembly.pdf} If you're
43 reading a black-and-white printed copy, you may find some of the
44 photos clearer in color onscreen. This copy describes the
45 circuit-board-based kit. If you are hand-wiring a board, see the older
46 assembly
47 guide.\footnote{http://atreus.technomancy.us/assembly-hand-wired.pdf}
48 The photos in this guide depict Matias switches, (with rectangular
49 switch stems) but you can use Cherry MX switches (with stems shaped
50 like a +) as well. The assembly steps are the same in either case.
51
52 \section{Sanding}
53
54 Start by sanding down both sides of each piece. You may want to
55 hold two pieces together while sanding for strength or placing it on a
56 flat surface you don't mind scruffing up; too much pressure on a
57 single plate could damage it.
58
59 \vspace{1em}
60 \noindent\makebox[\textwidth]{%
61 \includegraphics[width=0.7\linewidth]{sanding.jpg}}
62 \vspace{1em}
63
64 Keep in mind that the top side of the top plate and the bottom side of
65 the bottom plate are the only surfaces that are exposed to the touch
66 once the keyboard is fully assembled, so these will need the most
67 attention when sanding. You can sand the other surfaces as well just
68 to get the scorch marks off, but you don't need to worry about how
69 smooth the inner surfaces feel to the touch. Be sure to get all the
70 wood dust off the pieces before you go on. A clean tack cloth or other
71 fine cloth works well.
72
73 \section{Finishing}
74
75 You have two options when it comes to finishing. The easiest way is to
76 proceed with the wax/oil mixture included in the kit, but you can also
77 finish it with a spray lacquer. This requires buying more supplies and
78 takes longer, but it results in a sturdier, shinier
79 finish.\footnote{http://atreus.technomancy.us/lacquer.gif} The steps
80 for the lacquered finish are described in a separate
81 document,\footnote{http://atreus.technomancy.us/lacquer.pdf} and the
82 rest of this section describes the quicker finishing method.
83
84 \vspace{1em}
85
86 Some people don't like the look of the exposed edges charred from the
87 laser cutter. You can choose to sand off the charring, or alternately
88 cover it all with black ink from a sharpie for a more consistent look.
89
90 \vspace{1em}
91
92 Open up the wax/oil mixture. Apply some to the brush and start
93 spreading it over one side of each case piece. The color of the wood
94 will darken as it absorbs the oil. Try to ensure it's spread
95 evenly. Be more generous with the oil on the outer exposed
96 surfaces. Once you've spread it with the brush, you can use your
97 fingers to work the wax into the wood more deeply. If you need to
98 reapply the finishing in the future, butcher block conditioner is
99 readily available in stores and will do the job nicely.
100
101 \vspace{1em}
102 \noindent\makebox[\textwidth]{%
103 \includegraphics[width=0.7\linewidth]{oiled.jpg}}
104 \vspace{1em}
105
106 As your brush goes over the edges of the laser-cut wood, it will get
107 dirty from charred wood particles. After you've finished oiling one
108 side of each piece, it's best to wash out the brush. Be sure it's
109 fully dry before going on.
110
111 \section{Drying}
112
113 Once one side of each piece is finished, you'll need to lay them out
114 for a half hour or so to let them dry. Once one side is dry, repeat
115 the process on the other side. After you've finished the construction
116 you can come back and add another few coats to the outermost surfaces
117 for a smoother texture. Once it's dried for a while, wipe the excess
118 off. While you're waiting, you can start soldering the diodes and
119 controller onto the circuit board, but don't solder any switches in
120 before the switch plate is ready or you'll just need to remove them
121 later.
122
123 \section{Diodes}
124
125 If you've never soldered before, there are plenty of good
126 introductions online.\footnote{This one from Adafruit is great:
127   https://learn.adafruit.com/adafruit-guide-excellent-soldering/tools}
128 Coat the tip of the hot iron thinly with some solder before you
129 start. The key is to use the iron to heat both parts of the joint for
130 a second or two, then bring in a dab of the solder and let it melt and
131 stick to the component and the circuit board pad.
132
133 \vspace{1em}
134
135 Take five diodes at a time and bend them into a U shape. Place them
136 into the diode holes next to each switch slot on the unlabeled side of
137 the board. Each diode has a black band on it; the band should be
138 pointing in the direction of the arrow on the printed side of the
139 board. Once all five are in, pinch the legs of the diodes together to
140 keep them from falling out, then flip the board over and solder them
141 in place. Make sure they don't protrude off the board more than necessary.
142
143 \vspace{1em}
144 \noindent\makebox[\textwidth]{%
145   \includegraphics[width=0.7\linewidth]{diodes.jpg}}
146 \vspace{1em}
147
148 In the photo the diodes are inserted from the back of the circuit
149 board, but it will work just as well to insert them from the front as
150 long as the black band is oriented correctly. Once they're soldered,
151 trim the diode legs with wire cutters. Grip the diode leg as you
152 trim it to keep it from flying across the room. Keep the diode legs;
153 they will be needed in the next step. Repeat until each diode position
154 is filled.
155
156 \section{Controller}
157
158 Once the diodes are in place, you can begin attaching the controller.
159 If the controller came in a pink bag with its own header pins, you may
160 be tempted to use them to connect the controller to the circuit
161 board. Don't do this--they are too big and will prevent the case from
162 closing when you're done. We will be using the diode legs we just
163 trimmed instead.
164
165 \vspace{1em}
166
167 First take the PCB with the labeled side down and fill the four corner
168 holes in the center ``A-STAR'' section with solder. Insert diode legs
169 into these holes while melting the solder. Then repeat the process for
170 the other holes on the left, keeping them pointing as straight as possible.
171
172 \vspace{1em}
173 \noindent\makebox[\textwidth]{%
174   \includegraphics[width=0.8\linewidth]{many-pins.jpg}}
175 \vspace{1em}
176
177 Fit the controller over the pins you've attached so far. Solder the
178 four corner pins already connected to the PCB into the corners of the
179 controller. (The bottom left corner is unused; the pin above is used
180 instead.) Try to ensure the controller is as close to the PCB as
181 possible and not at an angle. Then solder the other left-side diode
182 legs into the controller as well. Trim them all with your wire
183 cutters when they are secure.
184
185 \vspace{1em}
186
187 Eight right-side holes remain. For these, bend four diode legs at a
188 time into an L shape, and insert them into four of the remaining
189 holes. Flip the board over and solder the protruding diode legs to the
190 PCB, then trim them down and flip the board back over. Straighten the
191 diode legs, then solder and trim them. Repeat for the remaining
192 unpopulated holes. From the PCB side, all the holes will be used, but
193 from the controller side, there will be some unused.
194
195 \vspace{1em}
196 \noindent\makebox[\textwidth]{%
197   \includegraphics[width=0.8\linewidth]{bent-legs.jpg}}
198 \vspace{1em}
199
200 Before you go on, take the time to double-check the solder joints on
201 the controller. The solder should fill the hole completely without
202 spilling over to adjacent holes, and the legs should be secure. Also
203 check that all the diodes are facing the correct direction with the
204 black band pointing to the bottom of the board.
205
206 \section{Firmware}
207
208 Installing the firmware now isn't strictly necessary, but it will
209 allow you to spot mistakes before the board is finished.
210
211 \vspace{1em}
212
213 \begin{wrapfigure}{r}{0.25\linewidth}
214   \includegraphics[width=0.8\linewidth]{reset.jpg}
215 \end{wrapfigure}
216
217 Plug in the USB micro cable into the controller, and plug the other
218 side into your computer. Get a copy of the
219 firmware \footnote{Available at https://atreus.technomancy.us/tmk} and
220 its dependencies, \texttt{avrdude} and \texttt{gcc-avr}, linked in the
221 firmware readme. The first time you upload the firmware, you will have
222 to use the hardware reset to enter the bootloader: take a diode leg or
223 wire and touch one end to the reset pin and one end to the ground
224 pin. (These are circled in the photo.)  Touch them together twice in
225 under a second and the LED underneath will begin pulsing in a
226 different pattern from the original blinking. This indicates it has
227 entered the bootloader for 8 seconds.
228
229 \vspace{1em}
230
231 While in the bootloader, type \texttt{make upload KEYMAP=qwerty
232   USB=[...]}  from the firmware directory\footnote{See the firmware
233   readme for instructions about determining the USB argument and
234   customizing the layout.}. The firmware should be uploaded, and it
235 will start functioning as a keyboard once switches are connected. Next
236 time you upload, you can use the reset key instead of touching the
237 pins together.
238
239 \vspace{1em}
240
241 If you only want to use the default layout and don't want to bother
242 with installing everything, the firmware readme also describes simpler
243 steps for installing a pre-compiled firmware.
244
245 \section{Switches}
246
247 Next take four switches and place each switch in a corner of the
248 switch plate. (The case layer with all the holes in it.) The switches
249 should be oriented so that the side with pins is to the ``north'' of
250 the board so they will fit into the holes in the circuit board. Put
251 the switch plate face-down on the table with the pins sticking
252 up.
253
254 \vspace{1em}
255
256 Carefully fit the circuit board over the protruding pins with the
257 labeled side down. Solder those corners to hold the circuit board and
258 the switch plate together. The switches should be flush with the
259 PCB. Take care that the switch pins are straight when you insert them;
260 pushing in a switch with a pin that's a bit bent will bend it flat and
261 prevent it from poking through the circuit board.
262
263 \vspace{1em}
264 \noindent\makebox[\textwidth]{%
265   \includegraphics[width=0.7\linewidth]{some-switches.jpg}}
266 \vspace{1em}
267
268 Next fill in the rest of the bottom row (SW1:3 through SW10:3) and the
269 leftmost column (SW0:1 and SW0:2). If your kit has red linear switches
270 which do not have any tactile bump, you can choose to use these for
271 the modifier keys (shift, ctrl, alt, etc) or to leave the modifiers as
272 normal tactile or clicky keys. Since modifier keys are held down, they
273 do not benefit from tactility like normal keys do, so some people find
274 they prefer linear keys there, but this is a matter of personal
275 taste. The modifiers on the bottom row are SW2:3, SW3:3, and SW8:3.
276 Place normal switches (usually grey or white) here if you want the
277 modifiers to feel like the other keys, and red ones if not.
278
279 \vspace{1em}
280
281 Solder the left and right pins of each of the switches you've placed so
282 far, and then plug it in to test them to ensure that each row and column is
283 connected back up to the controller correctly. Once you've confirmed
284 this, solder the rest of the switches, but leave the middle two
285 sideways ones for last.
286
287 \vspace{1em}
288 \noindent\makebox[\textwidth]{%
289   \includegraphics[width=0.8\linewidth]{center-switches.jpg}}
290 \vspace{1em}
291
292 \vspace{1em}
293
294 %% The main (non-rotated) switches on Matias kits have their pins
295 %% positioned a bit lower on the switch than Cherry pins; this shifts
296 %% the whole PCB a bit further down from where it would be on Cherry kits.
297
298 %% The holes for the rotated switches are oriented according to their
299 %% position on Cherry boards because Cherry switches cannot have their
300 %% pins twisted; they have a plastic post that helps mount it on the
301 %% PCB, but moving the middle holes down into the Matias-friendly
302 %% position would make it completely incompatible with Cherry, while
303 %% leaving it in the Cherry-friendly position simply makes it slightly
304 %% inconvenient for Matias kits.
305
306 Connecting the center two rotated thumb keys (SW5:0 and SW6:0) in kits
307 with Matias switches requires a little bit of tweaking. (Cherry
308 switches do not need this step.) The holes for the pins are not
309 aligned quite under where the pins protrude. A little twisting will
310 allow them to go in nicely. Note that the two switches must be twisted
311 in opposite directions since they are oriented facing away from each
312 other. You can use pliers or even just your wire cutters to twist
313 them.
314
315 \section{Wrapping Up}
316
317 If there's a misbehaving switch, it's often caused by a cold
318 joint. Reflow the solder on both contacts of the switch and the diode
319 first; if that doesn't fix it, it may be the connection to the
320 controller. You can follow the traces for the rows back to the middle,
321 but the columns on the back of the board are obscured when the
322 keyboard is assembled; you can see them in this PCB
323 diagram\footnote{https://atreus.technomancy.us/pcb}.
324 Re-melting the controller's solder joint for the affected row or
325 column is usually enough to get it working, but in some cases you may
326 need to reach under to get the joint that connects it to the PCB.
327
328 \vspace{1em}
329
330 If there is room between the head of the USB cable and the place where
331 the cable leaves the case, consider adding strain relief by wrapping
332 the cable with electrical tape at the point just below where it leaves
333 the case. This will make it so pulling on the cable does not dislodge
334 it from the controller.
335
336 \vspace{1em}
337
338 After the switches are all in and tested, place the keycaps. They can
339 take a fair bit of pressure to go on, so support the underside of the
340 board while pushing them on. Once the caps are on, they are very
341 difficult to remove again; don't try to pull them off without
342 desoldering the switch first.
343
344 \vspace{1em}
345
346 All that's left is to do is close the case by placing the switch plate
347 on top of the spacer and bottom plate, placing the top plate on it,
348 and screwing it together with the nuts facing up. If the controller
349 was not attached close enough to the circuit board, it may be
350 necessary to sand down the USB connector in order to close the
351 case. Before you place the rubber feet on the bottom plate near the
352 corners, consider giving the outer case another coat or two of wax and
353 allowing it to dry. If the rubber feet don't stay on with the provided
354 adhesive, white glue may be needed to secure them.
355
356 \vspace{1em}
357
358 Congratulations. Enjoy your new keyboard. It will take a
359 considerable adjustment period to get used to it, but it should result
360 in much more comfortable and effective typing. Also remember that
361 you're encouraged to customize the layout to make it truly your
362 own. Happy typing!
363
364 %% \noindent\makebox[\textwidth]{%
365 %% \includegraphics[width=\linewidth]{finished.jpg}}
366
367 \end{document}