Micro Motor Blogs
How N20 Encoder Feedback Works in DC Gear Motors

N20 encoder feedback often measures rotation at the motor shaft rather than directly at the gearbox output. This distinction affects pulse counting, output speed calculations and position monitoring. Engineers should verify encoder resolution, counting mode and gearbox ratio before integrating feedback into a motion-control system.
In an encoder-equipped DC gear motor, magnetic sensing elements generate electrical signals that a controller interprets to estimate rotational speed, direction and relative movement. Kechen Motor offers N20 gear motor configurations identified with 3 PPR and 7 PPR magnetic encoders. However, these ratings alone do not establish how many counts a particular controller will record.
The important questions are where the encoder measures rotation, how its pulse resolution is defined and which signal transitions the controller counts. A mismatch in any of these settings can produce incorrect speed readings or position estimates, even when the motor and encoder are functioning normally.
N20 Encoder Wiring and A/B Signal Channels
Correct N20 encoder wiring starts with identifying the motor power connections and the encoder’s electrical interface. The motor driver controls the motor windings, while the encoder electronics generate signals for the controller. These circuits may operate at different supply voltages and must be connected according to the specific motor documentation.
How Dual-Channel Hall Encoder Feedback Works
A typical dual-channel magnetic encoder uses Hall sensing elements to detect changes in the magnetic field as the motor rotates. The sensing circuit produces two digital output signals, commonly identified as channels A and B.
In a quadrature encoder, these signals are offset in phase. By examining which channel changes first, the controller can distinguish between opposite directions of rotation. The controller also counts selected signal transitions to estimate rotational movement.
For example, one rotational direction may produce the repeating signal-state sequence 00, 01, 11, 10. Reversing the motor produces the opposite transition order. Which sequence represents clockwise rotation depends on the channel assignments, wiring orientation and controller configuration.
Direction detection is useful in instrument adjustment mechanisms and motorized indexing equipment. When the mechanism reverses, the controller needs to subtract reverse movement rather than continue accumulating counts in one direction.
When an N20 encoder is mounted on the motor shaft, it measures rotation before the gearbox rather than directly at the output shaft. The controller must then use the gearbox ratio to estimate output movement. This arrangement should be confirmed from the mechanical drawing or encoder specification of the selected assembly.
Understanding the N20 Encoder Wiring Connections
Many N20 gear motor assemblies with dual-channel encoders use six electrical connections: two for the DC motor and four for the encoder. The following table describes a common functional arrangement, not a universal connector pinout.

| Connection | Function | Engineering Check |
|---|---|---|
| Motor + | Motor supply terminal | Confirm motor driver voltage and terminal assignment |
| Motor – | Motor supply terminal | Check the motor driver return connection |
| Encoder VCC | Encoder electronics supply | Verify the permitted supply voltage |
| Encoder GND | Encoder ground reference | Confirm compatible signal ground connections |
| Channel A | Digital encoder output | Check signal levels and transitions |
| Channel B | Second quadrature output | Verify transitions and phase relationship |

The encoder supply should not be assumed to match the motor voltage. A motor may operate from a higher voltage than its sensing circuit can tolerate. Connecting the motor supply directly to the encoder without checking its rating can damage the electronics.
The encoder output circuit also determines how the controller should receive the signals. Some output types require external pull-up resistors, while others provide actively driven logic levels. The controller’s input voltage limits and the encoder’s output characteristics must be compatible.
Wire colors and connector positions are not standardized across all N20 assemblies. The actual wiring diagram and pin assignments must be verified against the selected motor datasheet before connection.
Checking A/B Signals Before Counting Pulses
Before configuring the controller’s position counter, operate the motor at a low, controlled speed and examine both encoder channels with an oscilloscope or logic analyzer.
Check that each channel changes between valid logic states and that the transitions follow a consistent quadrature sequence. Reversing the motor should reverse the transition order. If the controller reports the wrong direction, inspect the channel assignments and software direction settings.
Missing N20 encoder pulses can result from unsuitable input thresholds, electrical interference, incorrect pull-up arrangements or insufficient controller sampling speed. Noise from motor switching may also affect signal quality, particularly when encoder conductors run alongside motor power wires.
Compare the waveforms at the encoder output and the controller input when investigating intermittent counts. This helps determine whether the problem originates in the sensing circuit, cable connection or signal-processing software.
N20 Encoder PPR, CPR and Quadrature Counting
One source of N20 encoder counting errors is treating pulses per revolution and decoded counts per revolution as interchangeable values. These measurements describe related quantities, but they are not necessarily identical.
PPR versus Counts per Revolution
PPR generally means pulses per revolution. In many quadrature encoder specifications, it describes the number of complete signal cycles produced by one channel during one revolution of a specified shaft.
CPR is less consistent across technical documentation. Some manufacturers use it for cycles per revolution, while others use it for counts per revolution after decoding. Consequently, the numerical value cannot always be interpreted without reading the manufacturer’s definition.
For example, suppose a 3 PPR encoder generates three complete A-channel cycles during one motor-shaft revolution. A controller using x4 quadrature decoding can detect twelve count transitions during that revolution.
This relationship applies only when PPR refers to complete cycles per channel and the encoder measures the stated shaft. A product specification that already reports decoded counts would require a different interpretation.
For N20 encoder integration, engineers should confirm the reference shaft, PPR definition and decoder configuration before using the resolution value in firmware.
How x1, x2 and x4 Quadrature Counting Differ
Quadrature decoding determines which signal transitions contribute to the controller’s position counter.
In x1 mode, the controller counts one selected edge per complete A-channel cycle. In x2 mode, it counts both the rising and falling edges of one channel. In x4 mode, it counts rising and falling transitions on both A and B.
The following values assume that PPR represents complete signal cycles per channel per motor-shaft revolution, both channels operate correctly and the decoder records every required transition.
| Encoder Resolution | x1 Counts | x2 Counts | x4 Counts |
|---|---|---|---|
| 3 PPR | 3 | 6 | 12 |
| 7 PPR | 7 | 14 | 28 |


If the specified 7 PPR represents seven complete signal cycles per channel per motor revolution, x4 decoding produces 28 counts per motor revolution. The same calculation gives twelve counts for a 3 PPR encoder.
These values illustrate the decoding relationship; they should not be treated as verified count specifications for a particular Kechen Motor model until the original encoder resolution definition is confirmed.
x4 decoding increases the number of detectable count transitions without changing the encoder’s physical magnetic pole arrangement or sensor hardware. It improves theoretical digital count resolution, but it does not automatically improve the mechanical accuracy of the gearbox output.
Why Encoder Counts May Differ Between Controllers
Two controllers connected to the same encoder can report different count totals when their decoding methods differ. Under the assumptions above, an x1 counter records one-quarter as many counts as an x4 counter for the same shaft movement.
Incorrect scaling affects the calculated speed as well. If the controller records seven counts per revolution but its software divides the count rate by 28, the reported rotational speed will be one-quarter of the correct value.
Other counting problems arise when a microcontroller cannot process transitions quickly enough. At higher motor speeds, interrupt latency, input filtering or electrical noise may cause missed or invalid transitions.
Before changing the conversion factor, rotate the reference shaft through a known number of revolutions and compare the observed N20 encoder count with the expected value. This test helps separate decoding configuration errors from missing electrical signals.
Calculating Output Shaft Counts After Gear Reduction
When an N20 encoder measures motor-shaft rotation upstream of the gearbox, its count rate must be converted to represent the slower output shaft. The required conversion depends on the actual reduction ratio.
Relationship Between Motor Rotation and Gearbox Output
A reduction gearbox transfers rotation from the motor to the output shaft at a lower speed. With a 50:1 reduction ratio, the motor shaft completes approximately fifty revolutions for one output-shaft revolution.
If the encoder measures the motor shaft, its counter accumulates signals throughout those fifty revolutions. The gearbox ratio must therefore be included when estimating output position or speed.
For example, an automated instrument may use a geared motor to adjust a rotary mechanism. Without the reduction ratio, the controller could calculate the motor speed correctly while reporting an incorrect speed for the driven mechanism.
Formula for Output Shaft Encoder Counts
The theoretical number of motor-side encoder counts corresponding to one output-shaft revolution can be calculated using:
Where C_motor is the number of decoded counts per motor-shaft revolution, G is the gearbox reduction ratio expressed as motor revolutions per output-shaft revolution, and C_output is the theoretical number of counts corresponding to one output-shaft revolution.
This relationship assumes that the encoder measures the gearbox input shaft, the counting method is defined and the mechanical reduction ratio is known.
For an encoder mounted directly on the output shaft, multiplying its measured counts by the gearbox ratio would be incorrect. The output encoder already measures rotation after gear reduction.
Worked Example: 3 PPR Encoder With a 50:1 Gearbox
Consider a hypothetical N20 encoder configuration with a 3 PPR motor-shaft encoder and a 50:1 gearbox. For this calculation, assume that 3 PPR means three complete signal cycles per channel per motor revolution and that no required transitions are missed.
Under x1 decoding, the encoder produces three counts per motor revolution. The theoretical output count is 3 × 50 = 150 counts per revolution.
Under x2 decoding, six motor-shaft counts give 6 × 50 = 300 counts per output revolution.
Under x4 decoding, twelve motor-shaft counts give 12 × 50 = 600 counts per output revolution.
For comparison, a hypothetical 7 PPR encoder with the same reference shaft, PPR definition, reduction ratio and x4 decoding would produce 28 × 50 = 1,400 counts per output revolution.
| Encoder | Counting Mode | Gear Ratio | Theoretical Output Counts |
|---|---|---|---|
| 3 PPR | x1 | 50:1 | 150 |
| 3 PPR | x2 | 50:1 | 300 |
| 3 PPR | x4 | 50:1 | 600 |
| 7 PPR | x4 | 50:1 | 1,400 |
These figures are theoretical calculation examples, not measured performance data for a specific product.
For the 3 PPR configuration using x4 decoding, the theoretical output angular increment is 360° / 600 = 0.6° per count. For the 7 PPR configuration under the same conditions, the increment is approximately 360° / 1,400 = 0.257° per count.
The smaller increment provides finer count-based movement estimation. It does not guarantee that the output shaft can physically position itself within that angle. Mechanical clearance, shaft compliance, load torque and gearbox ratio tolerances can all affect actual displacement.
Converting Encoder Counts Into Output Speed
Output speed can be estimated by measuring the number of encoder counts accumulated during a known time interval and dividing by the theoretical counts per output revolution.
Using the hypothetical 3 PPR, 50:1 configuration with x4 decoding, suppose the controller records 300 counts during one second. The estimated output speed is (300 / 600) × 60 = 30 rpm.
This calculation assumes correct decoding and no lost counts. It also represents average rotational speed during the measurement interval rather than instantaneous speed at every point.
At low pulse frequencies, short measurement intervals may produce unstable speed readings because only a few transitions occur during each sampling period. Longer intervals improve count-based resolution but introduce additional measurement delay.
For an N20 encoder used in speed regulation, the sampling interval should be selected according to the expected pulse frequency and the required controller response. Measuring the time between consecutive edges may also be useful at low speeds, provided the controller can measure the interval accurately.
Encoder Resolution, Gearbox Backlash and Positioning Limits
Increasing N20 encoder resolution provides more count information, but the mechanical output may not follow every count increment exactly. Encoder resolution, gearbox backlash and positioning repeatability describe different aspects of a motor-driven mechanism.
Why Encoder Resolution Is Not Positioning Accuracy
Encoder resolution describes the number of detectable count increments during a shaft revolution. Positioning accuracy describes how closely the actual mechanical position matches the commanded position.
A controller may calculate hundreds of theoretical counts per output revolution, but this does not establish the positioning accuracy of the gearbox assembly. Gear tooth clearance, elastic deformation, bearing play and external loading can cause differences between calculated and actual output movement.
Consider an optical adjustment mechanism driven through a small gearbox. Even if the controller records a motor-shaft movement corresponding to a fraction of a degree at the output, mechanical clearance may prevent the driven component from moving by that exact amount.
The theoretical count increment should therefore be treated as a measurement scale, not a guaranteed mechanical positioning tolerance.
How Gearbox Backlash Affects Position Feedback



Backlash is the clearance between mating mechanical components, particularly the teeth in a gear transmission. When a motor reverses direction, the input shaft may rotate through part of this clearance before the output shaft begins moving in the opposite direction.
During this interval, a motor-shaft-mounted N20 encoder continues registering rotation. The controller may therefore report movement even though the gearbox output has changed position very little or not yet moved.
This behavior is important in bidirectional indexing mechanisms. A device approaching the same position from opposite directions may stop at slightly different mechanical locations because the gear teeth engage on different sides of the clearance.
Higher encoder PPR cannot remove gearbox backlash. Mechanical testing should instead measure output displacement during direction reversals under representative operating loads.
For equipment with repeated forward and reverse movements, engineers may also evaluate one-direction approach methods, mechanical preload or direct output feedback, depending on the required positioning tolerance.
Motor-Shaft Feedback Versus Direct Output Feedback
Motor-shaft feedback estimates output rotation through the known gearbox ratio. Direct output-shaft feedback measures movement after the reduction stages and can detect output motion that is not directly represented by the motor-side encoder.
For instance, if an external load causes a small movement within the gearbox clearance while the motor shaft remains stationary, a motor-side encoder may not register that output displacement.
Incremental encoders also require a position reference when the controller must know an absolute mechanical location after power-up. Counts accumulated before power loss are not automatically available as a verified physical position after restarting.
Applications requiring a known mechanical origin may use a homing switch, reference sensor or suitable absolute position feedback. The method depends on the control requirements and the mechanical design of the equipment.
Selecting an N20 Motor with Encoder for OEM Equipment
Selecting an N20 motor with encoder involves more than choosing between different PPR ratings. The motor, gearbox, encoder interface and controller must operate together under the intended load and speed conditions.
Choosing Between 3 PPR and 7 PPR Configurations
When both encoder ratings use the same PPR definition and reference shaft, a 7 PPR encoder provides more decoded counts per revolution than a 3 PPR encoder under the same counting mode.
The higher count total allows the controller to distinguish smaller rotational increments. This may be useful when monitoring slow movement or calculating small changes in shaft position.
However, higher PPR also produces more signal transitions per motor revolution. At a given speed, the controller must process those transitions without losing counts or misinterpreting signal states.
For basic rotational speed monitoring, a lower-PPR configuration may provide sufficient measurement information. A higher-PPR configuration may be appropriate when finer count resolution is required and the controller’s input capabilities support the resulting signal frequency.
Kechen Motor’s KC-GM12-N20 gear motor with 3 PPR encoder provides a product reference for evaluating a lower-resolution magnetic encoder configuration. The actual count definition and electrical interface should be confirmed from the selected model’s documentation.
Motor and Encoder Specifications to Confirm
Before integrating an N20 encoder gear motor into OEM equipment, engineers should review the operating conditions and feedback requirements together. A gearbox that meets the required output speed may not provide sufficient torque at the operating point, while a suitable motor may still require a different encoder interface.
| Selection Parameter | What to Verify |
|---|---|
| Motor Voltage | Compatibility with the motor driver supply |
| Output Speed | Required speed under the intended load |
| Operating Torque | Available torque at the required speed |
| Gearbox Ratio | Actual reduction ratio used for movement calculations |
| Encoder Resolution | PPR definition and reference shaft |
| Encoder Supply | Permitted voltage and current requirements |
| Signal Interface | Output circuit, logic levels and controller compatibility |
| Counting Mode | x1, x2 or x4 decoding support |
| Mechanical Output | Shaft dimensions, mounting and coupling arrangement |
| Positioning Requirements | Allowable backlash, repeatability and reference method |
The required feedback resolution should also be considered alongside motor speed. At higher speeds, an encoder with more transitions per revolution places greater demands on controller input processing. At very low speeds, the measurement interval and available count frequency become important factors in speed estimation.
For example, an instrument adjustment drive may require monitoring of gradual rotation and direction changes. A mechanism that repeatedly approaches a fixed position may additionally require backlash evaluation and a reference-position method.
Kechen Motor N20 Encoder Configurations
Kechen Motor offers N20 DC gear motor configurations with magnetic encoder feedback for OEM equipment. Existing product references include 3 PPR and 7 PPR encoder variants, depending on the selected motor assembly.
Engineers can review the 3 PPR N20 encoder gear motor and the KC-GM1024-N20 magnetic encoder gear motor when comparing available feedback configurations.
Encoder availability and electrical characteristics depend on the selected assembly. The 3 PPR and 7 PPR descriptions should not be interpreted as interchangeable options for every N20 motor model without confirmation.
For projects requiring different gearbox ratios, shaft arrangements or mechanical configurations, the N20 DC motor configurations page provides additional model references.
OEM inquiries should specify motor voltage, working torque, required output speed, gearbox ratio, encoder resolution, controller input characteristics, shaft dimensions and mounting restrictions. A mechanical drawing and the intended control method can help establish whether an existing motor configuration meets the application requirements.
Kechen Motor can review these specifications for motor selection and discuss available gearbox, encoder and shaft configurations for OEM projects.
Checking N20 Encoder Feedback Before Integration
Reliable N20 encoder feedback depends on verified wiring, correctly interpreted pulse resolution, suitable quadrature decoding and accurate gearbox conversion, while actual output positioning performance must be evaluated separately under operating load.
Frequently Asked Questions
Does a 7 PPR N20 Encoder Provide Better Positioning Accuracy Than a 3 PPR Encoder?
A 7 PPR encoder provides more decoded counts than a 3 PPR encoder when both ratings use the same definition, reference shaft and counting method. This improves theoretical angular count resolution, but actual positioning accuracy also depends on gearbox backlash, mechanical loading and control performance. Higher PPR alone does not guarantee more accurate output positioning.
Why Does the Controller Report Four Times the Expected Encoder Count?
One possible explanation is a mismatch between the encoder’s PPR definition and the controller’s quadrature decoding mode. If a 3 PPR encoder produces three complete signal cycles per channel per motor revolution, x4 decoding generates twelve counts rather than three. The encoder specification and controller configuration should be checked before changing the scaling factor.
Can an N20 Encoder Detect Gearbox Backlash Directly?
A motor-shaft-mounted N20 encoder cannot directly measure gearbox backlash because it records rotation before the reduction stages. During direction reversal, the motor may rotate while the output shaft remains within the mechanical clearance. Measuring the resulting output displacement requires additional feedback at the output shaft or an independent mechanical measurement.
