Image of Atom

Light-Sensing Robot Science Fair Project

Create efficiency with light-sensing robot science fair projects.
menu

Advanced

Super Science Fair Projects :: Physics Science Fair Projects :: Robotics

Do Computer Software Instructions Really Make a Difference?

image of detective

 

 

 

 

 

Light Sensors

Robot science fair projects are a lot of fun for students. However, it is important to keep in mind that if you are working with or experimenting with sensors, whether they are light, motion or sound, that you will need to isolate the component during your experiment. This may mean that you have to build a sound proof test booth.

PURPOSE

The purpose of this experiment was to determine the most efficient software instruction set for a light-sensing robot to follow a visual path.

I became interested in this idea because when I’m older I would like to have a job with technology involved. So I thought that discovering a system that could affect manufacturers across the state would be a great first step toward my future.

The information gained from this experiment could allow manufacturers to have a better, more useful robot. If a robot has a malfunction it will most likely stop working, but if I can design a program that will allow a robot to handle malfunctions on its own, it could use my programming and handle itself.

 

Bioloid Beginner Programmable Robot ER-6 Programmable Robot OWI-535 Robotic Arm Edge OWI-007 Robotic Arm Kit Lego Mindstorms NXT 2.0
Image of Bioloid Beginner Programmable Robot Image of ER-6 Educational Programmable Robot image of OWI-535 Robotic Arm Edge Image of Robotics OWI007 Robotic Arm Kit image of Lego Mindstorms NXT 2.0  
Ages 12 and up Ages 10 and up Age 10 and up  Ages 10 and up    Ages 10 thru College

 

HYPOTHESIS

My first hypothesis was that specific programmed instructions could be varied to obtain a maximum speed and accuracy for the robot.

My second hypothesis was that specific programmed instructions optimized for one task would also give the maximum speed and accuracy on a second similar but different task.

I based my hypothesis on information about robots that explained the importance of the programmed instructions.

EXPERIMENT DESIGN

The constants in this study were:
• Robot components
• Stopwatch
• Design of robot
• Use of light sensor
• Basic program controlling robot
• Use of course 1 and 2

The manipulated variable was the error correction factors in the software instruction set.

The responding variable was the time it took for the robot to follow the intended route.

To measure the responding variable, I used a stopwatch for each trial to know how long it took for the robot to complete its task.

MATERIALS

QUANTITY ITEM DESCRIPTION
1 Stopwatch
1
Computer
1
“Mind Storms For School” Lego set
1
ROBOLAB 2.4.5 software for Windows
18"X24"
Tag board
1
Black Construction Paper
1
Scissors
1
Protractor

PROCEDURES

The following instructions assume two things. First the experimenter must be very well acquainted with using Lego’s, especially how gears work to power a small vehicle forward, backward, and in turns. Second, the software that controls the robot is “RoboLab 2.5.4.b” for a Windows PC. The experimenter must spend many hours becoming familiar with the basics of using this program. Since there is no true instruction manual for the software, one must go through a series of “Training Missions” to learn the basics for programming the robot. There are an enormous number of possible commands and programming options, and the training missions do not adequately lead you through more than 25%. So the next step is hours of trial and error effort to get to a point where a “formal experiment” can even be attempted.

1) Build basic robot using Lego “Mind storms for Schools” kit

a) Create compact vehicle powered with two electric motors each attached via direct gearing to its own drive wheel on an independent axle. There must be one more point of support, a tiny low-friction skid plate, to keep the vehicle upright and level.
b) Attach the RCX 1.0 computer module to the vehicle to act as its “brain”. Attach output A to the left motor and output C to the right motor. (Note these motors work in opposition.)

2) Create a basic program to make the robot do each of the following

a) Go straight forward for several seconds
b) Go straight backward for several seconds
c) Rotate clockwise
d) Rotate counter-clockwise.

3) Test vehicle and improve design and program as needed

a) Upload program to RCX using the USB controlled infra-red transmitter
b) Press “RUN” button on RCX to activate program
c) Observe and evaluate robot’s actions

4) Add light sensor to front of robot and connect to RCX input #1

5) Create a second basic program to make the robot do each of the following:
a) Read the input from the light sensor and display the lightness value
b) Stop or alter motion depending on a change in the light sensor reading

6) Create test course with black line on white paper

a) Create test course on white construction paper (18 X 24 inches). Draw basic course in pencil. Be sure to have a long straight-away, several “S” curves and several 90° zigzags.
b) Use black construction paper that is 3/4 inch wide to make continuous course following pencil line.
c) Glue down all of the pieces to your course.
d) Label one direction as Course 1 and the other as Course 2.
e) Place test course on a flat and level surface and tape down.

7) Create the test program using components from the basic programs above. It must have the following elements:

a) Activate both motors to move the robot forward in a straight line while constantly monitoring light sensor
b) If light sensor value is 43 or less (still tracking the black line) loop back to the beginning of the program and continue going forward
c) If light sensor value is 43 or greater (off-course, now on white instead of black), begin the first error correction routine:
i) Stop motors
ii) Add 3 to the temporary memory
iii) Rotate left and slightly back up using the following method (which will later be varied)
iv) Make left motor (A) reverse with a power setting of 5
v) Make the right motor (C) go slightly forward with a power setting of 3
vi) Do this for the exact amount of time indicated by the temporary memory (the first time it will be 3/100 second)
vii) Stop all motors
d) If light sensor value is 43 or less (back on the black line) loop back to the beginning of the program and start going forward
e) If light sensor value is 43 or greater (still off-course, rotating left didn’t work), begin the second error correction routine:
i) Add 3 more to the temporary memory
ii) Rotate right and slightly back up using the same power settings as in 6.c.iv-v above (only in opposite directions)
iii) Do this for the exact amount of time indicated by the temporary memory (the first time it will be 6/100 second) Note: the result of adding more time to the temporary memory causes the robot to rotate back to the beginning direction and continue on the same rotation to the opposite side.
iv) Stop all motors
f) If light sensor value is 43 or less (back on the black line) loop back to the beginning of the program and start going forward
g) If light sensor value is 43 or greater (still off-course, rotating right didn’t work either), try the first error correction routine again, only with a longer duration (which means a wider swing). Go back to 6.c.ii.

8) Upload program to RCX using the USB controlled infra-red transmitter

9) Conduct your first set of trials

a) Reset stopwatch.
b) Place robot on Course 1 start point.
c) Start stopwatch at the same time you press the “RUN” button on robot.
d) If something goes wrong while you are conducting a trial or robot gets stuck on a part of your course for longer than thirty seconds, define the trial as an “error.”
e) Stop both the watch and the robot when it ends the course.
f) Record time on data collection sheet.
g) Repeat steps 9 (a-f) for 10 trials.

10) Repeat step 9 using Course 2 (opposite direction)

11) Change motor power setting variables

a) Now change the program variables that control the motors:
i. First error correction routine should now make left motor (A) reverse with a power setting of 6 and make the right motor (C) go slightly forward with a power setting of 2.
ii. Second error correction routine should now make left motor (A) go slightly forward with a power setting of 2 and make the right motor (C) reverse with a power setting of 6.
12) Conduct second set of trials

a) Repeat steps 8-10 at the current settings.

13) Change motor power setting variables as in step 10 except use the values of 7 and 1

14) Conduct next set of trials as in step 11

15) Change correction routine duration variables

a) Repeat steps 7-13 except change temporary memory increment value to 5. First trial should start with motor power settings of 5 and 3 as in first trials. Note: the result of increasing the amount of time added to the temporary memory causes the robot to rotate back and forth through larger swings.
b) Repeat step 14.a. except change value to 7.

16) Analyze results.

RESULTS

The original purpose of this experiment was to determine the most efficient software instruction set for a light-sensing robot to follow a visual path.

The results of the experiment were that motor power settings of 6 and 2 had the best times overall. The error correction duration of 7 also provided the best times overall.

Another observation was that I could have predicted the outcome of any settings without so many trials. Five trials would have been more than enough. Also, the robot doesn’t run both courses equally, the robot scored a few seconds better on the second course.

CONCLUSION

My first hypothesis was that specific programmed instructions could be varied to obtain a maximum speed and accuracy for the robot.

The results indicate that my first hypothesis should be accepted, because the combination of power settings of 6,2 with an error correction duration increase of 7 gave the fastest times in both directions

My second hypothesis was that, specific programmed instructions optimized for one task would also give the maximum speed and accuracy on a second similar but different task.

The results indicate that my second hypothesis should also be accepted, because the same settings worked best on both tasks. I am uncomfortable with this statement because when the settings are slightly off the errors that result are much different for the two tasks. I think more research is needed on this hypothesis.

After thinking about the results of this experiment, I wonder how much changing the body style would affect performance. The distance of the light sensor in front of the axle would probably make a difference. Having two light sensors would also be a good thing to test. Most animals have two eyes so it is possible that it could be better for a robot as well.

If I were to conduct this project again I would have completed more trials and tested smaller variations of duration. Testing on longer and more difficult courses would be worth while. A more complex programming system could also result in less jerky movement of the robot and faster times. I would have tried to build a better body style. In addition I would have done something to stop the tires from slipping on the wheel rims.

3rd party contributor


Copyright © 2003 - 2010 Super Science Fair Projects - All Rights Reserved.




Science Fair Supplies, Kits, Projects & Ideas
power house experiments science kit  fun kids science fair projects  teacher science supplies  electricity experiments  astronomy for kids  earth science experiments  renewable energy education in the classroom  life science experiments  microbiology  biochemistry  medicine-health  engineering  chemistry biology  electronic scifair projects  dna extraction science fair projects  young scientists club science kit set  magnetometer high school science fair projects  energy science fair projects 

Science Fair Books & Software for Kids and Teachers
janice vancleave  shar levine science fair books 
best science projects books  science books for teachers

For Science Fair Report
graphics