curriculum -> guide, prepend 0- to arduino-to-deck
[challenge-bot] / guide / challenge-bot.scm
CommitLineData
37d286e7 1;; tldr; AGPLv3+
2;; copyright info at bottom
3
4(document
5 :title [challenge-bot]
6 (chapter
3c0c7ca4 7 :title [mechanical]
1625f486 8 (p [let's build your robot!])
3c0c7ca4 9 (section
58c778a1 10 :title [arduino to deck]
4a423b08 11 (p [let's attach the arduino to the deck.])
cf59d996 12 (subsection
13 :title [required materials]
14 (p [you will need the things in this picture.
eef3ff81 15 ,(figure
16 :legend "arduino to deck / required materials"
17 (image :file
18 "0-arduino-to-deck/0-required-materials.png"))
cf59d996 19 ,(itemize
20 (item [medical kit with bandages])
21 (item [safety goggles])
22 (item [drill bit \(we will determine size in a moment\)])
23 (item [drill])
24 (item [alan wrench])
25 (item [wood block])
26 (item [arduino])
d0873756 27 (item [#6-32x3/8\", four of them])
28 (item [robot deck, the white thing with a grid of holes1]))]))
24b6d750 29 (subsection
59fef212 30 :title [first hole]
ff0f6a78 31 (subsubsection
52596bd0 32 :title [choosing drill bit]
23045a14 33 (p [the arduino comes with holes in it already, so we will make
34 some choices around those holes.
35 choosing the right drill bit depends on what job you are
36 doing.
37 right now, we are making holes for screws to hold the
38 arduino to the deck.
39 there are two constraints between the hole and screw.
40 each hole needs to be big enough for the screw body to fit
41 through it.
42 the holes also need to be smaller than the screw's thread.
43 since there are holes on the arduino already, the screw was
44 chosen to match it.
45 the screw was chosen so that the hole on the arduino was
46 bigger than the screw body and smaller than its thread.
47 we will choose the biggest drill bit that fits through the
48 hole on the arduino, then use that to drill holes in the
49 deck.])
85fae63f 50 (p [here's a cross section of a screw in the deck]
51 (figure :legend "screw cross section"
52 (image :file
eef3ff81 53 "0-arduino-to-deck/screw-cross-section.png")))
27547a79 54 (p [check
55 ,(itemize
56 (item
57 [what would happen if the drill bit were larger than the
58 screw thread?])
59 (item
60 [what would happen if the drill bit were smaller than the
61 screw body?]))]))
ff0f6a78 62 (subsubsection
ca8e4428 63 :title [inserting drill bit]
64 (p (figure :legend "arduino to deck / insert bit"
eef3ff81 65 (image :file "0-arduino-to-deck/1-insert-bit.png"))
ca8e4428 66 [insert the drill bit into the teeth of the drill.
67 insert it far enough that the teeth will clamp on the
3875c1ef 68 smooth part of the bit when they are tightened.])
69 (p (figure
70 :legend "arduino to deck / twist tighten drill teeth"
eef3ff81 71 (image :file "0-arduino-to-deck/2-twist-tighten-drill-teeth.png"))
3875c1ef 72 [while holding the drill bit, twist end of the drill to tighten
73 the teeth.
74 make sure that the teeth end up gripping the flat part of
1887fb16 75 the drill bit.])
76 (p [check
77 ,(itemize
78 (item
79 [where should the teeth clamp down on the drill bit?])
80 (item
81 [what would happen if the teeth tightened on the recessed
82 part of the drill bit?]))]))
ff0f6a78 83 (subsubsection
7bf575b8 84 :title [holding drill]
85 (p [hold the drill with one hand on the handle and trigger.
86 put the other hand on the orange nozzle, before the
87 black spinning part.]))
c04a9631 88 (subsubsection
89 :title [arduino placement]
90 (p [the arduino should be placed as shown in this picture.]
cf59d996 91 (figure :legend "arduino to deck / place arduino"
eef3ff81 92 (image :file "0-arduino-to-deck/3-place-arduino.png")))
6fc3d47b 93 (p [here's a closeup]
c1732375 94 (figure :legend "arduino to deck / place arduino closeup"
0b5cd84e 95 (image :file
eef3ff81 96 "0-arduino-to-deck/4-place-arduino-closeup.png"))
0b5cd84e 97 [the picture above shows where to place the arduino on the deck.
98 the arduino should line up with the holes on the deck.
99 this alignment line is highlighted in pink.
100 on the arduino, there's a hole on the top left, between the
101 orange reset button and black headers.
102 the green circle shows where the hole is.
103 the blue box encloses the arduino hole and two deck holes.
104 place the arduino hole mid-way between the two
543ad3c2 105 deck holes.])
106 (p [check
107 ,(itemize
108 (item
109 [should the arduino be upside-down?])
110 (item
111 [what should the upper side of the arduino align with?])
112 (item
113 [why not place the arduino up along the left side of the
114 robot?]))]))
ff0f6a78 115 (subsubsection
41ba7302 116 :title [drilling practice]
117 (p [strength check]
118 (itemize
119 (item [put on safety goggles])
120 (item [unplug drill])
121 (item [hold drill in one hand])
122 (item [point drill at the ground])
123 (item [point drill at the wall])))
124 (p [steps for drilling into wood block]
125 (itemize
126 (item [plug in the drill])
127 (item [place the drill bit in position])
128 (item [bring the drill up to full speed, and keep it at full
129 speed while lowering and raising the drill])
130 (item [push down until the drill bit has passed through an inch
131 of the wood block])
132 (item [keep the drill at full speed])
133 (item [stop before the drill smashes into the wood block])
134 (item [keep the drill at full speed by holding the trigger])
135 (item [bring the drill straight back up])
136 (item [hold the trigger down to keep the drill at full speed])
137 (item [once the drill is back out of the hole, let go of the
138 trigger])))
139 (p [check
140 ,(itemize
141 (item
142 [should the drill be at full speed while the drill bit is
143 going down into the wood and coming back up?])
144 (item
145 [how do you keep the drill at full speed?])
146 (item
147 [what would happen if the drill bit were not at full
148 speed?])
149 (item
150 [what would happen if the drill were twisted sideways while
151 the drill bit were in the wood?]))]))
152 (subsubsection
7a744a6b 153 :title [drilling the first screw hole]
41ba7302 154 (itemize
155 (item [place the drill bit in position])
156 (item [bring the drill up to full speed, and keep it full speed])
157 (item [push down until the drill bit has passed through the
158 deck])
159 (item [keep the drill at full speed])
160 (item [stop before the drill smashes into the arduino])
161 (item [keep the drill at full speed by holding the trigger])
162 (item [bring the drill straight back up])
163 (item [hold the trigger down to keep the drill at full speed])
164 (item [once the drill is back out of the hole, let go of the
165 trigger]))
8fe23b94 166 (p [check
167 ,(itemize
168 (item
169 [should the drill be at full speed while the drill bit is
170 going down into the wood and coming back up?])
171 (item
172 [what would happen if the drill bit were not at full
173 speed?])
174 (item
175 [how do you keep the drill at full speed?]))])))
59fef212 176 (subsection
177 :title [first screw]
ff0f6a78 178 (subsubsection
9f651996 179 :title [fastening arduino to deck using #6-32x3/8\" screw]
180 (p [the "#6" part of "#6-32x3/8\"" is how big around the bolt is.
181 it is related to wire gauge.
4e2c2b29 182 bigger numbers mean larger screws.
6e7c78dd 183 smaller numbers means smaller screws.]
184 (figure :legend "arduino to deck / #6-32 screw"
185 (image :file
eef3ff81 186 "0-arduino-to-deck/6-32-screw.png")))
9f651996 187 (p [check
59fef212 188 ,(itemize
189 (item
9f651996 190 [in the motor assembly, there are #4-40x1.25\" screws.
191 are those fatter, thinner, or the same thickness as the
192 #6-32x3/8\" screws?]))])
5747a610 193 (p [the "32" part of "#6-32x3/8\"" is a measurement of how close
194 the threads are to each other.
9f651996 195 this is related to the angle of the thread, which is also
196 called pitch.
197 it is a count of how many times the thread wraps around one
198 inch of the screw body.])
199 (p [the head is the flat part where some tool, like the alan
200 wrench, can exert force to spin the screw.])
201 (p [check
59fef212 202 ,(itemize
9f651996 203 (item [how many times will the thread wrap around one inch of
204 the screw body?])
205 (item [what about 2 inches?
206 how many times will the thread wrap around two
7a2e6436 207 inches of the screw body?])
208 (item [where can a tool exert turning force on
209 the screw?]))]))
ff0f6a78 210 (subsubsection
211 :title [fasten the arduino board to the deck]
8eba0b8b 212 (p [first we'll put the screw into the deck just enough so the deck
213 holds it in place.
214 then we will hold the arduino up to the screw and finish
215 tightening the screw down.
216 with the screw partially in, we do not have hold it as
217 rigidly while we are also holding the arduino and
218 the deck.])
c4ea89ee 219 (p [push the #6-32 screw into the deck from the underside.
220 the underside is the brown side.
221 at the same time, spin the 6-32 screw so it rotates
222 clockwise while looking down on its head.
223 twist until the tip of the screw is about to stick out on
224 the top side of the deck.])
ff0f6a78 225 (p [hold the arduino board flat to the deck and line up the arduino
9f651996 226 hole so the screw can come up through it.
227 continue tightening the screw into the deck, spinning the same
228 direction as before.
229 tighten until the screw head touches the deck.
230 do not continue tightening after that.])
ff0f6a78 231 (p [the arduino should still be flat against the deck still, just
f9e58978 232 as it was before tightening the screw.])
233 (p [check
234 ,(itemize
235 (item [why do we insert the first screw partially before
236 holding up the arduino?])
237 (item [which side of the deck is the top side?]))]))
ff0f6a78 238 (subsubsection
f17976bf 239 :title [assessment of the first screw]
240 (itemize
7bca727f 241 (item [,(bold [warning]), if you rotate the arduino board too
242 much,you will unscrew it from the deck and you'll have to
243 screw it back in.
244 rotating a few degrees should be ok.])
f17976bf 245 (item [does the arduino stay with the deck when the deck moves?])
7bca727f 246 (item [can the arduino board still rotate a few degrees?]))))
f17976bf 247 (subsection
248 :title [second hole and screw]
ff0f6a78 249 (subsubsection
250 :title [arduino board move relative to deck]
251 (p [without any screws, the arduino board can move independently of
f17976bf 252 the deck.
c305da78 253 it can translate and rotate freely.
f17976bf 254 with the first screw, the arduino can rotate around one
763861dd 255 point on the deck and can no longer translate much.])
256 (p [the second screw limits rotation a lot.
257 it also makes translation even more difficult.
258 it might even be too small to be detectable by directly
259 looking at it.])
260 (p [to choose where the second hole and screw should go, we should
261 keep in mind that the goal is to attach the deck to the
262 arduino.
263 this means minimizing rotation and translation.
264 the picture below shows that the second hole should be as
265 far as possible from the first hole, since that minimizes
266 rotation.]
eef3ff81 267 (figure
268 :legend "arduino to deck / keep holes far apart"
269 (image
270 :file "0-arduino-to-deck/keep-holes-far-apart.png"))))
e3a31106 271 (subsubsection
96401b17 272 :title [drilling and attaching second screw]
e3a31106 273 (p [to drill the second hole, follow the same steps as drilling the
274 first hole.
275 hold the arduino down as before, and drill through the hole
6ef8240f 276 furthest away from the first hole.
277 then insert and tighten the screw as before.])))
24b6d750 278 (subsection
a5939c50 279 :title [third and fourth hole and screw]
280 (p [even though the arduino is pretty well attached with just 2
281 screws, we will add a third and fourth.
282 this gives practice drilling and tightening screws.
aa71ea44 283 it also keeps the arduino fixed even more rigidly.]))
284 (subsection
285 :title [assessment of arduino deck attachment]
286 (itemize
287 (item [you should now be able to grab the deck and shake it.
288 the arduino should stay firmly in place while you do.])
289 (item [the arduino should be close to but not touching an edge.])
290 (item [there should be no warping on the arduino.
291 this could happen if the screws are too tight.]))))
57e11138 292 (section
293 :title [breadboard])
3c0c7ca4 294 (section
390d8f01 295 :title [battery packs]
296 (subsection
297 :title [leads])
298 (subsection
299 :title [deck attachment]))
3c0c7ca4 300 (section
5aa69c47 301 :title [motors]
302 (subsection
303 :title [leads])
304 (subsection
305 :title [mount])
306 (subsection
307 :title [deck attachment]))
3c0c7ca4 308 (section
1b593ec7 309 :title [wheels]
310 (subsection
311 :title [tread])
312 (subsection
313 :title [motor]))
3c0c7ca4 314 (section
2ccf4ca9 315 :title [caster]
316 (subsection
317 :title [deck placement]))
3c0c7ca4 318 (section
6550a556 319 :title [sonars]
320 (subsection
321 :title [deck placement])))
3c0c7ca4 322 (chapter
9fb37473 323 :title [wiring and software]
324 (section
f0876d62 325 :title [serial]
326 (subsection
1be43d04 327 :title [software on computer]
c3e8314c 328 (subsubsection
1be43d04 329 :title [arduino])
c3e8314c 330 (subsubsection
1be43d04 331 :title [fritzing]))
f0876d62 332 (subsection
333 :title [attach arduino and computer via cable])
334 (subsection
335 :title [debugging common connection problems])
336 (subsection
337 :title [arduino reset button]))
9fb37473 338 (section
bb801164 339 :title [left sonar]
340 (subsection
341 :title [breadboard connectivity])
342 (subsection
343 :title [cable])
344 (subsection
cb7d1c68 345 :title [arduino headers])
346 (subsection
347 :title [sound cm per microsecond at sea level]))
9fb37473 348 (section
9183d52b 349 :title [both sonars]
350 (subsection
351 :title [breadboard power rail]
352 (p [power rail can provide power to more than one device.])))
9fb37473 353 (section
805d6362 354 :title [left motor]
355 (subsection
356 :title [arduino digital output])
357 (subsection
358 :title [quad half h bridge, aka motor controller])
359 (subsection
360 :title [motor battery]))
9fb37473 361 (section
79d761bc 362 :title [both motors]
363 (subsection
364 :title [analogWrite]))
9fb37473 365 (section
aedd9003 366 :title [untethered]
367 (subsection
368 :title [arduino battery])
369 (subsection
370 :title [off and on functions]))
9fb37473 371 (section
28a2365e 372 :title [follow]
373 (subsection
374 :title [same wiring as untethered])
375 (subsection
376 :title [set motor])
377 (subsection
378 :title [go])
379 (subsection
380 :title [determining speed]))
9fb37473 381 (section
d460f45c 382 :title [stay on table]
383 (subsection
384 :title [stop])
385 (subsection
386 :title [backup])
387 (subsection
388 :title [turn around]))))
37d286e7 389
390;; Copyright 2016 daniel watson
391
392;; This file is part of challenge-bot.
393
394;; challenge-bot is free software: you can redistribute it and/or modify
395;; it under the terms of the GNU Affero General Public License as
396;; published by the Free Software Foundation, either version 3 of the
397;; License, or (at your option) any later version.
398
399;; challenge-bot is distributed in the hope that it will be useful,
400;; but WITHOUT ANY WARRANTY; without even the implied warranty of
401;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
402;; GNU Affero General Public License for more details.
403
404;; You should have received a copy of the GNU Affero General Public
405;; License along with challenge-bot. If not, see
406;; <http://www.gnu.org/licenses/>.