2 ;; copyright info at bottom
10 (p [let's build your robot!])
12 :title [arduino to deck]
14 (p [let's attach the arduino to the deck.])
16 :title [required materials]
17 (p [you will need the things in this picture.])
19 :legend "arduino to deck / required materials"
21 "0-arduino-to-deck/0-required-materials.png"))
23 (item [medical kit with bandages])
24 (item [safety goggles])
25 (item [drill bit \(we will determine size in a moment\)])
30 (item [#6-32x3/8\", four of them])
31 (item [robot deck, the white thing with a grid of holes])))
35 :title [choosing drill bit]
36 (p [the arduino comes with holes in it already, so we will make
37 some choices around those holes.
38 choosing the right drill bit depends on what job you are
40 right now, we are making holes for screws to hold the
42 there are two constraints between the hole and screw.
43 each hole needs to be big enough for the screw body to fit
45 the holes also need to be smaller than the screw's thread.
46 since there are holes on the arduino already, the screw was
48 the screw was chosen so that the hole on the arduino was
49 bigger than the screw body and smaller than its thread.
50 we will choose the biggest drill bit that fits through the
51 hole on the arduino, then use that to drill holes in the
53 (p [here's a cross section of a screw in the deck])
54 (figure :legend "screw cross section"
56 "0-arduino-to-deck/screw-cross-section.png"))
60 [what would happen if the drill bit were larger than the
63 [what would happen if the drill bit were smaller than the
66 :title [inserting drill bit]
67 (figure :legend "arduino to deck / insert bit"
68 (image :file "0-arduino-to-deck/1-insert-bit.png"))
69 (p [insert the drill bit into the teeth of the drill.
70 insert it far enough that the teeth will clamp on the
71 smooth part of the bit when they are tightened.])
73 :legend "arduino to deck / twist tighten drill teeth"
75 :file "0-arduino-to-deck/2-twist-tighten-drill-teeth.png"))
76 (p [while holding the drill bit, twist end of the drill to tighten
78 make sure that the teeth end up gripping the flat part of
83 [where should the teeth clamp down on the drill bit?])
85 [what would happen if the teeth tightened on the recessed
86 part of the drill bit?])))
88 :title [holding drill]
89 (p [hold the drill with one hand on the handle and trigger.
90 put the other hand on the orange nozzle, before the
91 black spinning part.]))
93 :title [arduino placement]
94 (p [the arduino should be placed as shown in this picture.])
95 (figure :legend "arduino to deck / place arduino"
96 (image :file "0-arduino-to-deck/3-place-arduino.png"))
97 (p [here's a closeup])
98 (figure :legend "arduino to deck / place arduino closeup"
100 "0-arduino-to-deck/4-place-arduino-closeup.png"))
101 (p [the picture above shows where to place the arduino on the deck.
102 the arduino should line up with the holes on the deck.
103 this alignment line is highlighted in pink.
104 on the arduino, there's a hole on the top left, between the
105 orange reset button and black headers.
106 the green circle shows where the hole is.
107 the blue box encloses the arduino hole and two deck holes.
108 place the arduino hole mid-way between the two
113 [should the arduino be upside-down?])
115 [what should the upper side of the arduino align with?])
117 [why not place the arduino up along the left side of the
120 :title [drilling practice]
123 (item [put on safety goggles])
124 (item [unplug drill])
125 (item [hold drill in one hand])
126 (item [point drill at the ground])
127 (item [point drill at the wall]))
128 (p [steps for drilling into wood block])
130 (item [plug in the drill])
131 (item [place the drill bit in position])
132 (item [bring the drill up to full speed, and keep it at full
133 speed while lowering and raising the drill])
134 (item [push down until the drill bit has passed through an inch
136 (item [keep the drill at full speed])
137 (item [stop before the drill smashes into the wood block])
138 (item [keep the drill at full speed by holding the trigger])
139 (item [bring the drill straight back up])
140 (item [hold the trigger down to keep the drill at full speed])
141 (item [once the drill is back out of the hole, let go of the
146 [should the drill be at full speed while the drill bit is
147 going down into the wood and coming back up?])
149 [how do you keep the drill at full speed?])
151 [what would happen if the drill bit were not at full
154 [what would happen if the drill were twisted sideways while
155 the drill bit were in the wood?])))
157 :title [drilling the first screw hole]
159 (item [place the drill bit in position])
160 (item [bring the drill up to full speed, and keep it full speed])
161 (item [push down until the drill bit has passed through the
163 (item [keep the drill at full speed])
164 (item [stop before the drill smashes into the arduino])
165 (item [keep the drill at full speed by holding the trigger])
166 (item [bring the drill straight back up])
167 (item [hold the trigger down to keep the drill at full speed])
168 (item [once the drill is back out of the hole, let go of the
173 [should the drill be at full speed while the drill bit is
174 going down into the wood and coming back up?])
176 [what would happen if the drill bit were not at full speed?])
177 (item [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"
187 (image :file "0-arduino-to-deck/6-32-screw.png"))
191 [in the motor assembly, there are #4-40x1.25\" screws.
192 are those fatter, thinner, or the same thickness as the
193 #6-32x3/8\" screws?]))
194 (p [the "32" part of "#6-32x3/8\"" is a measurement of how close
195 the threads are to each other.
196 this is related to the angle of the thread, which is also
198 it is a count of how many times the thread wraps around one
199 inch of the screw body.])
200 (p [the head is the flat part where some tool, like the alan
201 wrench, can exert force to spin the screw.])
204 (item [how many times will the thread wrap around one inch of
206 (item [what about 2 inches?
207 how many times will the thread wrap around two
208 inches of the screw body?])
209 (item [where can a tool exert turning force on the screw?])))
211 :title [fasten the arduino board to the deck]
212 (p [first we'll put the screw into the deck just enough so the deck
214 then we will hold the arduino up to the screw and finish
215 tightening the screw down.
216 with the screw partially in, we do not have hold it as
217 rigidly while we are also holding the arduino and
219 (p [push the #6-32 screw into the deck from the underside.
220 the underside is the brown side.
221 at the same time, spin the 6-32 screw so it rotates
222 clockwise while looking down on its head.
223 twist until the tip of the screw is about to stick out on
224 the top side of the deck.])
225 (p [hold the arduino board flat to the deck and line up the arduino
226 hole so the screw can come up through it.
227 continue tightening the screw into the deck, spinning the
228 same direction as before.
229 tighten until the screw head touches the deck.
230 do not continue tightening after that.])
231 (p [the arduino should still be flat against the deck still, just
232 as it was before tightening the screw.])
235 (item [why do we insert the first screw partially before
236 holding up the arduino?])
237 (item [which side of the deck is the top side?])))
239 :title [assessment of the first screw]
241 (item [,(bold [warning]), if you rotate the arduino board too
242 much,you will unscrew it from the deck and you'll have to
244 rotating a few degrees should be ok.])
245 (item [does the arduino stay with the deck when the deck moves?])
246 (item [can the arduino board still rotate a few degrees?]))))
248 :title [second hole and screw]
250 :title [arduino board move relative to deck]
251 (p [without any screws, the arduino board can move independently of
253 it can translate and rotate freely.
254 with the first screw, the arduino can rotate around one
255 point on the deck and can no longer translate much.])
256 (p [the second screw limits rotation a lot.
257 it also makes translation even more difficult.
258 it might even be too small to be detectable by directly
260 (p [to choose where the second hole and screw should go, we should
261 keep in mind that the goal is to attach the deck to the
263 this means minimizing rotation and translation.
264 the picture below shows that the second hole should be as
265 far as possible from the first hole, since that minimizes
268 :legend "arduino to deck / keep holes far apart"
270 :file "0-arduino-to-deck/keep-holes-far-apart.png")))
272 :title [drilling and attaching second screw]
273 (p [to drill the second hole, follow the same steps as drilling the
275 hold the arduino down as before, and drill through the hole
276 furthest away from the first hole.
277 then insert and tighten the screw as before.])))
279 :title [third and fourth hole and screw]
280 (p [even though the arduino is pretty well attached with just 2
281 screws, we will add a third and fourth.
282 this gives practice drilling and tightening screws.
283 it also keeps the arduino fixed even more rigidly.]))
285 :title [assessment of arduino deck attachment]
287 (item [you should now be able to grab the deck and shake it.
288 the arduino should stay firmly in place while you do.])
289 (item [the arduino should be close to but not touching an edge.])
290 (item [there should be no warping on the arduino.
291 this could happen if the screws are too tight.]))))
293 :title [battery wiring]
298 (p ["leads" are the wires coming out of the battery pack.
299 prepare the leads of the batteries by stripping them and
300 placing heat shrink on them.
301 your battery packs are not attached to your deck yet,
302 but that will be the next step.])
303 (figure :legend "batteries / prepare leads / stripping"
305 :file "2-batteries/0-prepare-leads/0-strip.ogv"))
307 (item (bold [do not pick up batteries by their leads!]))
308 (item [strip the leads a tiny bit at a time.
309 keep stripping until a total of an inch is stripped.
310 the leads are made of tons of tiny wires that will
311 tear apart if too much insulation is stripped at
313 wire made of a bunch of tiny wires
314 is "stranded wire".])
315 (item [strip both leads of both batteries.])
316 (item [then place heat shrink on every lead.
317 make sure the heat shrink is either clear or matches
318 the color of the lead.]))
321 (item [should you pick up a battery by its leads?])
322 (item [should you strip the leads a large amount at a time?])
323 (item [what's the name of wires made of a bunch of tiny
327 (p [do the next 2 sections with just one lead at a time.
328 wrap, then solder one battery lead before moving on to the
330 wrap the stranded wire around a solid core wire, as shown
332 (figure :legend "batteries / prepare leads / wrap"
334 :file "2-batteries/0-prepare-leads/1-wrap.ogv"))
335 (p [the solid core wire is the stiff short wire.
336 it is much easier to poke into the breadboard.])
339 (item [why are we using a solid core wire?])))
342 (p [do this next section and the previous with just one lead at a
344 solder the stranded wire and solid core wire, as shown
346 (figure :legend "batteries / prepare leads / solder"
348 :file "2-batteries/0-prepare-leads/2-solder.ogv"))
349 (p [soldering is the process of joining 2 metal things with
352 (item [use the helping hands to grab the wires and hold them in
354 (item [clean off the tip of the soldering iron if it has been
355 sitting still for a while.
356 this cleans off corroded metal.])
357 (item [apply some solder directly to the tip of the soldering
359 this creates a pool of solder on the tip.
360 we will use this to transfer heat to the wires.])
361 (item [put the soldering iron up to the wires.
362 we want the wires to be hot enough to melt the
364 at the same time, poke the solder into the wire.
365 the solder will start melting and quickly spread to
366 hot parts of the wire.
367 there will be smoke.])
368 (item [move the solder away, then move the iron away.]))
371 (item [should the wires melt the solder?])
372 (item [why should we clean off the tip of the soldering iron?])
373 (item [why do we put more solder back on the tip of the iron?])))))
375 :title [motor wiring]
378 (p [attach leads to the motors to supply the motor with power.])
380 :legend "motors / leads"
382 :file "3-motor-assemblies/0-leads.ogv"))
384 (item [strip both the green and yellow wire on both ends.
385 strip one side only 1/8 inch.
386 strip the other side about 1/4 inch.])
387 (item [use the end of the wire stripper to bend a hook in the wire.
388 make this hook on the side of the wire with a smaller
390 (item [do not bend the wire so that the exposed wire runs alongside
392 (item [put the hooks through the tabs on the motor.
393 make sure to place the green and yellow wire on the
394 correct side of the motor.
395 match the side of the motor that already has wires
397 wrap the rest of the wire around the motor in order to
398 keep the wire from falling off.])
399 (item [once the wire is in place, wrap solder around the motor tab
401 heat up the solder, motor tab and wire with the
403 (item [test the solder joint with the 9v battery.
404 touch the battery leads to the motor leads.
405 make sure the 9v battery is on.
406 if the motor moves, the solder joint is good!])
407 (item [get section of electrical tape, roughly 100mm
409 slide the middle of the tape under the wires.
410 this tape will keep the solder joints away from the
411 metal band around the motor.])
412 (item [the zip tie will hold the wires to the motor.
413 wrap the zip tie on the round part of the motor where
414 it meets the square portion of the motor.
415 this will provide mechanical support for the solder
417 once the zip tie is wrapped, use wire strippers to cut
418 off the excess zip tie.])
419 (item [cover the solder joint with hot glue.
420 this will further keep the solder joints from corroding
421 in the air's moisture.
422 it will also keep the joint safe from anything poking
426 (item [should the electrical tape go between the wires and the
428 (item [are the motor tabs strong?])
429 (item [what are we doing to reinforce the motor tabs mechanically?])
430 (item [does hot glue make an electrical connection?])))
433 (p [now let's attach the motor mount to the motor.])
435 :title [angle bracket to motor mount]
436 (p [first, attach the angle brackets to the motor mounts with
437 #6-32x3/8 inch screws.])
439 :legend "motors / mount / angle bracket"
441 :file "3-motor-assemblies/1-motor-mount/0-angle-brackets.ogv"))
442 (p [if you cover up 2 of the holes on the motor mount, the
443 remaining holes look like a surprised face.
444 these are the holes to attach the angle brackets.
445 make sure the angle brackets on one motor mount are attached
446 in a mirror image to the other.])
449 (item [should the motor mounts have angle brackets attached in
450 a mirror image fashion?])
451 (item [why should the motor mounts have angle brackets attached in
452 a mirror image fashion?])))
454 :title [motor mount to motor]
455 (p [now attach the motor mount with angle brackets to the motor.])
457 :legend "motor / mount / mount to motor"
460 "3-motor-assemblies/1-motor-mount/1-motor-mount-to-motor.ogv"))
461 (p [we will attach the motor mount to the motor using #4 bolts.
462 these screws are thinner than the #6 bolts we have used.
463 to clamp down on the motor, we will use a #4 nut.
464 the white side of the nut should face outward.
465 this section of the nut will keep the nut from jiggling
466 loose off the bolt during normal operation.
467 the head of the #4 bolt is a philips head, so we will
468 use a philips head driver for it.])
471 (item [is the #4 bolt thicker or thinner than the #6?])
472 (item [do you have a ratcheting socket wrench, or not?]))))
474 :title [deck attachment]
475 (p [now that the motor assemblies are together, we will attach them
478 :legend "motor / motor assembly to deck"
480 :file "3-motor-assemblies/2-motor-assembly-to-deck.ogv"))
481 (p [when attaching the motor assembly to the deck, be sure to push
482 the assembly as far outward from the center of the robot
483 as you can while tightening it down.
484 this will give more clearance to the wheels of the robot
485 so they do not rub the deck.])))
488 (p [next, let's attach other parts to the deck.
489 we'll start with the breadboard.
490 there are many ways to do this, but one handy approach is
492 glue dots can be placed easily, are good at attaching flat
493 surfaces that directly touch and do not get much stress.])
494 (figure :legend "breadboard to deck / required materials"
496 :file "1-breadboard-to-deck/0-required-materials.png"))
497 (p [for this section, we will need the deck with arduino attached,
498 breadboard, and glue dots.])
499 (figure :legend "breadboard to deck / video"
501 :file "1-breadboard-to-deck/0-breadboard-to-deck.ogv"))
503 (item [take your breadboard out of its bag.])
504 (item [peel the backing.])
505 (item [put the shiny medal plate on the back.])
506 (item [break 4 glue dots away from the rest. put the rest back
508 (item [break off a glue dot from the group of 4, and peel away the
509 backing, exposing a sticky side.])
510 (item [put the glue dot on one corner of the shiny side of the
512 make sure to push it down firmly.])
513 (item [repeat for the other corners.])
514 (item [put the breadboard on the center of the deck.
515 position it so the black chip is on the right, and the
516 blue line is up against the arduino.])
517 (item [press firmly in each of the corners.]))
520 (item [should the black chip be on the right or the left?])
521 (item [how many glue dots should be on the breadboard?])))
523 :title [battery attachment]
525 :title [motor battery pack attachment]
526 (p [attach the motor battery pack to the robot deck.])
528 :legend "batteries / placement / motor pack"
530 :file "2-batteries/1-placement/0-motor-battery-pack.ogv"))
531 (p [we will use glue dots to attach the motor battery pack to the
533 the pack could be placed anywhere, but we will place it
534 in the lower left side of the robot.
535 this battery pack has 4 AA batteries in it.
536 each battery has 1.5 volts difference between the positive
538 the batteries are connected in series.
539 the total voltage difference for the whole battery pack is
540 the sum of the individual voltages, which is 6 volts.])
542 (item [make sure you are placing dots on the side of the battery
543 pack without the on/off switch.])
544 (item [peel off a glue dot for each of the corners of the
546 (item [when placing the battery pack, make sure the screw hole
547 aligns with a hole on the deck.]))
550 (item [why place the glue dots on the side of the battery pack
551 without the on/off switch?])))
553 :title [arduino battery pack attachment]
554 (p [attach the arduino battery pack to the robot deck.])
556 :legend "batteries / placement / arduino pack"
558 :file "2-batteries/1-placement/1-arduino-battery-pack.ogv"))
559 (p [next, we will attach the arduino battery pack to the deck.
560 again, the pack could be placed anywhere, but we will
561 place it in the lower right side of the robot.])
563 (item [make sure you are placing dots on the side of the battery
564 pack without the on/off switch, just as before.])
565 (item [peel off a glue dot for each end of the pack.])
566 (item [when placing the battery pack, make sure the screw hole
567 aligns with a hole on the deck.]))
570 (item [why align the screw with a hole on the deck?]))))
573 (p [the caster will go at the back of the robot and provide a third
574 point of contact for the robot, making it easier for it to
578 (video :file "4-caster-to-deck.ogv"))
581 (item [what would happen if the robot did not have a caster?])))
584 (p [now we will attach the wheels.
585 this makes the motor movement transform into robot movement!])
588 (video :file "5-wheel-to-robot-assembly.ogv"))
591 (item [does the robot's wheels scrape the deck?])
592 (item [what would happen if the robot had no wheels?])
593 (item [what does the tread do?])
594 (item [what is the tread?])
595 (item [what kind of screw is used?])))
598 (p [we are almost done with mechanical assembly!
599 this next step is to add the sonar sensors to the robot.
600 sonar sensors are what the robot uses to detect distances.
601 it sends out a signal, then listens for a response and
602 keeps track of how long it takes.])
604 :legend "sonar sensors"
605 (video :file "6-sonar-sensors-to-deck.ogv"))
608 (item [are your sonar sensors pointy pins facing in toward the
610 (item [was it difficult to get the sonar into the holder?])
611 (item [what would happen if it was easy to slip the sonar sensor
612 into the sonar holder?]))))
614 :title [wiring and software]
619 :title [software on computer]
625 :title [attach arduino and computer via cable])
627 :title [debugging common connection problems])
629 :title [arduino reset button]))
633 :title [breadboard connectivity])
637 :title [arduino headers])
639 :title [sound cm per microsecond at sea level]))
643 :title [breadboard power rail]
644 (p [power rail can provide power to more than one device.])))
648 :title [arduino digital output])
650 :title [quad half h bridge, aka motor controller])
652 :title [motor battery]))
656 :title [analogWrite]))
660 :title [arduino battery])
662 :title [off and on functions]))
666 :title [same wiring as untethered])
672 :title [determining speed]))
674 :title [stay on table]
680 :title [turn around]))))
682 ;; Copyright 2016 daniel watson
684 ;; This file is part of challenge-bot.
686 ;; challenge-bot is free software: you can redistribute it and/or modify
687 ;; it under the terms of the GNU Affero General Public License as
688 ;; published by the Free Software Foundation, either version 3 of the
689 ;; License, or (at your option) any later version.
691 ;; challenge-bot is distributed in the hope that it will be useful,
692 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
693 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
694 ;; GNU Affero General Public License for more details.
696 ;; You should have received a copy of the GNU Affero General Public
697 ;; License along with challenge-bot. If not, see
698 ;; <http://www.gnu.org/licenses/>.