| 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 | (p [check |
| 75 | ,(itemize |
| 76 | (item |
| 77 | [where should the teeth clamp down on the drill bit?]) |
| 78 | (item |
| 79 | [what would happen if the teeth tightened on the recessed |
| 80 | part of the drill bit?]))])) |
| 81 | (subsubsection |
| 82 | :title [holding drill] |
| 83 | (p [hold the drill with one hand on the handle and trigger. |
| 84 | put the other hand on the orange nozzle, before the |
| 85 | black spinning part.])) |
| 86 | (subsubsection |
| 87 | :title [arduino placement] |
| 88 | (p [the arduino should be placed as shown in this picture.] |
| 89 | (figure :legend "arduino to deck / place arduino" |
| 90 | (image :file "arduino-to-deck/3-place-arduino.png"))) |
| 91 | (p [here's a closeup] |
| 92 | (figure :legend "arduino to deck / place arduino closeup" |
| 93 | (image :file |
| 94 | "arduino-to-deck/4-place-arduino-closeup.png")) |
| 95 | [the picture above shows where to place the arduino on the deck. |
| 96 | the arduino should line up with the holes on the deck. |
| 97 | this alignment line is highlighted in pink. |
| 98 | on the arduino, there's a hole on the top left, between the |
| 99 | orange reset button and black headers. |
| 100 | the green circle shows where the hole is. |
| 101 | the blue box encloses the arduino hole and two deck holes. |
| 102 | place the arduino hole mid-way between the two |
| 103 | deck holes.]) |
| 104 | (p [check |
| 105 | ,(itemize |
| 106 | (item |
| 107 | [should the arduino be upside-down?]) |
| 108 | (item |
| 109 | [what should the upper side of the arduino align with?]) |
| 110 | (item |
| 111 | [why not place the arduino up along the left side of the |
| 112 | robot?]))])) |
| 113 | (subsubsection |
| 114 | :title [drilling practice] |
| 115 | (p [strength check] |
| 116 | (itemize |
| 117 | (item [put on safety goggles]) |
| 118 | (item [unplug drill]) |
| 119 | (item [hold drill in one hand]) |
| 120 | (item [point drill at the ground]) |
| 121 | (item [point drill at the wall]))) |
| 122 | (p [steps for drilling into wood block] |
| 123 | (itemize |
| 124 | (item [plug in the drill]) |
| 125 | (item [place the drill bit in position]) |
| 126 | (item [bring the drill up to full speed, and keep it at full |
| 127 | speed while lowering and raising the drill]) |
| 128 | (item [push down until the drill bit has passed through an inch |
| 129 | of the wood block]) |
| 130 | (item [keep the drill at full speed]) |
| 131 | (item [stop before the drill smashes into the wood block]) |
| 132 | (item [keep the drill at full speed by holding the trigger]) |
| 133 | (item [bring the drill straight back up]) |
| 134 | (item [hold the trigger down to keep the drill at full speed]) |
| 135 | (item [once the drill is back out of the hole, let go of the |
| 136 | trigger]))) |
| 137 | (p [check |
| 138 | ,(itemize |
| 139 | (item |
| 140 | [should the drill be at full speed while the drill bit is |
| 141 | going down into the wood and coming back up?]) |
| 142 | (item |
| 143 | [how do you keep the drill at full speed?]) |
| 144 | (item |
| 145 | [what would happen if the drill bit were not at full |
| 146 | speed?]) |
| 147 | (item |
| 148 | [what would happen if the drill were twisted sideways while |
| 149 | the drill bit were in the wood?]))])) |
| 150 | (subsubsection |
| 151 | :title [drilling the first screw hole] |
| 152 | (itemize |
| 153 | (item [place the drill bit in position]) |
| 154 | (item [bring the drill up to full speed, and keep it full speed]) |
| 155 | (item [push down until the drill bit has passed through the |
| 156 | deck]) |
| 157 | (item [keep the drill at full speed]) |
| 158 | (item [stop before the drill smashes into the arduino]) |
| 159 | (item [keep the drill at full speed by holding the trigger]) |
| 160 | (item [bring the drill straight back up]) |
| 161 | (item [hold the trigger down to keep the drill at full speed]) |
| 162 | (item [once the drill is back out of the hole, let go of the |
| 163 | trigger])) |
| 164 | (p [check |
| 165 | ,(itemize |
| 166 | (item |
| 167 | [should the drill be at full speed while the drill bit is |
| 168 | going down into the wood and coming back up?]) |
| 169 | (item |
| 170 | [what would happen if the drill bit were not at full |
| 171 | speed?]) |
| 172 | (item |
| 173 | [how do you keep the drill at full speed?]))]))) |
| 174 | (subsection |
| 175 | :title [first screw] |
| 176 | (subsubsection |
| 177 | :title [fastening arduino to deck using #6-32x3/8\" screw] |
| 178 | (p [the "#6" part of "#6-32x3/8\"" is how big around the bolt is. |
| 179 | it is related to wire gauge. |
| 180 | bigger numbers mean larger screw. |
| 181 | smaller numbers means smaller screws.] |
| 182 | (figure :legend "arduino to deck / #6-32 screw" |
| 183 | (image :file |
| 184 | "arduino-to-deck/6-32-screw.png"))) |
| 185 | (p [check |
| 186 | ,(itemize |
| 187 | (item |
| 188 | [in the motor assembly, there are #4-40x1.25\" screws. |
| 189 | are those fatter, thinner, or the same thickness as the |
| 190 | #6-32x3/8\" screws?]))]) |
| 191 | (p [the "32" part is a measurement of how close the threads are to |
| 192 | each other. |
| 193 | this is related to the angle of the thread, which is also |
| 194 | called pitch. |
| 195 | it is a count of how many times the thread wraps around one |
| 196 | inch of the screw body.]) |
| 197 | (p [the head is the flat part where some tool, like the alan |
| 198 | wrench, can exert force to spin the screw.]) |
| 199 | (p [check |
| 200 | ,(itemize |
| 201 | (item [how many times will the thread wrap around one inch of |
| 202 | the screw body?]) |
| 203 | (item [what about 2 inches? |
| 204 | how many times will the thread wrap around two |
| 205 | inches of the screw body?]))])) |
| 206 | (subsubsection |
| 207 | :title [fasten the arduino board to the deck] |
| 208 | (p [push the 6-32 screw into the deck from the underside and at the |
| 209 | same time, spin the 6-32 screw clockwise while looking |
| 210 | down on its head. |
| 211 | twist until the bottom of the screw is |
| 212 | about to stick out on the top side of the deck.]) |
| 213 | (p [hold the arduino board flat to the deck and line up the arduino |
| 214 | hole so the screw can come up through it. |
| 215 | continue tightening the screw into the deck, spinning the same |
| 216 | direction as before. |
| 217 | tighten until the screw head touches the deck. |
| 218 | do not continue tightening after that.]) |
| 219 | (p [the arduino should still be flat against the deck still, just |
| 220 | as it was before tightening the screw.])) |
| 221 | (subsubsection |
| 222 | :title [assessment] |
| 223 | (p [does the arduino stay with the deck when the deck moves? |
| 224 | can the arduino board still rotate a few degrees? |
| 225 | warning, if you rotate the arduino board too much, you |
| 226 | will unscrew it from the deck and you'll have to screw it |
| 227 | back in. |
| 228 | rotating a few degrees should be ok.])) |
| 229 | (subsubsection |
| 230 | :title [arduino board move relative to deck] |
| 231 | (p [without any screws, the arduino board can move independently of |
| 232 | the deck.]) |
| 233 | (p [with the first screw, the arduino can rotate around one point |
| 234 | on the deck.]))) |
| 235 | (subsection |
| 236 | :title [second hole and screw]) |
| 237 | (subsection |
| 238 | :title [third and fourth hole and screw])) |
| 239 | (section |
| 240 | :title [breadboard]) |
| 241 | (section |
| 242 | :title [battery packs] |
| 243 | (subsection |
| 244 | :title [leads]) |
| 245 | (subsection |
| 246 | :title [deck attachment])) |
| 247 | (section |
| 248 | :title [motors] |
| 249 | (subsection |
| 250 | :title [leads]) |
| 251 | (subsection |
| 252 | :title [mount]) |
| 253 | (subsection |
| 254 | :title [deck attachment])) |
| 255 | (section |
| 256 | :title [wheels] |
| 257 | (subsection |
| 258 | :title [tread]) |
| 259 | (subsection |
| 260 | :title [motor])) |
| 261 | (section |
| 262 | :title [caster] |
| 263 | (subsection |
| 264 | :title [deck placement])) |
| 265 | (section |
| 266 | :title [sonars] |
| 267 | (subsection |
| 268 | :title [deck placement]))) |
| 269 | (chapter |
| 270 | :title [wiring and software] |
| 271 | (section |
| 272 | :title [serial] |
| 273 | (subsection |
| 274 | :title [software on computer] |
| 275 | (subsubsection |
| 276 | :title [arduino]) |
| 277 | (subsubsection |
| 278 | :title [fritzing])) |
| 279 | (subsection |
| 280 | :title [attach arduino and computer via cable]) |
| 281 | (subsection |
| 282 | :title [debugging common connection problems]) |
| 283 | (subsection |
| 284 | :title [arduino reset button])) |
| 285 | (section |
| 286 | :title [left sonar] |
| 287 | (subsection |
| 288 | :title [breadboard connectivity]) |
| 289 | (subsection |
| 290 | :title [cable]) |
| 291 | (subsection |
| 292 | :title [arduino headers]) |
| 293 | (subsection |
| 294 | :title [sound cm per microsecond at sea level])) |
| 295 | (section |
| 296 | :title [both sonars] |
| 297 | (subsection |
| 298 | :title [breadboard power rail] |
| 299 | (p [power rail can provide power to more than one device.]))) |
| 300 | (section |
| 301 | :title [left motor] |
| 302 | (subsection |
| 303 | :title [arduino digital output]) |
| 304 | (subsection |
| 305 | :title [quad half h bridge, aka motor controller]) |
| 306 | (subsection |
| 307 | :title [motor battery])) |
| 308 | (section |
| 309 | :title [both motors] |
| 310 | (subsection |
| 311 | :title [analogWrite])) |
| 312 | (section |
| 313 | :title [untethered] |
| 314 | (subsection |
| 315 | :title [arduino battery]) |
| 316 | (subsection |
| 317 | :title [off and on functions])) |
| 318 | (section |
| 319 | :title [follow] |
| 320 | (subsection |
| 321 | :title [same wiring as untethered]) |
| 322 | (subsection |
| 323 | :title [set motor]) |
| 324 | (subsection |
| 325 | :title [go]) |
| 326 | (subsection |
| 327 | :title [determining speed])) |
| 328 | (section |
| 329 | :title [stay on table] |
| 330 | (subsection |
| 331 | :title [stop]) |
| 332 | (subsection |
| 333 | :title [backup]) |
| 334 | (subsection |
| 335 | :title [turn around])))) |
| 336 | |
| 337 | ;; Copyright 2016 daniel watson |
| 338 | |
| 339 | ;; This file is part of challenge-bot. |
| 340 | |
| 341 | ;; challenge-bot is free software: you can redistribute it and/or modify |
| 342 | ;; it under the terms of the GNU Affero General Public License as |
| 343 | ;; published by the Free Software Foundation, either version 3 of the |
| 344 | ;; License, or (at your option) any later version. |
| 345 | |
| 346 | ;; challenge-bot is distributed in the hope that it will be useful, |
| 347 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 348 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 349 | ;; GNU Affero General Public License for more details. |
| 350 | |
| 351 | ;; You should have received a copy of the GNU Affero General Public |
| 352 | ;; License along with challenge-bot. If not, see |
| 353 | ;; <http://www.gnu.org/licenses/>. |