← Back to Home

Rotary table control

PROTOTYPE

Task :

Measuring the spatial form of a workpiece placed on a rotary table with a tactile probe coordinate measuring machine, such that the rotary table rotates by a specified angle value upon commands issued by the coordinate measuring machine.

Operation :

Implemented with a DSPIC33EP32MC202 microcontroller. The servo motor rotates the main spindle through a 1/80 reduction gear. There is an incremental encoder on the motor shaft (A, B, index signals), which gives 4500 pulses per 1 motor revolution plus 1 index signal. This is 360,000 pulses/1 table revolution (0.001° resolution, 4500 x 80 = 360,000).

The servo motor expects the following signals for rotation :

  • DIR signal, selection of rotation direction
  • STEP signal (although this is not a stepper motor !!), which rotates the main spindle by some amount.

As a starting "hypothesis", such a pulse rotates the spindle by 0.001°, and for each STEP pulse, an incremental output pulse is generated on the incremental encoder on the motor shaft. (This provides the feedback, allowing for a closed-loop control). Due to the mechanical structure and inertia of the system, it can only be accelerated up to a specified (measured) speed; above this speed, the incoming "step" pulses are not executed immediately, but the servo motor electronics buffer them and execute them only later. Thus, a slip (lag) occurs, which is indicated by the difference between the number of issued pulses and the number of incoming incremental pulses (proportional to the actual rotation angle). (The number of incr. imp. will be smaller!) The servo motor must be controlled so that this slip value does not exceed a predefined level!

RECORDING REFERENCE POINT :

Before the actual work operations, the main spindle must be set to the reference point (zero point).

Implementation :

On the rim of the main spindle, there is a "zero point/reference point" positioning "pin", which, during rotation, when reaching the inductive sensor located on the stator, generates a signal which we call the creep speed signal, because if this signal arrives, the initial fast rotation switches to a slow creep rotation. Due to the reduction gear (1/80 ?), the index signal of the incremental encoder arrives within max. a few degrees after the signal arrival. This, corrected by an offset value (due to the mechanical structure), designates the reference or zero point, up to which the control rotates the main spindle.

Counting INCREMENTAL pulses :

With QEI - quadrature encoder interface, which receives the QEA, QEB, and IND signals of the incremental encoder and counts the pulses with a 32-bit up/down counter! (The index signal is needed for moving to the ref. position!) When recording the reference point, the index signal (IND) must be used.

Realization :

The PIC counts the incremental signals, detects the arrival of the index signal, receives commands from the tablet (Android OS), executes them to control the "stepping", acceleration, deceleration, and continuous movement of the servo motor until the specified incremental position is reached. Afterwards, it waits for the next command. During movement, it continuously sends the current position data (angle value, 0.001° accuracy!) to the tablet, which displays it.


© 2026 DevProt Engineering