Analysis of the structure and control technology of stepper motor

Publisher:清新心情Latest update time:2012-07-06 Source: mcu99 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Stepper motors, also called steppers, use the principles of electromagnetism to convert electrical energy into mechanical energy and have been used since the 1920s. With the increasing popularity of embedded systems such as printers, disk drives, toys, windshield wipers, vibrating pagers, robotic arms, and video recorders, the use of stepper motors has skyrocketed. Whether in industry, military, medical, automotive, or entertainment, as long as you need to move an object from one location to another, stepper motors can be used. Stepper motors come in many shapes and sizes, but no matter what shape and size, they can be divided into two categories: variable reluctance stepper motors and permanent magnet stepper motors. This article focuses on the simpler and more commonly used permanent magnet stepper motor.

The structure of a stepper motor

As shown in Figure 1, a stepper motor is driven by a set of coils wound around the stator teeth, which are the fixed part of the motor. Generally, a wire wound in a loop is called a solenoid, and in a motor, the wire wound around the teeth is called a winding, coil, or phase. If the current in the coil flows as shown in Figure 1, and we look down from the top of the motor to the top of the tooth slot, the current flows counterclockwise around the two teeth. According to Ampere's law and the right-hand rule, such a current will produce a magnetic field with the north pole facing up.

Now suppose we construct a motor with two windings wound around the stator and a permanent magnet built in that can rotate arbitrarily around the center. This rotatable part is called the rotor. Figure 2 shows a simple motor, called a two-phase bipolar motor, because it has two windings on the stator and its rotor has two magnetic poles. If we supply current to winding 1 in the direction shown in Figure 2a, and no current flows through winding 2, then the south pole of the motor rotor will naturally point to the north pole of the stator magnetic field as shown in the figure.

Assume that we cut off the current in winding 1 and supply current to winding 2 in the direction shown in Figure 2b. Then the stator magnetic field will point to the left, and the rotor will rotate accordingly, keeping the same direction as the stator magnetic field.

Next, we cut off the current in winding 2 and supply current to winding 1 in the direction of Figure 2c. Note that the current in winding 1 now flows in the opposite direction to that shown in Figure 2a. The north pole of the stator's magnetic field will then point downward, causing the rotor to rotate with its south pole also pointing downward.

Then we cut off the current in winding 1 and supply current to winding 2 in the direction shown in Figure 2d, so that the stator magnetic field will point to the right again, causing the rotor to rotate with its south pole also pointing to the right.

Finally, we cut off the current in winding 2 again and supply current to winding 1 as shown in Figure 2a, so that the rotor returns to its original position.

At this point, we have completed one cycle of electrical excitation of the motor winding, and the motor rotor has rotated a full circle. In other words, the electrical frequency of the motor is equal to the mechanical frequency of its rotation.

If we complete the four steps shown in Figure 2 in sequence in 1 second, the electrical frequency of the motor is 1 Hz. Its rotor rotates once, so its mechanical frequency is also 1 Hz. In summary, the relationship between the electrical frequency and mechanical frequency of a two-phase stepper motor can be expressed as follows:

fe=fm*P/2 (1)

Among them, fe represents the electrical frequency of the motor, fm represents its mechanical frequency, and P represents the number of equally spaced magnetic poles of the motor rotor.

From Figure 2 we can also see that each step of operation will cause the rotor to rotate 90°, that is, the degree of rotation caused by each step of operation of a two-phase stepper motor can be expressed by the following formula:

1 step = 180°/P (2)

From equation (2), we know that a bipolar motor can rotate 180°/2=90° per movement, which is exactly what we see in Figure 2. In addition, the equation also shows that the more poles the motor has, the higher the step accuracy. Common two-phase stepper motors have between 12 and 200 poles, and the step accuracy of these motors is between 15° and 0.9°.

The example shown in Figure 3 is a two-phase, six-pole stepper motor, which contains three permanent magnets and therefore has six magnetic poles. In the first step, as shown in Figure 3a, we apply voltage to winding 1, generating a magnetic field with the north pole pointing to the top of the stator, so that the south pole of the rotor (the red "S" end in Figure 3a) turns to the top of the figure. Next, in Figure 3b, we apply voltage to winding 2, generating a magnetic field with the north pole pointing to the left of the stator. As a result, the closest south pole of the rotor turns to the left of the figure, that is, the rotor rotates 30° clockwise. In the third step, in Figure 3c, we apply a voltage to winding 1 again, generating a magnetic field with the north pole pointing to the bottom of the figure in the stator, thereby causing the rotor to rotate 30° clockwise to the position shown in Figure 3c. In Figure 3d, we apply voltage to winding 2, generating a magnetic field with the north pole pointing to the right of the stator, and once again causing the rotor to rotate 30° clockwise to the position shown in Figure 3d. Finally, we apply voltage to winding 1 to generate a magnetic field with the north pole pointing upward to the stator as shown in Figure 3a, causing the rotor to rotate 30° clockwise, ending an electrical cycle. It can be seen that 4 steps of electrical excitation result in 120° mechanical rotation. In other words, the electrical frequency of the motor is 3 times the mechanical frequency, which is consistent with equation (1). In addition, we can also see from Figure 3 and equation (2) that the rotor of the motor rotates 30° in each step.

If current is delivered to both windings at the same time, the motor's torque can be increased, as shown in Figure 4. At this time, the magnetic field of the motor stator is the vector sum of the magnetic fields generated by the two windings separately. Although this magnetic field still only rotates the motor 90° each time, as in Figures 2 and 3, because we are energizing both motor windings at the same time, the magnetic field is stronger than when one winding is energized separately. Since this magnetic field is the vector sum of two perpendicular fields, it is equal to 2×1.414 times each field, so the torque applied by the motor to its load is also proportionally increased.

Motor excitation sequence

Now that we know that a series of stimuli will cause the stepper motor to rotate, the next step is to design the hardware to implement the required stepping sequence. The piece of hardware (or a combination of hardware and software) that makes the motor move is called a motor driver. [page]

Figure 4 shows how to excite the windings of a two-phase motor to make the motor rotor rotate. In the figure, the winding taps in the motor are marked as 1A, 1B, 2A and 2B. 1A and 1B are the two taps of winding 1, and 2A and 2B are the two taps of winding 2.

First, a positive voltage is applied to pins 1B and 2B, and 1A and 2A are grounded. Then, a positive voltage is applied to pins 1B and 2A, and 1A and 2B are grounded. This process actually depends on the direction of the wire winding around the tooth slot, assuming that the direction of the wire winding is consistent with the previous section. Following this sequence, we get the excitation sequence summarized in Table 1, where "1" represents a positive voltage and "0" represents ground.

There are two possible directions for the current to flow in the motor windings. Such motors are called bipolar motors and bipolar drive sequences. Bipolar motors are usually driven by a circuit called an H-bridge. Figure 5 shows the circuit connecting the H-bridge and the two taps of the stepper motor. The H-bridge is connected to a fixed voltage DC power supply (its amplitude can be selected according to the requirements of the motor) through a resistor. Then, the circuit is connected to the two taps of the winding through four switches (labeled S1, S2, S3 and S4). The layout of this circuit looks a bit like a capital letter H, so it is called an H-bridge.

As can be seen from Table 1, to energize the motor, the first step is to set tap 2A to logic 0 and tap 2B to logic 1, so we can close switches S1 and S4 and open switches S2 and S3. Next, we need to set tap 2A to logic 1 and tap 2B to logic 0, so we can close S2, S3, and open S1 and S4. Similarly, in the third step we can close S2, S3 and open S1 and S4, and in the fourth step we can close S1, S4 and open S2, S3.

The excitation method for winding 1 is no more than this, using a pair of H bridges to generate the required excitation signal sequence. Table 2 shows the position of the switch at each step in the excitation process.

Note that if R=0 and switches S1 and S3 are accidentally closed at the same time, the current flowing through the switches will reach infinity. In this case, not only will the switches be burned out, but the power supply may also be damaged, so a non-zero resistance resistor is used in the circuit. Although this resistor will cause certain power consumption and reduce the efficiency of the motor driver, it can provide short-circuit protection.

Unipolar motor and its driver

We have discussed bipolar stepper motors and drivers previously. Unipolar motors are similar except that the only externally accessible tap is the center tap of each winding, as shown in Figure 6. We label the tap from the top of the winding as tap B, the tap from the bottom as tap A, and the one in the middle as tap C.

Sometimes we encounter motors with unmarked taps. If we know the construction of stepper motors, it is easy to identify which taps belong to which winding by measuring the resistance between the taps. The impedance between taps of different windings is usually infinite. If the impedance between taps A and C is measured to be 100 ohms, then the impedance between taps B and C should also be 100 ohms, and the impedance between A and B should be 200 ohms. This impedance value of 200 ohms is called the winding impedance.

Figure 7 shows a single-phase drive circuit for a unipolar motor. It can be seen that when S1 is closed and S2 is open, the current will flow from right to left through the motor winding; and when S1 is open and S2 is closed, the current flow direction changes to left to right. Therefore, we can change the direction of the current with only two switches (while four switches are required in a bipolar motor). Table 3 shows the position of the switch at each step of excitation in the unipolar motor drive circuit. [page]

Although unipolar motors are relatively simple to drive and control, they are more complex and generally more expensive than bipolar motors due to the use of a center tap in the motor. In addition, unipolar motors only produce half the magnetic field because current flows through only half of the motor windings.

After knowing the construction principle of unipolar and bipolar motors, when we encounter a motor without taps and no data sheet, we can deduce the relationship between taps and windings. A motor with 4 taps is a two-phase bipolar motor, and we can tell which two taps belong to the same winding by measuring the impedance between the wires. A motor with 6 taps may be a two-phase unipolar motor or a three-phase bipolar motor, and the specific situation can be determined by measuring the impedance between the wires.

Motor Control

The motor control theory discussed earlier in this article can be implemented in a full hardware solution or using a microcontroller or DSP. Figure 8 shows how to control a two-phase unipolar motor using transistors as switches. The base of each transistor is connected to a digital output of the microcontroller through a resistor, which can be from 1 to 10M ohms, to limit the current flowing into the base of the transistor. The emitter of each transistor is grounded and the collector is connected to the four taps of the motor winding. The center tap of the motor is connected to the positive terminal of the supply voltage.

The collector of each transistor is connected to a voltage source through a diode to protect the transistor from being burned out by the induced current on the motor winding when the rotor rotates. When the rotor rotates, an induced voltage will appear on the motor winding. If the collector of the transistor is not connected to the voltage source through a diode, the current caused by the induced voltage will flow into the collector of the transistor.

For example, suppose digital output do1 is high and do2 is low, then do1 will turn on transistor T1, and current will flow from +V through the center tap and the base of T1, and then out of the emitter of T1. But do2 is off at this time, so current cannot flow through T2. By reasoning in this way, we can change Table 3 to the order of changes in the microcontroller digital outputs required to drive the motor.

Once we know the hardware and digital output sequences required to drive the motor, we can write software to implement these sequences for the microcontroller or DSP we are most comfortable with.

Firmware Control

I implemented the motor controller described above on a Microchip PIC16F877 using a 1N4003 diode and a 2SD1276A Darlington transistor. Bits 0 to 3 of PortA of the PIC are used for digital output. The motor is a 5V two-phase unipolar motor purchased from Jameco (produced by Airpax [Thomson], model M82101-P1), and the PIC and the motor are powered by the same 5V power supply. However, in real applications, in order to avoid introducing noise into the power supply signal of the microcontroller, it is recommended that you use different power supplies for the motor and the microcontroller.

Reference address:Analysis of the structure and control technology of stepper motor

Previous article:Distributed management and control heat meter
Next article:Stepper motor principle and instructions for use

Recommended ReadingLatest update time:2024-11-16 19:27

STM32 drives LCD12864 display
When we make an electronic product, we often need to realize the function of human-computer interaction. In addition to outputting to the host computer for display through the computer, the display is also a very good way for human-computer interaction, which can be used in some occasions where computers cannot be use
[Microcontroller]
Research on feed rate planning method for NC machining under high-order drive constraints
introduction Compared with three-axis CNC machining, five-axis CNC machine tools are widely used in aviation, aerospace, power, energy and other fields due to their excellent tool space accessibility and fewer tooling times. With the increasing demand for complex curved parts and machining accuracy i
[Embedded]
Research on feed rate planning method for NC machining under high-order drive constraints
Microchip Launches New All-in-One Hybrid Drive Module Solution Designed for Electric Aviation Applications
Microchip introduces new all-in-one hybrid drive module solution designed for electric aviation applications, reducing development time and weight The first in a new family of products, this highly integrated and configurable three-phase power module can be customized using either silicon carbide or s
[Microcontroller]
Microchip Launches New All-in-One Hybrid Drive Module Solution Designed for Electric Aviation Applications
FPGA chip EPXAl0 with embedded ARM core and its application in image driving and processing
With the development of submicron technology, the density of FPGA chips continues to increase, and with its powerful parallel computing capabilities and convenient and flexible dynamic reconfigurability, it is widely used in various fields. However, in the implementation of complex algorithms, FPGA is far less flexi
[Microcontroller]
FPGA chip EPXAl0 with embedded ARM core and its application in image driving and processing
Design of IDE display driver IP core in SOPC system based on NioslI
NioslI embedded processor is a SOPC solution proposed by A1tera . It is a 32-bit embedded processor that users can configure and build at will. Combined with rich peripherals , it can quickly and flexibly build a powerful SOPC system. A ltera provides some general IP cores, all
[Power Management]
Design of IDE display driver IP core in SOPC system based on NioslI
TaiSi Microelectronics - Single-chip automotive ambient light driver | Confirmed application for the 2023 "Xinxiang Yizhuang" Automotive Chip Competition
Apply for awards丨Top 50 automotive chips Application technology丨Single-chip automotive ambient light driver Product Description: · The chip atmosphere light driver TCPL01x series is a mixed-signal product, with a single core integrating the high-voltage analog part LIN transceiver, LDO, LED constant current
[Automotive Electronics]
TaiSi Microelectronics - Single-chip automotive ambient light driver | Confirmed application for the 2023
Analysis of mini2440 LED driver
//Define the name of the LED device, here is leds. After this module is loaded, it will automatically create a device file with this name in the /dev directory. #define DEVICE_NAME "leds" //There are 4 LEDs (light-emitting diodes) on the mini2440 development board; //These 4 LEDs are connected to the PINs (pins) of t
[Microcontroller]
Analysis of mini2440 LED driver
Based on 1602 LCD voltage driver applied in proteus simulation
This example uses 1602 driven by 5V voltage, with backlight, can display two lines, 16 characters per line, cannot display Chinese characters, has a built-in ASCII character set library containing 128 characters, only has a parallel interface, no serial interface. Analyzing the timing diagram, we can see that the pro
[Power Management]
Based on 1602 LCD voltage driver applied in proteus simulation
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号