Guide to Precision Encoders: From Quadrature to Hall

In this engineering brief we will examine the rotary encoder as installed on a Brushless DC (BLDC) motor. The Teknic motor, as shown in Figure 1, was part of the now obsolete NXP OM13067 kit. Note that DigiKey offers a variety of NXP development kits ranging from the small MCSPTE1AK116 to the large 1 kW HVP-MC3PH drives.

As our DigiKey friends say, “don’t turn it on, take it apart!”

Figure 1: Blue sky reflecting off an etched encoder featuring high resolution quadrature slots as well as concentric hall-simulating phase slots.

Encoder disk description

A close-up image of the motor’s encoder disk is shown in Figure 2. The etched slots are clearly visible including several concentric slots with green dot highlights as well as hundreds of closely spaced radially arranged slots. This is a general-purpose encoder that includes two outputs that may be classified as:

  • Quadrature with an index pulse that is asserted once every shaft revolution

  • Hall effect to reflect a 120° electrical revolution

Figure 2 includes a series of green dots identifying the distinct points on the Hall track. The corresponding binary sequence is shown in orange. As will be shown later in this document, this rotational pattern may be read by a logic analyzer.

Tech Tip: A Hall effect sensor is used to detect the presence of a magnetic field. Some BLDC motors embed the Hall sensors between the stator windings. From this position the sensors can detect the magnetic field emanating from the rotor’s permanent magnets. The featured motor uses optical methods to generate the corresponding signals.

Figure 2: Close up image showing the encoder’s interrupt disk. The orange lines identify the transition points for the phase slots.

Test setup

The featured motor is a three-phase synchronous motor with permanent magnets. Recall that a BLDC motor may be operated as a generator. In this example a large drill was used to spin the motor at approximately 850 RPM as shown in Figure 3. The oscilloscope function of the Digilent Analog Discovery Pro (ADP2230) captures the AC waveforms. The Digilent instrument also captures the encoder outputs using its logic analyzer.

Figure 3: Image of the BLDC motor being driven by a drill. The results are captured using the Digilent Analog Discovery Pro (ADP2230).

Quadrature output

The quadrature encoder has already been explored in the Tech Forum. Rather than repeat the information I will simply refer you to this beginners guide. There you will find a big and simple, yet full featured quadrature encoder. It features the requisite A and B quadrature signals generated by a pair of retroreflective sensors. It also features an index output provided by an inductive proximity sensor.

Using materials from the previous articles, you should have no problems interpreting the quadrature waveforms as presented in Figure. The index (I) signal in Figure 4 provides a convenient trigger. Recall that this index is present once per shaft revolution.

Figure 4: Logic analyzer and oscilloscope showing the encoders I, A, and B quadrature outputs in relationship to the motors (generators) three phase outputs.

Hall effect output

The Hall effect sensor as applied to a BLDC motor has yet to be explored on this TechForum. For now, we will skip a full explanation of the Hall sensors and instead focus on the waveforms developed by the Hall-simulating encoder as shown in (Figures 4 and 5). We use the simulating as there are no Hall sensors in the featured motor. Instead, the motor produces identical timed signal used optical means.

For our experiment, a drill was used to spin the motor. The oscilloscope captures two phase-to-phase voltage from our three-phase BLDC motor (acting as a generator with the drill as the energy source) as shown in Figure 5. As a subtle point, note that the two probe grounds are on the T-phase terminal. Consequently, we are looking at the T to S and the T to R-phase voltages.

The logic analyzer in Figure 4 presents the encoder outputs. Close inspection shows that the S to T and the T to R voltage correspond to the oscilloscope T to S and the T to R-phase voltages with a phase inversion on one of the signals.

As a critical observation, recognize that the Hall sensors outputs perfectly align with the physical positioning of the shaft. This strongly suggests their purpose of commutation informing a motor controller to activate the BLDC motor’s phase winding at the correct time.
Perhaps another day we will show how this may be used to commutate the BLDC motor. As an analogy, the Hall sensors coupled with a three-phase-bridge are to a BLDC motor as the commutator is to a brush type motor. In both cases we are talking about a switch used to change the flow of current to perfectly match the rotating magnetic field. The Hall sensor along with the three-phase-bridge has a distinct advantage in terms of efficiency and longevity.

Tech Tip: R, S and T are often used to identify the phases in a three-phase system. Alternative names include A, B, and C, as well as L1, L2, and L3.

Hall sensor sequence

The Hall sensor outputs follow the binary sequence of 100, 101, 001, 011, 010, 110 repeating. This was first identified in Figure 2 and is shown again in Figure 5. Once again, this pattern is used to divide an electrical revolution into distinct phases. This is then used for commutation ensuring that the proper phase winding is activated at the correct time.

Figure 5: Waveforms focused on the 120° Hall sensor signals. Note the distinct timing relationship between the AC waveform and the simulated hall output from the encoder. The green dots match the Figure 2 dots.

Tech Tip: The “electrical revolution” and the “mechanical revolution” are related by the number of poles. The featured motor has 8 poles consequently there are 4 electrical revolutions per mechanical revolution. For example, in Figure 3 the electrical period is approximately 18 ms. Multiply this by 4 to determine the mechanical rotational period. The resulting RPM is approximately 830 RPM. This is close to the nameplate rotational speed for the drill used to drive the motor.

Parting thoughts

This article featured a high performance, yet general purpose encoder as installed on a BLDC motor. The encoder provides quadrature output signal along with a once per revolution index. This allows for tenth-of-a-degree monitoring of the shaft position when coupled to an appropriate encoder. The encoder also features simulated Hall effect sensor outputs. This trio may be used for motor commutation.

Stay tuned as we explore motor commutation using the Hall sensors.

Please leave your comments and suggestions in the space below. Also, give a like if you learned something from this article.

Best wishes,

APDahlen

Related information

Please follow these links to related and useful information:

About this author

Aaron Dahlen, LCDR USCG (Ret.), serves as an application engineer at DigiKey. He has a unique electronics and automation foundation built over a 27-year military career as a technician and engineer which was further enhanced by 12 years of teaching (partially interwoven with military experience). With an MSEE degree from Minnesota State University, Mankato, Dahlen has taught in an ABET-accredited EE program, served as the program coordinator for an EET program, and taught component-level repair to military electronics technicians. Dahlen has returned to his Northern Minnesota home and thoroughly enjoys researching and writing educational articles about electronics and automation.

Highlighted experience

Dahlen is an active contributor to DigiKey’s Technical Forum. At the time of this writing, he has created over 200 unique posts and provided an additional 600 forum posts. Dahlen shares his insights on a wide variety of topics including microcontrollers, FPGA programming in Verilog, and a large body of work on industrial controls.