Introducing MindSensors NXTSumoEyes.

  1. What is a MindSensors NXTSumoEyes sensor used for?
  2. What does a MindSensors NXTSumoEyes look like?
  3. How is a MindSensors NXTSumoEyes sensor connected to an NXT robot?
  4. How can we test a MindSensors NXTSumoEyes using NXT-G?
  5. How can we test the MindSensors NXTSumoEyes using RobotC?
  6. How can I get my hands on a MindSensors NXTSumoEyes?

1. What is a MindSensors NXTSumoEyes sensor used for?

The MindSensors NXTSumoEyes sensor can be used to detect the presence of an object ahead of the sensor. It has two pre-set distance ranges. In short-range mode, this sensor can detect objects in approximately 20 degree arcs to the left, centre or right if they are closer than approximately 6 inches (approximately 15 centimetres) from the sensor, as represented in the diagram below.

NXT Sumo Eyes Picture image range MindSensors DrGraeme.net

In long-range mode, this sensor can similarly detects objects that are closer than approximately 12 inches (approximately 30 centimetres) from the sensor. However the 15 and 30 cm. ranges noted above should be treated as indicative only, because the distance at which the NXTSumoEyes can detect an object will vary depending on that object's shape, hardness and/or colour. You should always test the sensor to see what distances your can achieve in practice.

Back to the top.

1.1 Any Alternatives?

Other sensors that can be used to detect objects at a distance include LEGO's Ultrasonic sensor, and HiTechnic's EOPD sensor, each of which uses a different media to detect distance. The SumoEyes sensor measures the reflection of infra-red light; the ultrasonic sensor measures distance using high-frequency sound waves, and the EOPD sensor uses pulsed light waves - which sensor you use may depend on your application as each will have an advantage in different environments. 

Back to the top.

2. What does an NXTSumoEyes sensor look like?

The physical size of the NXTSumoEyes sensor can be judged from the following top view, bottom view, front view and back view. The ruler divisions are in centimetres and inches.

Sumo Eyes NXT sensor top view mindsensors DrGraeme Sumo Eyes NXT sensor bottom view mindsensors DrGraeme

Sumo Eyes NXT sensor front view mindsensors DrGraeme Sumo Eyes NXT sensor back view mindsensors DrGraeme

A YouTube move, a wmv movie and an mp4 movie with similar information can be seen below (20 seconds); note that some videos can be expanded to a full screen by clicking on or  in the lower right-hand corner of the movie screens.

 or movie(wmv), movie(mp4).

Back to the top.

3. How are NXTSumoEyes sensors connected to an NXT Robot?

We can connect an NXTSumoEyes to a LEGO NXT MindStorms computer brick using the components shown in the picture below.

SUMO eyes test rig LEGO NXT tutorial mindsensors DrGraeme

The process of putting these together is shown in the videos below (2 minutes 35 seconds); note that the videos can expanded to a full screen by clicking on or  in the lower right-hand corner of the movie screens.

or movie(wmv), movie(mp4)

This test rig is now ready for use when testing to see if your NXT SUMO Eyes sensor works as you expect it to work.

Back to the top.

4. How can we test NXTSumoEyes sensors using NXT-G?

Coming soon...

Back to the top.

5. How can we test NXTSumoEyes sensors using RobotC?

5.1 Downloading the RobotC Library for the NXTSumoEyes Sensor

First we need to download the RobotC library used by the NXT Sumo Eyes sensor. This is located here. We go to this web site, and download SE-lib.c. This is illustrated in the following videos. Note that the videos can expanded to a full screen by clicking on or  in the lower right-hand corner of the movie screens.

 or movie(wmv), movie(mp4)

5.2 Adding the RobotC Library to your RobotC program.

The library you have just downloaded in now placed in your RobotC program, just before the "task main()" portion of our RobotC program, as shown below.

// Program SumoEyesDrGraemeV1.c
/************************************************************************/
/*                                                                      */
/* Program Name: LL-lib.c                                       */
/* ===========================                                          */
/*                                                                      */
/* Copyright (c) 2008 by mindsensors.com                                */
/* Email: info (<at>) mindsensors (<dot>) com                           */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; version 3 of the License.              */
/* Read the license at: http://www.gnu.org/licenses/gpl.txt             */
/*                                                                      */
/************************************************************************/
/*
 * History
 * ------------------------------------------------
 * Author     Date      Comments
 * Deepak     04/21/09  Initial authoring
 */
#define SE_NONE  0
#define SE_FRONT 1
#define SE_LEFT 2
#define SE_RIGHT 3
int SumoEyes_DetectObstacleZone(byte port)
{
  int se_value;
   se_value = SensorValue[port];
   if ( se_value > 30 && se_value < 36 ) {
    // obstacle is on left
    return (SE_LEFT);
  }
  if ( se_value > 63 && se_value < 69 ) {
    // obstacle is on right
    return (SE_RIGHT);
  }
  if ( se_value >= 74 && se_value <= 80 ) {
    // obstacle is in front.
    return (SE_FRONT);
  }
  return (SE_NONE);
}
byte currRange;
void SumoEyes_SetLongRange(byte port)
{
  SensorType[port] = sensorLightInactive;
   if ( currRange != sensorLightInactive ) {
    wait1Msec(275);
  }
  currRange = sensorLightInactive;
}
void SumoEyes_SetShortRange(byte port)
{
  SensorType[port] = sensorLightActive;
   if ( currRange != sensorLightActive ) {
    wait1Msec(275);
  }
  currRange = sensorLightActive;
}
task main()
{
  // set up variables to receive response from SumoEyes sensor
  int detectLong;
  int detectShort;
   // SumoEyes is plugged in to slot S2
  SensorType[S2] = sensorLightInactive;
   while (true)
  { 
     // Get response from Sumo Eyes in Long Range mode
    SumoEyes_SetLongRange (S2);
    detectLong = SumoEyes_DetectObstacleZone(S2);
    // Send response to NXT screen
    // long detection to the left = L 3
    // long detection in the middle = L 1
    // long detection to the right = L 2
    // no long detection = L 0
    nxtDisplayBigStringAt(0, 18, "L: %i", detectLong);
	  
     // Get response from Sumo Eyes in short range mode
    SumoEyes_SetShortRange (S2); 
    detectShort = SumoEyes_DetectObstacleZone(S2);
    // Send response to NXT screen
    // short detection to the left = S 3
    // short detection in the middle = S 1
    // short detection to the right = S 2
    // no short detection = S 0
    nxtDisplayBigStringAt(0, 38, "S: %i", detectShort);
  }
}

I have added some code in the main part of the program that takes the response from the NXTSumoEyes sensor and displays it on the NXT robot's screen.

5.3 Testing the NXT Sumo Eyes sensor using RobotC code.

The code from section 5.2 is then downloaded to the LEGO NXT MindStorms robot. What happens when a test is run is shown in the videos below. Remember that "L 3" = left of the robot in long range mode, "L 1" is ahead of the robot in long range mode, and "L 2" is to the right of the robot in long range mode; also "S 3" = left of the robot in short range mode, "S 1" is ahead of the robot in short range mode, and "S 2" is to the right of the robot in short range mode. Note that the videos can expanded to a full screen by clicking on or  in the lower right-hand corner of the movie screens.

  or movie(wmv), video(mp4)

Note that you should test out your NXTSumoEyes sensor with the type of object you wish to detect. The NXTSumoEyes sensor can respond differently to differently shaped and differently coloured object. An rectangular object like the one in the video above may give less reflection than a rounder object (depending on the direction of the flat external faces of the object). A hard reddish object may give a stronger response than a blue soft object. Since these sensors are aimed at a use in SUMO competitions, I guess there won't be many pale blue soft cuddly robots playing Sumo, so this probably won't be a problem...

Back to the top.

6. How can I get my hands on MindSensors NXTSumoEyes sensors?

You can purchase an NXTSumoEyes sensor from Amazon.com by clicking on this image. The manufacturer of the NXTSumoEyes sensor is MindSensors. Their web site is http://www.MindSensors.com . For more information, you can go straight to their NXTSumoEyes web page by clicking here. 

Enjoy!

Back to the top.

 Free "Introducing the MindSensors NXT SUMO Eyes sensor"  tutorial - copyright Dr. Graeme Faulkner 2011 - www.DrGraeme.net