15ea4e00f96688f15b856dac3faf8d649757ac1b
[challenge-bot] / curriculum / 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 :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]))
115 (subsection
116 :title [first screw]
117 (subsubsection
118 :title [fastening arduino to deck using #6-32x3/8\" screw]
119 (p [the "#6" part of "#6-32x3/8\"" is how big around the bolt is.
120 it is related to wire gauge.
121 bigger numbers mean larger screw.
122 smaller numbers means smaller screws.]
123 (figure :legend "arduino to deck / #6-32 screw"
124 (image :file
125 "arduino-to-deck/6-32-screw.png")))
126 (p [check
127 ,(itemize
128 (item
129 [in the motor assembly, there are #4-40x1.25\" screws.
130 are those fatter, thinner, or the same thickness as the
131 #6-32x3/8\" screws?]))])
132 (p [the "32" part is a measurement of how close the threads are to
133 each other.
134 this is related to the angle of the thread, which is also
135 called pitch.
136 it is a count of how many times the thread wraps around one
137 inch of the screw body.])
138 (p [the head is the flat part where some tool, like the alan
139 wrench, can exert force to spin the screw.])
140 (p [check
141 ,(itemize
142 (item [how many times will the thread wrap around one inch of
143 the screw body?])
144 (item [what about 2 inches?
145 how many times will the thread wrap around two
146 inches of the screw body?]))]))
147 (subsubsection
148 :title [fasten the arduino board to the deck]
149 (p [push the 6-32 screw into the deck from the underside and at the
150 same time, spin the 6-32 screw clockwise while looking
151 down on its head.
152 twist until the bottom of the screw is
153 about to stick out on the top side of the deck.])
154 (p [hold the arduino board flat to the deck and line up the arduino
155 hole so the screw can come up through it.
156 continue tightening the screw into the deck, spinning the same
157 direction as before.
158 tighten until the screw head touches the deck.
159 do not continue tightening after that.])
160 (p [the arduino should still be flat against the deck still, just
161 as it was before tightening the screw.]))
162 (subsubsection
163 :title [assessment]
164 (p [does the arduino stay with the deck when the deck moves?
165 can the arduino board still rotate a few degrees?
166 warning, if you rotate the arduino board too much, you
167 will unscrew it from the deck and you'll have to screw it
168 back in.
169 rotating a few degrees should be ok.]))
170 (subsubsection
171 :title [arduino board move relative to deck]
172 (p [without any screws, the arduino board can move independently of
173 the deck.])
174 (p [with the first screw, the arduino can rotate around one point
175 on the deck.])))
176 (subsection
177 :title [second hole and screw])
178 (subsection
179 :title [third and fourth hole and screw]))
180 (section
181 :title [breadboard])
182 (section
183 :title [battery packs]
184 (subsection
185 :title [leads])
186 (subsection
187 :title [deck attachment]))
188 (section
189 :title [motors]
190 (subsection
191 :title [leads])
192 (subsection
193 :title [mount])
194 (subsection
195 :title [deck attachment]))
196 (section
197 :title [wheels]
198 (subsection
199 :title [tread])
200 (subsection
201 :title [motor]))
202 (section
203 :title [caster]
204 (subsection
205 :title [deck placement]))
206 (section
207 :title [sonars]
208 (subsection
209 :title [deck placement])))
210 (chapter
211 :title [wiring and software]
212 (section
213 :title [serial]
214 (subsection
215 :title [software on computer]
216 (subsubsection
217 :title [arduino])
218 (subsubsection
219 :title [fritzing]))
220 (subsection
221 :title [attach arduino and computer via cable])
222 (subsection
223 :title [debugging common connection problems])
224 (subsection
225 :title [arduino reset button]))
226 (section
227 :title [left sonar]
228 (subsection
229 :title [breadboard connectivity])
230 (subsection
231 :title [cable])
232 (subsection
233 :title [arduino headers])
234 (subsection
235 :title [sound cm per microsecond at sea level]))
236 (section
237 :title [both sonars]
238 (subsection
239 :title [breadboard power rail]
240 (p [power rail can provide power to more than one device.])))
241 (section
242 :title [left motor]
243 (subsection
244 :title [arduino digital output])
245 (subsection
246 :title [quad half h bridge, aka motor controller])
247 (subsection
248 :title [motor battery]))
249 (section
250 :title [both motors]
251 (subsection
252 :title [analogWrite]))
253 (section
254 :title [untethered]
255 (subsection
256 :title [arduino battery])
257 (subsection
258 :title [off and on functions]))
259 (section
260 :title [follow]
261 (subsection
262 :title [same wiring as untethered])
263 (subsection
264 :title [set motor])
265 (subsection
266 :title [go])
267 (subsection
268 :title [determining speed]))
269 (section
270 :title [stay on table]
271 (subsection
272 :title [stop])
273 (subsection
274 :title [backup])
275 (subsection
276 :title [turn around]))))
277
278 ;; Copyright 2016 daniel watson
279
280 ;; This file is part of challenge-bot.
281
282 ;; challenge-bot is free software: you can redistribute it and/or modify
283 ;; it under the terms of the GNU Affero General Public License as
284 ;; published by the Free Software Foundation, either version 3 of the
285 ;; License, or (at your option) any later version.
286
287 ;; challenge-bot is distributed in the hope that it will be useful,
288 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
289 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
290 ;; GNU Affero General Public License for more details.
291
292 ;; You should have received a copy of the GNU Affero General Public
293 ;; License along with challenge-bot. If not, see
294 ;; <http://www.gnu.org/licenses/>.