4.3.5. Operation with encoders¶
18.104.22.168. Application of encoders¶
Encoders are designed for creation of accurate and fast feedback according to the coordinate for all the electric motor types.The feedback is performed by the motor shaft position, by stage’s linear position, by the motorized table rotation angle or by any other parameter related to the shaft position and measured by using the two-channel quadrature encoder complying the requirements described in Specifications chapter for the appropriate controller type. Controller 8SMC5 supports differential encoders and simple (single-ended) encoders..
Auto-detect works only with 3.3V and 5V (with error 0.2V) encoders.
22.214.171.124. What is quadrature encoder?¶
Encoder is a mechanical motion sensor. The quadrature encoder is designed for direct detection of the shaft position. The sensor transmits the relative shaft position by using two electric signals at CH A and CH B channels shifted relative to each other at 1/4 of period.
An optical quadrature encoder mechanics is shown at the figure above. There are two optocouplers used. The operational principle of an optocoupler is as following: a LED and a detector are arranged opposite to each other from different sides of a disc. The optocoupler opens when disc’s “window” coincides with the detector (the outgoing signal is logic zero). The outgoing signal is logic one if the detector is closed by opaque part of the disc.
Number of steps per revolution (CPR) is the main parameter of the quadrature encoder. The standard resolution values for encoder are from 24 to 1024 CPR. Each period of signal alteration is interpreted by 1, 2 or 4 codes which is corresponding to X1, X2 and X4 operating modes. This controller uses the most accurate X4 mode. The maximum frequency of each encoder’s signal depends on the applied encoder itself, since for 200 kHz in X4 mode the controller can read up to 800,000 encoder counts per second.
126.96.36.199. Controller’s features¶
There are two operating modes with encoder available for the controller:
- the encoder is used as the main position sensor (this is the main operating mode for DC motors and the optional one for stepper motors).
- slippage, backlash or steps loss detection (the recommended mode for joint operations with stepper motors, in case the encoder is not used as a primary position sensor, see more).
188.8.131.52. Encoder connection¶
See also the Example of a motor connection chapter.
Encoder inputs of the controller internally pulled up to logic one by using the 5.1kΩ resistors. Frequently encoder outputs are of “open collector” type equipped with internal pull-up resistor. During the data transmission they provide good characteristics while passing from higher logic level to lower. However, the pass from logic 0 to logic 1 is more graduate. It passes through the RC circuit formed by pull-up resistor and cable capacitance. This is the most important thing if the cable is long (up to 5 meters). If the internal pull-up is not sufficient, the pull-up resistor with r=1.5kΩ may be added for every +5V to each output in order to improve the transmission speed parameters; before doing that please check if the open collector of the encoder can transmit 5mA current. The resistors insertion diagram is shown above. The maximum operating speed for quadrature encoder may be increased by adding a push-pull driver with the outgoing current over 10mA to its output, providing quick 0 - 1 and 1 - 0 transmission edges.
184.108.40.206.1. Operation with long cables¶
For correct encoder operations on cables longer than 5 meters, it is recommended to use an encoder with a differential output (RS485) to reduce the effect of electromagnetic interference. When using the RS485, all differential pairs must be terminated with a 120 Ohms resistor in the connector to the controller.
The cable must have an additional internal shield for digital signals (pins 5-15) connected to the DGND (pin 7) on the controller side and on the stage side. The external shield must be connected to the metal case of the connector directly on the side of the stage and to the metal case of the connector through a 47 nF capacitor on the side of the stage.
220.127.116.11.2. Automatic encoder type detection¶
The 8SMC5 controller can automatically detect the type of encoder if the corresponding option is enabled. This system is designed to work with standard CAT-5E cables up to 50 meters long and with a conductor resistance about 80 mOhm per meter. Automatic detection may not work well with cables longer than 50 meters or with non-standard cables with high resistance wires. In case of problems with automatic encoder type selection, encoder type can be selected manually in the feedback settings.