How to Use Line Tracking Sensor Module
It detects whether something is white or black. You can also use it to create a robot car that runs on a black line drawn on white paper.
About the Module
Normally, the undetected state is High, and it becomes Low when it detects white. This sensor can distinguish whether an object within a distance of about 2cm is white or black.
The sensor operates based on the strength of the reflected infrared signal. White reflects infrared strongly, resulting in a strong signal, while black absorbs infrared, causing either no reflection or a weak signal. The sensor distinguishes the strength of this signal. Additionally, when there is no object, infrared is not reflected, so it behaves the same as black.
This mechanism allows you to create, for example, a robot car that runs on a black line drawn on white paper.
Changes/Confirmations That Can Be Made on the Sensor Side
Turning the potentiometer counterclockwise decreases sensitivity (making it easier to detect black), while turning it clockwise increases sensitivity (making it easier to detect white).
Specifications
Voltage | 5V |
---|---|
Output Signal | Digital |
Temperature Range | 0~50℃ |
Size | 47 x 11 (mm) |
Connection
Connect the line tracking sensor module to the SPACEBLOCK microcontroller board using jumper wires (male-female) as follows:
- Line tracking sensor's S pin to SPACEBLOCK's digital compatible pin
- Line tracking sensor's G pin to SPACEBLOCK's GND
- Line tracking sensor's V pin to SPACEBLOCK's 5V
※The image shows the signal wire connected to pin A0. Digital compatible pins are A0 to A10, A13, A15, B0 to B15, C14 to C15.
※The image shows the signal wire connected to pin A0. Digital compatible pins are A0 to A10, A13, A15, B0 to B15, C14 to C15.
Usage
When it is not detecting white (something that reflects infrared strongly), it returns High (true).
When it detects white (something that reflects infrared strongly), it returns Low (false).
You can obtain values from the line tracking sensor module using blocks in the 'Input' category of the project.
For detailed usage of the blocks, click here
Digital Read