2 ;; copyright info at bottom
9 (p [let's build your robot!])
11 :title [arduino to deck]
12 (p [let's attach the arduino to the deck.])
14 :title [required materials]
15 (p [you will need the things in this picture.])
17 :legend "arduino to deck / required materials"
19 "0-arduino-to-deck/0-required-materials.png"))
21 (item [medical kit with bandages])
22 (item [safety goggles])
23 (item [drill bit \(we will determine size in a moment\)])
28 (item [#6-32x3/8\", four of them])
29 (item [robot deck, the white thing with a grid of holes])))
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 (figure :legend "arduino to deck / insert bit"
66 (image :file "0-arduino-to-deck/1-insert-bit.png"))
67 (p [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 (p [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"))
95 (p [here's a closeup])
96 (figure :legend "arduino to deck / place arduino closeup"
98 "0-arduino-to-deck/4-place-arduino-closeup.png"))
99 (p [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 speed?])
175 (item [how do you keep the drill at full speed?]))))
179 :title [fastening arduino to deck using #6-32x3/8\" screw]
180 (p [the "#6" part of "#6-32x3/8\"" is how big around the bolt is.
181 it is related to wire gauge.
182 bigger numbers mean larger screws.
183 smaller numbers means smaller screws.])
184 (figure :legend "arduino to deck / #6-32 screw"
185 (image :file "0-arduino-to-deck/6-32-screw.png"))
189 [in the motor assembly, there are #4-40x1.25\" screws.
190 are those fatter, thinner, or the same thickness as the
191 #6-32x3/8\" screws?]))
192 (p [the "32" part of "#6-32x3/8\"" is a measurement of how close
193 the threads are to each other.
194 this is related to the angle of the thread, which is also
196 it is a count of how many times the thread wraps around one
197 inch of the screw body.])
198 (p [the head is the flat part where some tool, like the alan
199 wrench, can exert force to spin the screw.])
202 (item [how many times will the thread wrap around one inch of
204 (item [what about 2 inches?
205 how many times will the thread wrap around two
206 inches of the screw body?])
207 (item [where can a tool exert turning force on the screw?])))
209 :title [fasten the arduino board to the deck]
210 (p [first we'll put the screw into the deck just enough so the deck
212 then we will hold the arduino up to the screw and finish
213 tightening the screw down.
214 with the screw partially in, we do not have hold it as
215 rigidly while we are also holding the arduino and
217 (p [push the #6-32 screw into the deck from the underside.
218 the underside is the brown side.
219 at the same time, spin the 6-32 screw so it rotates
220 clockwise while looking down on its head.
221 twist until the tip of the screw is about to stick out on
222 the top side of the deck.])
223 (p [hold the arduino board flat to the deck and line up the arduino
224 hole so the screw can come up through it.
225 continue tightening the screw into the deck, spinning the
226 same direction as before.
227 tighten until the screw head touches the deck.
228 do not continue tightening after that.])
229 (p [the arduino should still be flat against the deck still, just
230 as it was before tightening the screw.])
233 (item [why do we insert the first screw partially before
234 holding up the arduino?])
235 (item [which side of the deck is the top side?])))
237 :title [assessment of the first screw]
239 (item [,(bold [warning]), if you rotate the arduino board too
240 much,you will unscrew it from the deck and you'll have to
242 rotating a few degrees should be ok.])
243 (item [does the arduino stay with the deck when the deck moves?])
244 (item [can the arduino board still rotate a few degrees?]))))
246 :title [second hole and screw]
248 :title [arduino board move relative to deck]
249 (p [without any screws, the arduino board can move independently of
251 it can translate and rotate freely.
252 with the first screw, the arduino can rotate around one
253 point on the deck and can no longer translate much.])
254 (p [the second screw limits rotation a lot.
255 it also makes translation even more difficult.
256 it might even be too small to be detectable by directly
258 (p [to choose where the second hole and screw should go, we should
259 keep in mind that the goal is to attach the deck to the
261 this means minimizing rotation and translation.
262 the picture below shows that the second hole should be as
263 far as possible from the first hole, since that minimizes
266 :legend "arduino to deck / keep holes far apart"
268 :file "0-arduino-to-deck/keep-holes-far-apart.png")))
270 :title [drilling and attaching second screw]
271 (p [to drill the second hole, follow the same steps as drilling the
273 hold the arduino down as before, and drill through the hole
274 furthest away from the first hole.
275 then insert and tighten the screw as before.])))
277 :title [third and fourth hole and screw]
278 (p [even though the arduino is pretty well attached with just 2
279 screws, we will add a third and fourth.
280 this gives practice drilling and tightening screws.
281 it also keeps the arduino fixed even more rigidly.]))
283 :title [assessment of arduino deck attachment]
285 (item [you should now be able to grab the deck and shake it.
286 the arduino should stay firmly in place while you do.])
287 (item [the arduino should be close to but not touching an edge.])
288 (item [there should be no warping on the arduino.
289 this could happen if the screws are too tight.]))))
292 (p [next, let's attach other parts to the deck.
293 we'll start with the breadboard.
294 there are many ways to do this, but one handy approach is
296 glue dots can be placed easily, are good at attaching flat
297 surfaces that directly touch and do not get much stress.])
298 (figure :legend "breadboard to deck / required materials"
300 :file "1-breadboard-to-deck/0-required-materials.png"))
301 (p [for this section, we will need the deck with arduino attached,
302 breadboard, and glue dots.])
303 (figure :legend "breadboard to deck / video"
305 :file "1-breadboard-to-deck/0-breadboard-to-deck.ogv"))
307 (item [take your breadboard out of its bag.])
308 (item [peel the backing.])
309 (item [put the shiny medal plate on the back.])
310 (item [break 4 glue dots away from the rest. put the rest back
312 (item [break off a glue dot from the group of 4, and peel away the
313 backing, exposing a sticky side.])
314 (item [put the glue dot on one corner of the shiny side of the
316 make sure to push it down firmly.])
317 (item [repeat for the other corners.])
318 (item [put the breadboard on the center of the deck.
319 position it so the black chip is on the right, and the
320 blue line is up against the arduino.])
321 (item [press firmly in each of the corners.]))
324 (item [should the black chip be on the right or the left?])
325 (item [how many glue dots should be on the breadboard?])))
327 :title [battery packs]
332 (p ["leads" are the wires coming out of the battery pack.
333 prepare the leads of the batteries by stripping them and
334 placing heat shrink on them.
335 your battery packs are not attached to your deck yet,
336 but that will be the next step.])
337 (figure :legend "batteries / prepare leads / stripping"
339 :file "2-batteries/0-prepare-leads/0-strip.ogv"))
341 (item (bold [do not pick up batteries by their leads!]))
342 (item [strip the leads a tiny bit at a time.
343 keep stripping until a total of an inch is stripped.
344 the leads are made of tons of tiny wires that will
345 tear apart if too much insulation is stripped at
347 wire made of a bunch of tiny wires
348 is "stranded wire".])
349 (item [strip both leads of both batteries.])
350 (item [then place heat shrink on every lead.
351 make sure the heat shrink is either clear or matches
352 the color of the lead.]))
355 (item [should you pick up a battery by its leads?])
356 (item [should you strip the leads a large amount at a time?])
357 (item [what's the name of wires made of a bunch of tiny
361 (p [do the next 2 sections with just one lead at a time.
362 wrap, then solder one battery lead before moving on to the
364 wrap the stranded wire around a solid core wire, as shown
366 (figure :legend "batteries / prepare leads / wrap"
368 :file "2-batteries/0-prepare-leads/1-wrap.ogv"))
369 (p [the solid core wire is the stiff short wire.
370 it is much easier to poke into the breadboard.])
373 (item [why are we using a solid core wire?])))
376 (p [do this next section and the previous with just one lead at a
378 solder the stranded wire and solid core wire, as shown
380 (figure :legend "batteries / prepare leads / solder"
382 :file "2-batteries/0-prepare-leads/2-solder.ogv"))
383 (p [soldering is the process of joining 2 metal things with
386 (item [use the helping hands to grab the wires and hold them in
388 (item [clean off the tip of the soldering iron if it has been
389 sitting still for a while.
390 this cleans off corroded metal.])
391 (item [apply some solder directly to the tip of the soldering
393 this creates a pool of solder on the tip.
394 we will use this to transfer heat to the wires.])
395 (item [put the soldering iron up to the wires.
396 we want the wires to be hot enough to melt the
398 at the same time, poke the solder into the wire.
399 the solder will start melting and quickly spread to
400 hot parts of the wire.
401 there will be smoke.])
402 (item [move the solder away, then move the iron away.]))
405 (item [should the wires melt the solder?])
406 (item [why should we clean off the tip of the soldering iron?])
407 (item [why do we put more solder back on the tip of the iron?]))))
409 :title [deck attachment]
411 :title [motor battery pack attachment]
412 (p [attach the motor battery pack to the robot deck.])
414 :legend "batteries / placement / motor pack"
416 :file "2-batteries/1-placement/0-motor-battery-pack.ogv"))
417 (p [we will use glue dots to attach the motor battery pack to the
419 the pack could be placed anywhere, but we will place it
420 in the lower left side of the robot.
421 this battery pack has 4 AA batteries in it.
422 each battery has 1.5 volts difference between the positive
424 the batteries are connected in series.
425 the total voltage difference for the whole battery pack is
426 the sum of the individual voltages, which is 6 volts.])
428 (item [make sure you are placing dots on the side of the battery
429 pack without the on/off switch.])
430 (item [peel off a glue dot for each of the corners of the
432 (item [when placing the battery pack, make sure the screw hole
433 aligns with a hole on the deck.]))
436 (item [why place the glue dots on the side of the battery pack
437 without the on/off switch?])))
439 :title [arduino battery pack attachment]
440 (p [attach the arduino battery pack to the robot deck.])
442 :legend "batteries / placement / arduino pack"
444 :file "2-batteries/1-placement/1-arduino-battery-pack.ogv"))
445 (p [next, we will attach the arduino battery pack to the deck.
446 again, the pack could be placed anywhere, but we will
447 place it in the lower right side of the robot.])
449 (item [make sure you are placing dots on the side of the battery
450 pack without the on/off switch, just as before.])
451 (item [peel off a glue dot for each end of the pack.])
452 (item [when placing the battery pack, make sure the screw hole
453 aligns with a hole on the deck.]))
456 (item [why align the screw with a hole on the deck?])))))
461 (p [attach leads to the motors to supply the motor with power.])
463 :legend "motors / leads"
465 :file "3-motor-assemblies/0-leads.ogv"))
467 (item [strip both the green and yellow wire on both ends.
468 strip one side only 1/8 inch.
469 strip the other side about 1/4 inch.])
470 (item [use the end of the wire stripper to bend a hook in the wire.
471 make this hook on the side of the wire with a smaller
473 (item [do not bend the wire so that the exposed wire runs alongside
475 (item [put the hooks through the tabs on the motor.
476 make sure to place the green and yellow wire on the
477 correct side of the motor.
478 match the side of the motor that already has wires
480 wrap the rest of the wire around the motor in order to
481 keep the wire from falling off.])
482 (item [once the wire is in place, wrap solder around the motor tab
484 heat up the solder, motor tab and wire with the
486 (item [test the solder joint with the 9v battery.
487 touch the battery leads to the motor leads.
488 make sure the 9v battery is on.
489 if the motor moves, the solder joint is good!])
490 (item [get section of electrical tape, roughly 100mm
492 slide the middle of the tape under the wires.
493 this tape will keep the solder joints away from the
494 metal band around the motor.])
495 (item [the zip tie will hold the wires to the motor.
496 wrap the zip tie on the round part of the motor where
497 it meets the square portion of the motor.
498 this will provide mechanical support for the solder
500 once the zip tie is wrapped, use wire strippers to cut
501 off the excess zip tie.])
502 (item [cover the solder joint with hot glue.
503 this will further keep the solder joints from corroding
504 in the air's moisture.
505 it will also keep the joint safe from anything poking
509 (item [should the electrical tape go between the wires and the
511 (item [are the motor tabs strong?])
512 (item [what are we doing to reinforce the motor tabs mechanically?])
513 (item [does hot glue make an electrical connection?])))
516 (p [now let's attach the motor mount to the motor.])
518 :title [angle bracket to motor mount]
519 (p [first, attach the angle brackets to the motor mounts with
520 #6-32x3/8 inch screws.])
522 :legend "motors / mount / angle bracket"
524 :file "3-motor-assemblies/1-motor-mount/0-angle-brackets.ogv"))
525 (p [if you cover up 2 of the holes on the motor mount, the
526 remaining holes look like a surprised face.
527 these are the holes to attach the angle brackets.
528 make sure the angle brackets on one motor mount are attached
529 in a mirror image to the other.])
532 (item [should the motor mounts have angle brackets attached in
533 a mirror image fashion?])
534 (item [why should the motor mounts have angle brackets attached in
535 a mirror image fashion?])))
537 :title [motor mount to motor]
538 (p [now attach the motor mount with angle brackets to the motor.])
540 :legend "motor / mount / mount to motor"
543 "3-motor-assemblies/1-motor-mount/1-motor-mount-to-motor.ogv"))
544 (p [we will attach the motor mount to the motor using #4 bolts.
545 these screws are thinner than the #6 bolts we have used.
546 to clamp down on the motor, we will use a #4 nut.
547 the white side of the nut should face outward.
548 this section of the nut will keep the nut from jiggling
549 loose off the bolt during normal operation.
550 the head of the #4 bolt is a philips head, so we will
551 use a philips head driver for it.])
554 (item [is the #4 bolt thicker or thinner than the #6?])
555 (item [do you have a ratcheting socket wrench, or not?]))))
557 :title [deck attachment]
558 (p [now that the motor assemblies are together, we will attach them
561 :legend "motor / motor assembly to deck"
563 :file "3-motor-assemblies/2-motor-assembly-to-deck.ogv"))
564 (p [when attaching the motor assembly to the deck, be sure to push
565 the assembly as far outward from the center of the robot
566 as you can while tightening it down.
567 this will give more clearance to the wheels of the robot
568 so they do not rub the deck.])))
571 (p [the caster will go at the back of the robot and provide a third
572 point of contact for the robot, making it easier for it to
576 (video :file "4-caster-to-deck.ogv"))
579 (item [what would happen if the robot did not have a caster?])))
582 (p [now we will attach the wheels.
583 this makes the motor movement transform into robot movement!])
586 (video :file "5-wheel-to-robot-assembly.ogv"))
589 (item [does the robot's wheels scrape the deck?])
590 (item [what would happen if the robot had no wheels?])
591 (item [what does the tread do?])
592 (item [what is the tread?])
593 (item [what kind of screw is used?])))
596 (p [we are almost done with mechanical assembly!
597 this next step is to add the sonar sensors to the robot.
598 sonar sensors are what the robot uses to detect distances.
599 it sends out a signal, then listens for a response and
600 keeps track of how long it takes.])
602 :legend "sonar sensors"
603 (video :file "6-sonar-sensors-to-deck.ogv"))
606 (item [are your sonar sensors pointy pins facing in toward the
608 (item [was it difficult to get the sonar into the holder?])
609 (item [what would happen if it was easy to slip the sonar sensor
610 into the sonar holder?]))))
612 :title [wiring and software]
616 :title [software on computer]
622 :title [attach arduino and computer via cable])
624 :title [debugging common connection problems])
626 :title [arduino reset button]))
630 :title [breadboard connectivity])
634 :title [arduino headers])
636 :title [sound cm per microsecond at sea level]))
640 :title [breadboard power rail]
641 (p [power rail can provide power to more than one device.])))
645 :title [arduino digital output])
647 :title [quad half h bridge, aka motor controller])
649 :title [motor battery]))
653 :title [analogWrite]))
657 :title [arduino battery])
659 :title [off and on functions]))
663 :title [same wiring as untethered])
669 :title [determining speed]))
671 :title [stay on table]
677 :title [turn around]))))
679 ;; Copyright 2016 daniel watson
681 ;; This file is part of challenge-bot.
683 ;; challenge-bot is free software: you can redistribute it and/or modify
684 ;; it under the terms of the GNU Affero General Public License as
685 ;; published by the Free Software Foundation, either version 3 of the
686 ;; License, or (at your option) any later version.
688 ;; challenge-bot is distributed in the hope that it will be useful,
689 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
690 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
691 ;; GNU Affero General Public License for more details.
693 ;; You should have received a copy of the GNU Affero General Public
694 ;; License along with challenge-bot. If not, see
695 ;; <http://www.gnu.org/licenses/>.