report

Science Fair Projects Using Lego Mindstorms: Bomb Detecting Robot

Lego NTX Science Fair Project

If you have a Lego Mindstorms NXT Robot or have participated in Lego League, you might want to consider using that robot for a science fair project. Below is an example of two years of science fair projects that my son did in 7th and 8th grade. He won at the local level both years, and also placed 2nd at State one year.

You are welcome to use the plans below to develop your own research project. The format of the graphs he used are given, but you will need to do your own building, programming and testing.

Lego Robot Bomb Detector

Lego Mindstorms NXT
Lego Mindstorms NXT | Source

Lego NXT Science Fair Project Abstract

Guided robots are used by the military to find bombs. The purpose of my experiment was to create an unguided robot. Here is how my project was done:

  1. First, I wrote two computer programs: one used the robot’s touch sensor to allow it to locate a corner, turn and start the second program.
  2. The second program activated the light sensors and started the robot on an algorithm of continuous XY loop sweeps which allowed it to find the mirror “bomb.”
  3. Using 4 x 4 beams, I constructed three test maps: a box, a box with an obstacle, and two rooms separated by a wall.
  4. I made the robot out of 2 Lego Mindstorms NXT kits and a few extra Lego parts.
  5. I threw a disc behind my back into the map to randomly place the robot and bomb.
  6. Next, I started the robot and timed how long it took for the robot to complete its first program of finding a corner, and then how long it took to find the bomb.
  7. I also noted how many XY sweeps it required. I did ten trials in each box.

My results:

  1. We found that the robot found the “bomb” every time, and it took longer for every map, the time increasing as the difficulty did.
  2. The robot found the “bomb” mostly on the first X scan throughout the entire experiment, contrary to what I had predicted.
  3. The X/Y scan process was more efficient than I had expected.

Lego Science Project

Click thumbnail to view full-size
Lego robot using light sensor to find mirrors.Lego robot finding "bomb" mirrors.Lego Robot touch sensor.Lego Robot in room.Lego Robot in Room with ObstacleLego Robot in two rooms
Lego robot using light sensor to find mirrors.
Lego robot using light sensor to find mirrors. | Source
Lego robot finding "bomb" mirrors.
Lego robot finding "bomb" mirrors. | Source
Lego Robot touch sensor.
Lego Robot touch sensor. | Source
Lego Robot in room.
Lego Robot in room. | Source
Lego Robot in Room with Obstacle
Lego Robot in Room with Obstacle | Source
Lego Robot in two rooms
Lego Robot in two rooms | Source

Research Problem

What is the most efficient search strategy for an unguided robot to detect a bomb?

Hypothesis

Searches will take place over a ten-minute period. Success will be measured by both speed and percentage of successful searches. The right turning software search strategy will be both the fastest and the most efficient.

Materials

  1. Two Lego Mindstorms NXT kits
  2. Mindstorms NXT programming CD
  3. Computer to program on
  4. USB cable to transfer program
  5. Extra Lego pieces
  6. Maze (12’ x 12’) constructed of 4”x4” wooden beams. Within the 12’ x 12’ square, maze pattern is created with 1’ and 2’ long segments. Two mazes will be created using either right or random angles. No fasteners will be used; the weight of the 4x4s is enough to keep robot contained.
  7. “Bomb” target will be made of a flat LED flashing light and will be detected by the light sensors in order to simulate the search for a bomb using a bomb sensor.

Lego Mindstorms NXT

Procedure for NXT Lego Science Project

  1. Create boundary walls of maze with 4x4s
  2. Create maze pattern with small 4x4 pieces. Place sensor at (a) the center or (b) the edge of the maze.
  3. Place robot in middle of one side of the maze, facing the center of the maze. Start run.
  4. Measure time taken to locate target. If target still not located after 10 minutes, halt experiment and record as “undetected”.
  5. The robot will be wheeled, with have a CPU in the center, which will have the program downloaded onto it and will control all of the sensors and motors. A touch sensor will be pointed straight forward to detect walls.
  6. Four search strategies will be tested:
  • Right turn search strategy: The robot is programmed to move forward until it encounters a wall sensed by its touch sensor, then takes a 90 degree right turn.
  • Right turn/left turn search strategy: Same as previous, except robot alternates between right and left turns.
  • Double turn strategy: Same as previous, except turns right for two wall encounters, then left for two encounters and so on.
  • 135 degree turn strategy: At each wall encounter, robot turns 135 degrees right or left (alternating with each encounter).

7. Repeat steps 2-4 for each combination of parameters. Four replicates will be done for each set, with each replicate starting from one of the four sides of the maze.

  • Four replicates x 2 sensor positions in maze x 2 maze patterns = 16 runs per search pattern
  • Four search patterns x 16 runs = 64 runs total

Lego NXT Used in Real Science Research

Safety

I will not let the robots escape from the testing area. I will not use parts or programs from a stranger on the Internet or in real life. I will have an adult watching and helping with the preparation, testing, and clean-up.

Data Comparison for Lego NXT Science Project

  1. The number of successful target locations per 16 runs will be calculated for each search pattern. Significant differences between search patterns will be determined by statistical methods. This will determine the most efficient search pattern.
  2. The search times for each successful run will be analyzed to statistically compare search patterns. This will determine the fastest search pattern.

Data Table for Lego Mindstorms Science Fair Project

Map
Box
Obstacle
2 Rooms
Time trial 1
 
 
 
Time trial 2
 
 
 
Time trial 3
 
 
 
Time trial 4
 
 
 
Time trial 5
 
 
 
Time trial 6
 
 
 
Time trial 7
 
 
 
Time trial 8
 
 
 
Time trial 9
 
 
 
Time trial 10
 
 
 
Average:
 
 
 

Mindstorms Programing Algorithm

XY programing algorithm
XY programing algorithm | Source

Abstract Year 2: Can Robots Find Bombs Independently?

The robot, algorithm, and program from my Year 1 project, "Can Robots Find Bombs?" was not as independent as an actual bomb-finding robot should be. Its limitations were that robot had to be placed at a right angle and it had to be adjusted every once in a while.

The robot, program, and algorithm in this Year 2 project, "Can Robots Find Bombs Independently?" fixes both of those problems. The robot can be placed at any angle anywhere in all three maps, does not require adjusting, and is a lot faster. The changing-angle algorithm searches the open space quickly, then moves to the next area gradually. It is less predictable than the X-Y sweep algorithm, but is more efficient.

Lego Robot Cleaning Machine

NTX Lego Science Fair Project Year 2

Last year I made a project, Can Unguided Robots Find Bombs? which involved building and programming a robot that was capable of:

  • Navigating three simple maps made of 2x2 wood planks
  • Being able to do so after being placed randomly inside the map
  • Using light sensors to detect 3 1” mirrors in a triangle pattern placed randomly somewhere on the map

However, I had a few problems with last year’s robot.

  • The robot had to be set parallel to the wood planks, to ensure that the algorithm worked properly.
  • The robot occasionally got off track by a few centimeters, and I would have to adjust it to keep it from going off the planned path.

This year, I was able to fix those problems. The new robot and algorithm do not need to be set at a particular angle to the wall, so as well as randomly putting the robot in a spot, I was also able to randomly pick a direction for the robot to be facing. As well as that, I did not touch the robot during the testing, except for when I put down the robot and pressed the button to initiate the program.

Because of this, the robot would be a lot more practical in a real life situation than last year’s robot. Ideally a person would start the robot and let the robot run without having to watch or make changes to the robot’s trajectory, and my new robot makes that possible.

Robot Design Lego NXT Science Fair Year 2

The results are a lot more dependent on the design of the robot this year than they were last year. The robot last year was not designed to get itself unstuck because the program was designed to make that not happen. The new algorithm is simpler but can occasionally get the robot stuck in a corner, grinding against the wall without the touch sensor bumping the wall, etc.

Because of this a very good robot needed to be built that could get the robot out of a pickle. This year the robot has a frame around it to prevent the robot from getting its wheels stuck on the walls, and to make the robot parallel to the wall if the robot came to the wall at an angle loose enough that the touch sensor didn’t bump the wall.

As well as adding a frame, I added several toothed gears and rubber parts to the end of the touch sensor to get more traction and to help the robot get out of corners if it gets stuck.

Lego Mindstorms Robots

Procedure Year 2

  1. Get robot from previous experiment
  2. Redesign the old robot with a frame around the vertical NXT brick, motors on the back, two light sensors pointing downward, one multi-directional wheel in between the light sensors, one touch sensor pointing forward in front of the multi-directional wheel, and a platform in front of the NXT brick holding on the sensors and wheel.
  3. Make a program with a changing-angle algorithm. The robot will move until it detects a wall with the touch sensor, then it will turn to the right at a 90 degree angle. The angle will continue to change until it reaches a 180 degree angle, then the robot will start over at 90 degrees.
  4. Test the new algorithm with the redesigned robot in the same three robots from Can Unguided Robots Find Bombs? and record results in time that the robot takes to find the bomb and whether the robot needed any human interference.

Program Design Lego NXT Science Fair Project Year 2

My algorithm for this year (changing-angles) is a lot different than my algorithm from last year (X-Y sweep). X-Y sweep depended on the robot always making the turns exactly right and being totally exact. I realized that attempting that, for my purposes and with the robot and software I am using, would be too difficult to perfect. So changing-angles is both simpler and less dependent upon perfect turns and exact angles.

More by this Author


Comments 6 comments

VirginiaLynne profile image

VirginiaLynne 7 months ago from United States Author

Hi Mike--we don't have the code anymore but it wasn't too complicated. You can probably figure it out by looking at the diagrams.


Mike R 7 months ago

Virginia,

Would you happen to have the code for the robot that you could share ? I'm working on a project with my son and would like to figure out how to get the robot to be unguided.


Mike R 7 months ago

Virginia would you happen to have the program(code) for the robot. I would like to see if I can recreate the code you and your son originally put together.


VirginiaLynne profile image

VirginiaLynne 2 years ago from United States Author

Brandon--try looking up these keywords: "bomb detector," "engineering," "robotics." You could also look up "How Bomb Detectors Work" and "Weapons engineers"


Brandon Akinseye 2 years ago

I am doing a science fair project for the lego nxt bomb detector.

For the bibliography I need 5 websites and I have 4 so far and I need some more information like the engineering question


ExpectGreatThings profile image

ExpectGreatThings 3 years ago from Illinois

As the parent of a newborn, 5 and 3 year old, I can't wait to be able to do stimulating and challenging projects like this! Well done! - Ginger

    Sign in or sign up and post using a HubPages Network account.

    0 of 8192 characters used
    Post Comment

    No HTML is allowed in comments, but URLs will be hyperlinked. Comments are not for promoting your articles or other sites.


    Click to Rate This Article