Electronic Project Interdisciplinary Creation by Amy Barone and Cindy Bronen 1
What is a Robot? Let s look it up Merriam-Webster: machine that looks like a human being [ ] device that automatically performs [ ] tasks mechanism guided by automatic controls 2
I a 't defi e a o ot, ut I k o o e he I see o e. - Joseph Engelberger, the Fathe of I dust ial Ro oti s Explore Planets Create Art Work in Factories Drive Cars Perform Surgery Check out: http://spectrum.ieee.org/bl og/automaton 3 Help People with Disabilities
The Sense-Think-Act Robot Plan how to rea t SENSE? THINK The Environment Sense the e iro e t Do something! ACT 4
Form Signing and Accountability Each kit = $200 Accountability & Responsibility Sign and date the chart below acknowledging your accountability and responsibility for the care and inventory of all components of the kit. If you lose any of the parts, you are responsible for replacing it. Also, a checklist will need to be completed for each day to check inventory. Signature Date Signature 1. 5. 2. 6. 3. 7. 4. 8. Date 5
Inventory Sheet Daily checklist and inventory sheet Match kit components with picture Check your quantity Initial and date Inventory Sheet 6
Thinking with The Hummingbird Controller
Attaching the Standoffs Two sided Duo Controller Standoffs protect the control board Take out the 4 Standoffs in kit Squeeze the ends of the Standoffs and push them into the bottom of each corner 8
Acting with LEDs and Motors The Outputs Servos Gear Motors Single Color LED Tri Color LED Vibration Motor 9
Terminal Tool and Single Color LED Items needed from your kit: 10
Using the Terminal Tool Connecting input and output devices http://www.hummingbirdkit.com/learning/tut orials/connecting-electronics 0-50 sec. 11
Connection Steps 1. Remove any plastic from end of wire 2. Use thumb and index finger to twist individual strands together tightly 3. Press little button on top 4. Wire should insert easily If you have to push it hard make sure the button is all the way down 5. Release button to finish 12
Tri-Color LED a red-green-blue (RGB) light source which can produce many light-based colors like the RBG pixels of a TV or Computer screen, the colors mix together to make different colors 13
Tri-Color LED Take out the Tri-Color LED from your kit Watch video 50-1:20 Connect the Tri-Color LED 14
VIBRATION Motor a small motor that causes a shaking motion where you can control the intensity of shaking like the i rate mode of a cellphone 15
Vibration Motor Take out the Vibration Motor from your kit Watch video 1:20-1:45 Connect the Vibration Motor Since both wires are the same color, the vibration motor can be plugged in two ways. Switching them just changes which direction the weight spins. Yellow + and - 16
Motor an electric motor with speed control that can rotate in either direction indefinitely like a fan where you can control the blade speed and blowing direction 17
Gear Motor Take out the Gear Motor from your kit Watch video 1:45-2:17 Connect the Gear Motor Since both wires are the same color, the motor can be plugged in two ways. Switching them just changes which direction is fo a d. Yellow + and 18
Servo a limited range motor with controls for specific angular positions like an elbow which can move to different angles through a limited motion range 19
Servos Take out a Servo from your kit Watch video 2:17-2:48 Connect the Servo Looks like a row of pins on the control board 20
Sensing with Hummingbird The Sensors Distance Rotary Sound Temperature Light 21
Light Sensor a sensor that detects how bright the ambient light is like in walkway lights that turn on at dark 22
Light Sensor Take out the Light Sensor from your kit Watch video 2:48-3:18 Connect the Light Sensor 23
Other Components Wheel Adapter- can be attached to the Gear Motor to give you a larger surface to glue onto Plastic Block Adapter- allows you to snap Lego pulleys and gears onto the Gear Motor 24
Other Components (cont.) Extension Cable- used with the Servos to give you extra wire length when connecting to your Duo Controller Power Cord- gives you extra power to run your motors 25
Sensors You Can Sign Out for Your Project Distance Sensors (12) Sound Sensors (12) Rotary Sensors (12) 26
Using CREATE Lab Visual programmer to animate your project You will build a series of Expressions and Sequences to create the program for your project 27
Defining the Terms Expression- contains the settings of one or more outputs (Ex. Waving your hand in one direction would be one expression. Two expressions would be moving your hand to the right and then to the left.) Sequence- series of Expressions turned into a program 28
Connecting the Duo Controller to the Computer Take out your Duo Controller and USB cord Make sure the Standoffs (little legs) are still attached Plug in the USB cable to the Controller and then plug the Controller into the computer **You want to make sure the controller is plugged into the computer BEFORE you open CREATE Lab 29
Hummingbird Plug in USB and Power: Motor Power Indicator Motor Power Port USB Port Status Indicator 30
Using CREATE Lab Click on the CREATE Lab icon on the desktop Make sure your group writes down your computer number and you use the same computer number for the duration of the project Green light will indicate that a connection has been made 31
Video-Introduction (1:10) http://www.hummingbirdkit.com/learning/usi ng-visual-programmer#expression 32
Connecting the Outputs to the Controller Take out a Single Color LED, Tri-Color LED, Power Cord, Terminal Tool, and a Servo For today, I would like everyone to connect their outputs into portal 1 for demonstration purposes. **Remember to connect the wires properly. 33
Creating an Expression (Part 2 from playlist 4:10) http://www.hummingbirdkit.com/learning/usi ng-visual-programmer#expression 34
Your Turn to Make Expressions! Take the piece of tape and tape the Tri-Color LED to the Servo. Tape the light at 12:00 with the words on the servo at 6:00. (This will allow you to see the direction that the Servo is rotating as the light turns on.) Light up your LEDs to different colors and levels of brightness Set the Servo to rotate at different angles 35
Expression Building Practice Make su e ou a e o the E p essio Builde ta We are going to practice building the following: 1. Light turns on and rotates right 2. Light turns off and rotates left 3. Everything off 36
Your Task: Plan and Save an Expression Practice Task 1 Our expression will turn a light color on and rotate right 1. Click box for Servo port 1 2. Slide Servo to 120 3. Click Tri-Color LED port 1 4. Slide red brightness level to 50 (leave all other colors on 0).. Cli k o the a e o i the uppe ight ha d o e. a e as: ed se o This e p essio should appea u de E p essio s o the right side of the screen.) What problems (if any) did you have? 37
Your Task: Plan and Save an Expression Practice Task 2 Our expression will turn a light color off and rotate left 1. 2. 3. 4. 5. 6. 7. 8. Cli k o Ne i the uppe ight ha d o e of the E p essio Builde Ne t, li k o es fo the pop up that sa s Clea E p essio? Click box for Servo port 1 Slide Servo to 50 Click Tri-Color LED port 1 Slide red brightness level to 0 (leave all other colors on 0.) Cli k o the a e o i the uppe ight ha d o e Save as: redoff se o This e p essio should appea u de E p essio s o the right side of the screen.) **When sequencing later, depending on the order of task 1 and task 2, left and right may be reversed. What problems (if any) did you have? 38
Your Task: Plan and Save an Expression Practice Task 3 Our expression will turn everything off that was programmed so far. 1. 2. 3. 4. 5. 6. 7. 8. Cli k o Ne i the uppe ight ha d o e of the E p essio Builde Ne t, li k o es fo the pop up that sa s Clea E p essio? Click box for Servo port 1 Slide Servo to 0 Click Tri-Color LED port 1 Slide red brightness level to 0 (leave all other colors on 0.) Cli k o the a e o i the uppe ight ha d o e Save as: Tri-Color1off servo1off (This expression should appear under E p essio s o the ight side of the s ee. What problems (if any) did you have? 39
Saving the Expressions Cli k o a e a d a e ou e p essio It is important to name the expressions based on what you set them to do. (Ex. If you set the e o to otate at a 9 a d the light is set to red, you might want to name it rightred90.) 40
Planning Process The key word is PLAN. We want you to think about what you would like to happen with your Servo and LEDs and then program it to see if it actually works the way you intentionally planned it to work. 41
Points to Remember About Expressions You must have the box checked for the output or input you would like to work. You must choose a level of brightness, angle, direction, speed, etc. for each output. It is a good idea to save and name your expressions by what they do. (This is important when we get to building sequences and you need to look at the expressions you have available and in what order you want things to happen.) **To test your expression, go back and select e er thi g off a used ports ust e set at 0 fro the list on the right hand side of the screen and then select the expression you want to try. Next, you need to sele t Ope E pressio a d li k es o the pop up screen. From here, your expression should work. 42
Your Task: Plan and Save an Expression Directions: Write the plan of your first expression below and then program it using CREATE Lab to see if it works according to your plan. 1. Our e pressio ill Cause the Servo to rotate at (more than 90 degrees) to the and the LED will light up (color) at a level of (brightness number) (Remember you must uncheck the boxes to try out your saved expression.) Did your programmed expression match the written plan? Explain. What problems (if any) did you have? 43
Your Task: Plan and Save an Expression with the Light Off Directions: Write the plan of your first expression in the chart below and then program it using CREATE Lab to see if it works according to your plan. 1. Our e pressio ill Cause the Servo to rotate at (less than 90 degrees) to the left and the LED will be set at 0. Save this expression as light off. Did your programmed expression match the written plan? Explain. What problems (if any) did you have? 1. **Saving one expression with the light on and then saving a separate expression with the light off will allow you to program a project with a blinking light. 44
Other Output Components Vibration Motor- To program, use the slider to set the intensity of the vibration motor from low to high (100). Motor- To program, use the slider to set the speed and direction of the motor. The motor turns both clockwise and counter clockwise and can run faster (hare) or slower (turtle). Servo-To program, use the slider to set the Servo angle from 0 to 180. 45
Other Output Components -Audio Select from a tone, clip, or speech. Click play to test. Tone: Choose tone from the piano keys and set the duration and volume. Clip: Choose a clip from the drop down menu or upload your own. Speech: Type the word(s) you wish your robot to speak. 46
Directions: Write a plan for your next expression below using at least 3 outputs and then program it using CREATE Lab to see if it works according to your plan. 2. Our expressio ill look at the last exa ple for help Did your programmed expression match the written plan? Explain. What problems (if any) did you have? 47
Inputs-Sensors Sensors are not visible in the Expressio Builder e ause the e is ot a to set the. The e used i the Sequence Builder to choose between different expressions or sequences of expressions. We will learn how to use sensors in our program when we learn how to create sequences next. 48
Creating and Building a Sequence (Part 3 from playlist 2:05) http://www.hummingbirdkit.com/learning/usi ng-visual-programmer#expression 49
Sequence Building Practice Make su e ou a e o the e ue e Builde ta We are going to practice building the following: 1. Usi g the e p essio s ou e eated to sequence that blinks 2. Using a counter to repeat a sequence 3. Using a sensor in a sequence ake a 50
Your Task: Making and Saving a Sequence Practice Task 1 Creating a Sequence Our sequence will cause the servo to go back and forth while a light goes on and off. 1. ele t the e ue e Builde ta at the top ta a 2. Select and drag the expression red50 servo120 from the right into the canvas 3. Drag the expression redoff servo50 from the right into the canvas **(Drag expressions so they are listed in the order you would like to use them.) 4. Set the timing of each expression by clicking on the clock symbol. Set the time for 2 seconds. 5. Select pla 6. Select the arrow e t to the pla utto to s it h the pla ode to a loop 7. 8. Select Stop Select the a e utto a d a e as: rotating blinking light (This sequence should appea u de e ue es o the ight side of the s ee. 51
Using a Counter (Part 4 from playlist 1:26) A counter is helpful if you would like to repeat a sequence a certain number of times. For example, to make a servo-driven arm wave three times. http://www.hummingbirdkit.com/learning/usi ng-visual-programmer#expression 52
Your Task: Making and Saving a Sequence Practice Task 2 Using a Counter Our sequence will cause the servo to go back and forth three times while a light goes on and off 1. Select the e ue e Builde ta at the top ta a a d li k o Ne 2. Drag a counter block from the bottom right of the screen under st u tu es i to the a as 2. Select and drag the se ue e otati g li ki g light i to the ou te block 3. Click the lock at the top of the counter block to set the number of iterations to 3 5. Select pla 6. Select the a e utto a d a e as: three rotating blinking light (This se ue e should appea u de e ue es o the ight side of the screen.) 53
Using a Sensor (Part 5 from playlist 3:47) http://www.hummingbirdkit.com/learning/usi ng-visual-programmer#expression 54
Your Task: Making and Saving a Sequence Practice Task 3 Using a Sensor Our sequence will use a light sensor to cause the servo to rotate while a light goes on and off when the sensor is covered to make it dark 1. Insert the light sensor into port 1 using the terminal tool, by putting the ello i e i the s te i al, the ed i e i the +, a d the la k i e i the 2. Select the e ue e Builde 3. Drag the sensor block f o canvas ta at the top ta the otto a a d li k o Ne ight u de st u tu es i to the 4. Select light se so f o the d op do block and choose sensor port #1 e u o the top of the se so Light Sensor 55
Practice Task 3 Using a Sensor (cont.) 5. Select and drag the se ue e rotating blinking light i to the left column of the se so lo k elo the o d da ke 6. Select and drag the expression Tri-Color1off servo1off into the right column of the sensor block 7. Select the arrow under the right column in the sensor block to turn it into a loop 8. Slide the blue square in the sensor block toward the da ke side until it is in the center of the green space 56
Practice Task 3 Using a Sensor (cont.) 9. Select the a o e t to the pla button in the upper right hand corner of the screen to change it into a loop 10. Select pla 11. Cover the light sensor with your hand to activate the sequence so the light comes on and the servo rotates; move your hand away to stop the sequence 12. Select the a e utto a d a e as: light sensor rotating blinking light (This se ue e should appea u de e ue es o the ight side of the screen.) 57