IR Sensor-TCRT5000 Pin And Working Details
The TCRT5000 and TCRT5000L are reflective sensors which include an infrared emitter and photo-transistor in a leaded package which blocks visible light.
The package includes two mounting clips. TCRT5000L is the long lead version.
SPECIFICATIONS:
1. IR sensor with transistor output.
2. Operating Voltage:5V.
3. Diode forward Current: 60mA.
4. Output: Analog or digital data.
5. Transistor collector current: 100mA.
6. Operating temperature: -25°C to +85°C
HOW TI WORKS?
The TCRT500 sensor is just a combination of a photodiode and a photo transistor. The photo diode is powered through a current limiting resistor of value 220R and the Transistor is also grounded through a 10K resistor as shown in the below picture.
The transistor does not have a base pin because the biasing of the transistor is controlled by the amount of IR light it receives. So basically the IR light from the photo diode hits an object/surface and returns back to the photo transistor to bias it.
IR Sensor Circuit FOR TCRT 5000.
WHERE WE CAN USE TCRT5000?
The TCRT5000 is an IR sensor unit. It has both a Photodiode and a Phototransistor coupled in its package. The photo diode has two pins (Anode and Cathode) which can be used to generate an IR signal.
Similarly the Photo transistor also has two pins (Collector and Emitter) which can be used to read the IR signal that is reflected back. This sensor can be used to detect the presence of object or any other reflective surface in front it, also with some level of programming it can also calculate the distance of the object in front it.
But the distance can only be calculated for short range objects and is also subjected o environmental disturbance. So if you look for a sensor to measure distance of an object in front of it.
This sensor can either be used as an analog sensor or as a digital sensor. If we only have to detect the presence of an object then the sensor will be used as digital sensor if the distance of the object should also has to be measured then the sensor is used as a analog sensor.
For either method the circuit diagram shown above will remain the same.
FEATURES
1. Package type: leaded.
2. Detector type: photo-transistor.
3. Peak operating distance: 2.5 mm.
4. Operating range within > 20 % relative.
5. collector current: 0.2 mm to 15 mm.
6. Typical output current under test: IC = 1 mA.
7. Daylight blocking filter.
8. Emitter wavelength: 950 nm.
9. Lead (Pb)-free soldering released.
ALL SENSOR DETAILS:
1. HC-05 – Bluetooth
2. Mpu 6050 accelerometer-gyroscope- -module
3. Flame-sensor
4. Rotary-encoder
5. Force-sensor-fsr400
6. Current-sensor-acs712
7. Flex-sensor
8. IR-sensor-tcrt5000
9. Pulse-sensor-pin
10. Color-sensor-tcs230
11. SD-card-module
12. Oled-with-arduino
13. Addressable-rgb-led-strip-ws1812
14. Relay-module
15. TFT-1-8-display-st7735r
16. 8×8-dot-matrix-display-max7219
17. Smoke-sensor-mq-2
18. Ultrasonic-sensor-HC-sr04
19. PIR-motion-sensor-hc-sr501
20. Tilt-sensor-sw-520d
21. Microphone-sound-sensor
22. Reed-switch-reed-sensor
23. Rfid-reader-Em18
24. Rfid-tag
25. RTC-real-time-clock-ds1307
26. Temperature-sensor-ds18b20
27. Moisture-sensor
28. Rain-sensor
29. Pressure-sensor
30. Accelerometer
31. MOC-3021-circuit
32. DHT11-DHT22-temperature-and-humidity-sensor
APPLICATIONS:
Commonly used in proximity detection applications
1. Line follower or maze solver robots
2. Distinguish between reflective and non-reflective surface
3. Obstacle detection and avoidance
4. 2D-Model
5. Position sensor for shaft encoder
6. Detection of reflective material such as paper, IBM cards,magnetic tapes.
7. Limit switch for mechanical motions.
ARADUINO UNO WITH TCRT 5000 CIRCUIT DIAGRAM:
TCRT5000 WITH ARDUINO SKETCH CODE:
Copy and paste the code or download via below given link:
//Circuito.io is an automatic generator of schematics and code
//Copyright (C) 2016 Roboplan Technologies Ltd.
// Include Libraries
#include “Arduino.h”
#include “LiquidCrystal.h”
#include “Button.h”
// Pin Definitions
#define LCD_PIN_RS 7
#define LCD_PIN_E 6
#define LCD_PIN_DB4 2
#define LCD_PIN_DB5 3
#define LCD_PIN_DB6 4
#define LCD_PIN_DB7 5
#define REFLECTIVEIR_PIN_COLL 8
// Global variables and defines
// object initialization
LiquidCrystal lcd(LCD_PIN_RS,LCD_PIN_E,LCD_PIN_DB4,LCD_PIN_DB5,LCD_PIN_DB6,LCD_PIN_DB7);
Button ReflectiveIR(REFLECTIVEIR_PIN_COLL);
// define vars for testing menu
const int timeout = 10000; //define timeout of 10 sec
char menuOption = 0;
long time0;
// Setup the essentials for your circuit to work. It runs first every time your circuit is powered with electricity.
void setup()
{
// Setup Serial which is useful for debugging
// Use the Serial Monitor to view printed messages
Serial.begin(9600);
while (!Serial) ; // wait for serial port to connect. Needed for native USB
Serial.println(“start”);
// set up the LCD’s number of columns and rows
lcd.begin(16, 2);
ReflectiveIR.init();
menuOption = menu();
}
// Main logic of your circuit. It defines the interaction between the components you selected. After setup, it runs over and over again, in an eternal loop.
void loop()
{
if(menuOption == ‘1’) {
// LCD 16×2 – Test Code
// Print a message to the LCD.
lcd.setCursor(0, 0);
lcd.print(“Circuito Rocks !”);
// Turn off the display:
lcd.noDisplay();
delay(500);
// Turn on the display:
lcd.display();
delay(500);
}
else if(menuOption == ‘2’)
{
// Reflective IR Sensor TCRT5000L – Test Code
//read Reflective IR Sensor.
//if the sensor detects an echo function will return LOW (0).
//if it is not detect an echo function will return HIGH (1).
bool ReflectiveIR_Val = ReflectiveIR.read();
Serial.print(F(“Val: “)); Serial.println(ReflectiveIR_Val);
}
if (millis() – time0 > timeout)
{
menuOption = menu();
}
}
// Menu function for selecting the components to be tested
// Follow serial monitor for instrcutions
char menu()
{
Serial.println(F(“\nWhich component would you like to test?”));
Serial.println(F(“(1) LCD 16×2”));
Serial.println(F(“(2) Reflective IR Sensor TCRT5000L”));
Serial.println(F(“(menu) send anything else or press on board reset button\n”));
while (!Serial.available());
// Read data from serial monitor if received
while (Serial.available())
{
char c = Serial.read();
if (isAlphaNumeric(c))
{
if(c == ‘1’)
Serial.println(F(“Now Testing LCD 16×2”));
else if(c == ‘2’)
Serial.println(F(“Now Testing Reflective IR Sensor TCRT5000L”));
else
{
Serial.println(F(“illegal input!”));
return 0;
}
time0 = millis();
return c;
}
}
}
Download Full Arduino sketch Here. TCRT IR 5000 Sensor Code
thanks for this post, i have solved my problem on my code…