MOC-7811 Encoder Sensor - Slotted Opto Isolator | Compoden
MOC-7811 Slotted Opto Isolator – Encoder & Speed Sensor
The MOC-7811 is an infrared slotted optical switch consisting of an IR LED and a phototransistor in a compact 4-pin housing. It detects opaque objects passing through its 3mm slot, making it ideal for RPM measurement, position encoding, and limit detection in robotics, motor control, and industrial automation.
Key Specifications
| Specification | Value |
|---|---|
| Slot Width | 3 mm |
| IR LED Peak Wavelength | 940 nm |
| Phototransistor VCEO Max | 30 V |
| Collector Current (Max) | 20 mA |
| CTR (Typical at IF=20mA) | 20% |
| Operating Temperature | -25°C to +85°C |
What You Can Build With This
- Motor RPM counter using a slotted wheel
- Linear position encoder for 3D printers or CNC machines
- Limit switch for robotic arm end‑stops
- Object‑counting conveyor belt system
Compatibility
Works with any 5V or 3.3V microcontroller including Arduino Uno, NodeMCU, and Raspberry Pi Pico. The LED requires a current‑limiting resistor (typically 220–330Ω at 5V). The phototransistor output can be read directly via a digital input with an external pull‑up resistor (10kΩ recommended).
Wiring Notes
Connect the LED anode to VCC via a resistor and cathode to GND. The phototransistor collector goes to VCC (with pull‑up) and emitter to GND. Ensure the emitter load does not exceed 20mA. For clean signals, add a 100nF decoupling capacitor near the sensor.
Why Buy from Compoden
Every component is sourced from verified suppliers and tested for compatibility before listing. We've spent 10 years building projects for makers, schools, and institutions across India. Ships from Bengaluru in 3-5 days. If defective on arrival, replace within 7 days.
Is this compatible with Arduino?
Yes, connect the phototransistor output to any digital pin with a 10kΩ pull‑up resistor to VCC. Use digitalRead() to sense the slot state.
Can I use it for a wheel encoder at high RPM?
The MOC-7811 can handle pulse rates up to a few kHz, which is adequate for most low‑ to medium‑speed applications. For high RPM, ensure the slot wheel segmentation matches the sensor's response time.
Does it require an external crystal or oscillator?
No, it is a simple optical switch. You only need power for the LED and a pull‑up for the output.
📦 Free Setup Handoff Document Included
Every Compoden order includes a free setup handoff document — step-by-step instructions to get your component working within minutes. Download it via QR code on your package. The handoff document is also trained to help you troubleshoot the majority of problems.
Ask Soldr above what you can build with this — it knows every Compoden kit this part appears in.
Shipping Information
- Prepaid Orders: ₹75 for orders up to ₹999, FREE shipping above ₹999
- COD Orders: ₹125 shipping + ₹50 COD fee = ₹175 total
- Delivery Timeline: Dispatch in 1-2 days, delivery in 2-7 days depending on location
Returns & Warranty
- 7-Day Return: Manufacturing defects only (approval required)
- Warranty: 7 days from delivery
- Non-Returnable: Batteries, consumables, cut wires, clearance items