IR Photoelectric Encoder Sensor 4Pin
⚙️ IR Photoelectric Encoder Sensor Module – 4 Pin
Measure Rotation Speed, Direction, or Position of Motors
The IR Photoelectric Encoder Sensor Module is a compact, reliable sensor that detects rotational movement using infrared reflection. Often used in combination with encoder discs or slotted wheels, it’s ideal for projects requiring speed, position, or direction sensing — such as motor control, line counting, and robotic feedback systems.
⚙️ Technical Specifications
Parameter | Specification |
---|---|
Sensor Type | Infrared Reflection (Photo-interrupter) |
Operating Voltage | 3.3V – 5V DC |
Output Signal | Digital (HIGH/LOW based on reflection) |
Output Type | Open-Collector (pull-up required) |
Detection Range | Typically 0.5–2 mm (depends on surface) |
Speed Range | Supports high-speed encoding (motor RPM) |
Interface Pins | VCC, GND, DO (digital out), AO (optional analog out on some models) |
Board Size | ~30mm x 15mm |
✅ Features
- 🔁 Detects movement by sensing reflected IR from encoder discs or stripes
- 🎯 Suitable for speed measurement, pulse counting, and motor feedback
- 🧠 Compatible with Arduino, ESP32, STM32, Raspberry Pi
- 🔌 Easy 4-pin connection: VCC, GND, Digital Out, (optional Analog Out)
- 🧰 Great for robotics, mechatronics, and conveyor systems
🧪 Typical Arduino Connection
Module Pin | Arduino Pin |
---|---|
VCC | 5V |
GND | GND |
DO | D2 (Digital Pin) |
AO (if available) | A0 (Optional) |
Simple Arduino Code Example:
CopyEditint encoderPin = 2; void setup() { pinMode(encoderPin, INPUT); Serial.begin(9600); } void loop() { int state = digitalRead(encoderPin); Serial.println(state); delay(50); }
🧠 Usage Tips
- Use with encoder wheels or stripes on DC motor shafts
- Add interrupts in Arduino to count pulses for precise RPM
- Works well in line followers or position tracking robots