Introduction
This is an industrial incremental photoelectric rotary encoder with aluminum material, metal shell and stainless steel shaft. It generates AB two-phase orthogonal pulse signal though the rotation of the grating disk and optocoupler. 400 pulses/round for each phase, and 1600 pulses/round for dual-phase 4 times output. This rotary encoder supports max 5000 r/min speed. And it can be used for speed, angle, angular velocity and other data measurement. The photoelectric rotary encoder has a NPN open collector output. It could work with Microcontroller with internal pull-up resistors directly. And it is using 750L05 voltage regulator chip, which has a DC4.8V-24V wide range power input, compatible with Arduino, STM32, PLC and other types of microcontrollers.
![]() |
Note: NPN open collector output needs pull-up resistors for the oscilloscope display. |
---|
Specification
- Supply Voltage: 4.8V ~ 24v
- Encoder Body Size: Φ39× 36.5mm
- Output Shaft Diameter: Φ6 × 13mm
- Outside Shaft Platform: Φ20 × 4.85 mm
- Fixing Holes Screws: M3
Board Overview

Num | Label | Description |
---|---|---|
Red | VCC | Power + |
Black | GND | Power - |
White | A | Pulse A (Need pull-up Resistor) |
Green | B | Pulse B (Need pull-up Resistor) |
Tutorial
Direction & Interrupt count
Requirements
Hardware
- DFRduino UNO (or similar) x 1
- Incremental Photoelectric Rotary Encoder
- 2x 1K Resistor
- M-M/F-M/F-F Jumper wires
Software
- Arduino IDE, Click to Download Arduino IDE from Arduino®
Connection Diagram

Sample Code
OUTPUT

Expected Results
Use the interruption to detect the rotation direction and count cylinder number.

FAQ
Q1. Why I can't get any feedback from the encoder? |
---|
A. Please connect pull-up resistor to phase A & B |
For any questions, advice or cool ideas to share, please visit the DFRobot Forum. |
---|