4.3.5. Operation with encoders

4.3.5.1. 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..

Warning

Auto-detect works only with 3.3 V and 5 V (with error 0.2 V) encoders.

4.3.5.2. 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.

../../../_images/SigEnc1.png

The signals at CH A and CH B outputs of quadrature encoder

../../../_images/QuadEnc1.png

An optical quadrature encoder mechanics

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.

4.3.5.3. 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).

4.3.5.4. Encoder connection

The encoder is connected to the controller via D-SUB 15 pin connector, which is in all systems (controller board, one-axis and two-axis in box

../../../_images/Encoder.png

The diagram of single-ended encoder connection using D-SUB 15 pin connector.

../../../_images/Encoder_Diff.png

The diagram of differential encoder connection using D-SUB 15 pin connector.

See also the Example of a motor connection chapter.

Warning

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 +5 V 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.

4.3.5.4.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.

4.3.5.4.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.