Incremental encoders are often used for industrial applications like robotics or positioning tracking. Encoders for industrial applications comes mostly with a differential RS-422 interface.
The RS-422 is only used as a hardware layer. No serial protocol will be transmitted over the RS-422. Only the pulses of the encoder itself are directly transferred via 3 different RS-422 channels: SIN, COS and Z (zero position).
I will show in this small project how to use an industrial incremental encoder - in our case SICK DFS60 - with an Arduino UNO. Because of the 3 independent RS-422 channels we need 3 RS-422 inputs for the Arduino. For this purpose I've used 3 pcs of my Arduino RS422/RS485 shields - stacked on one Arduino.
the dip switch setting for any shield is the same.
- S1: ON, OFF, OFF, OFF
- S2: OFF, OFF, ON, ON
- S3: ON, OFF, OFF, OFF
The Jumper setting for any shield is different. Depending from the connected channel the RX pin is configured to:
- Z: D2
- COS: D3
- SIN: D4
The voltage jumper JP1 must be setted to 5V.
Wiring:The encoder can be powered by an laboratory power supply or directely by the 5V of the Arduino UNO
Final test:Open the serial monitor with 115200 baud. You will see the current increment value (updated all 0,5s) and the current status of the encoder there....
Comments
Please log in or sign up to comment.