Robotics Discovery I

roboarm

From February 1st to April 30th 2007, I took an online course with Northwestern University titled Winter Robotics Discovery I. The teacher, Carole Burns posted the assignments on the website. The students could post messages and attachments about their robot on individual boards. I used the NXT Lego Mindstorms kit, a camera, my Toshiba PC computer, and the Lego Mindstorms software. My Microsoft Window XP has a Intel Celereon processor and 1.60 GHz, 896 MB of RAM.

The first assignment for this course was to build the “Tribot” without any sensors. I submitted the picture of the Tribot on the “Assignment 1” discussion board. I took a digital photo with my Kodak EasyShare digital camera and uploaded it to my computer via a cable. I do not have blue tooth software.

The instructor posted many videos about the basics of the course. The videos showed how to program the robot to move forward and backward, turn, and numerous other things. I watched the videos but I already knew most of the concepts they demonstrated because I had received the Lego Mindstorms kit in December and tried it out to make sure I was ready for the course. My mother and I needed to upload more RAM on my computer so I would have enough to install the software.

The second assignment included two sets of videos and worksheets. The videos were about turning and going forward. I watched the videos and completed the worksheets. I sent them to Carole by e-mail.

In the third assignment, I was asked to make three programs. First I wrote a program telling the robot to move forward two feet and turn right. The second program commanded the robot to move in a 4’ by 4’ square. The third program told the robot to move in an S-shape around three cups and back to the starting point. The cups were placed 1.5 feet apart. I submitted the three programs and a picture of the robot moving in an S-shape around the cups. I was also required to attach a claw, hand, or grabber to the robot. I would program the robot to move two feet forward and turn right. The robot would then knock a cup over from the top of another cup. I made and attached an arm with a claw at the end of it onto the Tribot. I took two pictures of the robot and posted them in the discussion board.

In the third assignment, I was asked to make three programs. First I wrote a program telling the robot to move forward two feet and turn right. The second program commanded the robot to move in a 4’ by 4’ square. The third program told the robot to move in an S-shape around three cups and back to the starting point. The cups were placed 1.5 feet apart. I submitted the three programs and a picture of the robot moving in an S-shape around the cups. I was also required to attach a claw, hand, or grabber to the robot. I would program the robot to move two feet forward and turn right. The robot would then knock a cup over from the top of another cup. I made and attached an arm with a claw at the end of it onto the Tribot. I took two pictures of the robot and posted them in the discussion board.

The next assignment focused on gears and gear ratios. The videos explained how attaching a large gear to the motor and a small gear to the wheel would make the robot move faster. This gear setup would not give the wheels much strength to push something heavy, such as a stack of books. If a small gear was attached to the motor and a large gear to the wheel, the robot would have strength to push things. I answered the questions on the worksheet and sent them to Carole through email.

After this, Carole posted an assignment about sensors. I watched the videos for the sound sensor and answered the questions. They described how you can program the robot to move forward when you clap and stop when you clap again. I sent in my answers by email. The next set of videos focused on the Touch and Ultrasonic sensors. They explored the benefits and drawbacks of both sensors. I also sent in the worksheet for that section. In the next section, I programmed the robot to use the Light sensor to follow the right side of a black line. I thought the Light sensor was very interesting. Again, I sent in the answers to the worksheets through email to Carole. In the final section, I mapped the Ultrasonic sensor’s detection range and sent in my answers for the worksheets.

For the final assignment, I was asked to program the robot so that it would climb up a three-inch binder and stop at the peak. I measured the light value for the white color of the binder, then the light value for the brown color of the floor. Then, I programmed the robot to stop when the Light sensor sensed the floor. So, the robot stopped at the peak of the binder.

My favorite assignment was programming the robot to follow a line using the Light sensor. My second favorite was programming the robot to stop at the peak of the binder. I really liked this course and I hope I can take the second part, Summer Robotics Discovery II, this summer. The next course will use the same kit but it will involve more programming.

A picture of the Tribot before I added the sensors

robogirl

My answers for the “Turning” Worksheet:

Motor C spun and the robot turned to the right.
Motor C.
Motor C spun forward and Motor B did not spin.
Right.
It spun half a full turn.
The bot swings around Motor B.
1: Makes motor C go forward. 2: Makes Motor B stay still. 3: Makes Motor C go forward for 720 degrees. 4. Makes Motor C stop. 5. Makes Motor B stop.
i. You can’t tell which direction the robot turned to get to position B from position A. It could have turned left or right. ii. ¾ of a full turn. iii. ¼ of a full turn.
i. If the wheels are very small, they may have trouble turning under the robot’s weight. ii. If the surface is very rough (e.g. carpet), friction will interfere with the robot’s ability to turn swiftly.
i. Yes.
The first two motor blocks, and the Wait For block are different.
Yes

My answers for the “Forward” worksheet:
When I ran the program, the left motor spun and the robot moved in place, turning right.
The left motor spun.
Motor C spun forward.
Yes.
No.
The second motor command is needed to make the robot go forward.
The robot was not given a command to stop.
When you download a program, you transfer the program from the computer to the robot. When you run a program, you tell the robot to carry out the commands. When you are done with program and have plugged in the NXT robot, you need to download the program. After it is downloaded, you need to find the program on the NXT and run it.
(b.)
The first block tells motor C to move. The second tells motor B to move. The Wait For block tells motors C and B how long they should move. The fourth block tells motor C to stop, and the final block tells motor B to stop.
i. The “Wait For” block controlled how far the robot went before stopping. ii. To make the go a shorter distance, you could decrease the amount of degrees for the “Wait For” block. Longer distance: increase the amount of degrees.
You would need to replace everything with port B selected with A: the second motor block; the last stop block would need to be port A.
This program makes the robot run forward two rotations.
This makes the robot run for two rotations (720 degrees).
The motor (not the stop) blocks and the Wait for block are different.
The robot instead went forward, stopped, and then went backward too far and didn’t stop at the starting point.
The rotation sensor needed to be reset so the robot would start waiting from where it ended after going forward, not from where it originally started.
You will need to reset it when you go in different directions within one program.

The Tribot turning in a S-shape around three cups

s-shape

The Tribot with the claw attached to it

close-up

The robot knocks over the cup

knocked cups

My answers for the “Gears” worksheet:

Yes.

As the motors turn faster, they cause the wheels to turn faster, which cause the robot to move faster.

I think the robot will go faster. For the same number of motor rotations, there would be almost twice as many wheel rotations, so the robot would go faster.

Before I changed the gears, I measured how far the robot went with the same size gears. Then I changed the gears and measured how far the robot went with the different gears-it moved farther!

This time, the robot went slower than all the other tries.

#1: Increase the power of the motors.
#2: Switch the gears so that the large gear is on the motor and the small gear is on the wheel.

#1: Decrease the power of the motors.
#2: Switch the gears so that the small gear is on the motor and the large gear is on the wheel.

You need to put the larger gear on the motor.

i. The robot would go the same speed because the gears are the same size.
ii. The robot would go faster than the first one because every full turn the large gear turns the small one would turn more one than time around.
iii. If the gear on the motor is smaller than the one on the wheel, the robot will go slower because for each spin the gear on the motor makes, the gear on the wheel will go less than one spin. If the gear on the motor is larger than the one on the wheel, the robot will go faster because for each spin the gear on the motor makes, the gear on the wheel will go more than one spin. If the gears are the same size the robot will go at the same speed as it would with 16-tooth gears.
iv. If the gears are the same size, they will make the robot go the same speed as it would with 16-tooth gears. If the gear on the motor is larger than the one on the wheel, the robot will go faster. If the gear on the motor is smaller the one on the wheel, the robot will go slower.

10. i. Since the motor gear made the wheel gear go more than one rotation for each one of the motors rotations, the robot went farther than the first robot.
ii. Since the motor gear made the wheel gear go less than one rotation for each one of the motors rotations, the robot went didn’t go as far as the first and second robots.
iii. This will not work because if the motor gears and wheel gears are different, the wheel gears will change how far the robot goes.

i. A large gear on the motor and a small one on the wheel made the robot go the fastest.
ii. A small gear on the motor and a large one on the wheel enabled the robot to push the most books.
iii. I would use a small gear on the motor and a large one on the wheel for a bulldozer.
iv. I would use a large gear on the motor and a small one on the wheel for a race car.

When pulling a trailer, a truck would need to have a small gear on the motor and a large gear on the wheel for moving heavy loads. When not pulling a trailer, it would need to have a large gear on the motor and a large gear on the wheel for going fast.

My answers for the “Sound” worksheet:

The sound value for “quiet” is 4.
The sound value for “loud” is 96.
The threshold is 50.
The first block tells the motors to wait until a loud noise. The second block tells the motors to wait until silence. Then, the third and fourth blocks tell motors C and B to start moving. The fifth block tells the motors to wait until a loud noise. The sixth block tells the motors to wait until silence, and the final two blocks tell motors C and B to stop.
i. The two blocks are Wait for Sound blocks.
ii. If the sound waves from your clap are still traveling to the sensor, the sensor perceives your single clap as two sounds and the motors do not spin or otherwise spin very little. After you clap, there is silence and relative quiet before you make another sound. So, the block needs to wait for sound below the threshold, making sure you are done clapping, before it commands the motors to move.
The threshold is the point between loud sound and quiet. On the Wait for block, it can be set to Wait for sound greater or lower than the “threshold.” If you set the threshold higher, it would take a louder sound to make the sensor Wait for sound greater than the threshold. If you set the threshold lower, it would take a softer sound to make the sensor Wait for sound lower than the threshold.
Clapping is a loud sound and silence is a soft sound; therefore the threshold is in between clapping and silence.
To the robot, a loud sound is loud, and a quiet sound is quiet. The NXT can’t tell the difference between a loud clap and someone talking at the same volume as the clap.
i. Marisa should start running the program shortly before the door slams. She should set the threshold value for a rather high value, so the robot doesn’t start running if someone coughs or something similar.
ii. There is the possibility that an accidental noise as loud as a door slamming could be made, falsely cueing the robot.
The staff should program the robot to wait for a very loud noise using the Wait For blocks. They should then place the robot near the light switch and program it to lower an arm down so the lights go off once it hears a very loud noise.
The program kept running. When I made a loud sound, the robot started. When I made another loud sound, the robot stopped. I could repeat the procedure without having to press the “Run” button again.
The loop will run forever.
These are the answers for the “Touch” worksheet:

The robot went forward, and then stopped when it ran into the wall.
The touch sensor on the robot was pressed, causing the robot to stop.
I don’t think it’s a good idea because the object or the robot could break or tip over by bumping into each other.
If the object the robot ran into was fragile, the object could break or tip over. However, it is a good idea for the robot to stop after bumping into something instead of it continuing to push and further damaging itself or the object.
The robot went forward and stopped before it reached the wall.
The ultrasonic sensor sensed the wall and told the robot to stop.
The robot stopped five and one-half centimeters away from the way.
If the object were fragile, the robot would not damage it. One drawback is that the robot can’t sense exactly where the object is.
The ultrasonic sensor is much more reliable than the touch sensor because it stops the robot from bumping into objects.
i. The main difference is the Wait For block; in the first program it is set to the Touch Sensor and in the second it is set to the Ultrasonic sensor.
ii. In the first program, the robot bumps into an object, then stops. In the second, the robot senses an object, and then stops before bumping into it.
The benefit is that the robot will not crash into the object. A drawback is that the robot can’t sense exactly where the object is.
i. The Touch Sensor does not have a threshold, whereas the Ultrasonic sensor has a large threshold.
ii. The Ultrasonic sensor will sense an object to less than/greater than a certain number of inches/centimeters-however you set the threshold.
i. #1. The touch sensor can detect exactly where the objects are.
#2. Since the touch sensor can detect exactly where objects are, it can tell the robot to pick them up or manipulate them.
#3. It could not
ii. A robot that could play games with a ball could use a touch sensor.
My answers for the “Faster Line Following” worksheet:

The robot is looking for light and dark.
The robot should go right because the right edge, the way to the dark, is to the right.
The robot should go left because the left edge, the way to the light, is to the left.
The threshold value is 50.
i. Dark
ii. Light
iii. Light
iv. Dark
i. Filled(light)
ii. Empty(dark)
iii. Empty(dark)
iv. Empty(dark)
i. The robot will go to the left.
ii. The robot will go to the left.
iii. The robot will go to the right.
iv. The robot will go to the left.
The first motor block on the top section of the Switch block is set to make motor C turn forward. The second motor block on the top section of the Witch block is set to make motor B stay stationary.
Because she found the threshold value in the afternoon sunlight, the threshold value is not correct for the morning. The light from the sun the not the same in the afternoon as it is in the morning. This affects the “threshold”. Mele should take the threshold value for the morning and the afternoon and average them together. The number she gets should be the average threshold value for her Ultrasonic sensor.
i. Yes.
ii. Instead of following the left edge of the line, the robot would follow the right edge.
i. No.
ii. The program would still work.
iii. If you place the Light sensor in the back of your robot, the program would still work.
This program tells the robot to go left when it sees light, and right when it sees dark, causing the robot to follow the right side of the line instead of the left.
If there was an intersection of lines, and you wanted the robot follow the right line, the robot would be able to take the right path.

My answers for the “Obstacle Field” worksheet:

i. The marks make an upside-down figure eight.
ii. It represents the area the Ultrasonic sensor can detect.
i. The maximum distance is about 75 centimeters.
ii. The can was in a straight line from the sensor.
i. It is wider.
ii. If the can was past the “right side” ten cm mark, the Ultrasonic sensor wouldn’t be able to detect it and prevent a collision.
The actual distance between two horizontal lines is 2 cm.
10 cm is represented by the gap between every two lines.
The ratio is 1:5.
i. The scale model shows the same pattern the real model does.
ii. The scale model is not exactly the same as the full size model.
iii. Yes.
i. It means that every one centimeter on the grid represents five centimeters on the full size scale.
ii. They should be 4.4 centimeters apart.
iii. They should have been 11.5 centimeters apart on the full-size scale.
i. The object was located at the 75 centimeter marking on the graph sheet.
ii. 15 cm.
iii. The object should be 75 cm away from the sensor.
iv. The maximum distance is 75 cm. The object must be straight ahead.
i. The arc of the sensor’s detecting range gets wider and larger.
ii. It seems to occur when the object is 30 cm away from the sensor.
iii. The sensor needs different modes of operation so that it can sense things in a large range and in a small range.
The waves must travel within an upside-down figure eight shape.
#1. Place a long strip of tape down a space about a meter by 1.5 meters.
#2. Navigate to: View Mode-Ultrasonic cm-Port 4 on the NXT. Place a can at the end of the tape so that the NXT display shows ?????? and slowly move it closer until the NXT display shows a steady reading for the can. Take your hand away so you’re sure the NXT display is reading the can and not your hand.
#3. When you reach a distance that gets a steady reading, take the can away and place a piece of tape where the can was.
#4. Draw a mark on the “centerline” every 10 cm starting at the sensor and ending where the piece of tape (for the can) is.
#5. Place the can on the 10 cm mark you made on the centerline. Move it to the far right of the line until the NXT display shows ??????, making sure to keep the can aligned with the mark. Slowly move the can closer to the 10 cm mark until the NXT displays a steady reading for the distance of the can. Mark the location of the can by placing another piece of tape where the can ends up.
#6. Repeat the procedure on the left side of the 10 cm mark. Then go up the centerline and repeat it on the sides of all the marks, until you reach the piece of tape that marks the can.
#7. Print out a copy of the Graph Sheet. Find out the ratio of the distance between two neighboring lines on the paper and two marks on the “real” centerline.
#8. Measure the distance from the sensor to the piece of tape that marks the placement of the can. On the Graph Sheet, graph the corresponding point, using the ratio you found.
#9. Graph all the pieces of tape on the full-size model onto the Graph Sheet.
i. The maximum range of her sensor is 53 cm straight.
ii. The widest part of her detection area is 31 cm wide and about 40 cm away from the sensor.
i. The ratio is 2:25.
ii. The maximum range of the sensor is about 170 cm straight.
iii. The widest part of the detection area is 112.5 cm wide and about 75 cm away from the sensor.
iv. It doesn’t seem to exhibit mode-switching behavior.
i. The longest distance was 75 cm.
ii. Traveling to the object, the sound wave took about 0.002 seconds.
iii. Traveling back to the sensor, the sound wave took about 0.002 seconds
iv. The sound wave took about 0.004 seconds total.
v. The total travel time would be about 0.0045 seconds total.
vi. The sensor is very sensitive.

A picture of the robot I used to climb the binder

binder-climber


Bad Behavior has blocked 17 access attempts in the last 7 days.