| 1 | ;; tldr; AGPLv3+ |
| 2 | ;; copyright info at bottom |
| 3 | |
| 4 | (document |
| 5 | :title [challenge-bot] |
| 6 | (chapter |
| 7 | :title [mechanical] |
| 8 | (p [let's build your robot!]) |
| 9 | (section |
| 10 | :title [arduino to deck] |
| 11 | (p [let's attach the arduino to the deck.]) |
| 12 | (subsection |
| 13 | :title [required materials] |
| 14 | (p [you will need the things in this picture. |
| 15 | ,(figure :legend "arduino to deck / required materials" |
| 16 | (image :file "arduino-to-deck/0-required-materials.png")) |
| 17 | ,(itemize |
| 18 | (item [medical kit with bandages]) |
| 19 | (item [safety goggles]) |
| 20 | (item [drill bit \(we will determine size in a moment\)]) |
| 21 | (item [drill]) |
| 22 | (item [alan wrench]) |
| 23 | (item [wood block]) |
| 24 | (item [arduino]) |
| 25 | (item [#6-32x3/8\", four of them]) |
| 26 | (item [robot deck, the white thing with a grid of holes1]))])) |
| 27 | (subsection |
| 28 | :title [first hole] |
| 29 | (subsubsection |
| 30 | :title [choosing drill bit] |
| 31 | (p [the arduino comes with holes in it already, so we will make |
| 32 | some choices around those holes. |
| 33 | choosing the right drill bit depends on what job you are |
| 34 | doing. |
| 35 | right now, we are making holes for screws to hold the |
| 36 | arduino to the deck. |
| 37 | there are two constraints between the hole and screw. |
| 38 | each hole needs to be big enough for the screw body to fit |
| 39 | through it. |
| 40 | the holes also need to be smaller than the screw's thread. |
| 41 | since there are holes on the arduino already, the screw was |
| 42 | chosen to match it. |
| 43 | the screw was chosen so that the hole on the arduino was |
| 44 | bigger than the screw body and smaller than its thread. |
| 45 | we will choose the biggest drill bit that fits through the |
| 46 | hole on the arduino, then use that to drill holes in the |
| 47 | deck.]) |
| 48 | (p [here's a cross section of a screw in the deck] |
| 49 | (figure :legend "screw cross section" |
| 50 | (image :file |
| 51 | "arduino-to-deck/screw-cross-section.png"))) |
| 52 | (p [check |
| 53 | ,(itemize |
| 54 | (item |
| 55 | [what would happen if the drill bit were larger than the |
| 56 | screw thread?]) |
| 57 | (item |
| 58 | [what would happen if the drill bit were smaller than the |
| 59 | screw body?]))])) |
| 60 | (subsubsection |
| 61 | :title [inserting drill bit] |
| 62 | (p (figure :legend "arduino to deck / insert bit" |
| 63 | (image :file "arduino-to-deck/1-insert-bit.png")) |
| 64 | [insert the drill bit into the teeth of the drill. |
| 65 | insert it far enough that the teeth will clamp on the |
| 66 | smooth part of the bit when they are tightened.]) |
| 67 | (p (figure |
| 68 | :legend "arduino to deck / twist tighten drill teeth" |
| 69 | (image :file "arduino-to-deck/2-twist-tighten-drill-teeth.png")) |
| 70 | [while holding the drill bit, twist end of the drill to tighten |
| 71 | the teeth. |
| 72 | make sure that the teeth end up gripping the flat part of |
| 73 | the drill bit.])) |
| 74 | (subsubsection |
| 75 | :title [holding drill] |
| 76 | (p [hold the drill with one hand on the handle and trigger. |
| 77 | put the other hand on the orange nozzle, before the |
| 78 | black spinning part.])) |
| 79 | (subsubsection |
| 80 | :title [arduino placement] |
| 81 | (p [the arduino should be placed as shown in this picture.] |
| 82 | (figure :legend "arduino to deck / place arduino" |
| 83 | (image :file "arduino-to-deck/3-place-arduino.png"))) |
| 84 | (p [here's a closeup] |
| 85 | (figure :legend "arduino to deck / place arduino closeup" |
| 86 | (image :file |
| 87 | "arduino-to-deck/4-place-arduino-closeup.png")) |
| 88 | [the picture above shows where to place the arduino on the deck. |
| 89 | the arduino should line up with the holes on the deck. |
| 90 | this alignment line is highlighted in pink. |
| 91 | on the arduino, there's a hole on the top left, between the |
| 92 | orange reset button and black headers. |
| 93 | the green circle shows where the hole is. |
| 94 | the blue box encloses the arduino hole and two deck holes. |
| 95 | place the arduino hole mid-way between the two |
| 96 | deck holes.])) |
| 97 | (subsubsection |
| 98 | :title [drilling])) |
| 99 | (subsection |
| 100 | :title [first screw] |
| 101 | (subsubsection |
| 102 | :title [fastening arduino to deck using #6-32x3/8\" screw] |
| 103 | (p [the "#6" part of "#6-32x3/8\"" is how big around the bolt is. |
| 104 | it is related to wire gauge. |
| 105 | bigger numbers mean larger screw. |
| 106 | smaller numbers means smaller screws.] |
| 107 | (figure :legend "arduino to deck / #6-32 screw" |
| 108 | (image :file |
| 109 | "arduino-to-deck/6-32-screw.png"))) |
| 110 | (p [check |
| 111 | ,(itemize |
| 112 | (item |
| 113 | [in the motor assembly, there are #4-40x1.25\" screws. |
| 114 | are those fatter, thinner, or the same thickness as the |
| 115 | #6-32x3/8\" screws?]))]) |
| 116 | (p [the "32" part is a measurement of how close the threads are to |
| 117 | each other. |
| 118 | this is related to the angle of the thread, which is also |
| 119 | called pitch. |
| 120 | it is a count of how many times the thread wraps around one |
| 121 | inch of the screw body.]) |
| 122 | (p [the head is the flat part where some tool, like the alan |
| 123 | wrench, can exert force to spin the screw.]) |
| 124 | (p [check |
| 125 | ,(itemize |
| 126 | (item [how many times will the thread wrap around one inch of |
| 127 | the screw body?]) |
| 128 | (item [what about 2 inches? |
| 129 | how many times will the thread wrap around two |
| 130 | inches of the screw body?]))])) |
| 131 | (subsubsection |
| 132 | :title [fasten the arduino board to the deck] |
| 133 | (p [push the 6-32 screw into the deck from the underside and at the |
| 134 | same time, spin the 6-32 screw clockwise while looking |
| 135 | down on its head. |
| 136 | twist until the bottom of the screw is |
| 137 | about to stick out on the top side of the deck.]) |
| 138 | (p [hold the arduino board flat to the deck and line up the arduino |
| 139 | hole so the screw can come up through it. |
| 140 | continue tightening the screw into the deck, spinning the same |
| 141 | direction as before. |
| 142 | tighten until the screw head touches the deck. |
| 143 | do not continue tightening after that.]) |
| 144 | (p [the arduino should still be flat against the deck still, just |
| 145 | as it was before tightening the screw.])) |
| 146 | (subsubsection |
| 147 | :title [assessment] |
| 148 | (p [does the arduino stay with the deck when the deck moves? |
| 149 | can the arduino board still rotate a few degrees? |
| 150 | warning, if you rotate the arduino board too much, you |
| 151 | will unscrew it from the deck and you'll have to screw it |
| 152 | back in. |
| 153 | rotating a few degrees should be ok.])) |
| 154 | (subsubsection |
| 155 | :title [arduino board move relative to deck] |
| 156 | (p [without any screws, the arduino board can move independently of |
| 157 | the deck.]) |
| 158 | (p [with the first screw, the arduino can rotate around one point |
| 159 | on the deck.]))) |
| 160 | (subsection |
| 161 | :title [second hole and screw]) |
| 162 | (subsection |
| 163 | :title [third and fourth hole and screw])) |
| 164 | (section |
| 165 | :title [breadboard]) |
| 166 | (section |
| 167 | :title [battery packs] |
| 168 | (subsection |
| 169 | :title [leads]) |
| 170 | (subsection |
| 171 | :title [deck attachment])) |
| 172 | (section |
| 173 | :title [motors] |
| 174 | (subsection |
| 175 | :title [leads]) |
| 176 | (subsection |
| 177 | :title [mount]) |
| 178 | (subsection |
| 179 | :title [deck attachment])) |
| 180 | (section |
| 181 | :title [wheels] |
| 182 | (subsection |
| 183 | :title [tread]) |
| 184 | (subsection |
| 185 | :title [motor])) |
| 186 | (section |
| 187 | :title [caster] |
| 188 | (subsection |
| 189 | :title [deck placement])) |
| 190 | (section |
| 191 | :title [sonars] |
| 192 | (subsection |
| 193 | :title [deck placement]))) |
| 194 | (chapter |
| 195 | :title [wiring and software] |
| 196 | (section |
| 197 | :title [serial] |
| 198 | (subsection |
| 199 | :title [software on computer] |
| 200 | (subsubsection |
| 201 | :title [arduino]) |
| 202 | (subsubsection |
| 203 | :title [fritzing])) |
| 204 | (subsection |
| 205 | :title [attach arduino and computer via cable]) |
| 206 | (subsection |
| 207 | :title [debugging common connection problems]) |
| 208 | (subsection |
| 209 | :title [arduino reset button])) |
| 210 | (section |
| 211 | :title [left sonar] |
| 212 | (subsection |
| 213 | :title [breadboard connectivity]) |
| 214 | (subsection |
| 215 | :title [cable]) |
| 216 | (subsection |
| 217 | :title [arduino headers]) |
| 218 | (subsection |
| 219 | :title [sound cm per microsecond at sea level])) |
| 220 | (section |
| 221 | :title [both sonars] |
| 222 | (subsection |
| 223 | :title [breadboard power rail] |
| 224 | (p [power rail can provide power to more than one device.]))) |
| 225 | (section |
| 226 | :title [left motor] |
| 227 | (subsection |
| 228 | :title [arduino digital output]) |
| 229 | (subsection |
| 230 | :title [quad half h bridge, aka motor controller]) |
| 231 | (subsection |
| 232 | :title [motor battery])) |
| 233 | (section |
| 234 | :title [both motors] |
| 235 | (subsection |
| 236 | :title [analogWrite])) |
| 237 | (section |
| 238 | :title [untethered] |
| 239 | (subsection |
| 240 | :title [arduino battery]) |
| 241 | (subsection |
| 242 | :title [off and on functions])) |
| 243 | (section |
| 244 | :title [follow] |
| 245 | (subsection |
| 246 | :title [same wiring as untethered]) |
| 247 | (subsection |
| 248 | :title [set motor]) |
| 249 | (subsection |
| 250 | :title [go]) |
| 251 | (subsection |
| 252 | :title [determining speed])) |
| 253 | (section |
| 254 | :title [stay on table] |
| 255 | (subsection |
| 256 | :title [stop]) |
| 257 | (subsection |
| 258 | :title [backup]) |
| 259 | (subsection |
| 260 | :title [turn around])))) |
| 261 | |
| 262 | ;; Copyright 2016 daniel watson |
| 263 | |
| 264 | ;; This file is part of challenge-bot. |
| 265 | |
| 266 | ;; challenge-bot is free software: you can redistribute it and/or modify |
| 267 | ;; it under the terms of the GNU Affero General Public License as |
| 268 | ;; published by the Free Software Foundation, either version 3 of the |
| 269 | ;; License, or (at your option) any later version. |
| 270 | |
| 271 | ;; challenge-bot is distributed in the hope that it will be useful, |
| 272 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 273 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 274 | ;; GNU Affero General Public License for more details. |
| 275 | |
| 276 | ;; You should have received a copy of the GNU Affero General Public |
| 277 | ;; License along with challenge-bot. If not, see |
| 278 | ;; <http://www.gnu.org/licenses/>. |