

The E2-Q2 Encoder by Robocore is a rotary encoder designed to convert the angular position or motion of a rotating shaft into an analog or digital signal. This encoder is widely used in applications requiring precise position feedback, such as robotics, automation systems, motor control, and CNC machines. Its compact design and reliable performance make it an excellent choice for both hobbyists and professionals.








Below are the key technical details of the E2-Q2 Encoder:
| Parameter | Specification |
|---|---|
| Manufacturer | Robocore |
| Part ID | E2-Q2 |
| Output Signal Type | Quadrature (A and B channels) |
| Resolution | 360 pulses per revolution (PPR) |
| Operating Voltage | 5V DC |
| Operating Current | 20 mA (typical) |
| Maximum Rotational Speed | 6000 RPM |
| Output Format | Digital (TTL compatible) |
| Operating Temperature | -10°C to 70°C |
| Shaft Diameter | 6 mm |
| Mounting Hole Diameter | 3 mm |
The E2-Q2 Encoder has a 5-pin interface. The pinout is as follows:
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power supply input (5V DC) |
| 2 | GND | Ground |
| 3 | A | Channel A output (quadrature signal) |
| 4 | B | Channel B output (quadrature signal) |
| 5 | Z | Index pulse output (optional, 1 pulse per revolution) |
Below is an example of how to connect and use the E2-Q2 Encoder with an Arduino UNO to read position and direction:
// E2-Q2 Encoder Example with Arduino UNO
// Reads the encoder position and direction using interrupts
#define ENCODER_PIN_A 2 // Pin connected to Channel A
#define ENCODER_PIN_B 3 // Pin connected to Channel B
volatile int encoderPosition = 0; // Tracks the encoder position
volatile int lastEncoded = 0; // Stores the last encoder state
void setup() {
pinMode(ENCODER_PIN_A, INPUT);
pinMode(ENCODER_PIN_B, INPUT);
// Enable pull-up resistors for stable signal reading
digitalWrite(ENCODER_PIN_A, HIGH);
digitalWrite(ENCODER_PIN_B, HIGH);
// Attach interrupts to the encoder pins
attachInterrupt(digitalPinToInterrupt(ENCODER_PIN_A), updateEncoder, CHANGE);
attachInterrupt(digitalPinToInterrupt(ENCODER_PIN_B), updateEncoder, CHANGE);
Serial.begin(9600); // Initialize serial communication
}
void loop() {
// Print the encoder position to the Serial Monitor
Serial.print("Encoder Position: ");
Serial.println(encoderPosition);
delay(100); // Update every 100ms
}
void updateEncoder() {
// Read the current state of Channel A and Channel B
int MSB = digitalRead(ENCODER_PIN_A); // Most Significant Bit
int LSB = digitalRead(ENCODER_PIN_B); // Least Significant Bit
int encoded = (MSB << 1) | LSB; // Combine the two bits
int sum = (lastEncoded << 2) | encoded; // Track state changes
// Determine direction and update position
if (sum == 0b1101 || sum == 0b0100 || sum == 0b0010 || sum == 0b1011) {
encoderPosition++;
} else if (sum == 0b1110 || sum == 0b0111 || sum == 0b0001 || sum == 0b1000) {
encoderPosition--;
}
lastEncoded = encoded; // Update the last state
}
No Signal Output:
Incorrect Position Readings:
Signal Noise or Jitter:
Encoder Not Responding:
Q: Can the E2-Q2 Encoder be used with a 3.3V microcontroller?
A: The encoder requires a 5V power supply, but its output signals are TTL compatible. Use a level shifter if your microcontroller operates at 3.3V.
Q: What is the purpose of the Z (index) pin?
A: The Z pin provides a single pulse per revolution, which can be used for homing or zeroing the position.
Q: How do I calculate the angular position from the encoder output?
A: Divide the encoder position count by the resolution (360 PPR) and multiply by 360° to get the angular position in degrees.
Q: Can I use the E2-Q2 Encoder for speed measurement?
A: Yes, by measuring the time between pulses on the A or B channel, you can calculate the rotational speed.
This concludes the documentation for the E2-Q2 Encoder. For further assistance, refer to the manufacturer's datasheet or contact Robocore support.