RS422 wiring

Thread Starter

anoopak

Joined Nov 24, 2023
77
I want to read data from a Numerik jena LIA21optical encoder through RS422. I read that typical RS422 pins are named as RX+, RX-, TX+ and TX-. But when I go through the data sheet of optical encoder, i found some different types of pin specification and also more number of pins. Please help me on this wiring. I am attaching screen shot of LIA-21 pin configuration and full data sheet below. How a typical RS422 four pin configuration corresponds to pins specified in the data sheet?
UM_LIA_eng_2024-12-11_21.47_01.pngUM_LIA_eng_2024-12-11_22.18_02.png
 

Attachments

Last edited:

nsaspook

Joined Aug 27, 2009
16,255
1733934703802.png
1733934915570.png

It's not a TX/RX regular communications protocol. You have three signals (each needing a RX receiver) that need to be decoded for the incremental position. Looks like A/B (quadrature Z1/Z2) and maybe a home reference Z0.
 

Thread Starter

anoopak

Joined Nov 24, 2023
77
I want to use a Arduino Nano to read the incremental encoder output. Please give some guidelines to establish this. What are the hardware required for this?
 

Thread Starter

anoopak

Joined Nov 24, 2023
77
https://projecthub.arduino.cc/hwhardsoft/how-to-use-incremental-encoders-338566

How to Use Incremental Encoders
How to connect incremental encoders for industrial use with RS-422 interface to an Arduino UNO.
Thank you for sharing this post.
Author of the post specified that" 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 also wants to stick with this method (i.e. Not to send any Serial data, only voltage level shifting). But I want to avoid RS422 shields and instead use a suitable IC for voltage level shifting from RS422 to TTL. Whether MC3486 quodruple line reciever IC can do this?
I am planning to do connections as indicated in the attachment. (Z=optical encoder pins, D-Arduino digital pins)
Untitled2.png
I will use the same arduino code given in the post which uses interrupts to read encoder output.
Whether this setup will work?
 

MaxHeadRoom

Joined Jul 18, 2013
30,562
I would look at the more popular RS485 square wave output and complementary pulse, i.e. A & /A , B & /B etc and use a couple of RS485 I.C.,s. MAX3485 for e.g.
This is a noise cancelling signal, but why not using shielded cable?
The RS485 is noise cancelling incremental signal as @nsaspook link shows and is simpler than using the sine wave versions which require co-tangent reading.
Generally the encoders that show both A & /A etc, have the 485 drivers internal.
 

nsaspook

Joined Aug 27, 2009
16,255
Sure, the MC3486 Quadruple Differential Line Receiver should work with the proper circuit.

1735245827181.png

As is in your package diagram, connect Z0 inputs to channel 3 and don't forget to add bypass and filter capacitors close to the device package.
 

MisterBill2

Joined Jan 23, 2018
27,193
Before I spend time guessing at the purpose of " I want to read data from a Numerik jena LIA21optical encoder ", I am asking a very specific question: , "For what purpose??" Incremental encoders cost enough that they are not added just for looks.
Often the purpose of an encoder is to provide a signal to measure and control the speed of rotation. In other instances it is utilized to determine the angle of a rotating element. In one instance I designed in an incremental encoder to serve as an adjustment knob, to interact with software, to be able to adjust a large number of variables, one at a time, in a rather complex testing machine. Incremental encoders may also be used to monitor a powered wrench to verify a bolt has been turned an adequate number of revolutions prior to monitoring the torque to turn it.

The encoder shown has number of options for the outputs, and some will be better for some applications while others will work better in other of the applications. So please let everybody know the specific purpose of "reading the data."
 

nsaspook

Joined Aug 27, 2009
16,255
Before I spend time guessing at the purpose of " I want to read data from a Numerik jena LIA21optical encoder ", I am asking a very specific question: , "For what purpose??" Incremental encoders cost enough that they are not added just for looks.
Often the purpose of an encoder is to provide a signal to measure and control the speed of rotation. In other instances it is utilized to determine the angle of a rotating element. In one instance I designed in an incremental encoder to serve as an adjustment knob, to interact with software, to be able to adjust a large number of variables, one at a time, in a rather complex testing machine. Incremental encoders may also be used to monitor a powered wrench to verify a bolt has been turned an adequate number of revolutions prior to monitoring the torque to turn it.

The encoder shown has number of options for the outputs, and some will be better for some applications while others will work better in other of the applications. So please let everybody know the specific purpose of "reading the data."
Does it mater? This question was about the physical interface, not about applications. IMO, the OP does understand what he has and what he wants to do with it.
 

MaxHeadRoom

Joined Jul 18, 2013
30,562
To me, it does not show the more standard Differential, 90° encoder signal.?
Which I think would be the much better option and easier to work with.
I also prefer the RS422/RS485 output interface.
 

MaxHeadRoom

Joined Jul 18, 2013
30,562
I would like to hear what the application is ?
Also, what is the equipment it is connected to!
The 90° incremental encoder has been around for some decades and has served most typical positioning methods well! :(
 

Thread Starter

anoopak

Joined Nov 24, 2023
77
I would like to hear what the application is ?
Also, what is the equipment it is connected to!
The 90° incremental encoder has been around for some decades and has served most typical positioning methods well! :(
This encoder will be used to read position of a stepper operated control valve. Valve stem travels a distance of 10mm between its end positions and stepper controller used here (TB6600) is able to operate with a precision of 1/32000 through micro-stepping (i.e. A total of 10 revolutions with 3200 steps per revolution). My requirements are
(1) To obtain best possible precision in valve position reading. (Encoder hardware is fixed, cannot change)
(2) A continuous check for Motor slip by comparing the encoder reading and cumulative step count from controller.
(3) Arduino Nano has to be used to read encoder output
Encoder.png
 
Last edited:

Sensacell

Joined Jun 19, 2012
3,769
What is the maximum pulse frequency the encoder will generate?
Beware that "encoder libraries" for Arduino are not pro solutions, the maximum frequency is very low.

If you need high speed- you need an dedicated encoder counter chip or an MCU with encoder hardware built-in.
 

Thread Starter

anoopak

Joined Nov 24, 2023
77
What is the maximum pulse frequency the encoder will generate?
Beware that "encoder libraries" for Arduino are not pro solutions, the maximum frequency is very low.

If you need high speed- you need an dedicated encoder counter chip or an MCU with encoder hardware built-in.
In my case the maximum traversing speed is only 200 micrometer/sec.
So minimum required clock frequency of counter is <100Hz (without interpolation)

vmax.png
 
Last edited:

MisterBill2

Joined Jan 23, 2018
27,193
OK, the frequency is certainly low enough, but I see another issue, which is that in real world gear reduction schemes there is always backlash, which will compromise the accuracy independent of the resolution. "Precision" can only be provided by a combination of both resolution and accuracy.

Micro-steping a stepper motor with a basic 180 steps per revolution will certainly improve the resolution prior to the gear reduction, but there will still be lost motion with every reversal of direction.
Certainly there are proven schemes to remove the effects of lost motion in gear trains, I hope they have all ready been applied.
 
Top