Line Tracker - Sensors for VEX V5

Description

The Line Tracker is an analog sensor consisting of an infrared LED and an infrared light sensor. It has a single mounting hole and is designed to be mounted under the chassis of a robot. The Line Tracker allows a robot to follow a pre-marked path. It is one of the 3-Wire series sensors.

The 3-Wire Sensors are compatible with the V5 Robot Brain or the Cortex. Their sensor cable can be extended using a 3-Wire Extension Cable.

In order for the Line Tracker to be functional with the V5 Brain, the sensor cable needs to be fully inserted into a V5 Brain 3-Wire Port.

The Line Tracker comes in the Advance Sensor Kit or a 3-pack and can be purchased here.

Line Tracker Sensor Cable Fully Inserted
Line_Tracker.jpg Triport_Connected_to_V5_Brain.jpg

How the Line Tracker Works

The Line Tracker functions by illuminating a surface with its infrared light LED and then the infrared light sensor measures the reflected infrared radiation. Based on the reflected radiation’s intensity, the Line Tracker can determine how light or dark the surface is below the sensor.

Lightly colored surfaces will reflect more infrared light than dark surfaces and will appear brighter to the sensor. This allows the sensor to detect a dark line on a pale surface, or a pale line on a dark surface.

The Line Tracker is an analog sensor which means the infrared sensor will return a value anywhere between 0v and 5v of voltage to the V5 Brain depending on the reflected infrared radiation. The V5 Brain then converts this value to a percentage of reflectivity. This type of measurement requires an adequate threshold of difference between the shades of reflectivity in order to successfully follow a line.

For example, the Line Tracker will not follow a strip of black electrical tape placed on the dark gray VEX Competition Field Tiles because the sensor will return percentages of reflection too close together for a threshold of difference. However, a strip of white electrical tape on the VEX Competition Field Tiles will provide a large difference in values and an adequate threshold for the robot to track the tape.

The Line Tracker needs to be paired with a programming language such as the VEXcode V5 Blocks or Text to create a user program for the Brain to use the value from the percent of reflectivity to control the robot. 

 

Placement of the Sensors

Placement of the Line Trackers is critical to the function of the sensors. The range for the Line Tracker is approximately 0.02” to 0.25” above the surface it is measuring. Its optimum sensitivity at 3 mm (about ⅛”) and the sensor should be placed as close to this distance from the surface as possible.

Placing a Line Tracker on a robot above 0.25” (such as attaching the sensor directly under a drivetrain using 4” wheels) will produce a very poor set of values due to the low level of reflected infrared intensity.

In addition to the distance above the surface the sensor is placed, the distance from the robot’s rotational pivot point needs to be considered. Typically, this pivot point is in the center of the robot for an all-wheel drive robot and centered between the two wheels of a two-wheel drive robot.

The closer the Line Tracker is placed to the pivot point, the more the robot needs to pivot to displace the sensor. However, it is possible to place the Line Trackers too far from the pivot point, where only a slight pivot will be needed to displace the sensor.

The response time for the line tracker is 50Hz. If the travel speed of the robot it too great, combined with a large sensor distance from the robot’s pivot point, the response time of the Line Tracker may not be great enough for the sensor to follow a line.

It also needs to be noted, the minimum line width the Line Tracker can detect is 0.25in.

 

Common Uses of the Line Tracker:

Line Trackers can be used as a single unit, a pair of Line Trackers, or as a set of three Line Trackers to follow a line.

Single Unit: A single Line Tracker is generally programmed to turn towards a line until it detects the line. Then the robot turns away from the line moving slightly forward and then turns back towards the line.

This produces a very slow, jerky movement along the line. However, it is the easiest programming logic to use because it is only checking a single feedback control condition: is the line detected or not?

Pair of Line Trackers: Two Line Trackers can be mounted so as the distance separating them is slightly wider than the width of the line they are following. The robot is placed with a sensor on each side of the line. When either of the Line Trackers detects the line, the user program has the robot turn so the line between the two sensors again.

This setup produces a smoother movement for the robot. However, this setup needs more advanced programming in order to work.

Set of Three: A series of three Line Trackers can be mounted so the center Tracker can detect the line and the two side Trackers are mounted just offset to each side of the line. In this setup, as soon as the center sensor does not detect the line and one of the side sensors does detect the line, the robot will turn to bring the line back under the center sensor.

The main advantage the set of three Line Trackers over a pair of sensors is: if all three Line Tackers are not detecting a line the robot can be programmed to stop. Once the robot has stopped, it can start scanning back and forth trying to find the line again. This setup requires three feedback control loops and several different conditions making it the most complex logic of the three options.

Line detection with a set of three Line Trackers
line-tracker.png

Other Uses

All three of the Line Tracker setups can be used to move straight forward until they detect a line and then stop.

The pair of Line Trackers and the set of three can be programmed to follow a line and detect a cross line. Cross lines along the main line path can be used to change the robot’s behavior. For example, if the travel surface is marked out with a grid of lines, the robot could be programmed to follow a line, detect three grid crosslines, and then turn right at the fourth crossline to follow that line.

 

Uses of Line Trackers on a Competition Robot:

Each year’s VEX Robotics Competition’s game field has a different set of white electrical tape lines placed down. These usually mark out different zones on the field. The lines can also be used by the Line Trackers during the autonomous period. Some types of use for the field lines include:

Scoring: A robot’s Line Trackers can use goal lines on the field to detect scoring zones and then align on them to score game objects into the area, such as with the goal lines in the 2015-2016 game, Nothing But Net.

Locating Game Pieces: Many times game pieces are found along a field line. The Line Trackers can be used to follow a line to locate a game piece, pick it up, and then score. An example of this was with the fabric large Cubes which were placed on the line separating the near zone and the far zone during the 2016-2017 game, Starstruck.

Alignment: Line Trackers can be used to align a robot along a field line to perform some task or recalibrate its position on the field. In the 2018-2019 game, Turning Point, the expansion zone lines could be used to align the robot so the Caps could be high scored.

Navigation: As previously mentioned, Line Trackers can be used to follow a line or stop the robot when a line is detected. An example of this could have been used in the 2019-2020 game, Tower Takeover, Line Trackers could have stopped a robot from passing over the Autonomous Line and losing their Alliance’s Autonomous Bonus.

Object Detection: A Line Tracker can be mounted flush between two pieces of structural metal within a claw, a conveyor system, or slide system. As a game piece slides over the Line Tracker the sensor can detect the object.

Many games have obstacles on the field which Line Trackers can get caught up on, so it is important to take this into account when designing the robot. For instance, placing the Line Trackers directly between a set of wheels can help carry them over most obstacles.