add note about third and fourth screws
[challenge-bot] / curriculum / 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.
15 ,(figure :legend "arduino to deck / required materials"
9fbc1a3f 16 (image :file "arduino-to-deck/0-required-materials.png"))
cf59d996 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])
d0873756 25 (item [#6-32x3/8\", four of them])
26 (item [robot deck, the white thing with a grid of holes1]))]))
24b6d750 27 (subsection
59fef212 28 :title [first hole]
ff0f6a78 29 (subsubsection
52596bd0 30 :title [choosing drill bit]
23045a14 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.])
85fae63f 48 (p [here's a cross section of a screw in the deck]
49 (figure :legend "screw cross section"
50 (image :file
27547a79 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?]))]))
ff0f6a78 60 (subsubsection
ca8e4428 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
3875c1ef 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
1887fb16 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?]))]))
ff0f6a78 81 (subsubsection
7bf575b8 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.]))
c04a9631 86 (subsubsection
87 :title [arduino placement]
88 (p [the arduino should be placed as shown in this picture.]
cf59d996 89 (figure :legend "arduino to deck / place arduino"
6fc3d47b 90 (image :file "arduino-to-deck/3-place-arduino.png")))
91 (p [here's a closeup]
c1732375 92 (figure :legend "arduino to deck / place arduino closeup"
0b5cd84e 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
543ad3c2 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?]))]))
ff0f6a78 113 (subsubsection
41ba7302 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
7a744a6b 151 :title [drilling the first screw hole]
41ba7302 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]))
8fe23b94 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?]))])))
59fef212 174 (subsection
175 :title [first screw]
ff0f6a78 176 (subsubsection
9f651996 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.
4e2c2b29 180 bigger numbers mean larger screws.
6e7c78dd 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")))
9f651996 185 (p [check
59fef212 186 ,(itemize
187 (item
9f651996 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?]))])
5747a610 191 (p [the "32" part of "#6-32x3/8\"" is a measurement of how close
192 the threads are to each other.
9f651996 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
59fef212 200 ,(itemize
9f651996 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
7a2e6436 205 inches of the screw body?])
206 (item [where can a tool exert turning force on
207 the screw?]))]))
ff0f6a78 208 (subsubsection
209 :title [fasten the arduino board to the deck]
8eba0b8b 210 (p [first we'll put the screw into the deck just enough so the deck
211 holds it in place.
212 then we will hold the arduino up to the screw and finish
213 tightening the screw down.
214 with the screw partially in, we do not have hold it as
215 rigidly while we are also holding the arduino and
216 the deck.])
c4ea89ee 217 (p [push the #6-32 screw into the deck from the underside.
218 the underside is the brown side.
219 at the same time, spin the 6-32 screw so it rotates
220 clockwise while looking down on its head.
221 twist until the tip of the screw is about to stick out on
222 the top side of the deck.])
ff0f6a78 223 (p [hold the arduino board flat to the deck and line up the arduino
9f651996 224 hole so the screw can come up through it.
225 continue tightening the screw into the deck, spinning the same
226 direction as before.
227 tighten until the screw head touches the deck.
228 do not continue tightening after that.])
ff0f6a78 229 (p [the arduino should still be flat against the deck still, just
f9e58978 230 as it was before tightening the screw.])
231 (p [check
232 ,(itemize
233 (item [why do we insert the first screw partially before
234 holding up the arduino?])
235 (item [which side of the deck is the top side?]))]))
ff0f6a78 236 (subsubsection
f17976bf 237 :title [assessment of the first screw]
238 (itemize
7bca727f 239 (item [,(bold [warning]), if you rotate the arduino board too
240 much,you will unscrew it from the deck and you'll have to
241 screw it back in.
242 rotating a few degrees should be ok.])
f17976bf 243 (item [does the arduino stay with the deck when the deck moves?])
7bca727f 244 (item [can the arduino board still rotate a few degrees?]))))
f17976bf 245 (subsection
246 :title [second hole and screw]
ff0f6a78 247 (subsubsection
248 :title [arduino board move relative to deck]
249 (p [without any screws, the arduino board can move independently of
f17976bf 250 the deck.
c305da78 251 it can translate and rotate freely.
f17976bf 252 with the first screw, the arduino can rotate around one
763861dd 253 point on the deck and can no longer translate much.])
254 (p [the second screw limits rotation a lot.
255 it also makes translation even more difficult.
256 it might even be too small to be detectable by directly
257 looking at it.])
258 (p [to choose where the second hole and screw should go, we should
259 keep in mind that the goal is to attach the deck to the
260 arduino.
261 this means minimizing rotation and translation.
262 the picture below shows that the second hole should be as
263 far as possible from the first hole, since that minimizes
264 rotation.]
265 (figure :legend "arduino to deck / keep holes far apart"
e3a31106 266 (image :file "arduino-to-deck/keep-holes-far-apart.png"))))
267 (subsubsection
96401b17 268 :title [drilling and attaching second screw]
e3a31106 269 (p [to drill the second hole, follow the same steps as drilling the
270 first hole.
271 hold the arduino down as before, and drill through the hole
6ef8240f 272 furthest away from the first hole.
273 then insert and tighten the screw as before.])))
24b6d750 274 (subsection
a5939c50 275 :title [third and fourth hole and screw]
276 (p [even though the arduino is pretty well attached with just 2
277 screws, we will add a third and fourth.
278 this gives practice drilling and tightening screws.
279 it also keeps the arduino fixed even more rigidly.])))
57e11138 280 (section
281 :title [breadboard])
3c0c7ca4 282 (section
390d8f01 283 :title [battery packs]
284 (subsection
285 :title [leads])
286 (subsection
287 :title [deck attachment]))
3c0c7ca4 288 (section
5aa69c47 289 :title [motors]
290 (subsection
291 :title [leads])
292 (subsection
293 :title [mount])
294 (subsection
295 :title [deck attachment]))
3c0c7ca4 296 (section
1b593ec7 297 :title [wheels]
298 (subsection
299 :title [tread])
300 (subsection
301 :title [motor]))
3c0c7ca4 302 (section
2ccf4ca9 303 :title [caster]
304 (subsection
305 :title [deck placement]))
3c0c7ca4 306 (section
6550a556 307 :title [sonars]
308 (subsection
309 :title [deck placement])))
3c0c7ca4 310 (chapter
9fb37473 311 :title [wiring and software]
312 (section
f0876d62 313 :title [serial]
314 (subsection
1be43d04 315 :title [software on computer]
c3e8314c 316 (subsubsection
1be43d04 317 :title [arduino])
c3e8314c 318 (subsubsection
1be43d04 319 :title [fritzing]))
f0876d62 320 (subsection
321 :title [attach arduino and computer via cable])
322 (subsection
323 :title [debugging common connection problems])
324 (subsection
325 :title [arduino reset button]))
9fb37473 326 (section
bb801164 327 :title [left sonar]
328 (subsection
329 :title [breadboard connectivity])
330 (subsection
331 :title [cable])
332 (subsection
cb7d1c68 333 :title [arduino headers])
334 (subsection
335 :title [sound cm per microsecond at sea level]))
9fb37473 336 (section
9183d52b 337 :title [both sonars]
338 (subsection
339 :title [breadboard power rail]
340 (p [power rail can provide power to more than one device.])))
9fb37473 341 (section
805d6362 342 :title [left motor]
343 (subsection
344 :title [arduino digital output])
345 (subsection
346 :title [quad half h bridge, aka motor controller])
347 (subsection
348 :title [motor battery]))
9fb37473 349 (section
79d761bc 350 :title [both motors]
351 (subsection
352 :title [analogWrite]))
9fb37473 353 (section
aedd9003 354 :title [untethered]
355 (subsection
356 :title [arduino battery])
357 (subsection
358 :title [off and on functions]))
9fb37473 359 (section
28a2365e 360 :title [follow]
361 (subsection
362 :title [same wiring as untethered])
363 (subsection
364 :title [set motor])
365 (subsection
366 :title [go])
367 (subsection
368 :title [determining speed]))
9fb37473 369 (section
d460f45c 370 :title [stay on table]
371 (subsection
372 :title [stop])
373 (subsection
374 :title [backup])
375 (subsection
376 :title [turn around]))))
37d286e7 377
378;; Copyright 2016 daniel watson
379
380;; This file is part of challenge-bot.
381
382;; challenge-bot is free software: you can redistribute it and/or modify
383;; it under the terms of the GNU Affero General Public License as
384;; published by the Free Software Foundation, either version 3 of the
385;; License, or (at your option) any later version.
386
387;; challenge-bot is distributed in the hope that it will be useful,
388;; but WITHOUT ANY WARRANTY; without even the implied warranty of
389;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
390;; GNU Affero General Public License for more details.
391
392;; You should have received a copy of the GNU Affero General Public
393;; License along with challenge-bot. If not, see
394;; <http://www.gnu.org/licenses/>.