2 ;; copyright info at bottom
8 (p [let's build your robot!])
10 :title [arduino to deck]
11 (p [let's attach the arduino to the deck.])
13 :title [required materials]
14 (p [you will need the things in this picture.
16 :legend "arduino to deck / required materials"
18 "0-arduino-to-deck/0-required-materials.png"))
20 (item [medical kit with bandages])
21 (item [safety goggles])
22 (item [drill bit \(we will determine size in a moment\)])
27 (item [#6-32x3/8\", four of them])
28 (item [robot deck, the white thing with a grid of
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
38 right now, we are making holes for screws to hold the
40 there are two constraints between the hole and screw.
41 each hole needs to be big enough for the screw body to fit
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
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
51 (p [here's a cross section of a screw in the deck]
52 (figure :legend "screw cross section"
54 "0-arduino-to-deck/screw-cross-section.png")))
58 [what would happen if the drill bit were larger than the
61 [what would happen if the drill bit were smaller than the
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.])
71 :legend "arduino to deck / twist tighten drill teeth"
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
76 make sure that the teeth end up gripping the flat part of
81 [where should the teeth clamp down on the drill bit?])
83 [what would happen if the teeth tightened on the recessed
84 part of the drill bit?]))]))
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.]))
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")))
96 (figure :legend "arduino to deck / place arduino closeup"
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
111 [should the arduino be upside-down?])
113 [what should the upper side of the arduino align with?])
115 [why not place the arduino up along the left side of the
118 :title [drilling practice]
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]
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
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
144 [should the drill be at full speed while the drill bit is
145 going down into the wood and coming back up?])
147 [how do you keep the drill at full speed?])
149 [what would happen if the drill bit were not at full
152 [what would happen if the drill were twisted sideways while
153 the drill bit were in the wood?]))]))
155 :title [drilling the first screw hole]
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
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
171 [should the drill be at full speed while the drill bit is
172 going down into the wood and coming back up?])
174 [what would happen if the drill bit were not at full
177 [how do you keep the drill at full speed?]))])))
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"
188 "0-arduino-to-deck/6-32-screw.png")))
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
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.])
205 (item [how many times will the thread wrap around one inch of
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
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
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
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.])
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?]))]))
241 :title [assessment of the first screw]
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
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?]))))
250 :title [second hole and screw]
252 :title [arduino board move relative to deck]
253 (p [without any screws, the arduino board can move independently of
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
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
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
270 :legend "arduino to deck / keep holes far apart"
272 :file "0-arduino-to-deck/keep-holes-far-apart.png"))))
274 :title [drilling and attaching second screw]
275 (p [to drill the second hole, follow the same steps as drilling the
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.])))
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.]))
287 :title [assessment of arduino deck attachment]
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.]))))
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
300 glue dots can be placed easily, are good at attaching flat
301 surfaces that directly touch and do not get much stress.])
303 :legend "breadboard to deck / required materials"
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.]))
309 :title [battery packs]
313 :title [deck attachment]))
321 :title [deck attachment]))
331 :title [deck placement]))
335 :title [deck placement])))
337 :title [wiring and software]
341 :title [software on computer]
347 :title [attach arduino and computer via cable])
349 :title [debugging common connection problems])
351 :title [arduino reset button]))
355 :title [breadboard connectivity])
359 :title [arduino headers])
361 :title [sound cm per microsecond at sea level]))
365 :title [breadboard power rail]
366 (p [power rail can provide power to more than one device.])))
370 :title [arduino digital output])
372 :title [quad half h bridge, aka motor controller])
374 :title [motor battery]))
378 :title [analogWrite]))
382 :title [arduino battery])
384 :title [off and on functions]))
388 :title [same wiring as untethered])
394 :title [determining speed]))
396 :title [stay on table]
402 :title [turn around]))))
404 ;; Copyright 2016 daniel watson
406 ;; This file is part of challenge-bot.
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.
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.
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/>.