X-Git-Url: https://git.armaanb.net/?a=blobdiff_plain;f=assembly%2Fassembly.tex;h=8e67c6fd99376a2cd18bd79967990a082616ee75;hb=78d151f1bb7e689cbfca2e62ecdd6875bbb999ca;hp=b73358f15616a34e94052b677a948b4002cc7cf5;hpb=ab40cabc419425851efb5581dfdc8e3a4f643c06;p=atreides.git diff --git a/assembly/assembly.tex b/assembly/assembly.tex index b73358f..8e67c6f 100644 --- a/assembly/assembly.tex +++ b/assembly/assembly.tex @@ -1,304 +1,323 @@ -\documentclass{article} +\documentclass[landscape,twocolumn]{article} \title{Atreus Keyboard Assembly} \date{ } +\usepackage{pdflscape} \usepackage{graphicx} +\usepackage[landscape,twocolumn]{geometry} +\usepackage{wrapfig} +\newgeometry{margin=2cm} \begin{document} +\setlength{\columnsep}{1.4cm} \setlength{\parindent}{0cm} \maketitle \section{Prerequisites} -In order to assemble your keyboard, you'll need your kit plus a few -other tools. The kit should contain these parts and a few spares: +Before starting, make sure your kit has all its parts: \begin{itemize} -\item Case (top plate, switch plate, spacer, bottom plate) -\item Sandpaper -\item Finishing wax -\item Diodes (42) -\item Cherry MX switches (37 blue/clear, 5 red) -\item A-Star Micro controller -\item Machine screws and nuts (8 each, 16mm M3 size) -\item Key caps (40 normal, 2 long) +\item Case: top plate, switch plate, 3 spacer pieces, bottom plate +\item Sandpaper: 100-220 grit and 1000-2000 grit waterproof +\item Key switches: 42 tactile or clicky, 5 red optional +\item Printed circuit board (PCB) +\item A-Star Micro controller\footnote{The controller and diodes will be + attached to the PCB already in presoldered boards.} +\item Diodes\textsuperscript{2}: 42 \item USB micro cable +\item Key caps: 40 normal, 2 long +\item Screws and nuts: 8 each, 16mm M3 size \item Rubber feet \end{itemize} You'll also need to have these on hand: \begin{itemize} -\item Soldering iron and solder -\item Wire cutters -\item Brush for applying finishing wax (a toothbrush will do) -\item Optional: ``helping hands'' stand +\item Can of spray lacquer, shellac, or polyurethane (for wood cases) +\item Newspaper or other material to spray on (for wood cases) +\item Soldering iron and solder (lead-free not recommended) +\item Wire cutters (not needed for presoldered kits) +\item Eye protection for soldering \end{itemize} \vspace{1em} The latest version of this document can always be found -online.\footnote{http://atreus.technomancy.us/assembly.pdf} If you're -reading a black-and-white printed copy, you may find some of the -photos clearer in color onscreen. This copy describes -the circuit-board-based kit. If you have an earlier hand-wired kit, -see the older assembly +online.\footnote{http://atreus.technomancy.us/assembly.pdf} If you are +hand-wiring a board without a PCB, see the older assembly guide.\footnote{http://atreus.technomancy.us/assembly-hand-wired.pdf} +The photos in this guide depict Matias switches (with rectangular +switch stems), but you can use Cherry MX switches (with stems shaped +like a +) as well. -\section{Sanding Case} +\section{Sanding} -The wood finishing process involves sanding down the wood to remove -scorch marks and produce a smooth surface, applying an oil/wax mixture -to further smooth it and protect it from fluids, and allowing it to -dry. The whole process takes about 45 minutes of work, but since each -side has to dry individually plan on allowing for a couple 30-minute -breaks to let it dry. You'll need a place to lay the pieces aside to -dry; a paper towel would help keep the oil from getting all over your -table or desk. +Start by sanding with your rougher sandpaper. The top side of the +top plate and the bottom side of the bottom plate are the only +surfaces that are exposed to the touch once the keyboard is fully +assembled, so these will need the most attention when sanding. You can +sand the other surfaces as well just to get the scorch marks off, but +you don't need to worry about how smooth the inner surfaces feel to +the touch. (Acrylic cases can skip down to the ``Diodes'' step.) +\vspace{1em} +\begin{center} + \includegraphics[width=0.7\columnwidth]{sanding.jpg} +\end{center} \vspace{1em} -Start by sanding down both sides of each piece. You may want to hold -two pieces together while sanding for strength or placing it on a flat -surface you don't mind scruffing up; too much pressure on a single -plate could damage it. +You may want to hold two pieces together while sanding for strength or +placing it on a flat surface you don't mind scruffing up; too much +pressure on a single plate could damage it. Be sure to get all the +wood dust off the pieces before you go on. A clean tack cloth or other +fine cloth works well. -\vspace{1em} -\noindent\makebox[\textwidth]{% -\includegraphics[width=\linewidth]{sanding.jpg}} \vspace{1em} -Keep in mind that the top side of the top plate and the bottom side of -the bottom plate are the only surfaces that are exposed to the touch -once the keyboard is fully assembled, so these will need the most -attention when sanding. You can sand the other surfaces as well just -to get the scorch marks off, but you don't need to worry about how -smooth the inner surfaces feel to the touch. +Some people don't like the look of the exposed edges charred black +from the laser cutter. You can choose to sand off the charring, or +alternately cover it all with black ink from a sharpie marker for a +more consistent look, or just leave it alone. -\section{Oiling Case} +\section{Wood Finishing} -Be sure to get all the wood dust off the pieces before you go on. Open -up the wax/oil mixture. Apply some to the brush and start spreading it over -one side of each case piece. The color of the wood will darken as it -absorbs the oil. Try to ensure it's spread evenly. Be more generous -with the oil on the outer exposed surfaces. +Once the case is sanded down all over with coarse sandpaper, find a +good place to spray the lacquer or polyurethane; either outdoors or in +a well-ventilated garage. Lay down the newspaper with the pieces of +the case on top of it. Spray your first coat of lacquer to the face-up +side of each piece. As you spray to and fro, overlapping the path of +the spray slightly will minimize running. The evenness of the spray +matters less on the internal surfaces of the case, so that's a good +place to practice and get the hang of it. -\vspace{1em} -\noindent\makebox[\textwidth]{% -\includegraphics[width=\linewidth]{oiled.jpg}} \vspace{1em} -As your brush goes over the edges of the laser-cut wood, it will get -dirty from charred wood particles. After you've finished oiling one -side of each piece, it's best to wash out the brush. Be sure it's -fully dry before going on. +Check the lacquer directions to see how long your particular product +needs to dry; this can vary from half an hour to many hours. Once your +first coat is dry, flip each piece over and spray the other +side. Repeat for a second coat. After the second coat, you can ignore +all surfaces except for the top of the top plate and the bottom of the +bottom plate since only these are exposed to the outside. At this +point you can take in the switch plate and continue the rest of the +keyboard construction in between applying the further coats. -\section{Drying Case} +\vspace{1em} -Once one side of each piece is finished, you'll need to lay them out -for a half hour or so to let them dry. Once one side is dry, repeat -the process on the other side. After you've finished the construction -you can come back and add another few coats to the outermost surfaces -for a smoother texture. Once it's dried for a while, wipe the excess -off. While you're waiting, you can start soldering the diodes and -controller onto the circuit board, but don't solder any switches in -before the switch plate is ready or you'll just need to remove them -later. +The outer surfaces should have between five to eight coats applied +total. As you get to the later coats, the end result will be smoother +if you can keep them thinner. After your second-to-last coat dries, +take your fine sandpaper and soak it in water, then sand over the top +and bottom surfaces lightly. Add a final coat and buff it with a fine +cloth. If you make any mistakes or are unhappy with the smoothness of +the finish, let it dry and add another layer. \section{Diodes} +If you've got a presoldered board, you can skip ahead to the +``Switches'' section. + +\vspace {1em} + If you've never soldered before, there are plenty of good introductions online.\footnote{This one from Adafruit is great: https://learn.adafruit.com/adafruit-guide-excellent-soldering/tools} Coat the tip of the hot iron thinly with some solder before you -start. The key is to use the iron to heat both parts of the joint for -a second or two, then bring in a dab of the solder and let it melt and -stick to the component and the circuit board pad. +start. The key is to use the iron to heat both the hole and the lead +sticking through it for a second or two, then bring in a dab of the +solder. The solder should melt immediately if the joint is hot enough. \vspace{1em} Take five diodes at a time and bend them into a U shape. Place them -into the diode holes next to each switch slot on the reverse side of +into the diode holes next to each switch slot on the unlabeled side of the board. Each diode has a black band on it; the band should be -pointing to the bottom of the circuit board, toward each diode's arrow -on the printed side of the board. Once all five are in, bend the legs -of the diodes outwards to hold them in place, then flip the board over -and solder them in place. +pointing in the direction of the arrow on the printed side of +the board. Once all five are in, pinch the legs of the diodes together +to keep them from falling out, then flip the board over and solder +them in place. Make sure they don't protrude up more than necessary. \vspace{1em} -\noindent\makebox[\textwidth]{% - \includegraphics[width=\linewidth]{diodes.jpg}} +\includegraphics[width=\columnwidth]{diodes.jpg} \vspace{1em} -Once they're soldered, trim the diode legs with wire cutters. (This -step should be done with protective eye covering.) Keep the diode -legs; they will be needed in the next step. Repeat until each diode -position is filled. +Once each set of diodes is soldered, trim the diode legs with wire +cutters. Pinch the diode leg as you trim it to keep it from flying +across the room or into an eye. \textbf{Keep the diode legs}; they will be +needed in the next step. Repeat until each diode position is +filled. Note that each row on the bottom needs six diodes instead of five. \section{Controller} -Once the diodes are in place, you can begin attaching the -controller. This is the trickiest part of the assembly process, so -once you knock this out it's all down hill. First pre-fill all the -holes we're going to use on the controller with solder. (This is all -the left side ones, plus all the right side ones except 3V3, 5V, and -VIN.) If you have a ``helping hands'' stand, this is where it comes in -useful. - -\vspace{1em} - +Once the diodes are in place, you can begin attaching the controller. If the controller came in a pink bag with its own header pins, you may be tempted to use them to connect the controller to the circuit board. Don't do this--they are too big and will prevent the case from -closing when you're done. +closing when you're done. We will be using the diode legs we just +trimmed instead. \vspace{1em} -Take six trimmed diode legs and stick them into the top six pins on -the right-hand side of the controller by melting the pre-filled -solder. Solder one into the pin labeled ``GND'' as well. Put one in -the top and bottom pins on the other side, labeled ``0'' and -``9''. We'll leave out the rest on the left for now to make -it easier to insert the controller into the circuit board, but we'll -make another pass to get those in next. +First take the PCB with the labeled side down and fill the four corner +holes in the center ``A-STAR'' section with solder. Insert diode legs +into these holes while melting the solder. Then repeat the process for +the other holes on the left, keeping them pointing as straight as +possible. Leave the rest of the right side alone for now. \vspace{1em} -\noindent\makebox[\textwidth]{% - \includegraphics[width=\linewidth]{controller-legs.jpg}} +\begin{center}\includegraphics[width=0.8\columnwidth]{many-pins.jpg}\end{center} \vspace{1em} -Straighten the attached legs as much as possible and carefully insert -them through the circuit board. Once they are in, you'll want to -populate the remaining left-side pins. Hold the board vertical either -using a set of helping hands or pinned between your knees as shown -below. Insert a diode leg through the circuit board hole so it touches -the already-solder-filled hole on the controller. Melt the solder -while pushing the diode leg barely through. You can blow on the solder -joint to cool it more quickly so it firms up. +Fit the controller over the legs you've attached so far. You can trim +the legs some if it helps get the controller on, but don't cut them to +less than a quarter of the original length. Solder the four corner +pins already connected to the PCB into the corners of the +controller. (The bottom left corner pin of the controller is unused; +the pin above it is used instead.) Try to ensure the controller is as +close to the PCB as possible and not at an angle. Then solder the +other left-side diode legs into the controller as well. Trim them all +with your wire cutters when they are secure. \vspace{1em} -\noindent\makebox[\textwidth]{% - \includegraphics[width=0.5\linewidth]{insert-pin.jpg}} -\vspace{1em} -Once the pins are all in place on the controller side, it's time to -attach them to the circuit board. Bend them outwards and solder each -one, then trim all the legs. +Eight right-side holes remain. For these, bend four diode legs at a +time into an L shape, and insert them into four of the remaining +holes. Flip the board over and solder the protruding diode legs to the +PCB, then trim them down and flip the board back over. Straighten the +diode legs, then solder and trim them. Repeat for the remaining +right-side holes. From the PCB side, all the holes will be used, but +from the controller side, there will be some unused. \vspace{1em} -\noindent\makebox[\textwidth]{% - \includegraphics[width=\linewidth]{seated.jpg}} +\begin{center} + \includegraphics[width=0.8\columnwidth]{bent-legs.jpg} +\end{center} \vspace{1em} Before you go on, take the time to double-check the solder joints on the controller. The solder should fill the hole completely without -spilling over to adjacent holes, and the legs should be secure. Also -check that all the diodes are facing the correct direction with the -black band pointing to the bottom of the board. Once the switches are -in place, the controller will be pinned between the switch plate and -the circuit board, making it difficult to make further changes to the -controller. +spilling over to adjacent holes. Also check that all the diodes are +facing the correct direction with the black band pointing to the +bottom of the board. -\section{Switches} +\section{Firmware} -\noindent\makebox[\textwidth]{% - \includegraphics[width=\linewidth]{switch-corners.jpg}} +Installing the firmware now isn't strictly necessary, but it will +allow you to spot mistakes before the board is finished. \vspace{1em} -Next take four switches and place each switch in a corner of the -switch plate. Put the switch plate face-down on the table with the -pins sticking up. Carefully fit the circuit board over the protruding -pins and posts and solder those to hold the circuit board and the -switch plate together. The labeled side of the board should be -face-up. Take care that the switch pins are straight; pushing in a -switch with a pin that's a bit bent will bend it flat and prevent it -from poking through the circuit board. +Plug in the USB micro cable into the controller, and plug the other +side into your computer. Get a copy of the +firmware \texttt{.hex} file \footnote{Available at + https://atreus.technomancy.us/download} and \texttt{avrdude}. The +first time you upload the firmware, you will have to use the hardware +reset to enter the bootloader: take a diode leg or wire and touch one +end to the reset pin and one end to the ground pin. (These are circled +in the photo.) Touch them together twice in under a second and the +LED underneath will begin pulsing in a smoother pattern from the +original blinking. This indicates it has entered bootloader mode for 8 +seconds. \vspace{1em} -If your kit has five linear switches (non-tactile, usually red) place -those in the modifier positions next and solder them in. These all go -on the bottom row: SW3:3, SW5:0, SW6:0, SW8:3, and SW9:3. +While it's in the bootloader mode, run \texttt{avrdude -p atmega32u4 + -c avr109 -U flash:w:atreus.hex -P /path/to/usb} from the directory +containing the firmware\footnote{See the firmware readme for + instructions about determining the USB argument and customizing the + layout.}. The firmware should be uploaded, and it will start +functioning as a keyboard once switches are connected. Next time you +upload, you can use the reset key instead of touching the pins +together. + +\section{Switches} + +Next take four switches and place each switch in a corner of the +switch plate. (That's the case layer with all the holes in it.) The +switches should be oriented so that the side with pins is to the +``north'' of the board so they will fit into the holes in the circuit +board. Put the switch plate face-down on the table with the pins +sticking up. \vspace{1em} -Once you have a switch in each column and a switch in each row, you -can skip ahead to the next step where you install the firmware in -order to ensure all the connections to the controller are solid. If -you place all the switches now, it will be difficult to fix problems -with the controller since reaching the controller involves removing -all the switches. Testing with only a few switches attached will let -you spot problems early when they're still easier to fix. +Carefully fit the circuit board over the protruding pins with the +labeled side down. Solder those corners to hold the circuit board and +the switch plate together. The switches should be flush with the +PCB. Take care that the switch pins are straight when you insert them; +pushing in a switch with a pin that's a bit bent will bend it flat and +prevent it from poking through the circuit board. \vspace{1em} -\noindent\makebox[\textwidth]{% - \includegraphics[width=\linewidth]{switches.jpg}} +\begin{center} + \includegraphics[width=0.9\columnwidth]{some-switches.jpg} +\end{center} \vspace{1em} -\section{Wrapping up} - -Plug in the USB micro cable into the controller, and plug the other -side into your computer. Get a copy of the -firmware \footnote{Available at - https://github.com/technomancy/atreus-firmware} and its -dependencies, \texttt{avrdude} and \texttt{gcc-avr}, linked in the -firmware readme. The first time you upload the firmware, you will have -to use the backup reset to enter the bootloader: take a diode leg or -wire and touch one end to the reset pin and one end to the ground -pin. (These are the bottom-most two exposed pins on the right-hand -side of the controller.) Touch them together twice in under a second -and the LED will begin pulsing. This indicates it has entered the -bootloader for 8 seconds. +Next fill in the rest of the bottom row (SW1:3 through SW10:3) and the +leftmost column (SW0:1 and SW0:2). If your kit has red linear switches +which do not have any tactile bump, you can choose to use these for +the modifier keys (shift, ctrl, alt, etc) or to leave the modifiers +using the same switches as the rest of the board.\footnote{Since + modifier keys are held down, they do not benefit from tactility like + normal keys do, so some people find they prefer linear keys there, + but this is a matter of personal taste.} The modifiers on the bottom +row are SW2:3, SW3:3, and SW8:3. \vspace{1em} -While in the bootloader, type \texttt{make upload} from the firmware -directory. The firmware should be uploaded\footnote{See the firmware - readme for instructions about customizing the layout.}, and it -should start acting as a keyboard. (At this point if you need to -upload it again, you can use the reset key instead of touching the -pins together.) Now would be a good time to test each switch by typing -``The quick, brown fox jumped over the lazy dog.'' and hitting the -other few keys which aren't hit by that phrase. +Solder the left and right pins of each of the switches you've placed +so far, and then plug it in to a computer to test them to ensure that +each row and column is connected back up to the controller +correctly. Once you've confirmed this, solder the rest of the +switches. -\vspace{1em} +\section{Wrapping Up} If there's a misbehaving switch, it's often caused by a cold joint. Reflow the solder on both contacts of the switch and the -diode. If an entire row or column is out, it's probably the connection -to the controller. You can follow the traces for the columns back -to the middle, but the rows on the back of the board are obscured when -the keyboard is assembled. The bottom four pins on the left correspond -to the four rows, top to bottom. Reflowing the pin's solder for the -affected row or column is usually enough to get it working. +diode. If an entire row or column is affected, it's probably the +connection to the controller. You can follow the traces for the rows +back to the middle, but the columns on the back of the board are +obscured when the keyboard is assembled; you can see them in this PCB +diagram\footnote{https://atreus.technomancy.us/pcb}. Re-melting the +controller's solder joint for the affected row or column is usually +enough to get it working. If you still can't +get it working, email me: \texttt{phil@hagelb.org}. \vspace{1em} -Before you place the rubber feet on the bottom plate near the corners, -consider giving the outer case another coat or two of wax and allowing -it to dry. Then close the case by placing the switch plate on top of -the spacer and bottom plate, placing the top plate on it, and screwing -it together with the nuts on top. If the controller was not attached -close enough to the circuit board, it may be necessary to sand down -the USB connector in order to close the case. If the rubber feet don't -stay on with the provided adhesive, white glue may be needed to secure -them. +You may want to add strain relief by wrapping the USB cable with +electrical tape at the point just below where it leaves the case. This +will make it so pulling on the cable does not dislodge it from the +controller. \vspace{1em} -All that's left is to place the keycaps. The larger keycaps go on the -middle thumb keys. +After the switches are all in and tested, place the keycaps. They can +take a fair bit of pressure to go on, so support the underside of the +board while pushing them on. Once the caps are on, they are very +difficult to remove again; don't try to pull them off without +desoldering\footnote{Desoldering a single switch can be done with just + an iron, but for doing more you may want a pump or wick. See + https://blog.adafruit.com/2015/11/25/collins-lab-desoldering/} the +switch first. \vspace{1em} -Congratulations. Enjoy your new keyboard. It will take a considerable -adjustment period to get used to it, but it should result in much more -comfortable and effective typing. Also remember that you're encouraged -to customize the layout to make it truly your own. +All that's left is to do is close the case by placing the spacer +pieces and bottom plate on the keyboard while upside down, then +putting some screws in. Flip it over and place the top plate on, then +attach the nuts. If the controller was not attached close enough to +the circuit board, it may be necessary to sand down the USB connector +in order to close the case. If the rubber feet don't stay on with the +provided adhesive, white glue may be needed to secure them. If you +have some wood finishing oil or beeswax, you can apply it with your +fingers after the feet go on. \vspace{1em} -Happy typing! - -%% \noindent\makebox[\textwidth]{% -%% \includegraphics[width=\linewidth]{finished.jpg}} +Congratulations! Enjoy your new keyboard. It will take a +considerable adjustment period to get used to it, but it should result +in much more comfortable and effective typing. Also remember that +you're encouraged to customize the layout to make it truly your +own. Happy typing! \end{document}