The 600 PPR Optical Rotary Encoder is a precision device designed to convert the angular position or motion of a shaft or axle into an analog or digital signal. With a resolution of 600 pulses per revolution (PPR), this encoder is ideal for applications requiring high accuracy and reliability.
Parameter | Value |
---|---|
Resolution | 600 PPR |
Supply Voltage | 5V DC |
Output Type | Quadrature (A and B channels) |
Operating Temperature | -20°C to 85°C |
Shaft Diameter | 6 mm |
Maximum Speed | 5000 RPM |
Output Current | 20 mA max |
Pin Number | Pin Name | Description |
---|---|---|
1 | VCC | Power supply (5V DC) |
2 | GND | Ground |
3 | A | Channel A output |
4 | B | Channel B output |
5 | Z | Index pulse (optional, if available) |
// Example code to read a 600 PPR Optical Rotary Encoder with Arduino UNO
const int pinA = 2; // Encoder output A connected to digital pin 2
const int pinB = 3; // Encoder output B connected to digital pin 3
volatile int encoderPos = 0; // Variable to store the encoder position
int lastEncoded = 0; // Variable to store the last encoded value
void setup() {
pinMode(pinA, INPUT);
pinMode(pinB, INPUT);
attachInterrupt(digitalPinToInterrupt(pinA), updateEncoder, CHANGE);
attachInterrupt(digitalPinToInterrupt(pinB), updateEncoder, CHANGE);
Serial.begin(9600);
}
void loop() {
Serial.print("Encoder Position: ");
Serial.println(encoderPos);
delay(100);
}
void updateEncoder() {
int MSB = digitalRead(pinA); // Most significant bit
int LSB = digitalRead(pinB); // Least significant bit
int encoded = (MSB << 1) | LSB; // Combine the two bits
int sum = (lastEncoded << 2) | encoded; // Combine with previous state
if (sum == 0b1101 || sum == 0b0100 || sum == 0b0010 || sum == 0b1011) {
encoderPos++;
}
if (sum == 0b1110 || sum == 0b0111 || sum == 0b0001 || sum == 0b1000) {
encoderPos--;
}
lastEncoded = encoded; // Store the current state
}
No Output Signal:
Inaccurate Readings:
Mechanical Misalignment:
By following this documentation, users can effectively integrate and utilize the 600 PPR Optical Rotary Encoder in their projects, ensuring accurate and reliable performance.