]> git.armaanb.net Git - atreides.git/blob - assembly/assembly.tex
83a062fe97640187748a4bfae62f93b47773f432
[atreides.git] / assembly / assembly.tex
1 \documentclass{article}
2 \title{Atreus Keyboard Assembly}
3 \date{ }
4 \usepackage{graphicx}
5 \begin{document}
6 \setlength{\parindent}{0cm}
7 \maketitle
8 \section{Prerequisites}
9
10 In order to assemble your keyboard, you'll need your kit plus a few
11 other tools. The kit should contain these parts and a few spares:
12
13 \begin{itemize}
14 \item Case (top plate, switch plate, spacer, bottom plate)
15 \item Sandpaper
16 \item Finishing wax (mixture of beeswax and mineral oil)
17 \item Diodes (42)
18 \item Key switches (37 tactile or clicky, 5 red)
19 \item A-Star Micro controller
20 \item Machine screws and nuts (8 each, 16mm M3 size)
21 \item Key caps (40 normal, 2 long)
22 \item USB micro cable
23 \item Rubber feet
24 \end{itemize}
25
26 You'll also need to have these on hand:
27
28 \begin{itemize}
29 \item Soldering iron and solder
30 \item Wire cutters
31 \item Tape (masking tape works well)
32 \item Brush for applying finishing wax (a toothbrush will do)
33 \item Optional: ``helping hands'' stand
34 \end{itemize}
35
36 \vspace{1em}
37
38 The latest version of this document can always be found
39 online.\footnote{http://atreus.technomancy.us/assembly.pdf} If you're
40 reading a black-and-white printed copy, you may find some of the
41 photos clearer in color onscreen. This copy describes the
42 circuit-board-based kit. If you have an earlier hand-wired kit, see
43 the older assembly
44 guide.\footnote{http://atreus.technomancy.us/assembly-hand-wired.pdf}
45 The photos in this guide depict Cherry MX switches, but some kits ship
46 with Matias switches instead, which have a clear housing. The assembly
47 steps are the same in either case.
48
49 \section{Sanding}
50
51 Start by sanding down both sides of each piece. You may want to
52 hold two pieces together while sanding for strength or placing it on a
53 flat surface you don't mind scruffing up; too much pressure on a
54 single plate could damage it.
55
56 \vspace{1em}
57 \noindent\makebox[\textwidth]{%
58 \includegraphics[width=\linewidth]{sanding.jpg}}
59 \vspace{1em}
60
61 Keep in mind that the top side of the top plate and the bottom side of
62 the bottom plate are the only surfaces that are exposed to the touch
63 once the keyboard is fully assembled, so these will need the most
64 attention when sanding. You can sand the other surfaces as well just
65 to get the scorch marks off, but you don't need to worry about how
66 smooth the inner surfaces feel to the touch. Be sure to get all the
67 wood dust off the pieces before you go on. A clean tack cloth or other
68 fine cloth works well.
69
70 \section{Finishing}
71
72 You have two options when it comes to finishing. The easiest way is to
73 proceed with the wax/oil mixture included in the kit. The other option
74 is to apply several layers of lacquer and wet sand it down in
75 between coats. This requires buying more supplies and takes significantly
76 longer, but it results in a shinier
77 finish.\footnote{http://atreus.technomancy.us/lacquer.gif} The steps
78 for the lacquered finish are described in a separate
79 document,\footnote{http://atreus.technomancy.us/lacquer.pdf} and the
80 rest of this section describes the quicker finishing method.
81
82 Open up the wax/oil mixture. Apply some to the brush and start
83 spreading it over one side of each case piece. The color of the wood
84 will darken as it absorbs the oil. Try to ensure it's spread
85 evenly. Be more generous with the oil on the outer exposed
86 surfaces. Once you've spread it with the brush, you can use your
87 fingers to work the wax into the wood more deeply.
88
89 \vspace{1em}
90 \noindent\makebox[\textwidth]{%
91 \includegraphics[width=\linewidth]{oiled.jpg}}
92 \vspace{1em}
93
94 As your brush goes over the edges of the laser-cut wood, it will get
95 dirty from charred wood particles. After you've finished oiling one
96 side of each piece, it's best to wash out the brush. Be sure it's
97 fully dry before going on.
98
99 \section{Drying Case}
100
101 Once one side of each piece is finished, you'll need to lay them out
102 for a half hour or so to let them dry. Once one side is dry, repeat
103 the process on the other side. After you've finished the construction
104 you can come back and add another few coats to the outermost surfaces
105 for a smoother texture. Once it's dried for a while, wipe the excess
106 off. While you're waiting, you can start soldering the diodes and
107 controller onto the circuit board, but don't solder any switches in
108 before the switch plate is ready or you'll just need to remove them
109 later.
110
111 \section{Diodes}
112
113 If you've never soldered before, there are plenty of good
114 introductions online.\footnote{This one from Adafruit is great:
115   https://learn.adafruit.com/adafruit-guide-excellent-soldering/tools}
116 Coat the tip of the hot iron thinly with some solder before you
117 start. The key is to use the iron to heat both parts of the joint for
118 a second or two, then bring in a dab of the solder and let it melt and
119 stick to the component and the circuit board pad.
120
121 \vspace{1em}
122
123 Take five diodes at a time and bend them into a U shape. Place them
124 into the diode holes next to each switch slot on the reverse side of
125 the board. Each diode has a black band on it; the band should be
126 pointing in the direction of the arrow on the printed side of the
127 board. Once all five are in, bend the legs of the diodes outwards to
128 hold them in place, then flip the board over and solder them in place.
129
130 \vspace{1em}
131 \noindent\makebox[\textwidth]{%
132   \includegraphics[width=\linewidth]{diodes.jpg}}
133 \vspace{1em}
134
135 In the photo the diodes are inserted from the back of the circuit
136 board, but it will work just as well to insert them from the front as
137 long as the black band is oriented correctly. Once they're soldered,
138 trim the diode legs with wire cutters. Grip the diode leg as you
139 trim it to keep it from flying across the room. Keep the diode legs;
140 they will be needed in the next step. Repeat until each diode position
141 is filled.
142
143 \section{Controller}
144
145 Once the diodes are in place, you can begin attaching the controller.
146 If the controller came in a pink bag with its own header pins, you may
147 be tempted to use them to connect the controller to the circuit
148 board. Don't do this--they are too big and will prevent the case from
149 closing when you're done.
150
151 \vspace{1em}
152
153 Take four trimmed diode legs and bend them into an L shape. Hold the
154 controller upside down and insert the diode legs into the holes at the
155 corners, (except for the VIN corner, which is not used; use the GND
156 hole instead as indicated in the picture below) fixing them in place
157 with tape. Try to get them to point straight.
158
159 \vspace{1em}
160 \noindent\makebox[\textwidth]{%
161   \includegraphics[width=\linewidth]{taped-pins.jpg}}
162 \vspace{1em}
163
164 Insert the legs into the circuit board. The port for the USB cable
165 should fit into the circuit board's notch in the middle. Solder the
166 diode legs into the circuit board and trim them. Then flip the whole
167 thing over, remove the tape, and solder them into the controller on
168 the other side, trying to ensure the controller is as close to the
169 board as possible.
170
171 \vspace{1em}
172 \noindent\makebox[\textwidth]{%
173   \includegraphics[width=\linewidth]{insert-pin.jpg}}
174 \vspace{1em}
175
176 Now that the controller is secured in place, bend some more diode legs
177 and put them in the other holes in the circuit board. You can do this
178 one side at a time. Use the same method of taping the bent ends in
179 place, flipping, and soldering the other side in place before going
180 back to solder the bent side. Trim as you go. Be sure to fill all the
181 ``A-STAR'' holes in the circuit board.
182
183 \vspace{1em}
184
185 Before you go on, take the time to double-check the solder joints on
186 the controller. The solder should fill the hole completely without
187 spilling over to adjacent holes, and the legs should be secure. Also
188 check that all the diodes are facing the correct direction with the
189 black band pointing to the bottom of the board. Once the switches are
190 in place, the controller will be pinned between the switch plate and
191 the circuit board, making it difficult to make further changes to the
192 controller and its connections.
193
194 \section{Switches}
195
196 Next take four switches and place each switch in a corner of the
197 switch plate. (The case layer with all the holes in it.) The switches
198 should be oriented so that the side with pins is to the ``north'' of
199 the board so they fit into the holes in the circuit board. Put the
200 switch plate face-down on the table with the pins sticking
201 up. Carefully fit the circuit board over the protruding pins, trying
202 to get the pins to push as far through the circuit board as you can.
203 Solder those corners to hold the circuit board and the switch plate
204 together. The labeled side of the board should be face-up. Take care
205 that the switch pins are straight; pushing in a switch with a pin
206 that's a bit bent will bend it flat and prevent it from poking through
207 the circuit board.
208
209 \vspace{1em}
210
211 If your kit has five linear switches (non-tactile, usually red), you
212 can choose to use these for the modifiers or to leave the modifiers as
213 normal tactile keys. Since modifier keys are held down, they do not
214 benefit from tactility like normal keys do, so some people find they
215 prefer linear keys there, but this is a matter of personal taste.
216
217 \vspace{1em}
218
219 If you decide to use the linear switches, place them in the modifier
220 positions next and solder them in. These all go on the bottom row:
221 SW3:3, SW5:0, SW6:0, SW8:3, and SW9:3. Fill in the rest of the bottom
222 row with your primary switch type, and then fill in the leftmost
223 column as well. Note that the center two switches are oriented
224 sideways. The pins on them may need to be bent outwards a bit to get
225 them to fit into the circuit board.
226
227 \vspace{1em}
228 \noindent\makebox[\textwidth]{%
229   \includegraphics[width=\linewidth]{switches.jpg}}
230 \vspace{1em}
231
232 \section{Firmware}
233
234 With a full row and a full column installed you now have enough
235 switches installed to test every pin on the
236 microcontroller. Installing the firmware will allow you to spot
237 mistakes before the board is fully completed. Once all the switches
238 are in place it's a lot of work to go back and fix connections on the
239 microcontroller, but at this point it can be done by only removing a
240 handful of switches.
241
242 \vspace{1em}
243
244 Plug in the USB micro cable into the controller, and plug the other
245 side into your computer. Get a copy of the
246 firmware \footnote{Available at
247   https://github.com/technomancy/atreus-firmware} and its
248 dependencies, \texttt{avrdude} and \texttt{gcc-avr}, linked in the
249 firmware readme\footnote{If you only want to use the default layout
250   and don't want to bother with installing everything, the firmware
251   readme also describes simpler steps for installing a pre-built
252   firmware with the default layout}. The first time you upload the
253 firmware, you will have to use the backup reset to enter the
254 bootloader: take a diode leg or wire and touch one end to the reset
255 pin and one end to the ground pin. (These are the bottom-most two
256 exposed pins on the left-hand side of the controller when the keyboard
257 is facing down.) Touch them together twice in under a second and the
258 LED will begin pulsing in a different pattern from the original
259 blinking. This indicates it has entered the bootloader for 8 seconds.
260
261 \vspace{1em}
262
263 While in the bootloader, type \texttt{make upload USB=/path/to/usb}
264 from the firmware directory. The firmware should be
265 uploaded\footnote{See the firmware readme for instructions about
266   determining the USB argument and customizing the layout.}, and it
267 should start acting as a keyboard. (At this point if you need to
268 upload it again, you can use the reset key instead of touching the
269 pins together.) Now would be a good time to test each switch that's
270 been placed so far.
271
272 \section{Wrapping Up}
273
274 If all the switches are registering key presses on your computer,
275 finish soldering the rest of the switches in.
276
277 \vspace{1em}
278
279 If there's a misbehaving switch, it's often caused by a cold
280 joint. Reflow the solder on both contacts of the switch and the diode
281 first; if that doesn't fix it, it may be the connection to the
282 controller. You can follow the traces for the columns back to the
283 middle, but the rows on the back of the board are obscured when the
284 keyboard is assembled. The bottom four pins on the left correspond to
285 the four rows, top to bottom.
286
287 \vspace{1em}
288
289 Re-melting the controller pin's solder for the affected row or column
290 is usually enough to get it working. First try the melting exposed
291 solder on the big circuit board; if that doesn't fix it you may need
292 to desolder some switches to get to the pins on the controller
293 itself. It's possible to remove switches using only your soldering
294 iron, but getting a desoldering pump is much more effective.
295
296 \vspace{1em}
297
298 If there is room between the head of the USB cable and the place where
299 the cable leaves the case, consider adding strain relief by wrapping
300 the cable with electrical tape at the point just below where it leaves
301 the case. This will make it so pulling on the cable does not dislodge
302 it from the controller.
303
304 \vspace{1em}
305
306 After the switches are all in and tested, close the case by placing
307 the switch plate on top of the spacer and bottom plate, placing the
308 top plate on it, and screwing it together with the nuts facing up. If the
309 controller was not attached close enough to the circuit board, it may
310 be necessary to sand down the USB connector in order to close the
311 case. Before you place the rubber feet on the bottom plate near the
312 corners, consider giving the outer case another coat or two of wax and
313 allowing it to dry. If the rubber feet don't stay on with the provided
314 adhesive, white glue may be needed to secure them.
315
316 \vspace{1em}
317
318 All that's left is to place the keycaps. The larger keycaps go on the
319 middle thumb keys. Congratulations. Enjoy your new keyboard. It will
320 take a considerable adjustment period to get used to it, but it should
321 result in much more comfortable and effective typing. Also remember
322 that you're encouraged to customize the layout to make it truly your
323 own. Happy typing!
324
325 %% \noindent\makebox[\textwidth]{%
326 %% \includegraphics[width=\linewidth]{finished.jpg}}
327
328 \end{document}