Skip to main content

AN-CM-221 Incremental Encoder from HDD Motor

Contents

Terms and Definitions

IC Integrated Circuits
HDD Hard Drive Stepper
BLDC Motor Brushless DC Motor
CNC Computer Numerical Control

References

For related documents and software, please visit:

https://www.dialog-semiconductor.com/configurable-mixed-signal.

Download our free GreenPAK Designer software [1] to open the .gp files [2] and view the proposed circuit design. Use the GreenPAK development tools [3] to freeze the design into your own customized IC in a matter of minutes. Dialog Semiconductor provides a complete library of application notes [4] featuring design examples as well as explanations of features and blocks within the Dialog IC.

  1. GreenPAK Designer Software, Software Download and User Guide, Dialog Semiconductor
  2. Incremental Encoder from HDD Motor.gp, GreenPAK Design File, Dialog Semiconductor
  3. GreenPAK Development Tools, GreenPAK Development Tools Webpage, Dialog Semiconductor
  4. GreenPAK Application Notes, GreenPAK Application Notes Webpage, Dialog Semiconductor
  5. SLG46110V, Datasheet, Dialog Semiconductor
  6. Encoder from HDD Motor, YouTube Video, Dialog Semiconductor

Author: Volodymyr Batih

Introduction

Encoders are widely used to translate rotary or linear motion into a digital signal. They are useful for monitoring or controlling motion parameters such as speed, rate, direction, distance or position. These parameters are necessary for countless applications that translate motion parameters into information like motor feedback, linear measurement, and X-Y positioning. Encoders can be found everywhere from complex computer numerical control (CNC) machines to computer mice. There are several types of rotary encoders. Absolute and relative (incremental) encoders are the two main types. An absolute encoder outputs a value proportional to the current state, whereas an incremental encoder outputs a change in state and its direction.

To create a reliable, almost unbreakable incremental encoder, an HDD motor designed to operate over thousands of turns can be a good solution. All you need is to connect it to a GreenPAK IC.

Brushless DC Motor Theory

Any BLDC motor has two primary parts: the rotor, the rotating part; and the stator, the stationary part. Important components of the two parts are the stator windings and the rotor magnets.

In an outer rotor design, the windings are located in the core of the motor. The rotor magnets surround the stator windings (see Figure 1).

Figure 1: 12 Tooth BLDC Motor

Standard 3-phase circuits take on two major forms with names that represent the way in which the single-phase networks are connected: a Star-connected network, also known as Y-connected, symbolized by the letter Υ; and a Delta connected network, symbolized by Δ (delta). In our case we will be looking only at the Star type connection.

Figure 2: BLDC Motor Coil Placement

GreenPAK Circuit Design Analysis

Let’s start from the left side of the design shown in Figure 3. We have two analog comparators (ACMPs) connected to the appropriate inputs to monitor voltage on the motor coils. Next, we have two delays (DLYs) configured for both edges to filter any possible noise from the inputs. Two DFFs take on the role of signal sequence dependent switches. To understand this better, note that all design operation is based on a signal race between input Pins 6 (IN#2) and 3 (IN#1). For example, if the signal on the input of ACMP1 reaches the threshold before ACMP0, only DFF2 will be ready to switch to a HIGH state. All we need then is to wait for the HIGH signal from ACMP0’s output, and vice versa. Thus, we will have pulses on Pin10 (Increment) or Pin12 (Decrement). From that point, we have an operational rotation encoder.

As you can see in Figure 3, PIN9 is named Buzzer. Each time a pulse appears on DFF2 or DFF3, cells PDLY and CNT3 / DLY3 generate a 1 ms pulse for a BPT-14 model piezo sound transducer. This creates a soft clicking sound while the encoder is rotating and helps the user to understand how much the encoder was rotated.

Figure 3: Design View in GreenPAK Designer
Figure 4: Encoder Application Circuit

Circuit operation

In Figure 4 you can see the way the coils are connected. We use two Schottky diodes, D1 and D2, to limit negative (relative to GND) voltage phase. To define the Pinout of the HDD motor you can simply measure coil resistance with a multimeter. To properly connect the motor to the GreenPAK IC as shown in Figure 4, we measured the resistance between coils until we found 3 separate coils (1.9 Ω in our case) and the common point “Q”.

The functionality waveform of a real HDD motor encoder circuit created in GreenPAK Designer is shown in Figure 5 and Figure 6, in which Channel1 (yellow / top line) ─ PIN3 (IN#1), Channel2 (light blue / 2nd line) ─ Pin6 (IN#2), Channel3 (magenta / 3rd line) ─ Pin10 (Increment), Channel4 (blue / bottom line) ─ Pin12 (Decrement). As can be seen in Figure 5 and Figure 6, we can easily define which output channel to toggle by the sequence of input Pins 3 (IN#1) and 6 (IN#2).

Figure 5: Increment Operation
Figure 6: Decrement Operation

Conclusion

GreenPAK IC’s are readily suitable for this application because of their low current consumption, small package size, and flexibility in operation. The benefit of such an encoder is its reliability because of the absence of direct electrical contact. Its operation is very similar to an optical encoder except that the motor will give some threshold in speed of rotation to start detecting a useful signal.

Note: for proper circuit operation, do not forget to configure the input and output Pins correctly. As shown in the schematic, Pins 3 and 6 inputs are to be configured as Analog input and all outputs as 2x Push Pull with the largest possible current drive mode.