IR SumoBot WX Opponent Detection and Tracking

What it's about

In a robot sumo match, your SumoBot WX needs a way to find, face, and charge at an opponent SumoBot.  Three common sensors that help a SumoBot detect an opponent at a distance are infrared, ultrasonic, and laser.  
Infrared (IR) sensors, like the ones in this activity set, shine IR light and detect reflections off nearby objects. 

Ultrasonic sensors like the Ping))) Ultrasonic Distance Sensor typically measure time of flight - the time it takes for a reflected ultrasonic chirp to return.  The microcontroller measures that return time and uses the speed of sound to calculate the distance.  Laser sensors like the LaserPING 2m Rangefinder also measure time of flight, but since light travels much faster than sound, the time measurement is normally built into the device.

In this activity, you will make IR distance sensors from the infrared (IR) LEDs.  The infrared LEDs and you will use are similar to the ones found inside infrared TV remotes.  Likewise, the infrared receivers you will use are similar to the ones found inside certain TVs, VCRs, projectors, to name a few.  Although IR light is invisible to us, the SumoBot will be able to use its IR LEDs like invisible flashlights and its IR receivers like eyes that can see the reflection when an IR beam shines on an opponent.

In this section’s activities, you will:

  • Enclose infrared LEDs in light shields
  • Mount the infrared LEDs and receivers on your SumoBot
  • Load, run and test programs that:
    • Display the relative distance of an object when it’s in the IR beam’s path
    • Make the SumoBot maneuver to follow an object.

Before you start

In addition to items like a computer and SumoBot robot, you will also need experience (practice with earlier activities) before continuing here.



  • Basic BlocklyProp coding skills, at least through the BlocklyProp for your SumoBot WX pages
  • Practice with navigation, through the SumoBot WX Movement Basics pages
  • Practice with avoiding the edge of the ring, through the Install the QTI Line Sensors pages.

After you finish

You will have your first working program that can make your SumoBot “see” and charge an opponent.