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