Introduction: How to Use TCRT5000 IR Sensor Module With Arduino UNO
In this tutorial, we are going to teach you some basics on using TCRT5000 IR Sensor Module. These basic are showing you the analog and digital values at serial monitor.
This IR reflective sensor utilizes a TCRT5000 to detect color and distance. It emits IR and then detects if it receives the echo. This sensor is often used in line following robots, auto data logging on utility meters, because this module can sense if a surface is white or black.
The measuring distance range from 1mm to 8mm, and the central point is about 2.5mm. There is also an on-board potentiometer to adjust the sensitivity. The infrared diode will emitting the infrared continuously when the module connect to the power, when the emitted infrared light has not been reflected or the strength is not big enough,the module will in the off state, at this time, D0 output logic HIGH and the signal indicate LED off.
- Supply Voltage: 3.3V~5V
- Detect distance: 1mm-8mm
- Digital Outputs LOW when objects detected
- On-board indicator LED to show the results
- On-board potentiometer to adjust the sensitivity
- On-board LM393 chip
Step 1: Pin Definition
Step 2: Material Preparation
For this tutorial, we require these items:
1. Arduino UNO.
2. TCRT 5000 IR sensor module.
3. Wire male to female.
Step 3: Pin Connection
Step 4: Sample Source Code
The attachment is the sample source code for TCRT 5000 IR Sensor Module. You may download it and upload it into your Arduino Uno.
Step 5: Open the Source Code and Upload to Arduino UNO
Step 6: Way to Open the Serial Monitor
Step 7: Result
The picture above shows the result on the Serial Monitor for the TCRT5000 IR Sensor Module.
TCRT5000 IR Sensor Module detects the obstacle infront
- The "Digital Reading" shows 1
- The "Analog Reading" shows value which less than 50
TCRT5000 IR Sensor Module detects nothing
- The "Digital Reading" shows 0
- The "Analog Reading" shows value around 900 above
We have a be nice policy.
Please be positive and constructive.