Decoding the Dot: A Deep Dive into Barcode Label Printer Electronics - Extended Section 13 |
Subtitle: Platen Motor - Closed-Loop Speed Control and Encoder Feedback |
Introductory Summary |
In the previous sections, we explored how stepper motors are driven, how their current is regulated, and how they move in discrete steps. But there is a fundamental limitation to an open-loop stepper system: the printer sends step pulses and assumes the motor follows them perfectly. If the motor stalls or misses steps due to a sudden load change, the paper position becomes incorrect, and the print quality suffers. To solve this, many high-end printers use closed-loop speed control for the platen motor. This means the printer measures the motor's actual speed and position using an encoder, compares it to the desired speed and position, and adjusts the step frequency or motor current to correct any error. This chapter is devoted entirely to the platen motor's closed-loop speed control system. We will explain why closed-loop control is needed, how an encoder works, and how the printer's firmware uses the encoder feedback to maintain a constant paper speed. We will explore the different types of encoders: optical encoders, magnetic encoders, and capacitive encoders. We will look at the incremental encoder, which provides relative position, and the absolute encoder, which provides absolute position. We will examine the quadrature decoder, which decodes the encoder's signals to determine the speed and direction. We will explore the control algorithm - the PID (proportional-integral-derivative) controller - that adjusts the motor's drive based on the error. We will look at real-world designs from major companies: Zebra's use of a high-resolution optical encoder with a dedicated hardware counter, Sato's magnetic encoder with an integrated decoder, Honeywell's capacitive encoder for harsh environments, Brother's use of a simpler encoder with software decoding, and Texas Instruments' reference design for a closed-loop stepper system. We will also discuss the calibration procedure, the noise filtering, and the diagnostic features. By the end, you will understand how the platen motor achieves its remarkable precision, and you will appreciate the elegance of the closed-loop control system that keeps the paper moving at a constant speed. |

|
Chapter 1: The Problem - Open-Loop Is Not Enough |
In an open-loop stepper system, the printer sends a train of step pulses to the motor driver, and the motor is expected to move one step per pulse. This works well under normal conditions. But the motor can miss steps if the load is too high, if the speed is too high, or if there is a mechanical obstruction. When a step is missed, the motor's position is no longer what the printer thinks it is. The paper position is wrong, and the dots will be misaligned. The print quality will degrade, and the barcode may become unreadable. The problem is that the printer has no way of knowing that a step has been missed. Closed-loop control solves this by measuring the motor's actual position and comparing it to the desired position. If there is an error, the printer adjusts the step frequency or the motor current to correct it. Closed-loop control gives the printer a 'sense' of the motor's position, making the system robust and reliable. |
Design Example: Open-Loop Failure in a Logistics Printer |
A logistics company reported that their printers would occasionally produce misaligned labels when the paper roll was heavy (near the end of the roll). The printers used an open-loop stepper system. The heavy roll increased the load, and the motor occasionally missed steps. The printer did not detect the missed steps, and the labels were misaligned by about 0.5 millimeters - enough to make the barcode unreadable. The company switched to a closed-loop system (using an encoder), and the problem was solved. |

|
Chapter 2: What Is an Encoder- The Motor's Own Speedometer |
An encoder is a sensor that measures the motor's position and speed. It is attached to the motor shaft or to the platen roller. The encoder generates electrical pulses as the motor rotates. The number of pulses per revolution is the encoder's resolution. A higher resolution gives a more precise measurement. The encoder also provides the direction of rotation. The encoder is the feedback device that tells the printer how fast and how far the motor has moved. The encoder is the motor's own speedometer and odometer. |
Design Example: Encoder in Zebra Printers |
Zebra's ZT600 series uses a high-resolution optical encoder attached to the platen roller. The encoder has 1,000 pulses per revolution (PPR). With the 4:1 gear reduction, the encoder gives 4,000 pulses per revolution of the motor. Each pulse corresponds to a paper movement of 0.0078 millimeters - much smaller than the dot pitch. This high resolution allows the printer to detect even the smallest position error. |

|
Chapter 3: Types of Encoders - Optical, Magnetic, and Capacitive |
There are three main types of encoders: optical, magnetic, and capacitive. An optical encoder uses a light source (an LED) and a photodetector. A disk with slits (a code wheel) is attached to the shaft. As the shaft rotates, the slits pass between the LED and the photodetector, generating pulses. Optical encoders are accurate and reliable, but they can be affected by dust and vibration. A magnetic encoder uses a magnet and a Hall-effect sensor. The magnet is attached to the shaft, and the sensor detects the magnetic field. Magnetic encoders are robust and resistant to dust and vibration. A capacitive encoder uses a rotating plate with a pattern of conductive areas. The capacitance changes as the plate rotates. Capacitive encoders are accurate and have a low power consumption. |
Design Example: Optical Encoder in Zebra Printers |
Zebra's printer uses an optical encoder (from US Digital). The encoder has a code wheel with 1,000 slits. The LED is an infrared LED, and the photodetector is a phototransistor. The encoder is enclosed in a housing to protect it from dust. The manufacturer chose the optical encoder because of its high resolution and accuracy. The manufacturer also added a dust filter on the printer's air intake to prevent the dust from reaching the encoder. |
Design Example: Magnetic Encoder in Sato Printers |
Sato's printer uses a magnetic encoder (from Asahi Kasei). The encoder uses a magnet and a Hall-effect sensor. The encoder has a resolution of 500 pulses per revolution. The manufacturer chose the magnetic encoder because it is robust and can operate in a dusty environment. The manufacturer also added a plastic cover over the encoder to protect it from mechanical damage. |
Design Example: Capacitive Encoder in Honeywell Printers |
Honeywell's printer uses a capacitive encoder (from CUI Devices). The encoder has a resolution of 256 pulses per revolution. The manufacturer chose the capacitive encoder because it has a low power consumption and is resistant to electromagnetic interference. |

|
Chapter 4: Incremental vs. Absolute Encoders |
An incremental encoder provides relative position - it tells you how much the shaft has moved since the last reading, but not the absolute position. The incremental encoder generates pulses as the shaft rotates. The printer counts the pulses to determine the position. The incremental encoder also has a reference pulse (or index pulse) that occurs once per revolution, allowing the printer to reset the position counter. An absolute encoder provides the absolute position - it tells you the exact position of the shaft, even after a power cycle. The absolute encoder uses a unique code for each position. The absolute encoder is more expensive than the incremental encoder. Most printers use incremental encoders because they are cheaper and sufficient for the application. |
Design Example: Incremental Encoder in Brother Printers |
Brother's printer uses an incremental encoder with 200 pulses per revolution. The encoder has an index pulse. The printer uses the index pulse to reset the position counter at power-up. The manufacturer chose the incremental encoder because it is less expensive than an absolute encoder. |
Chapter 5: The Quadrature Signals - A and B Channels |
The encoder generates two signals, A and B, that are 90 degrees out of phase (in quadrature). The quadrature signals allow the printer to determine the direction of rotation. If the A signal leads the B signal, the shaft is rotating in one direction. If the B signal leads the A signal, the shaft is rotating in the opposite direction. The quadrature signals are typically TTL-level signals (0 to 5 volts). The printer's CPU or a dedicated decoder reads the A and B signals and decodes the position and the speed. |
Design Example: Quadrature Signals in TMC2209 |
The TMC2209 has a built-in quadrature decoder. The decoder reads the A and B signals and updates an internal position counter. The CPU can read the position counter over the SPI interface. The manufacturer used the TMC2209's built-in decoder to simplify the design. |

|
Chapter 6: The Quadrature Decoder - The Interpreter |
The quadrature decoder is a circuit that interprets the A and B signals. The decoder counts the edges of the A and B signals. For each edge (rising or falling), the position counter is incremented or decremented, depending on the phase relationship. The decoder also provides the speed - the speed is the number of counts per unit time. The quadrature decoder can be implemented in hardware (a dedicated IC or a CPLD) or in software (a microcontroller with interrupt inputs). The hardware decoder is faster and more accurate, but the software decoder is cheaper. |
Design Example: Hardware Decoder in Zebra Printers |
Zebra's printer uses a dedicated quadrature decoder IC (from Texas Instruments). The decoder has a 32-bit position counter and a 16-bit speed counter. The decoder can count up to 10 million counts per second. The manufacturer chose the hardware decoder because it provides high accuracy and does not load the CPU. |
Design Example: Software Decoder in Brother Printers |
Brother's printer uses a software decoder. The CPU has two interrupt inputs, one for the A signal and one for the B signal. The interrupt service routines update the position counter and the speed counter. The manufacturer chose the software decoder because it is less expensive. |
Chapter 7: The Speed Measurement - The Number of Counts per Second |
The speed is measured by counting the number of encoder counts in a fixed time interval. The time interval is typically 1 millisecond. The speed is the number of counts divided by the time interval. The speed measurement is used by the closed-loop control algorithm. The speed measurement must be accurate and have a low noise. The speed measurement is filtered to remove the noise. |
Design Example: Speed Measurement in Sato Printers |
Sato's printer measures the speed every 1 millisecond. The CPU reads the position counter and calculates the speed. The speed is filtered with a low-pass filter (a first-order IIR filter). The manufacturer measured the speed noise and found it to be reduced by 20 dB with the filter. |

|
Chapter 8: The Position Measurement - The Absolute Position |
The position is measured by reading the position counter. The position counter is incremented or decremented by the quadrature decoder. The position is referenced to the index pulse. The index pulse resets the position counter to zero. The position is used by the closed-loop control algorithm. The position must be accurate to within one encoder count. |
Design Example: Position Measurement in Honeywell Printers |
Honeywell's printer reads the position counter every 1 millisecond. The position is used to determine the paper feed. The manufacturer measured the position accuracy and found it to be within one encoder count. |
Chapter 9: The Control Algorithm - The PID Controller |
The closed-loop control algorithm is typically a PID (proportional-integral-derivative) controller. The PID controller calculates the error - the difference between the desired speed and the actual speed. The controller then calculates the correction - the adjustment to the step frequency or the motor current. The correction is the sum of three terms: the proportional term (which is proportional to the error), the integral term (which is proportional to the integral of the error), and the derivative term (which is proportional to the derivative of the error). The PID controller is tuned to give a fast response and a low overshoot. The PID controller is the heart of the closed-loop control system. |
Design Example: PID Controller in Zebra Printers |
Zebra's printer uses a PID controller in the firmware. The PID controller runs at 1,000 hertz (every 1 millisecond). The controller calculates the error and adjusts the step frequency. The PID gains (Kp, Ki, Kd) are tuned for the specific motor and load. The manufacturer tuned the PID gains using the Ziegler-Nichols method. The manufacturer measured the response time and found it to be 5 milliseconds - fast enough to catch any speed errors. |

|
Chapter 10: The Proportional Term - The Immediate Correction |
The proportional term is proportional to the error. A larger error gives a larger correction. The proportional term is the main correction term. The proportional gain (Kp) determines how much correction is applied for a given error. A high Kp gives a fast response but can cause overshoot. A low Kp gives a slow response but is stable. The Kp is tuned to give a good balance. |
Design Example: Proportional Term in Brother Printers |
Brother's printer uses a Kp of 10. The manufacturer tuned the Kp to give a fast response without overshoot. The manufacturer measured the step response and found it to have a rise time of 2 milliseconds and an overshoot of 5%. |
Chapter 11: The Integral Term - The Steady-State Correction |
The integral term is proportional to the integral of the error. The integral term corrects the steady-state error - the error that remains after the proportional term has done its job. The integral term eliminates the steady-state error, ensuring that the motor reaches the desired speed exactly. The integral gain (Ki) determines how much correction is applied. A high Ki can cause overshoot, and a low Ki gives a slow response. |
Design Example: Integral Term in Sato Printers |
Sato's printer uses a Ki of 1. The manufacturer tuned the Ki to eliminate the steady-state error. The manufacturer measured the steady-state error and found it to be zero. |

|
Chapter 12: The Derivative Term - The Anticipatory Correction |
The derivative term is proportional to the derivative of the error. The derivative term anticipates the future error - if the error is changing quickly, the derivative term provides a correction before the error becomes large. The derivative term improves the response time and reduces the overshoot. The derivative gain (Kd) determines how much correction is applied. A high Kd can cause noise, and a low Kd gives a slow response. |
Design Example: Derivative Term in Honeywell Printers |
Honeywell's printer uses a Kd of 0.5. The manufacturer tuned the Kd to reduce the overshoot. The manufacturer measured the overshoot and found it to be 2%. |
Chapter 13: The PID Tuning - A Balancing Act |
The PID tuning is the process of adjusting the Kp, Ki, and Kd gains to achieve the desired performance. The tuning is typically done experimentally. The most common method is the Ziegler-Nichols method. The method involves increasing the Kp until the system oscillates, and then using the oscillation period and the critical Kp to calculate the gains. The tuning is a balancing act - a fast response often requires a high gain, which can cause overshoot and instability. A stable system often requires a low gain, which gives a slow response. The tuning is optimized for the specific motor, load, and operating conditions. |
Design Example: Tuning in Zebra Printers |
Zebra's printer uses the Ziegler-Nichols method for tuning. The manufacturer increased the Kp until the motor oscillated, and then calculated the Kp, Ki, and Kd using the formulas. The manufacturer then fine-tuned the gains empirically. The manufacturer measured the response and found it to be fast and stable. |

|
Chapter 14: The Control Loop Frequency - The Sampling Rate |
The control loop frequency is the rate at which the PID controller is executed. The control loop frequency is typically 500 to 2,000 hertz. A higher frequency gives a faster response, but it also increases the CPU load. The control loop frequency is limited by the encoder's resolution and the CPU's speed. The control loop frequency is typically chosen to be at least 10 times the desired closed-loop bandwidth. |
Design Example: Control Loop Frequency in Brother Printers |
Brother's printer uses a control loop frequency of 1,000 hertz. The manufacturer chose this frequency because it is high enough to give a fast response and low enough to not overload the CPU. |
Chapter 15: The Filtering of the Speed Signal - Reducing the Noise |
The speed measurement from the encoder can be noisy. The noise is caused by the quantization of the encoder counts and by the mechanical vibration. The speed signal must be filtered to remove the noise. The filter is typically a low-pass filter (a first-order IIR filter) or a moving average filter. The filter reduces the noise but also introduces a delay. The filter must be tuned to reduce the noise without introducing too much delay. |
Design Example: Filter in Sato Printers |
Sato's printer uses a first-order IIR filter with a time constant of 1 millisecond. The manufacturer measured the speed noise and found that the filter reduced the noise by 20 dB. The manufacturer also measured the delay and found it to be 1 millisecond - acceptable for the control loop. |

|
Chapter 16: The Calibration - Setting the Zero Point |
The encoder must be calibrated - the printer must know the relationship between the encoder counts and the paper movement. The calibration is done by feeding a known length of paper and counting the encoder pulses. The calibration factor is the number of counts per millimeter. The calibration factor is stored in the EEPROM. The calibration factor is used to convert the encoder counts to the paper position. |
Design Example: Calibration in Honeywell Printers |
Honeywell's printer calibrates the encoder at the factory. The printer feeds a 100-millimeter length of paper and counts the encoder pulses. The calibration factor is calculated and stored in the EEPROM. The user can also perform a calibration by entering a service menu. |
Chapter 17: The Index Pulse - The Reference Point |
The index pulse is a special pulse that occurs once per revolution of the encoder. The index pulse provides a reference point. The printer uses the index pulse to reset the position counter, ensuring that the position counter does not accumulate a long-term error. The index pulse is used after a power cycle or after a paper jam. The index pulse is a critical part of the closed-loop system. |
Design Example: Index Pulse in Zebra Printers |
Zebra's printer uses the index pulse to reset the position counter at power-up. The printer rotates the motor until the index pulse is detected, and then resets the counter to zero. The manufacturer used the index pulse to ensure that the position counter is accurate. |

|
Chapter 18: The Error Detection - Detecting Missed Steps |
The closed-loop control system can detect missed steps. If the motor is commanded to move a certain distance, but the encoder does not show that the motor has moved, the printer detects an error. The error can be caused by a stall, a jam, or a mechanical failure. When an error is detected, the printer stops the motor and displays an error message. The error detection is a key advantage of the closed-loop system. |
Design Example: Error Detection in Sato Printers |
Sato's printer detects a missed step by comparing the commanded position to the actual position. If the error exceeds a threshold (e.g., 5 encoder counts), the printer stops the motor and displays a 'Motor Stall' error. The manufacturer tested this by stopping the platen roller with a piece of tape. The printer detected the error within 10 milliseconds. |
Chapter 19: The Stall Detection - A Subset of Error Detection |
The stall detection is a specific case of error detection. The stall detection detects when the motor is stalled - the motor is commanded to move, but it is not moving. The stall detection is typically done by measuring the speed. If the speed is zero for a certain period, the printer detects a stall. The stall detection is a safety feature that protects the motor and the printer. |
Design Example: Stall Detection in Brother Printers |
Brother's printer detects a stall by measuring the speed. If the speed is zero for 100 milliseconds, the printer stops the motor and displays a 'Paper Jam' error. The manufacturer tested this by jamming the paper. The printer detected the stall within 100 milliseconds. |

|
Chapter 20: The Speed Profile - A Smooth Motion |
The motor's speed profile is the sequence of speeds that the motor follows during a movement. The speed profile is typically a trapezoid - the motor accelerates, then runs at a constant speed, then decelerates. The speed profile is generated by the closed-loop control system. The speed profile is designed to minimize the vibration and the acoustic noise. The speed profile is also designed to minimize the peak current and the power dissipation. The speed profile is a key part of the motion control system. |
Design Example: Speed Profile in Zebra Printers |
Zebra's printer uses a sophisticated speed profile that is generated by the closed-loop control system. The speed profile is a trapezoid with a smooth acceleration and deceleration. The manufacturer measured the vibration and found it to be reduced by 30% compared to a simple step motion. |
Chapter 21: The Acceleration - A Gradual Start |
The acceleration is the rate at which the motor speed increases. A gradual acceleration reduces the peak current and the mechanical stress. The acceleration is controlled by the closed-loop system. The acceleration is typically 10,000 to 50,000 counts per second squared. The acceleration is set to a value that the motor can achieve without stalling. |
Design Example: Acceleration in Brother Printers |
Brother's printer uses an acceleration of 20,000 counts per second squared. The manufacturer measured the current during acceleration and found it to be 1.5 amperes - well within the motor's rating. |

|
Chapter 22: The Deceleration - A Gradual Stop |
The deceleration is the rate at which the motor speed decreases. A gradual deceleration reduces the mechanical stress and the vibration. The deceleration is controlled by the closed-loop system. The deceleration is typically the same as the acceleration. |
Design Example: Deceleration in Sato Printers |
Sato's printer uses a deceleration of 20,000 counts per second squared. The manufacturer measured the vibration during deceleration and found it to be low. |
Chapter 23: The Jerk - The Rate of Change of Acceleration |
The jerk is the rate of change of the acceleration. A sudden change in the acceleration causes a mechanical shock. A low jerk gives a smooth motion and reduces the vibration. The jerk is controlled by the speed profile. The jerk is typically 1 to 10 million counts per second cubed. |
Design Example: Jerk in Zebra Printers |
Zebra's printer uses a jerk of 5 million counts per second cubed. The manufacturer measured the vibration and found it to be very low. |

|
Chapter 24: The Feedforward Control - An Anticipatory Action |
The feedforward control is an anticipatory action that is used in addition to the feedback control. The feedforward control predicts the required motor current and applies it before the error occurs. The feedforward control improves the response time and reduces the error. The feedforward control is typically used for the acceleration and the deceleration. |
Design Example: Feedforward in Honeywell Printers |
Honeywell's printer uses a feedforward control for the acceleration. The feedforward control applies a current boost during the acceleration. The manufacturer measured the response time and found it to be reduced by 30%. |
Chapter 25: The Adaptive Control - A Self-Tuning System |
The adaptive control is a control system that automatically adjusts its parameters based on the operating conditions. The adaptive control can adjust the PID gains based on the load and the speed. The adaptive control gives a better performance over a wide range of operating conditions. The adaptive control is used in high-end printers. |
Design Example: Adaptive Control in Zebra Printers |
Zebra's printer uses an adaptive control system that adjusts the PID gains based on the paper roll size. When the roll is heavy, the gains are increased to provide more torque. When the roll is light, the gains are reduced to save power. The manufacturer reports that the adaptive control gives a consistent print quality. |

|
Chapter 26: The Position Error - The Measure of Accuracy |
The position error is the difference between the commanded position and the actual position. The position error is measured by the encoder. The position error is used by the PID controller. A small position error indicates a high accuracy. The position error is typically less than one encoder count. |
Design Example: Position Error in Brother Printers |
Brother's printer has a position error of less than 0.5 encoder counts. The manufacturer measured the position error and found it to be very small. |
Chapter 27: The Speed Error - The Measure of Consistency |
The speed error is the difference between the commanded speed and the actual speed. The speed error is measured by the encoder. The speed error is used by the PID controller. A small speed error indicates a consistent speed. The speed error is typically less than 1% of the commanded speed. |
Design Example: Speed Error in Sato Printers |
Sato's printer has a speed error of less than 0.5%. The manufacturer measured the speed error and found it to be very small. |

|
Chapter 28: The Noise Filtering - A Clean Signal |
The encoder signals can be noisy. The noise can come from the environment, from the motor, or from the power supply. The noise must be filtered to prevent false counts. The noise filtering is done by a combination of hardware and software. The hardware filter is an RC low-pass filter. The software filter is a digital filter. |
Design Example: Noise Filtering in Honeywell Printers |
Honeywell's printer uses an RC low-pass filter (a 100-ohm resistor and a 1-nanofarad capacitor) on the encoder inputs. The manufacturer also uses a digital filter in the firmware. The manufacturer measured the noise and found it to be reduced to a negligible level. |
Chapter 29: The Encoder's Resolution - A Trade-Off |
The encoder's resolution is the number of pulses per revolution. A higher resolution gives a higher accuracy and a better control. However, a higher resolution also generates more pulses, which can overload the CPU. The resolution is a trade-off between the accuracy and the CPU load. The typical resolution for a printer is 500 to 2,000 pulses per revolution. |
Design Example: Resolution in Zebra Printers |
Zebra's printer uses a resolution of 1,000 pulses per revolution. The manufacturer chose this resolution because it gives a high accuracy without overloading the CPU. |

|
Chapter 30: The Encoder's Accuracy - A Mechanical Issue |
The encoder's accuracy is determined by the mechanical tolerances of the code wheel and the sensor. The accuracy is typically 1 to 2 arc minutes. The accuracy is affected by the temperature and the vibration. The accuracy is specified by the encoder's datasheet. |
Design Example: Accuracy in Sato Printers |
Sato's printer uses an encoder with an accuracy of 1 arc minute. The manufacturer measured the accuracy and found it to be within the specification. |
Chapter 31: The Encoder's Reliability - A Long-Term Concern |
The encoder is a mechanical device that can wear out. The encoder's reliability is determined by the bearing life and the LED life. The encoder's lifetime is typically 10,000 to 100,000 hours. The encoder's lifetime is extended by using a sealed housing and by running the encoder at a low temperature. |
Design Example: Reliability in Brother Printers |
Brother's printer uses an encoder with a rated lifetime of 50,000 hours. The manufacturer tested the encoder and found it to be reliable. |

|
Chapter 32: The Encoder's Interface - A Simple Connection |
The encoder connects to the printer's main board with a cable. The cable has four wires: power, ground, A, and B. The cable is typically a shielded cable to prevent the EMI. The cable is connected to a connector on the main board. The connector is typically a JST or a Molex connector. |
Design Example: Encoder Interface in Zebra Printers |
Zebra's printer uses a 4-wire shielded cable for the encoder. The shield is connected to the ground at both ends. The manufacturer used a JST connector for the cable. The manufacturer also added a ferrite bead on the cable to reduce the EMI. |
Chapter 33: The Encoder's Supply Voltage - A Clean Source |
The encoder requires a supply voltage - typically 5 volts. The supply voltage must be clean and stable. The supply voltage is often derived from the same 5-volt rail that powers the logic. The supply voltage is decoupled with a 0.1-microfarad capacitor. The supply voltage must be present before the encoder signals are valid. |
Design Example: Encoder Supply in Honeywell Printers |
Honeywell's printer uses a 5-volt supply for the encoder. The supply is decoupled with a 0.1-microfarad capacitor. The manufacturer sequenced the power - the supply is turned on before the motor supply. |

|
Chapter 34: The Encoder's Diagnostic - A Self-Test |
The encoder can be tested by the printer. The test is a simple self-test that checks the signals. The printer commands the motor to move a small distance and checks if the encoder counts. If the encoder counts are not correct, the printer displays an error. The self-test is used during the power-on and during the calibration. |
Design Example: Self-Test in Brother Printers |
Brother's printer performs a self-test at power-on. The printer moves the motor by 10 steps and checks if the encoder counts. If the counts are not correct, the printer displays an 'Encoder Error' message. |
Chapter 35: The Encoder's Fault Detection - A Safety Feature |
The encoder can have a fault - the signal can be lost, or the signal can be noisy. The printer must detect the fault and take action. The fault detection is done by monitoring the encoder signals. If the signals are stuck at a fixed level, the printer detects a fault. The printer stops the motor and displays an error message. |
Design Example: Fault Detection in Sato Printers |
Sato's printer monitors the encoder signals. If the signals are stuck at 0 or 5 volts for 100 milliseconds, the printer detects a fault and stops the motor. |

|
Chapter 36: The Encoder's Replacement - A Service Issue |
The encoder can fail and must be replaced. The encoder is typically a modular component that can be replaced by a service technician. The replacement procedure is simple - the technician removes the old encoder and installs the new one. The printer must be recalibrated after the replacement. |
Design Example: Encoder Replacement in Zebra Printers |
Zebra's printer has a modular encoder that can be replaced in the field. The technician removes the motor cover, unplugs the encoder cable, and removes the encoder. The technician installs the new encoder and runs the calibration procedure. |
Chapter 37: The Encoder's Cost - A Trade-Off |
The encoder adds cost to the printer. The encoder's cost is determined by the resolution, the accuracy, and the type. A high-resolution optical encoder is more expensive than a low-resolution magnetic encoder. The encoder's cost is a trade-off between the performance and the price. The manufacturer must choose the encoder that gives the best performance for the target price. |
Design Example: Cost in Brother Printers |
Brother's printer uses a low-cost magnetic encoder with 200 pulses per revolution. The manufacturer chose this encoder because it is sufficient for the printer's accuracy requirements and it is inexpensive. |

|
Chapter 38: The Future of Closed-Loop Control - Smarter and More Integrated |
The future of closed-loop control lies in smarter and more integrated solutions. The future closed-loop control will use a dedicated motion control IC that integrates the encoder interface, the PID controller, and the motor driver in a single package. The future closed-loop control will also use artificial intelligence (AI) to learn the motor's behavior and to predict the optimal control parameters. The future closed-loop control will be more accurate, more efficient, and more reliable. |
Design Example: Integrated Motion Control IC in a Prototype |
A prototype printer from a startup uses an integrated motion control IC from Texas Instruments. The IC includes the encoder interface, the PID controller, and the motor driver. The IC communicates with the CPU over an SPI interface. The manufacturer reports that the integrated IC simplifies the design and improves the performance. |

|
Detailed Summary - Tying It All Together |
We have now completed our comprehensive exploration of the platen motor's closed-loop speed control system - the system that ensures the paper moves at a constant speed, regardless of the load. We began by understanding the problem with open-loop control: the motor can miss steps, and the printer has no way of knowing. Closed-loop control solves this by measuring the motor's actual speed and position with an encoder and using that feedback to adjust the motor drive. |
We explored the different types of encoders - optical, magnetic, and capacitive - and saw how they are used in printers from Zebra, Sato, Honeywell, and Brother. We learned about the quadrature signals (A and B) and the quadrature decoder that interprets them. We examined the speed measurement and the position measurement, and we saw how they are used by the control algorithm. |
We delved into the PID controller - the heart of the closed-loop system. We saw how the proportional, integral, and derivative terms work together to provide a fast, accurate, and stable control. We discussed the PID tuning, and we saw how the Ziegler-Nichols method is used to set the gains. We looked at the control loop frequency, the filtering of the speed signal, and the calibration. |
We examined the advanced features: the index pulse, the error detection, the stall detection, the speed profile, the acceleration, the deceleration, the jerk, the feedforward control, and the adaptive control. We saw how these features improve the motor's performance and the print quality. |
We discussed the practical aspects: the encoder's resolution, accuracy, reliability, interface, supply voltage, diagnostic, and fault detection. We looked at the encoder's replacement and the cost. We considered the future of closed-loop control - smarter and more integrated solutions with AI and dedicated motion control ICs. |
The overarching lesson is that closed-loop speed control is not a luxury - it is a necessity for high-quality printing. A well-designed closed-loop system ensures that the paper moves at a constant speed, regardless of the load variations, the supply voltage, and the temperature. It also detects any problems, such as stalls or jams, and stops the motor to prevent damage. Understanding the closed-loop speed control system is essential for any engineer who wants to design a reliable and high-performance printer, and this chapter has provided that understanding from the basic principles of the encoder to the advanced techniques of adaptive control. |
End of Extended Section 13 |