300 likes | 409 Vues
HIGH COUNTRY ROBOTICS. Robotics Projects for LEGO NXT and TETRIX. Edited by Brad Johnson Kimberly Marland Eric Marland Tom Brown. HIGH COUNTRY ROBOTICS. Introduction. TOC. T2a. Type of sensor(s) used or lesson type. Difficulty.
E N D
HIGH COUNTRY ROBOTICS Robotics Projects for LEGO NXT and TETRIX Edited by Brad Johnson Kimberly Marland Eric Marland Tom Brown
HIGH COUNTRY ROBOTICS Introduction TOC T2a Type of sensor(s) used or lesson type Difficulty Each project or lesson plan is labeled according to the scheme at the right. Beginning students should begin with single sensor, difficulty “1” projects and then work their way up. Each project has a basic outline filled in – how much you provide for your students is up to you. A blank project page is included at the end of this file for you copy for your students or to create your own project. Please share any that you find particularly useful. Enumeration Sensor / Lesson Key T – touch S – sound L – light M – motor / rotation U – ultrasonic E – engineering / physics principles O - other
HIGH COUNTRY ROBOTICS Table of Contents TOC Projects M1a – Curveball. M1b – Boomerang. M1c – Slinking. M2a – Parking. M2b – Driver’s Ed. M3a – Slalom M4a – Dash T1a – Touch and go. T1b – Kiss and run. T1c – Wait for it … T2a – Too steep. T2b – Search Pattern. T2c – Getting stuck. L1a – Don’t jump! L2a – And counting … L2b – Light maze. L2c – Follow the trail. L5a – Telephone. S1a – Red light, green light. S1b – Talk louder. S2a – Drill field. S4a – Robot whisperer. S5a – Get funky. U1a – Stay back! U1b – Navigation. U2a – Molecule too. U2b – Stuck in traffic. U4a – Claustrophobia. U4b – Follow the leader. E1a – Mechanical advantage E1b – Light and sound E1c – Human Programming E1d – Pillar of strength E1e – Magnetic personality US4 – Trombone (Theremin) TS4 – Trumpet. UM4 – Soccer. OM4 – Infrared Hockey. UML5 – Parallel parking. UM5 – Egg race. Blank Forms
HIGH COUNTRY ROBOTICS NAME: DATE: PROJECT: PVC Maze Challenge (Part I) OBJECTIVE: Solve a maze using only NXT touch sensors. T DESCRIPTION OF TASK: Program the robot to solve a maze by only using the touch sensors. One approach to solving this problem may be to follow along the right side of the wall (or left side) until you finish the maze. The maze will be created using PVC piping (or you could just use books, etc.) ROBOT DESIGN / SPECIAL FEATURES: This project uses the base robot with one touch sensors attached to the front of the robot and one touch sensor attached to the side of the robot. The sensors will be adjusted so that they touch the wall. MAP OF TASK:
OBSERVATIONS AND QUESTIONS: • Outline how your program was able to find the first wall. • Were you able to solve the maze? • How were you able to overcome being trapped in a corner? • 4. Describe other difficulties with this project. How were you able to overcome these difficulties? • 5. Name one real world application where this project could be used.
HIGH COUNTRY ROBOTICS NAME: DATE: PROJECT: PVC Maze Challenge (Part II) OBJECTIVE: Solve a maze using NXT touch sensors and color sensor. T,L DESCRIPTION OF TASK: Program the robot to solve a maze by using the touch sensors and the color sensor. The program is the same as before, except the robot uses colors as hints. Detecting red tells the robot to not travel down that path. Blue color means that the robot had finished the task and should stop moving. The robot is not allowed to use the yellow colors just yet (yellow is saved for the next exercise). The colored lines can be created using colored tape. ROBOT DESIGN / SPECIAL FEATURES: This project uses the base robot with one touch sensors attached to the front of the robot and one touch sensor attached to the side of the robot. The sensors will be adjusted so that they touch the wall. The robot also uses a color sensor that should be placed near the front of the robot pointed towards the ground. MAP OF TASK:
OBSERVATIONS AND QUESTIONS: • Did you find the red tape being an advantage to solving the task? • How did the robot know when it had solved the maze? • In the previous exercise, would the robot know if it had solved the maze? • Give one example of how colors could be used on a transportation system (maybe a train system) to perform some task. • Give a reason why colors would probably not be the best solution for a transportation system to perform a task (for example: Buses use radio frequency identification to determine where in the route the bus is, but hey don’t use colors).
HIGH COUNTRY ROBOTICS NAME: DATE: PROJECT: PVC Maze Challenge (Part III) OBJECTIVE: Solve a maze using NXT touch sensors and color sensor. T,L DESCRIPTION OF TASK: Program the robot to solve a maze as fast as possible by using the touch sensors and/or the color sensor. The robot is allowed to use any of the colors as hints and can also use touch sensors to detect walls. ROBOT DESIGN / SPECIAL FEATURES: This project uses the base robot with one touch sensors attached to the front of the robot and one touch sensor attached to the side of the robot. The sensors will be adjusted so that they touch the wall. The robot also uses a color sensor that should be placed near the front of the robot pointed towards the ground. MAP OF TASK:
OBSERVATIONS AND QUESTIONS: • What is the best method to use to solve the maze in the fastest time possible? • Were you able to solve the maze? If so, then how long did it take to solve the maze. • How could an automobile use a yellow line sensor on a highway? • How could you change the angles on the yellow line to make it easier for the robot to follow (the angles are currently at 90 degrees)?
HIGH COUNTRY ROBOTICS NAME: DATE: PROJECT: Classic Bull in the Ring OBJECTIVE: Push off all of the cups that are inside of a black circle U,L DESCRIPTION OF TASK: The robot should start outside of the black circle. It should then drive into the circle and push out any cups that are on top of the circle. The red circles represent plastic cups. ROBOT DESIGN / SPECIAL FEATURES: This project uses the base robot with ultrasonic sensor pointed forward attached to the top of the robot and a light sensor attached on the front of the robot pointing towards the ground. MAP OF TASK:
OBSERVATIONS AND QUESTIONS: • What percentage of cups were you able to push out of the circle? If you were able to push out all of the cups, then how long did it take to do so? • Describe your biggest challenge with this exercise and the steps you took to overcome this challenge. • How did the robot detect the cups? • Compare and contrast how does this exercise relates to a Roomba vacuum cleaning robot?
HIGH COUNTRY ROBOTICS NAME: DATE: PROJECT: Create a Jingle (Mary Had a Little Lamb) OBJECTIVE: Create a jingle by playing a tone every time a robot drives over different colored pieces of tape. U,L DESCRIPTION OF TASK: The robot should drive forward over a pattern of colored tape. There needs to be a gap in the tape between each note. Each color of tape represents a different note. The gaps (probably white) should not play a sound. ROBOT DESIGN / SPECIAL FEATURES: This project uses a color sensor attached on the front of the robot pointing towards the ground. MAP OF TASK:
OBSERVATIONS AND QUESTIONS: • Why is it important to have gaps in the tape? • The following are the musical notes for Mary Had a Little Lamb. Compare the dots (solid or hollow) with the length of the tape on the previous page. What can you conclude about a hollow dot compared with a solid dot? • What is the easiest way to slow or speed up your song with your robot? • Using red, blue, yellow, and green markers . . . Draw a diagram of the next line of the song. Note: a hollow dot without a vertical line attached is 4 times longer than a single note. • From the notes above, some of the dots are on horizontal lines and some are in between. What can you conclude about the vertical placement of the dots?
HIGH COUNTRY ROBOTICS NAME: DATE: PROJECT: Read a Bar Code OBJECTIVE: Have a robot drive over a series of pieces of tape and convert the color to a binary number. L DESCRIPTION OF TASK: Binary numbers are solely used in just about every computer. Binary numbers are just 0’s and 1’s. For example, the binary number 1001 represents the number 9. This makes computing much easier to deal with since computers use voltages . A 1 represents +5V and a 0 represents 0V. In this exercise, you will have a robot drive over a series of pieces of tapes and convert the tape into a binary number. After the robot is finished, display that number on the NXT’s screen. From the diagram below, you should have the robot display 1011100101 on the screen. (Hint: Read the light sensor at consistent time intervals). ROBOT DESIGN / SPECIAL FEATURES: This project uses the base robot with a light sensor attached on the front of the robot pointing towards the ground. MAP OF TASK: PROGRAMMING FLOW CHART:
OBSERVATIONS AND QUESTIONS: • What was the most unexpected challenge faced with this task? And how did you overcome this task? • If you have one piece of tape, you can have two numbers: 0, 1. If you have two pieces of tape, then you can have four numbers: 00, 01, 10, 11. If you have 3 pieces of tape, then you can have eight numbers: 000, 001, 010, 011, 100, 101, 110, 111. How many numbers can you have with four pieces of tape? List them below. • How many numbers can you have with 5 pieces of tape? 6 pieces of tape? 7 pieces of tape? • Suppose you have a grocery store with 100 items. How many stripes must you have on a bar code so that each item has a unique bar code? • A serial communication device (ex: USB) transmits voltages at certain rates (known as a baud rate). In the diagram below, you can see how the number 010000010 is transmitted. By transmitting at a rate, you can communicate any numbers with just 2 wires (signal and ground)! How does serial communication relate to the exercise you just did?
HIGH COUNTRY ROBOTICS NAME: DATE: PROJECT: Classic NXT Black Line Maze OBJECTIVE: Solve a maze by staying on the black line. L DESCRIPTION OF TASK: This is the classic NXT black line maze used often because of its ease to make (don’t have to build walls). Use the light sensor to only stay on black lines. Solve the maze without leaving the black lines. Designate where the start and finish are on the maze drawing. You can modify these positions later. ROBOT DESIGN / SPECIAL FEATURES: This project uses the base robot with a light sensor attached on the front of the robot pointing towards the ground. MAP OF TASK: PROGRAMMING FLOW CHART:
OBSERVATIONS AND QUESTIONS: • What was the biggest challenges with this exercise and how did you overcome these challenges? • Were you able to solve the maze and if so, then how long did it take? • How does this exercise compare with a mail man’s daily route?
HIGH COUNTRY ROBOTICS NAME: DATE: PROJECT: Bull’s Eye OBJECTIVE: To drive a robot onto a target and land on the bull’s eye. L DESCRIPTION OF TASK: The robot will start outside of the target and drive until it reaches the bull’s eye. Each ring of the target can be a different color or a more challenging problem would be for the rings to only consist of 2 colors. ROBOT DESIGN / SPECIAL FEATURES: This project uses the base robot with a light sensor attached on the front of the robot pointing towards the ground. MAP OF TASK: PROGRAMMING FLOW CHART: Yes No No Yes No Yes Drive Forward Black? Black? Turn Left Red? Drive Forward Repeat for other colors
OBSERVATIONS AND QUESTIONS: • What was the biggest challenges with this exercise and how did you overcome these challenges? • Finish the flow chart for the red, yellow, green, and blue stripes below.
HIGH COUNTRY ROBOTICS NAME: DATE: PROJECT: Edge Detector Design OBJECTIVE: Design an arm that detects an edge on a table. T DESCRIPTION OF TASK: This is more of a design challenge than a programming challenge. The idea is to design edge detectors so that your robot can be driving on a table top and can sense where the edge of the table is. Use touch sensors to do achieve this. ROBOT DESIGN / SPECIAL FEATURES: This project uses the base robot with an arm that has a touch sensor. The touch sensor is normally pressed in by the ground surface and is released when the arm goes over a table edge. MAP OF TASK: PROGRAMMING FLOW CHART:
HIGH COUNTRY ROBOTICS NAME: DATE: LESSON: State Machines (Flow Charts) State machines are flow charts for programmers that are used to help organize thoughts and problem solving. They help a programmer think about a problem in a systematic way, much like the way a computer thinks. Every time I have a programming project, I jot down my ideas in a flow chart to help me later on with the programming. After I finish the flow chart, the programming is just a matter of syntax because all the problem solving has been done already. This prevents me from getting confused when I jump into the details. In state machines (flow charts for programmers), there are typically three shapes: boxes, diamonds, and ovals. Boxes: Items written inside a box represent an output (such as a motor, a sound, display, etc.). Diamonds: Items written inside a diamond are inputs (such as a sensor or a button to be pressed). Often, diamonds are called “decision diamonds.” This is because depending on the input, the flow chart could take different paths. Ovals: Items written inside an oval are conditional outputs. Conditional outputs are outputs that happen depending on some input. For example, if we were designing a soda vending machine, then we would have different outputs (soda) depending on the button the user presses. Anything that comes after a box (including the box) is considered a state. Anything that is in a state happens simultaneously. All state machines have boxes, but they don’t necessarily have diamonds or ovals. Let’s design a washing machine. Some states that we may have are (1) Wait for Start Button (2) Fill Washer (3) Agitate (4) Empty Washer (5) Rinse (6) Spin. We will just design the first 3 states to get an idea of how a state machine works.
HIGH COUNTRY ROBOTICS NAME: DATE: LESSON: DC Motor Electrical current is when electrical charge flows through a wire. When a current flows through a wire, a magnetic field forms rings around the wire. If you place a compass on top of a wire without electrical current flow, then the compass will point towards magnetic north. Then if you allow the electrical current to flow, the compass needle will suddenly move (as long as the compass is close enough to the wire and there’s enough current to produce a strong magnetic field). If you take a wire and form loops with it so that it forms a coil, then you have multiple magnetic fields adding together to form a really strong magnetic field. This coil is referred to as a solenoid and is the heart behind making motors, switches, relays, transformers, electromagnets, and many other things. To create a DC motor, we will need to make a solenoid.
HIGH COUNTRY ROBOTICS NAME: DATE: LESSON: DC Motor To create a DC motor, we will need to make a solenoid. The wire used to make the solenoid coil should be magnet wire which can be purchased at Radio Shack and other places. We will also need a permanent magnet (the stronger the better) and some paper clips and a battery. We will need to scrape off the enamel that is on the magnet wire so that we can make a good contact between the paper clip and the coil. When the battery is connected allowing electrical current to flow, the coil (solenoid) will create an electromagnet that will either be attracted (or repelled – doesn’t really matter) by the permanent magnet causing the coil to spin. The inertia of the coil wants to keep the coil spinning so it will actually spin past the attraction and eventually it spins to the point where it is repelled. This cycle of attraction – repulsion – attraction – repulsion will continue as long as current continues through the coil. Hence, we have a DC motor! We converted electrical energy to mechanical spinning.