5 Ways TCRT5000 Tracking Sensor Module Tutorial

by mybotic in Circuits > Sensors

11080 Views, 3 Favorites, 0 Comments

5 Ways TCRT5000 Tracking Sensor Module Tutorial

63f06b396bd7536f8a80d49977a929701533281903-nm.jpg

Description

This module is specialized for Arduino mobile robot that are to be used to run through a black and white line road track, or in simple words a module for line following robot. It uses a hex inverter that can provide clean digital output when there is a black line detected.

Features

  • 5-way reflective optical sensors mounted in line (TCRT5000 or equivalent)
  • On-board hex inverter provide clean digital output
  • Sensitive to dark color and infrared
  • Operating Voltage : 5 V (recommended)
  • Comes with M3 flexible mounting slot

Materials Preparation

0fd1750bb51485d5b4cf4b3483919a3d1522899149-sm.jpg
4039c85ebad6c189e2c9535609ef046a1472202860-sm.jpg
dd7212de3cd32064a6815f8ebf34c1ce1478077166-sm.jpg

In this tutorial, we are going to make a tutorial on how 5 Ways TCRT5000 Tracking Sensor Module works with Arduino coding. Thus, the materials needed to be prepared is listed as following:

  1. Arduino Uno
  2. Female to male jumper wire
  3. USB Cable Type A to B

Hardware Installation

38533732_2114633032126198_6459432072162312192_n.jpg

The diagram above shows the connection between 5 Ways TCRT5000 Tracking Sensor Module and Arduino Uno. The detailed connection will be mentioned below:

  1. OUT5 > D12
  2. OUT4 > D11
  3. OUT3 > D10
  4. OUT4 > D9
  5. OUT5 > D8
  6. 5V > 5V
  7. GND > GND

After completing the connection, simply connect Arduino Uno to power supply/PC via USB Cable Type A to B.

Source Code

  1. Download the source code provided and open it with Arduino IDE.
  2. Upload the source code into your Arduino Uno.

Downloads

Results

Untitled.png

Based on the source code, the pins of OUT1, OUT2, OUT3, OUT4 and OUT5 are defined and each of them responds with IRvalue respectively. Serial monitor is set as 9600 baud and the results will be printed on the serial monitor.

How does it works?

Simply use your finger to approach the IR sensor. The IR sensor will detect your finger and it eventually lights up the LED on the module. On the serial monitor, when the IR sensor does not detect anything, the number will be shown as 0 and when it does detect, the number is 1.

Serial monitor will show "DigitalReading=00000" and those positions for 0 indicates which pin it is detected. For example, if the IR sensor 2 is detected, the serial monitor will show "DigitalReading=01000".