

The Differential Servo Encoder Converter (A, B) for PLC TTL/NPN is a versatile device designed to convert differential signals from a servo encoder into a format compatible with Programmable Logic Controllers (PLCs). It supports TTL or NPN output, ensuring reliable digital communication in industrial automation systems. This component is commonly used in motion control, robotics, and industrial machinery where precise position or speed feedback is required.








Below are the key technical details of the Differential Servo Encoder Converter:
| Parameter | Specification |
|---|---|
| Input Signal Type | Differential (A, B) |
| Output Signal Type | TTL or NPN |
| Input Voltage Range | 5V to 24V DC |
| Output Voltage Range | 5V to 24V DC (matches input voltage) |
| Maximum Output Current | 20mA per channel |
| Operating Temperature Range | -20°C to 70°C |
| Signal Frequency Range | Up to 200 kHz |
| Isolation | Optically isolated output |
| Dimensions | 50mm x 30mm x 15mm |
The pin configuration for the Differential Servo Encoder Converter is as follows:
| Pin | Label | Description |
|---|---|---|
| 1 | A+ | Differential encoder signal A+ |
| 2 | A- | Differential encoder signal A- |
| 3 | B+ | Differential encoder signal B+ |
| 4 | B- | Differential encoder signal B- |
| 5 | GND | Ground reference for input signals |
| Pin | Label | Description |
|---|---|---|
| 1 | A | TTL/NPN output signal A |
| 2 | B | TTL/NPN output signal B |
| 3 | GND | Ground reference for output signals |
| 4 | VCC | Power supply for output signals (5-24V) |
If you are using the Differential Servo Encoder Converter with an Arduino UNO for testing or prototyping, the following code demonstrates how to read the A and B signals:
// Define the input pins for the encoder signals
const int encoderPinA = 2; // Connect to output signal A from the converter
const int encoderPinB = 3; // Connect to output signal B from the converter
volatile int encoderPosition = 0; // Variable to store the encoder position
int lastEncoded = 0; // Variable to store the last encoder state
void setup() {
pinMode(encoderPinA, INPUT); // Set pin A as input
pinMode(encoderPinB, INPUT); // Set pin B as input
// Enable pull-up resistors for noise immunity
digitalWrite(encoderPinA, HIGH);
digitalWrite(encoderPinB, HIGH);
// Attach interrupts to the encoder pins
attachInterrupt(digitalPinToInterrupt(encoderPinA), updateEncoder, CHANGE);
attachInterrupt(digitalPinToInterrupt(encoderPinB), updateEncoder, CHANGE);
Serial.begin(9600); // Initialize serial communication for debugging
}
void loop() {
// Print the encoder position to the serial monitor
Serial.println(encoderPosition);
delay(100); // Delay for readability
}
void updateEncoder() {
// Read the current state of the encoder pins
int MSB = digitalRead(encoderPinA); // Most Significant Bit
int LSB = digitalRead(encoderPinB); // Least Significant Bit
int encoded = (MSB << 1) | LSB; // Combine the two bits into a single value
int sum = (lastEncoded << 2) | encoded; // Combine with the last state
// Determine the direction of rotation
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 Output Signal:
PLC Not Detecting Signals:
Noisy or Unstable Signals:
Incorrect Position Feedback:
By following this documentation, users can effectively integrate the Differential Servo Encoder Converter into their systems for reliable and accurate signal conversion.