SMT, PCB Electronics Industry News

How to Add Encoder to Stepper Motor

Dec 14, 2021

Figure 1: Inner components of a stepper motor.

Figure 1: Inner components of a stepper motor.

1. Working Principle of Stepper Motor

When the current flows through the stator winding, the stator winding produces a vector magnetic field. The magnetic field will drive the rotor to rotate an angle, so that the direction of magnetic fields of the rotor is consistent with that of the stator.

When the vector magnetic field of the stator rotates an angle, the rotor also rotates at an angle with this magnetic field. Every input of an electric pulse leads the motor to rotate at an angle to advance one step. The angular displacement of the output is proportional to the number of pulses input, and the speed is proportional to the pulse frequency.

Changing the order in which the winding is energized will reverse the motor. So the control of pulses’ number, frequency and the power on sequence of each phase winding of the motor affect the rotation of the stepper motor.

The internal of common types of motors are iron core and winding coil. If the winding is with a resistance, there will be electric loss which is proportional to the square of resistance and current. This is what we often call copper loss. If the current is not a standard DC or sine wave, it will also produce harmonic loss.
There is hysteresis eddy current effect in the iron core, producing loss in alternating magnetic field. The size of the iron core is related to material, current, frequency and voltage, which is called iron loss.

Copper loss and iron loss are reflected in the form of heat, affecting the efficiency of the motor. The stepper motor generally pursues positioning accuracy and torque output with low efficiency, large current, and high harmonic composition. And the frequency of alternating current changes with the speed. Therefore, the heating condition is common in stepper motor, especially compared with AC motor.

2. Three Types of Circuit Diagrams of Stepper Motor

Circuit diagram of driving system of stepper motor

Figure 2: Circuit diagram of driving system of stepper motor


RL1 ~ RL4 shown in Figure 1 are winding internal resistor, while 50 Ω Resistor is an external resistor, which can limit the current and improve the time constant of the circuit. D1 ~ D4 are freewheeling diode, through which the back EMF generated by the motor winding fades, thus protecting the power transistor TIP122 from damage.

50 Ω external resistor is connected in parallel with a 200 μ F capacitor, which can improve the current pulse front of the stepper motor winding and improve the high frequency performance of the stepper motor. 200 Ω resistor in series with freewheeling diode can reduce the discharge time constant of the circuit. It makes the back edge of the current pulse in the winding steeper, and reduces the current drop time. Besides, the resistor improves the performance of high frequency.

The driving circuit of bipolar stepper motor is shown in the figure 2. The two groups of phases are driven by eight transistors. Bipolar drive circuit can drive 4 - wire or 6 - wire stepper motor at the same time. 4 - wire stepper motor can only use bipolar drive circuit, which greatly reduces the cost of mass production application.

The number of transistors in the drive circuit of bipolar stepper motor is twice that of unipolar drive circuit. The four lower transistors are usually directly driven by the microcontroller, while the upper transistors need the upper drive circuit with higher cost. The transistor of bipolar drive circuit only bears the motor voltage, so it doesn't need clamp circuit which is in unipolar drive circuit.



Driving circuit diagram of bipolar stepper motor

Figure 3: Driving circuit diagram of bipolar stepper motor


Stepper motor shall not be directly connected to AC or DC power supply, but must be used with specific stepper motor drive, as shown in Figure 3. It is composed of pulse generation control unit, power drive unit, protection unit, etc. The two units pulse generation control unit and feedback and protection unit can be controlled by microcomputer. The drive unit is directly coupled with the stepper motor, which could also be understood as the power interface of microcomputer controller for the stepper motor.



motor drive controlling the stepper motor

Figure 4: Drive controller of stepper motor



stepper motor drive system with constant current chopping function composed of L297 (special chip for ring distributor) and L298

Figure 5: Stepper motor drive system with constant current

3. Whether You Should Add an Encoder to Stepper Motor

You should add the encoder on the back shaft of the dual shaft stepper motor.

The stepper motor is the original executive part, while the encoder belongs to the feedback system. The encoder that is controlled by PLC is used with the stepper motor. According to the principle, PLC sends pulse instruction to the stepper driver, and the driver makes the stepper motor run by providing corresponding current to it.

When encoder detects that the stepper motor is running to the position to be reached, it will send feedback signal to the PLC, and then the PLC stops sending pulse signal to stepper driver. When there is no electric current in stepper motor, it will stop running immediately. Actually, the encoder will constantly send the current position to the PLC that compares the feedback value with the target value and adjusts the rotation angle of the rotor.

Definitely, whether the stepper motor stops at the expected position depends on the brake device of the motor. The general feed accuracy can be satisfied when the motor is running at low speed.

Another method is to calculate the pulse number required for the feed of stepper motor, and use PLC programming to run pulses. When the stepper motor stops, the encoder will send the motor position back in order to form a semi closed-loop control. In addition, the PLC program can set the motor to slow down its feed when it is fast to the position, which can meet the positioning accuracy.



Rotor and stator in the encoder

Figure 6: Rotor and stator in the encoder

4. How to Add An Encoder to Stepper Motor

Because the stepper motor can not respond in real time, there must be a process of acceleration and deceleration.

For instance, stepper motor with harmonic reducer whose reduction ratio is 100:1, and the step angle is 0.0072 °is required to be added an encoder to prevent step loss.

In principle, a motor can be installed at one end of the leading screw and the encoder installed at the other end. But this method will be affected by the accuracy of the reducer, which may lead to misjudgment of step loss. The encoder is better to be added to the back shaft of the dual shaft motor. This is common in servo motor, unless you are using it specially or the use is limited by conditions (there is no double output shaft). In general, it is sufficient to process 2500 lines, and it will be a waste to process excessive lines.



Fanuc Encoder A860-0304-T001 2000 pulse

Figure 7: Fanuc Encoder A860-0304-T001


On the other hand, the resolution of the encoder and stepper motor resolution is about the same. If the subdivision on the drive is very high, and only the step loss is needed to be detected, the resolution of the encoder should be consistent with or slightly higher than that of motor before subdivision.

5. Why Adding Encoder to Motor Stepper

The stepper motor is a device which can be controlled accurately, but it is open-loop, and the encoder is needed to realize closed-loop feedback control. The added encoder also measures step loss and rotation or moving speed for dynamic speed control.

For this statement, it is important that the encoder is required to realize closed-loop feedback. In actual use, it’s the poor wire connection of the stepper motor that will occasionally cause the stepper motor to fail to work normally. However, it is not necessary to control the speed through the encoder, because the speed control can be realized by controlling the pulse frequency of the stepper motor.

More information please viait https://okmarts.com/

OKmarts.com Online Store | We provide leading brands of refrigeration compressors, servo motors, Air cylinder and more all over the world.

Dec 30, 2021 -

What does the Tire Pressure Sensor Fault Mean?

Dec 30, 2021 -

Car AC Compressor Troubleshooting-- Best Suggestions

Dec 29, 2021 -

Where is Servo Motor and Servo Drive Used?

Dec 29, 2021 -

Basics of Servo Motor You Should Know

Dec 28, 2021 -

How to Replace Refrigerator Compressor

Dec 28, 2021 -

When You Should Use an Absolute Encoder - Pros and Cons of Different Absolute Encoders

Dec 27, 2021 -

6 Reasons for Refrigeration Compressor Not to Start

Dec 27, 2021 -

Why Refrigeration Compressor Oil Deteriorates & How to Add Oil

Dec 26, 2021 -

Japanese Giant Mitsubishi Heavy Industries Goes Into Central Air Conditioners for Home Use

Dec 26, 2021 -

High Temperature Mulfunction of Screw Compressor and Solutions

92 more news from OKmarts Industrial Parts Mall »

Jul 06, 2022 -

Offline PCBA Cleaning Machine HJS-7100,rosin flux, non-clean flux,water-soluble flux cleaning machine

Jul 05, 2022 -

Semiconductor Spray Cleaning Machine HJS-9700,Semiconductor Wafer Cleaning Machine HJS-9700

Jul 04, 2022 -

Pneumatic Stencil Cleaner HJS-9000II,dual chamber stencil cleaning machine

Jul 03, 2022 -

Electric Stencil Cleaner HJS-9500, SMT Electric Stencil Cleaner HJS-9500

Jul 01, 2022 -

Screen Cleaning Machine HJS-4600, SMT Screen Cleaning Machine HJS-4600

Jun 30, 2022 -

Electric Fixture Cleaning Machine HJS-6700, SMT pallet cleaning machine, soldering pallet cleaning machine

Jun 29, 2022 -

Waste Water Treatment Machine RWT-1000, SMT Waste Water Treatment Machine RWT-1000

Jun 28, 2022 -

Gen3's Dr Chris Hunt, CTO submits an insightful paper to the journal of Surface Mount Technology

Jun 28, 2022 -

Squeegee Cleaning Machine HJS-3700,SMT Squeegee Cleaning Machine HJS-3700

Jun 27, 2022 -

Solderstar Celebrates 20 Years of Innovation

See electronics manufacturing industry news »

How to Add Encoder to Stepper Motor news release has been viewed 361 times

Jetting Pump for Integration

ICT Total SMT line Provider