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.
Below we described steps needed to understand how the incremental encoder has been programmed. However, if you just want to get the result of programming, download GreenPAK software to view the already completed GreenPAK Design File. Plug the GreenPAK Development Kit to your computer and hit the program to design the device.
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).
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.
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.
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)....Read more »