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