curriculum -> guide, prepend 0- to arduino-to-deck
[challenge-bot] / guide / challenge-bot.scm
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
16 :legend "arduino to deck / required materials"
17 (image :file
18 "0-arduino-to-deck/0-required-materials.png"))
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])
27 (item [#6-32x3/8\", four of them])
28 (item [robot deck, the white thing with a grid of holes1]))]))
29 (subsection
30 :title [first hole]
31 (subsubsection
32 :title [choosing drill bit]
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.])
50 (p [here's a cross section of a screw in the deck]
51 (figure :legend "screw cross section"
52 (image :file
53 "0-arduino-to-deck/screw-cross-section.png")))
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?]))]))
62 (subsubsection
63 :title [inserting drill bit]
64 (p (figure :legend "arduino to deck / insert bit"
65 (image :file "0-arduino-to-deck/1-insert-bit.png"))
66 [insert the drill bit into the teeth of the drill.
67 insert it far enough that the teeth will clamp on the
68 smooth part of the bit when they are tightened.])
69 (p (figure
70 :legend "arduino to deck / twist tighten drill teeth"
71 (image :file "0-arduino-to-deck/2-twist-tighten-drill-teeth.png"))
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
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?]))]))
83 (subsubsection
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.]))
88 (subsubsection
89 :title [arduino placement]
90 (p [the arduino should be placed as shown in this picture.]
91 (figure :legend "arduino to deck / place arduino"
92 (image :file "0-arduino-to-deck/3-place-arduino.png")))
93 (p [here's a closeup]
94 (figure :legend "arduino to deck / place arduino closeup"
95 (image :file
96 "0-arduino-to-deck/4-place-arduino-closeup.png"))
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
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?]))]))
115 (subsubsection
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
153 :title [drilling the first screw hole]
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]))
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?]))])))
176 (subsection
177 :title [first screw]
178 (subsubsection
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.
182 bigger numbers mean larger screws.
183 smaller numbers means smaller screws.]
184 (figure :legend "arduino to deck / #6-32 screw"
185 (image :file
186 "0-arduino-to-deck/6-32-screw.png")))
187 (p [check
188 ,(itemize
189 (item
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?]))])
193 (p [the "32" part of "#6-32x3/8\"" is a measurement of how close
194 the threads are to each other.
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
202 ,(itemize
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
207 inches of the screw body?])
208 (item [where can a tool exert turning force on
209 the screw?]))]))
210 (subsubsection
211 :title [fasten the arduino board to the deck]
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.])
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.])
225 (p [hold the arduino board flat to the deck and line up the arduino
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.])
231 (p [the arduino should still be flat against the deck still, just
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?]))]))
238 (subsubsection
239 :title [assessment of the first screw]
240 (itemize
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.])
245 (item [does the arduino stay with the deck when the deck moves?])
246 (item [can the arduino board still rotate a few degrees?]))))
247 (subsection
248 :title [second hole and screw]
249 (subsubsection
250 :title [arduino board move relative to deck]
251 (p [without any screws, the arduino board can move independently of
252 the deck.
253 it can translate and rotate freely.
254 with the first screw, the arduino can rotate around one
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.]
267 (figure
268 :legend "arduino to deck / keep holes far apart"
269 (image
270 :file "0-arduino-to-deck/keep-holes-far-apart.png"))))
271 (subsubsection
272 :title [drilling and attaching second screw]
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
276 furthest away from the first hole.
277 then insert and tighten the screw as before.])))
278 (subsection
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.
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.]))))
292 (section
293 :title [breadboard])
294 (section
295 :title [battery packs]
296 (subsection
297 :title [leads])
298 (subsection
299 :title [deck attachment]))
300 (section
301 :title [motors]
302 (subsection
303 :title [leads])
304 (subsection
305 :title [mount])
306 (subsection
307 :title [deck attachment]))
308 (section
309 :title [wheels]
310 (subsection
311 :title [tread])
312 (subsection
313 :title [motor]))
314 (section
315 :title [caster]
316 (subsection
317 :title [deck placement]))
318 (section
319 :title [sonars]
320 (subsection
321 :title [deck placement])))
322 (chapter
323 :title [wiring and software]
324 (section
325 :title [serial]
326 (subsection
327 :title [software on computer]
328 (subsubsection
329 :title [arduino])
330 (subsubsection
331 :title [fritzing]))
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]))
338 (section
339 :title [left sonar]
340 (subsection
341 :title [breadboard connectivity])
342 (subsection
343 :title [cable])
344 (subsection
345 :title [arduino headers])
346 (subsection
347 :title [sound cm per microsecond at sea level]))
348 (section
349 :title [both sonars]
350 (subsection
351 :title [breadboard power rail]
352 (p [power rail can provide power to more than one device.])))
353 (section
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]))
361 (section
362 :title [both motors]
363 (subsection
364 :title [analogWrite]))
365 (section
366 :title [untethered]
367 (subsection
368 :title [arduino battery])
369 (subsection
370 :title [off and on functions]))
371 (section
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]))
381 (section
382 :title [stay on table]
383 (subsection
384 :title [stop])
385 (subsection
386 :title [backup])
387 (subsection
388 :title [turn around]))))
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/>.