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