TSOP21..
AI

The **TSOP21** series belongs to a family of miniaturized receivers for infrared remote control systems. These components are highly integrated and designed to simplify the process of decoding IR signals in consumer electronics.
---
## 1. Internal Architecture
The TSOP21 integrates several electronic stages into a single 3-pin package. This removes the need for complex external circuitry.
| Component | Function |
| :--- | :--- |
| **Photo Detector** | A high-speed PIN diode that converts IR light into electrical current. |
| **Preamplifier** | Amplifies the weak current signals from the photo detector. |
| **Band Pass Filter** | Filters out noise and only allows specific frequencies (e.g., 38kHz) to pass. |
| **Demodulator** | Extracts the digital data (bits) from the carrier frequency. |
| **Automatic Gain Control (AGC)** | Adjusts sensitivity to compensate for distance and ambient light. |
---
## 2. Technical Specifications
Commonly, these sensors operate on a standard 5V logic level and are optimized for specific carrier frequencies (the most common being 38kHz).
* **Operating Voltage:** 2.7V to 5.5V.
* **Supply Current:** Typ. 0.7 mA (very low power).
* **Carrier Frequencies:** Available in 30, 33, 36, 38, 40, and 56 kHz.
* **Transmission Distance:** Up to 45 meters (under ideal conditions).
* **Output:** Active Low (The output pin drops to 0V when a signal is detected).
---
## 3. Pinout Configuration
The TSOP21 typically features a 3-pin layout (though physical orientation may vary by specific sub-model):
| Pin Number | Name | Description |
| :--- | :--- | :--- |
| **1** | **OUT** | Data Output (Connects to Microcontroller) |
| **2** | **GND** | Ground (0V) |
| **3** | **Vs** | Supply Voltage (VCC) |
---
## 4. Basic Circuit Implementation
To ensure stability, a simple RC filter is recommended for the power supply to prevent noise from interfering with the high-gain amplifier inside the sensor.
```c
// Example Connection logic for Arduino
// VCC -> 5V (via 100 Ohm resistor)
// GND -> GND
// OUT -> Digital Pin 2
// Note: Place a 4.7uF capacitor between VCC and GND near the sensor.
```
### Key Application Features:
* **High Immunity:** It is designed to ignore "optical noise" from fluorescent lamps or sunlight.
* **Compatibility:** Works with almost all standard IR remote protocols like RC5, RC6, and NEC.
- ⤷What is the difference between the TSOP21 and TSOP48 series?
- ⤷ How do I calculate the specific carrier frequency needed for my project?
- ⤷ Why is the output signal of the TSOP21 considered 'Active Low'?