Track Sensor

From ITEAD Wiki
Jump to: navigation, search


Track sensor.jpg

What is an electronic brick? An electronic brick is an electronic module which can be assembled like Lego bricks simply by plugging in and pulling out. Compared to traditional universal boards and circuit modules assembled with various electronic components, electronic brick has standardized interfaces, plug and play, simplifying construction of prototype circuit on one’s own. There are many types of electronic bricks, and we provide more than twenty types with different functions including buttons, sensors, Bluetooth modules, etc, whose functions cover from sensor to motor drive, from Ethernet to wireless communication via Bluetooth, and so on. We will continue to add more types to meet the various needs of different projects.

Electronic brick of track sensor is based on sensor TCRT5000, which is to receive the returned infrared signals after sending out to detect the signal strength. Within a certain height range, the control board can detect whether there are objects blocking via digital pins . Track sensors are widely used in smart cars or printers for black and white line detection.

Go shopping Track Sensor (IM121012001)


1. Plug and play, easy to use. Compatible with the mainstream 2.54 interfaces and 4-Pin Grove interfaces in the market.


2. With use of M4 standard fixed holes, compatible with M4-standard kits such as Lego and Makeblock.


3. With adjustable potentiometer to set detecting height threshold.


4. With hysteresis comparison circuit for more stable digital output voltage


5. With LED indicator for real-time detection of current digital output status.



PCB size 48.0mm X 13.00mm X 1.6mm
Working voltage 3.3 or 5V DC
Operating voltage 3.3 or 5V DC
Compatible interfaces 2.54 3-pin interface and 4-pin Grove interface(1)
Detecting height range 0-50mm(2)

Note 1:S for analog/digital output port ( defined according to the switch), V and G for voltage at the common collector and ground respectively

Note 2: The specific measurable height is depended on the color and reflection of the material, the more the color contrast, the better to detect.

Electrical Characteristics

Parameter Min. Typical Max. Unit
Working voltage 2.1 5 5.5 VDC
Digital output voltage(VCC=5V) 0 - 5 V
Working current(VCC=5V) - 38 - mA
Threshold hysteresis ΔUth - VCC*0.09 - V
Detecting height range(VCC=5V,Vth=3.5V) 0 - 50 mm



Switch and indicator

1. Regulating of threshold voltage:

The threshold voltage is a voltage for comparison. When the sensor encounters obstacles, and the induced voltage is above the threshold, it will digitally output a high level (3.3V or 5V); when there are no obstacles, and the induced voltage is below the threshold, it will digitally output a low level (0V). In this way, the digital pin can be used directly to see if the sensor encounters obstacles or not. The threshold voltage can be regulated by simply twisting the potentiometer which is shown in the following diagram, and it increases by rotating to left side and decreases by rotating to right side


2. Status lamp

Within certain height, LED lamp will be OFF when obstacles or non-black objects are detected and it will be ON when no obstacles but black objects (compared to the non-black objects under the same height) are detected.


Connect S port of track sensor to D2 port of Arduino board, and we will use the following program to read the digital value of current status. When objects are detected, buzzer will give an alarm.

 const int DSIGNAL = 2;
 const int buzzer= 3;

 void setup() 
 void loop() 
 int DsignalState = digitalRead(DSIGNAL);


Datasheet for Track Sensor

Schematic for Track Sensor

Demo code for Track Sensor

Useful Links