English
Language : 

TMC5130A-TA_17 Datasheet, PDF (100/128 Pages) TRINAMIC Motion Control GmbH & Co. KG. – POWER DRIVER FOR STEPPER MOTORS
TMC5130A DATASHEET (Rev. 1.14 / 2017-MAY-15)
100
22 ABN Incremental Encoder Interface
The TMC5130A is equipped with an incremental encoder interface for ABN encoders. The encoder
inputs are multiplexed with other signals in order to keep the pin count of the device low. The basic
selection of the peripheral configuration is set by the register GCONF. The use of the N channel is
optional, as some applications might use a reference switch or stall detection rather than an encoder
N channel for position referencing. The encoders give positions via digital incremental quadrature
signals (usually named A and B) and a clear signal (usually named N for null or Z for zero).
N SIGNAL
The N signal can be used to clear the position counter or to take a snapshot. To continuously monitor
the N channel and trigger clearing of the encoder position or latching of the position, where the N
channel event has been detected, set the flag clr_cont. Alternatively it is possible to react to the next
encoder N channel event only, and automatically disable the clearing or latching of the encoder
position after the first N signal event (flag clr_once). This might be desired because the encoder gives
this signal once for each revolution.
Some encoders require a validation of the N signal by a certain configuration of A and B polarity. This
can be controlled by pol_A and pol_B flags in the ENCMODE register. For example, when both pol_A
and pol_B are set, an active N-event is only accepted during a high polarity of both, A and B channel.
For clearing the encoder position ENC_POS with the next active N event set clear_on_n = 1 and
clr_once = 1 or clr_cont = 1.
Position -4 -3 -2 -1 0 1 2 3 4 5 6 7
A
B
N
t
Figure 22.1 Outline of ABN signals of an incremental encoder
THE ENCODER CONSTANT ENC_CONST
The encoder constant ENC_CONST is added to or subtracted from the encoder counter on each polarity
change of the quadrature signals AB of the incremental encoder. The encoder constant ENC_CONST
represents a signed fixed point number (16.16) to facilitate the generic adaption between motors and
encoders. In decimal mode, the lower 16 bits represent a number between 0 and 9999. For stepper
motors equipped with incremental encoders the fixed number representation allows very comfortable
parameterization. Additionally, mechanical gearing can easily be taken into account. Negating the sign
of ENC_CONST allows inversion of the counting direction to match motor and encoder direction.
Examples:
- Encoder factor of 1.0: ENC_CONST = 0x0001.0x0000 = FACTOR.FRACTION
- Encoder factor of -1.0: ENC_CONST = 0xFFFF.0x0000. This is the two’s complement of 0x00010000.
It equals (2^16-(FACTOR+1)).(2^16-FRACTION)
- Decimal mode encoder factor 25.6: 00025.6000 = 0x0019.0x1770 = FACTOR.DECIMALS
www.trinamic.com