搜档网
当前位置:搜档网 › 步进电机细分控制(英文)

步进电机细分控制(英文)

步进电机细分控制(英文)
步进电机细分控制(英文)

1/17

AN1495

APPLICATION NOTE

1INTRODUCTION

Microstepping a stepper motor may be used to achieve one or both of two objectives; 1) increase the position resolution or 2) achieve smoother operation of the motor. In either case the basic the-ory of operation is the same.

The simplified model of a stepper motor is a permanent magnet rotor and two coils on the stator separated by 90 degrees, as shown in Figure 1. In classical full step operation an equal current is delivered to each of the coils and the rotor will align itself with the resulting magnetic vector along one of the 45 degree axis. To step the motor, the current in one of the two coils is reversed and the rotor will rotate 90 degrees. The complete full step sequence is shown in figure 2. Half step drive,where the current in the coil is turned off for one step period before being turned on in the opposite direction, has been used to double the step resolution of a motor. In either full and half step drive,the motor can be positioned only at one of the 4 (8 for half step) defined positions.[4][5] Therefore,the number of steps per electrical revolution and the number of poles on the motor determine the resolution of the motor. Typical motors are designed for 1.8 degree steps (200 steps per revolution)or 7.5 degree steps (48 steps per revolution). The resolution may be doubled to 0.9 or 3.75 degrees by driving the motor in half step. Further increasing the resolution requires positioning the rotor at positions between the full step and half step positions. Figure 1. Model of stepper motor

MICROSTEPPING STEPPER MOTOR DRIVE

USING PEAK DETECTING CURRENT CONTROL

Stepper motors are very well suited for positioning applications since they can achieve very good positional accuracy without complicated feedback loops associated with servo sys-tems. However their resolution, when driven in the conventional full or half step modes of operation, is limited by the configuration of the motor. Many designers today are seeking alternatives to increase the resolution of the stepper motor drives. This application note will discuss implementation of microstepping drives using peak detecting current control where the sense resistor is connected between the bottom of the bridge and ground. Examples show the implementation of microstepping drives with several currently available chips and chip sets.

REV . 2AN1495/0604

AN1495 APPLICATION NOTE

Figure 2. Full step sequence.

Another issue occurs at low operating speeds. At low speeds, both the full and half step drive tend to make abrupt mechanical steps since the time the rotor takes to move to the next position can be much less than the step period. This stepping action contributes to jerky movement and mechanical noise in the system. Looking at the simplified model of the stepper motor in Figure 1, it can be seen that if the two coils were driven by sine and cosine waveforms the motor would operate as a syn-chronous machine and run very smoothly. These sinusoidal waveforms may be produced by a mi-crostepping drive .

Microstepping can be implemented in either a voltage mode or current mode drive. In voltage mode drive, the appropriate duty cycle would be generated by the controller so that the voltage applied to the coil (Vsupply * duty cycle) is the appropriate value for the desired position. In current mode drives, the winding current is sensed and controlled to be the appropriate value for the desired po-sition. This application note will consider only current mode drive implemented using peak detecting current controllers.

To understand the microstepping concept, consider the simplified model of the stepper motor as shown in Figure 1. As previously discussed when the two coils are energized with equal currents, the re-sulting magnetic vector will be at 45° and the permanent magnet of the rotor will align with that vec-tor. However, if the two coils are energized by currents of different magnitude, the resulting magnetic vector will be at an angle other than 45° and the rotor would attempt to align with the new magnetic vector. If one coil were driven with a current that was twice the current in the second coil the magnetic vector would be at 30°, as shown in Figure 3. For any given desired position, the re-quired currents are defined by the sine and cosine of the desired angle.

To implement a microstepping drive, two D/A converters are used to set the current level in the coils of the motor, as shown in the block diagram in Figure 4.

2/17

AN1495 APPLICATION NOTE Figure 3. Example alignment of microsteping

Figure 4. Block Diagram of microstepping motor drive.

2MICROSTEPPING WITH THE L6208

In a typical application the L6208, which integrates two H-Bridges with the current control, drives a bipolar stepper in either full or half step modes. The internal state machine generates the full step or half step sequence from the clock and direction inputs. [1] Although at first glance it is not obvious that the L6208 may be used in a microstepping application, it is possible since the current control circuits have separate reference inputs.

To implement a microstepping application, a variable voltage proportional to the desired output cur-rent must be applied to each of the reference pins. In the block diagrams above, the two required D/A converters provide the required voltages. A simple and inexpensive alternative to a D/A con-

3/17

AN1495 APPLICATION NOTE

verter chip is to use a counter/timer in the microprocessor to generate a PWM output for each phase and pass this through a voltage divider and low pass filter to get the desired voltage. The Vref input voltage is equal to the microprocessor power supply voltage times the divider ratio of the resistor divider times the PWM duty cycle. Figure 5 shows the connection between a microcontroller and the L6208. The complete circuit schematic for the power section is shown in appendix A.

Since the L6208 includes an internal phase generation circuit, this circuit must be synchronized to the externally provided reference voltages. Again a simple solution is possible. The initial state of the decoding logic after reset is known and may be used as the starting state. After applying a reset to the L6208, either at power up or by forcing a reset from the microprocessor, the full-scale voltage is applied to both Vref pins to align the stepper motor to the known state that corresponds to one of the full step positions. Once the motor is aligned, the references can be reduced to 70.7%, which is the correct value for the currents for the 45-degree position in the microstepping sequence. After the motor is aligned the microcontroller can move through the sine/cosine table to generate the ap-propriate reference levels to move in either direction. The software also has to set the appropriate direction on the CW/CCW pin and generate a clock pulse for each phase reversal that is required. This occurs whenever the phase crosses a 90° boundary in the sine table. By operating the L6208 in the full step mode and providing clock signals at the appropriate time, the decoding logic will out-put the correct phase information for the bridges. Using the L6208 in the half step mode with the appropriate clock signals can improve the performance at the zero cross over of the current, as will be discussed later.

Figure 5. Circuit connections for the L6208

Figure 6 shows the operating waveforms when using the L6208 in full step mode and varying the reference inputs to achieve microstepping. Trace 1 is the clock input to the L6208. Traces 2 and 3 on the plot are the VrefA and VrefB inputs applied to the L6208. Trace 4 is the motor current in chan-nel B. Although the current has the discontinuities near zero that are typical of a peak detection cur-rent control method, the resulting output matches the desired sine wave reasonably well.

4/17

AN1495 APPLICATION NOTE Figure 6. Microstepping waveforms: Typical Operation

Figure 7. Microstepping waveforms: Current can not follow desired sine wave

3SPEED LIMITATIONS

Since the motor coil is primarily an inductance, the rate of current change in the coils is limited by the L/R time constant of the motor. As the motor is operated at higher speeds, the L/R time constant of the motor limits the rate of current change and the current can no longer follow the desired sine wave. Figure 7 shows the motor current at a higher rotational frequency. On this scope trace, we see two effects. First, the filter on the reference voltage is starting to roll off the reference signal and

5/17

AN1495 APPLICATION NOTE

second, the motor current is limited by the motor time constant and it begins to look more like a triangle waveform than the desired sine wave. Although moving the pole of the filter on the refer-ence voltage will make the reference signal appear more ideal, it will have little effect on the motor current at this point since the motor current is primarily limited by the L/R characteristics of the mo-tor. When approaching this point, the motor will run smoothly in full step mode and the micropro-cessor could easily change to full step drive.

If the step rate is increased further, the motor will stall when the current can no longer reach a value large enough to produce the required torque. Figure 8 shows a typical current waveform when the motor has stalled. The almost pure triangular current waveform is similar to the triangular waveform that would result if the motor were being driven in the full step mode at this step rate. At this oper-ating point the current is entirely controlled by the L/R time constant of the motor and no chopping is occurring.

Figure 8. Waveforms when motor has stalled

4SLOW VS. FAST DECAY MODE

When implementing current controlled motor drives, the designer has a choice of the recirculation path the current flows in during the "off" time. Figure 9 shows the two recirculation options imple-mented in the L6208. Applying the chopping to only one side of the bridge allows the current to re-circulate around a low voltage loop, in the upper transistors with the L6208. Since the rate of change of the current is controlled primarily by the L/R time constant of the motor, the current decays rela-tively slowly, hence the designation of slow decay mode. However applying the chopping to both sides of the bridge results in the current recirculating back to the power supply and a higher voltage across the coil, hence a fast decay mode. The L6208 also implements a type of synchronous rec-tification that turns on the MOS transistor in parallel with the conducting diode to reduce the power dissipation. [1]

The selection of the decay mode influences the operation of a microstepping drive in several ways. The most obvious is the magnitude of the ripple current. Drives implemented using the fast decay mode will have, for the same off time or chopping frequency, a higher ripple current than drives im-plemented using a slow decay mode. This difference in itself is not significant for most stepper mo-6/17

AN1495 APPLICATION NOTE

tor drives. Issues with the stability of the current control loop are discussed elsewhere [3].

When microstepping at a relatively high speed, the selection of the decay mode affects the ability of the drive to follow the desired current level. At any time, the rate of change of current is deter-mined by the inductance of the motor and the voltage across the coil. In the slow decay mode, the voltage across the coil during the off time is only the drop across one transistor and one diode so the current changes very slowly. As the desired current level is lowered, it is the rate of change dur-ing the off time that determines how quickly the current transitions to the new level. At low speeds, the effect may not be too noticeable. However, at higher speeds, the motor current cannot decay fast enough to follow the desired decreasing slope of the sine wave. During this time the current change is limited by the time constant imposed by the motor inductance and the slow decay path and can remain higher than the set value. The current will continue to decay at the slow rate until a phase reversal occurs, at which point the bridge reverses, applying the full supply voltage across the coil, effectively putting the bridge in a fast decay mode and the current will decay quickly to zero. Selecting the fast decay mode can improve the ability of the drive to follow fast decreases in the current. The waveforms in Figure 6 are achieved using the fast decay mode.

The ability of the drive to increase current on the upper slope of the sine wave is not affected by the choice of the decay mode since the voltage applied to the coil during the on time is the same. Figure 9. PWM current control decay modes.

7/17

AN1495 APPLICATION NOTE

8/17

5MINIMUM CURRENT ISSUES

When operating a chopping current control that has a minimum duty cycle, the current cannot be taken below a level that is effectively set by the motor resistance and the minimum duty cycle. Con-stant off time controls, like the L6208, have a minimum on time that is set primarily by the propaga-tion delays from the end of the off time until the comparator detects a current above the threshold and retriggers the monostable putting the bridge in the recirculation mode again. This minimum on time and the off time set by the monostable set a minimum working duty cycle for the circuit. When this duty cycle is applied to the motor, a current will be established. If a reference corresponding to a current lower than this minimum is set on the input, the circuit will detect that the motor current is above the reference. However, since the IC is already operating at its minimum duty cycle, the cur-rent can not go any lower and thus will not reach the current level desired by the reference level.The minimum duty cycle in other controllers can some times be adjusted. The minimum on time in the L6506, for example, is set by the width of the sync pulse. By varying the duty cycle of the oscil-lator, the minimum duty cycle of the output can also be changed. Since the sync pulse is also used to mask the switching noise in the system, reducing the minimum duty cycle is not always possible.[3]

Figure 10 shows the operating waveforms at the minimum current level. The traces in the oscilo-graph are:Ch 1 :Voltage on output pin Ch 2 :V ref Ch 3 :V sense Ch 4 :Load current (20mA/div)Figure 10. Oscillograph of the minimum current

At the start of each cycle the bridge is turned on and the motor current flows through the sense re-sistor to produce the voltage V sense . However at this operating point the sense voltage is already greater than the Vref input voltage, as can be seen in Figure 10. The comparator will detect that V sense

is greater than Vref and cause the circuit switch the bridge into the recirculation mode and

AN1495 APPLICATION NOTE the output is switched off after a delay that is determined by the response time of the circuit. The output pulse width, and hence the operating current, are set by the response of the circuit to a con-dition where the current sense comparator detects a current above the set value as soon as the drive is turned on. Since this pulse width can not be reduced further, the current that flows is the minimum that the device can regulate. In Figure 10, the minimum current is approximately 100mA. The minimum current level means a nonlinear transfer function exists between reference in (usually a voltage) to current out. Figure 11 shows the resulting transfer function between reference and out-put current.

Figure 11. Transfer function showing nonlinearity

The transfer function also depends on the chopping mode, fast decay (enable chopping) or slow decay (phase chopping) as shown in Figure 11. In slow decay mode the current changes very slow-ly during recirculation and has a small ripple value. When operating in fast decay the transfer func-tion also has a discontinuity in the slope at low levels. At the minimum current level, the duty cycle is small and when operating at this point the current typically is discontinuous, that is the current rises to a peak value and decays back to zero during each cycle. The flat section of the current transfer function corresponds to this minimum current. When the reference is increased, the device begins to regulate current however the device will still operate in the discontinuous mode. Continu-ing to increase the reference, the device will begin to operate in the continuous current mode, where the current does not decay to zero in each cycle. When the current changes from discontinuous to continuous, the slope of the transfer function changes. The result is that there are two discontinui-ties in the transfer function, one set by the minimum current and one set by the change in slope. In theory the slow decay mode could also have two discontinuities, however in practical examples the minimum current is reached before the current goes discontinuous.

The minimum achievable current effectively sets a limit on the number of microsteps per step by setting minimum current for the first microstep. Since the fast decay mode has a lower minimum current, fast decay can be used to minimize the effect of the minimum current, but will introduce another error due to the change of the slope. The latter can be compensated for by adjusting the DAC value.

It is, however, possible to get zero current in a phase by disabling the bridge when zero current is desired in that phase. When using drivers that have an enable input for each bridge simply disabling the bridge will force the current to zero. The L6208, however, does not have a separate enable input for each bridge so we need to use another trick of the logic to disable the bridge at the appropriate time. When driven in the half step mode, one bridge is disabled in each of the even states [2]. This operating sequence can be used to disable the bridge at the appropriate times. To achieve this, op-

9/17

AN1495 APPLICATION NOTE

erate the L6208 in half step mode and apply a pulse to the clock input at the same time that the desired current is set to zero. At the next change of current apply a second pulse to the clock input and set the current value for the first microstep. The step sequence generator in the L6208 will cause the change from current in one direction in the bridge, to the bridge being disabled, to current in the reverse direction as shown in Figure 12.

Figure 12. Microstepping waveforms with improved performance at zero current.

The effects of the minimum current can be seen in the motor movement as errors in the motor po-sition or as a jerky movement in a constant speed movement. How much the minimum current af-fects the drive depends primarily on the number of microsteps implemented per step. Since zero current can be achieved as described above, the positions at the 90 degree intervals where one coil is driven by zero current and the other is driven by the full scale current can easily be implemented. However, the next microstep where the current in one coil is small is most affected. If the desired current for any position is less than the minimum current, an error occurs. If the current required for the first microstep after the zero current position is greater than the minimum current, no error is contributed. Fortunately, since the desired current profile is a sine wave, the first step after the zero crossing has the largest relative increase in current of any microstep. If the required current for this first microstep is greater then the minimum current the device can regulate, there will be no error in the current to the motor due to the minimum current.

If the design required that one step (90 Deg.) be divided into 16 microsteps, the angle for the first step would be 5.625 Deg. The sine of 5.625 degrees is 0.098. When using an 8-bit D/A, the closest available value would correspond to an input of 25 out of 255. No other microstep needs a current less than this (except the 0 as discussed above). As long as the minimum current is less than the value corresponding 25/255 of the peak current, there will be no noticeable error contributed by the minimum current. Another way to express this that no error will be noticeable if the output current can be regulated to plus or minus 1 LSB over the range 24 to 255. There is no system level require-ment to maintain the accuracy for inputs less than 24.

10/17

AN1495 APPLICATION NOTE

6L6506 & L6203/L298

Microstepping drives can be implemented using the L6506 controller and bridge IC's like the L6201, L6202, L6203 and L298. The main difference between the standard half step application and a mi-crostepping application is that the two references of the L6506 are set by D/A converter outputs. Figure 13 shows a microstepping application using the L6506 and the L6203. Outputs Px 1 through Px 4 from the microprocessor set the phase for the L6506/L6203 combination and output Px 5 and PX 6 are used to enable the bridges. Again, the D/A function could be implemented using the PWM outputs of the microprocessor as was done in the example above or it could be implemented using and integrated D/A. The same logic configuration can be used with the L6201, L6202 or L298. When using the typical connection between the L6506 and the L6203 (as shown in Figure 13a), the PWM signal is applied to one of the phase inputs (the phase that is normally high) and you get the slow decay mode of operation.

To implement the fast decay mode of operation, the PWM signal needs to be applied to the EN-ABLE inputs of the L6203s. This can be accomplished by rearranging the connections from the mi-croprocessor. Inputs IN 1 and IN 2 of the L6203s are disconnected from the L6506 and connected directly to the Px 1 through Px 4 outputs of the microprocessor, which will continue to provide the phase information as before. The two PWM current control loops in the L6506 are then used to con-trol the ENABLE inputs of the two L6203, as shown in Figure 13b. Px 5 and Px 6 are now connected to the inputs of the L6506 so that each bridge can be disabled to get zero current. Finally the Power On Reset (POR) is connected to the RESET input of the L6506 to disable the bridge during power up.

Figure 13a. Microstepping using L6506 and L6203 (Slow Decay)

11/17

AN1495 APPLICATION NOTE

Figure 13b. Microstepping using L6506 and L6203 (Fast Decay)

7PBL3717, TEA3717, TEA3718 AND L6219

Devices like the PBL3717, TEA3717 TEA3718 and L6219 can also be used to implement mi-crostepping. The main limitation in these devices is that, due to their internal connections, they can only implement the slow decay mode. The microstepping application is the same as the typical ap-plication for the device except that D/A converters must control the reference pins. With these de-vices since the reference is designed to operate from 5V and includes an internal voltage divider, a low impedance output must be used to drive the reference. If the PWM from the microprocessor is used for the D/A function, then only an RC filter is used without the second resistor for the divider. The resulting signal must them be buffered by an amplifier before driving the reference input. The connections between the microprocessor and the PBL3717 family of devices are shown in Fig-ure 14. For the best resolution it is suggested to set the I0 and I1 inputs to select the maximum cur-rent level. One should also be aware that the specifications of the L6219 have a minimum input reference voltage level. This level must be respected and will then determine the minimum current that can be achieved in a microstepping circuit.

12/17

AN1495 APPLICATION NOTE Figure 14. Microstepping connection using PBL3717

8CONCLUSION

Although they were not designed specifically to implement microstepping, many of the integrated motor control/drive circuits can be used to implement microstepping stepper motor drives. The lim-its imposed by a peak detecting current control technique and the selected decay mode will directly affect the performance of the motor drive. Specifically it's ability to follow the desired current wave-form. So long as these limits allow the designer to achieve the desired resolution in the microstep-ping application the devices provide a cost effective implementation.

9REFERENCES

[1] A NEW FULLY INTEGRATED STEPPER MOTOR DRIVER IC, Domenico Arrigo, Thomas L. Hopkins, Angelo Genova, Vincenzo Marano, and Aldo Novelli, Proceedings of PCIM 2001, Septer-mber 2001, Intertech Communication

[2] L6208 Data Sheet

[3] STEPPER MOTOR DRIVES, COMMON PROBLEMS AND SOLUTIONS, AN460, T. Hopkins, STMicroelectronics

[4] L297 Data Sheet

[5] THE L297 STEPPER MOTOR CONTROLLER, AN470, STMicroelectronics

[6] STEPPER MOTOR DRIVING, AN235, H. Sax, STMicroelectronics

13/17

AN1495 APPLICATION NOTE APPENDIX A

Figure 15. Scheme of the EVAL6208N

14/17

AN1495 APPLICATION NOTE

APPENDIX B

The following is an excerpt from the firmware which executes on the ST7264 based control which is part of the Practispin evaluation system. This code segment is executed when the decision has been made that it is time for the L6208 to take the next microstep (either forward or reverse).

; PB.4 is the L6208 clock pin

; PB.5 is the L6208 reset pin

; stepstate is a byte variable which controls the motor stepping.

; torquscaler is a byte used to modulate the normalized sine wave values read from the table to set the current level

; TAOC1LR is a register that controls Vrefa (via the duty cycle into the low pass filter) ; TBOC1LR is a register that controls Vrefb (via the duty cycle into the low pass filter) bres PBDR,#4; take clock back low ready to generate rising edge lat-

er

bset PBDR,#5; normal state for reset

jumpifflagclear forward,doclockrev; jump if direction is reverse

;direction is forward

inc stepstate

jrne for002; skip if stepstate has not rolled over to zero

bres PBDR,#5; activate reset to maintain sync (just for added noise

immunity insurance)

for002:

ld a,stepstate

and a,#%00011111; use only lower five bits as index for table lookup

ld x,a ; save index

; on indexes 8 and 9, clock L6208 to sequence through zero and then polarity reversal and a,#%00001110

cp a,#8 ; 8 or 9

jrne for001

bset PBDR,#4 ; rising edge for clock

for001:

ld a,(microtable1,x) ; get normalized value from table

ld y,torquescaler

mul y,a ; y:a = (table value) * torquescaler

ld TAOC1LR,y ; duty cycle = (table value) * torquescaler/256

; repeat for phase B

ld a,(microtable2,x)

ld y,torquescaler

mul y,a

ld TBOC1LR,y

jp pwmend; end of routine for forward step

doclockrev:

;direction is reverse

dec stepstate

jrne rev002

bres PBDR,#5; activate reset to maintain sync

rev002:

ld a,stepstate

and a,#%00011111

ld x,a

inc a; 7 or 8 =>> 8 or 9

and a,#%00001110

cp a,#8 ; 8 or 9

15/17

AN1495 APPLICATION NOTE

16/17jrne rev001

bset PBDR,#4 ; rising edge for clock

rev001:

ld a,(microtable1,x)

ld y,torquescaler

mul y,a

ld TAOC1LR,y

ld a,(microtable2,x)

ld y,torquescaler

mul y,a

ld TBOC1LR,y

jp pwmend

; The lookup table holds the magnitude of a sine wave normalized to a peak value of 256. ; Each line of 16 entries represents 90 degrees or one full step (thus 16 microsteps per step).

; Table reference labels at 45 degrees (microtable1) and 135 degrees (microtable2) are provided for convenience

; to allow easy lookup of two waveforms with 90 degree phase relationship.

; Since only five bits (0 to 31) of the stepstate table index are used, references using microtable1 roll over through

; just the first two lines of the table while references using microtable2 stay within the second and third lines

; of the overall table.

microtable1:

; degrees 45 90

dc.b180,197,212,224,235,244,250,253,254,253,250,244,235,224,212,197

microtable2:

; degrees 135 0

dc.b180,161,141,120,097,074,049,024,000,024,049,074,097,120,141,161

; degrees 45 +90

dc.b180,197,212,224,235,244,250,253,254,253,250,244,235,224,212,197

Table 1. Revision History

Date Revision Description of Changes

April 20021First Issue

June 20042Replaced the Appendix B that contains assembler code for an ST7264.

Changed the Style-sheet following the new "Corporate T echnical

Pubblications Design Guide"

AN1495 APPLICATION NOTE The present note which is for guidance only, aims at providing customers with information regarding their products in order for them to save time. As a result, STMicroelectronics shall not be held liable for any direct, indirect or consequential damages with respect to any claims arising from the content of such a note and/or the use made by customers of the information contained herein in connection with their products.

Information furnished is believed to be accurate and reliable. However, STMicroelectronics assumes no responsibility for the consequences of use of such information nor for any infringement of patents or other rights of third parties which may result from its use. No license is granted by implication or otherwise under any patent or patent rights of STMicroelectronics. Specifications mentioned in this publication are subject to change without notice. This publication supersedes and replaces all information previously supplied. STMicroelectronics products are not authorized for use as critical components in life support devices or systems without express written approval of STMicroelectronics.

The ST logo is a registered trademark of STMicroelectronics.

All other names are the property of their respective owners

? 2004 STMicroelectronics - All rights reserved

STMicroelectronics GROUP OF COMPANIES

Australia - Belgium - Brazil - Canada - China - Czech Republic - Finland - France - Germany - Hong Kong - India - Israel - Italy - Japan - Malaysia - Malta - Morocco - Singapore - Spain - Sweden - Switzerland - United Kingdom - United States

https://www.sodocs.net/doc/2d10942256.html,

17/17

4、基于FPGA的步进电机细分驱动控制设计

南京工程学院 自动化学院 大作业(论文) 题目:基于FPGA的步进电机细分驱动 控制设计 专业:测控技术与仪器 班级:学号: 学生姓名: 任课教师:郭婧 成绩:

基于FPGA的步进电机细分驱动控制设计 一、基本要求: 在理解步进电机的工作原理以及细分原理的基础上,利用FPGA实现四相步进电机的8细分驱动控制。 二、评分标准: 1、设计方案介绍(共15分) 要求:详细叙述利用FPGA实现对四相步进电机进行8细分控制的设计方案。 评分标准: 13-15分:方案叙述详细,正确; 10-12分:方案叙述较详细,基本正确; 9分以下:酌情给分 0分:抄袭别人 2、VHDL设计部分(60分) 要求:给出详细的VHDL设计过程,提供详细的程序代码,如果设计中用到LPM模块,则给出生成LPM模块的每一步操作流程的截图,并加以文字描述。 评分标准: 54-60分:代码详细,截图完整,书写规范, 48-53分:代码较详细,截图较完整,书写较规范; 47以下:酌情给分 0分:抄袭别人 3、模拟调试部分(20分) 要求:给出详细的仿真过程,对软件编译、仿真分析、仿真波形进行截图。并给出8细分情况下的仿真测试结果,给出详细的实验结果分析。 评分标准: 18-20分:调试过程详细,正确,截图完整; 15-17分:调试过程较详细,基本正确,有截图; 14分以下:酌情给分 0分:抄袭别人

4、提高部分(5分) 要求:利用FPGA实验箱上的步进电机,实现细分控制。 评分标准:根据完成的程度给分。 0分:抄袭别人

参考:实验十八 FPGA步进电机细分驱动控制设计 示例程序和实验指导课件位置:\EDA_BOOK3_FOR_C35\chpt3\EXP18_MOTO\工程:step_a 一、实验目的 学习用FPGA实现步进电机的驱动和细分控制。 二、实验设备 PC机一台 GW48-PK4试验系统一台 连接线若干 三、实验内容 1、建立工程。完成以图18-1为原理图的工程设计,并保存工程名为step_a。 2、编译仿真。对以上工程进行编译,成功后进行方针测试。 3、引脚锁定。引脚锁定参考图18-2. 图18-1 步进电机PWM细分控制控制电路图 图18-2 引脚锁定图 4、下载测试 参考\EDA_BOOK3_FOR_C35\Chpt3\ALl.PPT\实验17.PPT 选择模式5,短路冒接clock0.根据第一章注释分别“38“和”42“或”“7”连接(见GW48主

单片机基于80C51单片机的步进电机控制系统

中国地质大学长城学院 本科课程设计题目:基于80C51单片机的步进电机控制系统 系别信息工程系 学生姓名 专业电气工程及其自动化 学号 指导教师 职称讲师 2014 年6 月11 日

摘要 本文研究基于51系列单片机的步进电机控制系统设计,该系统包括以下几个部分:数据采集、数据处理、终端接收,该系统以汇编语言为单片机的驱动程序语言,单片机控制步进电机,主要任务是把二进制数变成脉冲序列,按相序输入脉冲以实现电机转动方向控制,利用单片机实现对步进电机的远距离实时监控,从而达到高效、节能的控制步进电机工作的目的,该系统具有成本低、控制方便的特点。使用单片机驱动四相步进电机,控制步进电机以四相八拍的方式运行,来实现步进电机正向/反向旋转,P1.0~P1.3分别控制步进电机;P1.5~P1.7分别控制步进电机的停止、正转、反转。 关键词:51单片机;步进电机;数据采集;汇编语言;

目录 摘要 0 1 设计目的 (1) 2设计内容与要求 (1) 3 总体设计方案 (1) 3.1整体方案 (1) 3.2具体方案实现 (1) 4系统硬件设计 (2) 4.1复位电路 (2) 4.2晶振电路 (2) 4.3按键电路 (3) 4.4指示灯电路 (3) 4.5驱动电路 (4) 4.6步进电机 (4) 5程序软件设计 (5) 5.1程序流程图 (5) 5.2源程序 (6) 6系统调试与仿真 (7) 7总结 (8)

1设计目的 1.掌握单片机控制步进电机的硬件接口电路。 2.掌握步进电机驱动程序的设计和调试方法。 3.熟悉步进电动机的工作特性。 2设计内容与要求 1.查阅资料,了解步进电机的工作原理。 2.通过单片机给定参数控制电机转动。 3.通过按钮控制正转、反转和停止。 3总体设计方案 3.1整体方案 本系统主要是由AT89C51,步进电机控制器ULN2004,步进电机,通过单片机编程,实现步进电机控制的脉冲分配,使电机实现正转,反转以及停止等功能 3.2具体实现方案 根据系统要求画出单片机控制步进电机的控制框图,见下图。系统包括单片机、按键、驱动电路和步进电机。 键盘80c51单片机 步进电机 驱动电路

步进电机驱动器的主要细分作用

步进电机是一种开环伺服运动系统执行元件,以脉冲方式进行控制,输出角位移。与交流伺服电机及直流伺服电机相比,其突出优点就是价格低廉,并且无积累误差。但是,步进电机运行存在许多不足之处,如低频振荡、噪声大、分辨率不高等,又严重制约了步进电机的应用范围。 通过细分步进电机驱动方式不仅可以减小步进电机的步距角,提高分辨率,而且可以减少或消除低频振动,使电机运行更加平稳均匀。 步进电机驱动器细分的主要作用是提高步进电机的精确率。 国内有一些驱动器采用“平滑”来取代细分,有的亦称为细分,但这不是真正的细分,这两者之间的本质是不同的: 一、 “平滑”并不精确控制电机的相电流,只是把电流的变化率变缓一些,所以“平滑”并不产生微步,而细分的微步是可以用来精确定位的。 二、 步电机系统解决方案

电机的相电流被平滑后,会引起电机力矩的下降,而细分控制不 但不会引起电机力矩的下降,相反,力矩会有所增加。 驱动器细分后的主要优点为:完全消除了电机的低频振荡。低频振荡是步进电机(尤其是反应式电机)的固有特性,而细分是消除它的唯一途径,如果您的步进电机有时要在共振区工作(如走圆弧),选择细分驱动器是唯一的选择。提高了电机的输出转矩。尤其是对三相反应式电机,其力矩比不细分时提高约30-40% 。提高了电机的分辨率。由于减小了步距角、提高了步距的均匀度,‘提高电机的分辨率‘是不言而喻的。 很多用户误以为步进电机驱动器的细分越高,步进电机的精度就越高,其实这是一种错误的观念,比如步进电机驱动器细分较高的可以达到60000个脉冲一转,而步进电机实际是无法分辨这个精度的,当驱动器设置为60000个脉冲/转的时候,步进电机驱动器接受好几个脉冲,步进电机才走一步,这样并不能提高步进电机的精度。 步进电机的细分技术实质上是一种电子阻尼技术,其主要目的是 减弱或消除步进电机的低频振动,提高电机的运转精度只是细分技术 步电机系统解决方案

步进电机驱动方式(细分)概述

步进电机驱动方式(细分)概述 众所周知,步进电机的驱动方式有整步,半步,细分驱动。三者即有区别又有联系,目前,市面上很多驱动器支持细分驱动方式。本文主要描述这三种驱动的概述。 如下图是两相步进电机的内部定子示意图,为了使电机的转子能够连续、平稳地转动,定子必须产生一个连续、平均的磁场。因为从宏观上看,电机转子始终跟随电机定子合成的磁场方向。如果定子合成的磁场变化太快,转子跟随不上,这时步进电机就出现失步现象。 既然电机转子是跟随电机定子磁场转动,而电机定子磁场的强度和方向是由定子合成电流决定且成正比。即只要控制电机的定子电流,则可以达到驱动电机的目的。下图是两相步进电机的电流合成示意图。其中Ia是由A-A`相产生,Ib是由B-B`相产生,它们两个合成后产生的电流I就是电机定子的合成电流,它可以代表电机定子产生磁场的大小和方向。 有了以上的步进电机背景描述后,对于步进电机的整步、半步、细分的三种驱动方式,都会是同一种方法,只是电流把一个圆(360°)分割的粗细程序不同。 整步驱动 对于整步驱动方式,电机是走一个整步,如对于一个步进角是3.6°的步进电机,整步驱动是每走一步是走3.6°。

下图是整步驱动方式中,电机定子的电流次序示意图: 由上图可知,整步驱动每一时刻只有一个相通电,所以这种驱动方式的驱动电路可以是很简单,程序代码也是相对容易实现,且由上图可以得到电机整步驱动相序如下: BB’→A’A→B’B→A A’→B B’ 下图是这种驱动方式的电流矢量分割图: 可见,整步驱动方式的电流矢量把一个圆平均分割成四份。 下图是整步驱动方式的A、B相的电流I vs T图: 可以看出,整步驱动描出的正弦波是粗糙的。使用这种方式驱动步进电机,低速时电机会抖动,噪声会比较大。但是,这种驱动方式无论在硬件或软件上都是相对简单,从而驱

步进电机细分控制(英文)

1/17 AN1495 APPLICATION NOTE 1INTRODUCTION Microstepping a stepper motor may be used to achieve one or both of two objectives; 1) increase the position resolution or 2) achieve smoother operation of the motor. In either case the basic the-ory of operation is the same. The simplified model of a stepper motor is a permanent magnet rotor and two coils on the stator separated by 90 degrees, as shown in Figure 1. In classical full step operation an equal current is delivered to each of the coils and the rotor will align itself with the resulting magnetic vector along one of the 45 degree axis. To step the motor, the current in one of the two coils is reversed and the rotor will rotate 90 degrees. The complete full step sequence is shown in figure 2. Half step drive,where the current in the coil is turned off for one step period before being turned on in the opposite direction, has been used to double the step resolution of a motor. In either full and half step drive,the motor can be positioned only at one of the 4 (8 for half step) defined positions.[4][5] Therefore,the number of steps per electrical revolution and the number of poles on the motor determine the resolution of the motor. Typical motors are designed for 1.8 degree steps (200 steps per revolution)or 7.5 degree steps (48 steps per revolution). The resolution may be doubled to 0.9 or 3.75 degrees by driving the motor in half step. Further increasing the resolution requires positioning the rotor at positions between the full step and half step positions. Figure 1. Model of stepper motor MICROSTEPPING STEPPER MOTOR DRIVE USING PEAK DETECTING CURRENT CONTROL Stepper motors are very well suited for positioning applications since they can achieve very good positional accuracy without complicated feedback loops associated with servo sys-tems. However their resolution, when driven in the conventional full or half step modes of operation, is limited by the configuration of the motor. Many designers today are seeking alternatives to increase the resolution of the stepper motor drives. This application note will discuss implementation of microstepping drives using peak detecting current control where the sense resistor is connected between the bottom of the bridge and ground. Examples show the implementation of microstepping drives with several currently available chips and chip sets. REV . 2AN1495/0604

步进电机细分驱动方式的研究

步进电机作为电磁机械装置,其进给的分辨率取决于细分驱动技术。采用软件细分驱动方式,由于编程的灵活性、通用性,使得步进细分驱动的成本低、效率高,要修改方案也易办到。同时,还可解决步进电机在低速时易出现的低频振动和运行中的噪声等。但单一的软件细分驱动在精度与速度兼顾上会有矛盾,细分的步数越多,精度越高,但步进电机的转动速度却降低;要提高转动速度,细分的步数就得减少。为此,设计了多级细分驱动系统,通过不同的细分档位设定,实现不同步数的细分,同时保证了不同的转动速度。 1 细分驱动原理 步进电机控制中已蕴含了细分的机理。如三相步进电机按A→B→C……的顺序轮流通电,步进电机为整步工作。而按A→AC→C→CB→B→BA→A……的顺序通电,则步进电机为半步工作。以A→B为例,若将各相电流看作是向量,则从整步到半步的变换,就是在IA与IB之间插入过渡向量IAB,因为电流向量的合成方向决定了步进电机合成磁势的方向,而合成磁势的转动角度本身就是步进电机的步进角度。显然,IAB的插入改变了合成磁势的转动大小,使得步进电机的步进角度由θb 变为0.5θb,从而也就实现了2步细分。由此可见,步进电机的细分原理就是通过等角度有规律的插入电流合成向量,从而减小合成磁势转动角度,达到步进电机细分控制的目的。 在三相步进电机的A相与B相之间插入合成向量AB,则实现了2步细分。要再实现4步细分,只需在A与AB之间插入3个向量I1、I2、I3,使得合成磁势的转动角度θ1=θ2=θ3=θ4,就实现了4步细分。但4步细分与2步细分是不同的,由于I1、I2、I33个向量的插入是对电流向量IB的分解,故控制脉冲已变成了阶梯波。细分程度越高,阶梯波越复杂。 在三相步进电机整步工作时,实现2步细分合成磁势转动过程为 IA→IAB→IB;实现4步细分转动过程为IA→I2→IAB……;而实现8步细分则转

步进电机驱动控制系统设计(有程序)

目录 一前言 (1) 二总体方案设计 (1) 1工作原理 (1) 2方案选择 (1) 2.1时钟脉冲 (1) 2.2脉冲分配器 (1) 2.3驱动器 (1) 3 总的框架 (2) 三单元模块设计 (2) 1单片机模块 (2) 1.1复位控制 (3) 1.2单片机频率 (3) 2接口 (3) 3驱动器ULN2003 (4) 4按键模块 (5) 5步进电机 (5) 5.1工作原理 (5) 5.2 28BYJ48型四相八拍 (7) 四整机调试与技术指标测量 (8) 五设计总结 (8) 参考文献 (9) 附录1电路原理图 (10) 附录2 源程序 (11)

一、前言 步进电动机是一种将电脉冲信号转换成机械位移的机电执行元件,是机电一体化的关键产品之一, 广泛应用在各种自动化控制系统中。随着微电子和计算机技术的发展,步进电机的需求量与日俱增,在各个国民经济领域都有应用。 二、总体方案设计 1、工作原理 步进电机是一种将电脉冲转化为角位移的执行机构。通俗一点讲:当步进驱动器接收到一个脉冲信号,它就驱动步进电机按设定的方向转动一个固定的角度(及步进角)。您可以通过控制脉冲个数来控制角位移量,从而达到准确定位的目的;同时您可以通过控制脉冲频率来控制电机转动的速度和加速度,从而达到调速的目的。 2、方案选择 (1)时钟脉冲 通常有两种方法实现: 方案一直接有硬件组成如:多谐振荡器 LC 等。 方案二用软件的方式形成优点便于随时更改,调整。 为了方便我们选用软件方式有单片机实现。 (2)脉冲分配器 方案一硬件环形分配器:由计数器等数字电路组成的。有较好的响应速度,且具有直观、维护方便等优点。 方案二软件环分:由计算机接口电路和相应的软件组成的。受到微型计算机运算速度的限制,有时难以满足高速实时控制的要求。由软件完成脉冲分配工作,不仅使线路简化,成本下降,而且可根据应用系统的需要,灵活地改变步进电机的控制方案。 考虑到硬件设备的有限和对步进电机的控制我们选择软件环分可以有单片机实现。 (3)驱动器 方案一使用功率场效应管的单电压功放电路。

研控步进电机YKD3422MA细分驱动器说明书

YKD3422MA 数字式细分驱动器 特点木工雕刻机 数控机床 包装设备 纺织设备 水钻设备 激光切割机 YKD3422MA是一款基于高性能DSP控制的三相步进电机驱动器,硬件设计上采用DSP+IPM模块进行高集成度简约化设计,数字式PWM控制方式,软件上采用矢量控制技术及微细分自适应控制技术,即使在低细分条件下也可以使电机低速运行平稳,几乎没有震动和噪音,电机在高速时力矩大大高于两相和五相混合式步进电机。驱动电压为交流110V-240V,适配电流在4.2A以下的各种型号三相混合式步进电机。此款驱动最适宜控制高电压小电流电机。定位精度最高可达10000步/转.细分设置更改需要断电重启后才生效,运行电流及抱轴电流设定支持不断电在线设置。 电流设定驱动器接线示意图 典型应用概述1. STOP/Im为保持状态(或抱轴状态)输出电流设置电位器,可设置为 正常输出电流的20%-80%(顺时针增大,逆时针减小),支持在线调整。 2. RUN/Im为正常工作输出电流设置开关(详见下表),支持在线调整。 PU DR MF DIP开关设定输入信号波形时序图安装尺寸(单位:mm)◆◆◆◆◆◆◆◆◆◆◆◆ 采用矢量控制及微细分控制技术,在运行平稳性、噪音、震动、发热等方面 较传统驱动器均有较大的提升; 衰减模式及衰减时间自适应控制,开关管运行在最少开关模式,运行时发热 大大降低,电流波形失真度较小; 设有16档等角度恒力矩细分,最高分辨率10000步/转; 最高响应频率可达200Kpps; 加减速曲线配置合适的情况下电机最高空载速度可达50R/S(or 3000RPM); 步进脉冲停止超过100ms时,线圈电流自动减为20%-80%(由STOP/Im设定) 光电隔离信号输入/输出 驱动电流从0.6A/相到4.2A/相分16档可调 单电源输入,电压范围:交流AC110-220V 出错保护:过热保护/过流、电压过低保护 YKD3422MA体积为178x108.5x68(),净重量为:0.93kg 相位记忆功能(注:输入脉冲停止超过5秒后,驱动器自动记忆当时电机相位, 重新上电或MF信号由有效变为无效时,驱动器自动恢复电机相位)。 3mm 注意!信号端DB15塑料壳 需保留45mm的安装空间。

步进电机驱动器及细分控制原理

步进电机驱动器及细分控制原理 步进电机驱动器原理: 步进电机必须有驱动器和控制器才能正常工作。驱动器的作用是对控制脉冲进行环形分配、功率放大,使步进电机绕组按一定顺序通电。 以两相步进电机为例,当给驱动器一个脉冲信号和一个正方向信号时,驱动器经过环形分配器和功率放大后,给电机绕组通电的顺序为AA BB A A B B ,其四个状态周而复始 进行变化,电机顺时针转动;若方向信号变为负时,通电时序就变为 AA B B A A BB ,电机就逆时针转动。 随着电子技术的发展,功率放大电路由单电压电路、高低压电路发展到现在的斩波电路。其基本原理是:在电机绕组回路中,串联一个电流检测回路,当绕组电流降低到某一下限值时,电流检测回路发出信号,控制高压开关管导通,让高压再次作用在绕组上,使绕组电流重新上升;当电流回升到上限值时,高压电源又自动断开。重复上述过程,使绕组电流的平均值恒定,电流波形的波顶维持在预定数值上,解决了高低压电路在低频段工作时电流下凹的问题,使电机在低频段力矩增大。 步进电机一定时,供给驱动器的电压值对电机性能影响较大,电压越高,步进电机转速越高、加速度越大;在驱动器上一般设有相电流调节开关,相电流设的越大,步进电机转速越高、力距越大。 细分控制原理: 在步进电机步距角不能满足使用要求时,可采用细分驱动器来驱动步进电机。细分驱动器的原理是通过改变A,B相电流的大小,以改变合成磁场的夹角,从而可将一个步距角细分为多步。

定子 A 转子 S N B B B S N A A (a)(b) A S N B B N S B S N A (c)(d) 图3.2步进电机细分原理 图 仍以二相步进电机为例,当A、B相绕组同时通电时,转子将停在A、B相磁极中间,如图3.2。 若通电方向顺序按AA AA BB BB BB AA AA AA BB BB BB AA,8个状态周而 复 始进行变化,电机顺时针转动;电机每转动一步,为45度,8个脉冲电机转一周。与图2.1相比,它的步距角小了一半。 驱动器一般都具有细分功能,常见的细分倍数有:1/2,1/4,1/8,1/16,1/32,1/64;或:1/5,1/10,1/20。 细分后步进电机步距角按下列方法计算:步距角=电机固有步距角/细分数 例如:一台1.8°电机设定为4细分,其步距角为 1.8°/4=0.45°。当细分 等级大于1/4后,电机的定位精度并不能提高,只是电机转动更平稳。

步进电机工作原理、驱动控制系统与选型

步进电机工作原理、驱动控制系统与选型 一、感应子式步进电机工作原理 (一)反应式步进电机原理 由于反应式步进电机工作原理比较简单。下面先叙述三相反应式步进电机原理。 1、结构: 电机转子均匀分布着很多小齿,定子齿有三个励磁绕阻,其几何轴线依次分别与转子齿轴线错开。0、1/3て、2/3て,(相邻两转子齿轴线间的距离为齿距以て表示),即A与齿1相对齐,B与齿2向右错开1/3て,C与齿3向右错开2/3て,A'与齿5相对齐,(A'就是A,齿5就是齿1)下面是定转子的展开图: 2、旋转: 如A相通电,B,C相不通电时,由于磁场作用,齿1与A对齐,(转子不受任何力以下均同)。 如B相通电,A,C相不通电时,齿2应与B对齐,此时转子向右移过1/3て,此时齿3与C偏移为1/3て,齿4与A偏移(て-1/3て)=2/3て。 如C相通电,A,B相不通电,齿3应与C对齐,此时转子又向右移过1/3て,此时齿4与A偏移为1/3て对齐。 如A相通电,B,C相不通电,齿4与A对齐,转子又向右移过1/3て。 这样经过A、B、C、A分别通电状态,齿4(即齿1前一齿)移到A 相,电机转子向右转过一个齿距,如果不断地按A,B,C,A……通电,

电机就每步(每脉冲)1/3て,向右旋转。如按A,C,B,A……通电,电机就反转。 由此可见:电机的位置和速度由导电次数(脉冲数)和频率成一一对应关系。而方向由导电顺序决定。 不过,出于对力矩、平稳、噪音及减少角度等方面考虑。往往采用A-AB-B-BC-C-CA-A这种导电状态,这样将原来每步1/3て改变为1/6て。甚至于通过二相电流不同的组合,使其1/3て变为1/12て,1/24て,这就是电机细分驱动的基本理论依据。 不难推出:电机定子上有m相励磁绕阻,其轴线分别与转子齿轴线偏移1/m,2/m……(m-1)/m,1。并且导电按一定的相序电机就能正反转被控制——这是步进电机旋转的物理条件。只要符合这一条件我们理论上可以制造任何相的步进电机,出于成本等多方面考虑,市场上一般以二、三、四、五相为多。 3、力矩: 电机一旦通电,在定转子间将产生磁场(磁通量Ф)当转子与定子错开一定角度产生力 F与(dФ/dθ)成正比 其磁通量Ф=Br*S ;Br为磁密;S为导磁面积; F与L*D*Br成正比;L为铁芯有效长度;D为转子直径;Br=N·I/RN·I为励磁绕阻安匝数(电流乘匝数)R为磁阻。 力矩=力*半径力矩与电机有效体积*安匝数*磁密成正比(只考虑线性状态) 因此,电机有效体积越大,励磁安匝数越大,定转子间气隙越小,电机力矩越大,反之亦然。 (二)感应子式步进电机

本教程介绍步进电机驱动和细分的工作原理

本教程介绍步进电机驱动和细分的工作原理,以及stm32103为主控芯片制作的一套自平衡的两轮车系统,附带原理图pcb图和源代码,有兴趣的同学一起来吧.本系统还有一些小问题,不当之处希望得到大家的指正. 一.混合式步进电机的结构和驱动原理 电机原理这部分不想讲的太复杂了,拆开一台电机看看就明白了。 电机的转子是一个永磁体,它的上面有若干个磁极SN组成,这些磁极固定的摆放成一定角度。电机的定子是几个串联的线圈构成的磁体。出线一般是四条线标记为A+,A-,B+,B-。A相与B相是不通的,用万用表很容易区分出来,至于各相的+-出线实际是不用考虑的,任意一相正负对调电机将反转。另外一种出线是六条线的只是在A相和B相的中间点做两条引出线别的没什么差别,六出线的电机通过中间出线到A+或A-的电流来模拟正向或负向的电流,可以在没有负相电流控制的电路中实现电机驱动,从而简化驱动电路,但是这种做法任意时刻只有半相有电流,对电机的力矩是有损失的。步进电机的转动也是电磁极与永磁极作用力的结果,只不过电磁极的极性是由驱动电路控制实现的。 我们做这样的一个实验就可以让步进电机转动起来。1找一节电池正负随意接入到A相两端;然后断开;(记为A正向)2再将电池接入到B相两端; 然后断开;(记为B正向)3电池正负对调再次接入A相; 然后断开;(记为A负向)4保持正负对调接入B相;然后断开;(记为B负向)…如此循环你会看到步进电机在缓慢转动。注意电机的相电阻是很小的接

通时近乎短路。我们将相电流的方向记录下来应该为:A+B+A-B-A+…, 如果我们更换接线顺序使得相电流顺序为A+B-A-B+A+…这时我们会看 到电机向反方向运动。这里每切换一次相电流电机都会转动一个很小的角度,这个角度就是电机的步距角。步距角是步进电机的一个固有参数,一般两相电机步距角为1.8度即切换200次可以让电机转动一圈。这里我们比较正反转的电流顺序可以看出A+和A-;B+和B-的交换后的顺序 和正反顺序是一致的,也就是前面所说的”任意一相正负对调电机将反转”。以上为四排工作方式,为了使相电流更加平滑另外可以使用八排的工作方式即: A+;A+B+;B+;B+A-;A-;A-B-;B-;B-A+;从前往后循环正转,从后往前循环反转。 为了用单片机实现相电流的正负流向控制必须要有一个H桥的驱动电路,这种带H桥的驱动模块还是很多的,比较便宜的是晶体管H桥比如L298N,晶体管开关速度比较慢,无法驱动电机高速运动。有些模块将细分控制电路也包含在内,我们也不用这种,因为我们的细分由软件控制。实际应用中使用ST的mos管两桥驱动芯片L6205一片即可驱 动一台步进电机。有了H桥通过PWM就可以控制相电流大小,改变输入极IN1、IN2的状态(参看手册第8页)可以控制相电流的方向。 二.细分的原理和输出控制 从这里开始重点了,别的地方看不到哦。 一个理想的步进电机电流曲线应该是相位相差90度的正弦曲线如

基于FPGA的步进电机的PWM控制__细分驱动的实现

姓名___ _ _ _ 学号201016050136 院系电气信息工程学院 专业电子信息工程 班级___信息10-1______ __

目录 目录 (2) 摘要 (3) 关键词 (3) Abstract (3) Keywords (3) 一、引言 (4) 二、步进电机细分驱动的基本原理 (4) 三、Quartus II概述 (5) 四、课题设计 (5) (一)总体设计 (5) (二)细分电流的实现 (6) (三)细分驱动性能的改善 (6) (四)程序设计 (6) 六、仿真与测试结果分析 (10) 七、结论 (12) 参考文献 (12) 注释 (13) 附录 (14) 心得体会 (20)

摘要 在对步进电机细分驱动原理进行分析研究的基础上,提出一种基于FPGA 控制的步进电机细分驱动器。利用FPGA中的嵌入式EAB构成LPM-ROM,存放步进电机各相细分电流所需的PWM控制波形数据表,并通过FPGA设计的数字比较器,同时产生多路PWM电流波形,实现对步进电机转角进行均匀细分控制。实验证明,所研制的步进电机驱动器不仅体积小,简化了系统的设计,减少了延迟,改善了低频特性,有良好的适应性和自保护能力,提高了驱动器的稳定性和可靠性。 关键词 步进电机;细分驱动;脉宽调制;FPGA Abstract In this paper, a divided driving circuit for stepping motor controlled by FPGA is put forward, based on the analysis of the principle of stepping motor divided driving. Using embedded EAB in FPGA to compose LPM-ROM, store PWM control wave form data which stepping motor each phase subdivided driving current is needed.The magnitude comparator designed with FPGA generates several PWM current waveform synchronously, to realize the step angles even division control for three–phase stepping motor.Experimments have proved that the developed subdivision driver is not only smaller,sampler in system, can shorten the delay time,improve the stability in low frequency ,but has good self-adaptation and self-protection ability,and its stability and relibility are higher. Keywords stepping motor; divided driving;PWM; FPGA

步进电机细分驱动电路设计

前言 随着社会的进步和人民生活水平的不断提高及全球经济一体化势不可挡的浪潮,我国微特电机工业在最近10年得到了快速的发展。快速发展的显着标志是使用领域不断拓宽,用量大增,特别是在日用消费市场和工业自动化装置及系统的表现最为明显。与此同时,随着电力电子技术、微电子技术和计算机技术、新材料以及控制理论和电机本体技术的不断发展进步,用户对电机控制的速度、精度和实时性提出了更高的要求,因此作为微特电机重要分枝的控制电机也得到了空前的发展。步进电动机又称为脉冲电动机,是数字控制系统中的一种执行组件。其功用是将脉冲电信号变换为相应的角位移或直线位移,即给一个脉冲电信号,电动机就转动一个角度或前进一步。步进电机和普通电动机不同之处是步进电机接受脉冲信号的控制。现在比较常用的步进电机包括反应式步进电机、永磁式步进电机、混合式步进电机和单相式步进电机等。其中反应式步进电机的转子磁路由软磁材料制成,定子上有多相励磁绕组,利用磁导的变化产生转矩。现阶段,反应式步进电机获得最多的应用。步进电机和普通电机的区别主要在于其脉冲驱动的形式,正是这个特点,步进电机可以和现代的数字控制技术相结合。不过步进电机在控制的精度、速度变化范围、低速性能方面都不如传统的闭环控制的直流伺服电动机。在精度不是需要特别高的场合就可以使用步进电机,步进电机可以发挥其结构简单、可靠性高和成本低的特点。使用恰当的时候,甚至可以和直流伺服电动机性能相媲美。步进电机被广泛应用于数字控制各个领域:机器人方面,机器人的的关节驱动及行进的精确控制,需要步进电机;数控机床方面,如数控电火花切割机床要求刀具精确走步,减小加工件表面的粗糙度的同时提高效率,需要步进电机;办公自动化方面,如电脑磁盘驱动器中的磁盘进行读盘操作的精确位置控制,需要步进电机,在打印机、传真机中也需要步进电机对设备进行位置控制。步进电动机是经济型数控系统经常采用的电机驱动系统。这类电机驱动系统的特点是控制简单,适合计算机系统控制要求。步进电动机的细分驱动系统较以往的电机系统,消除了低频震荡问题,控制分辨率更高,使其应用领域更加广泛。

步进电机 驱动器 控制器三者的关系

电机行业专业求职平台 1.步进电机是将电脉冲信号转变为角位移或线位移的开环控制元件。在非超载的情况 下,电机的转速、停止的位置只取决于脉冲信号的频率和脉冲数,而不受负载变化的影响,即给电机加一个脉冲信号,电机则转过一个步距角。这一线性关系的存在,加上步进电机只有周期性的误差而无累积误差等特点。使得在速度、位置等控制领域用步进电机来控制变的非常的简单。 虽然步进电机已被广泛地应用,但步进电机并不能象普通的直流电机、交流电机在常规下使用。步进电机必须由双环形脉冲信号、功率驱动电路等组成控制系统方可使用。它涉及到机械、电机、电子及计算机等许多专业知识。 提及此知识,希望能给予正在对电机选型的客户有所帮助。 2.力矩: 电机一旦通电,在定转子间将产生磁场(磁通量Ф)当转子与定子错开一定角度,则产生力 F与(dФ/dθ)成正比 S 其磁通量Ф=Br*S Br为磁密,S为导磁面积 F与L*D*Br成正比 L为铁芯有效长度,D为转子直径 Br=N·I/R N·I为励磁绕阻安匝数(电流乘匝数)R为磁阻。 力矩=力*半径 力矩与电机有效体积*安匝数*磁密成正比(只考虑线性状态) 因此,电机有效体积越大,励磁安匝数越大,定转子间气隙越小,电机力矩越大,反之亦然。 一、混合式步进电机

电机行业专业求职平台1、特点: 混合式(又称感应子式步进电机)与传统的反应式步进电机相比,结构上转子加有永磁体,以提供软磁材料的工作点,而定子激磁只需提供变化的磁场而不必提供磁材料工作点的耗能,因此该电机效率高,电流小,发热低。因永磁体的存在,该电机具有较强的反电势,其自身阻尼作用比较好,使其在运转过程中比较平稳、噪音低、低频振动小。 混合式步进电机某种程度上可以看作是低速同步电机。一个四相电机可以作四相运行,也可以作二相运行。(必须采用双极电压驱动),而反应式电机则不能如此。例如:四相,八相运 行(A-AB-B-BC-C-CD-D-DA-A)完全可以采用二相八拍运行方式.不难发现其条件为C= A ,D=B . 一个二相电机的内部绕组与四相电机完全一致,小功率电机一般直接接为二相, 而功率大一点的电机,为了方便使用,灵活改变电机的动态特点,往往将其外部接线为八根引线(四相),这样使用时,既可以作四相电机使用,更可以作二相电机绕组串联或并联使用。 2、分类 混合式步进电机可分二相、三相、四相、五相等,我公司混合式步进电机以相数可分为:二相电机、三相电机: TEB20H,TEB28H,TEB35H,TEB39H,TEB42H,TEB57H,TEB86H,TEB110 H,TEC57H,TEC86H,TEC110H,TEC130H. 3、步进电机的静态指标术语 相数:产生不同对极N、S磁场的激磁线圈对数。常用m表示。 拍数:完成一个磁场周期性变化所需脉冲数或导电状态用n表示,或指电机转过一个齿距角所需脉冲数,以四相电机为例,有四相四拍运行方式即AB-BC-CD-DA-AB,四相八拍运行方式即A-AB-B-BC-C-CD-D-DA-A. 步距角:对应一个脉冲信号,电机转子转过的角位移用θ表示。θ=360度(转子齿数J*运行拍数),以常规二、四相,转子齿为50齿电机为例。四拍运行时步距角为θ=360度/(50*4)=1.8度(俗称整步),八拍运行时步距角为θ=360度/(50*8)=0.9度(俗称半 步)。 定位转矩:电机在不通电状态下,电机转子自身的锁定力矩(由磁场齿形的谐波以及机械误差造成的)

步进电机闭环细分驱动控制系统设计_宋鸿飞

步进电机闭环细分驱动控制系统设计 摘要:介绍了螺纹非接触光电测试系统中步进电机闭环细分控制系统的设计,并结合系统要求对抗干扰性和稳定性进行深入研究。文中对步进电机的特性与系统的性能相互关系进行了论述,在此基础上提出了可行的系统设计方案,给出了基于TA8435专用芯片的细分驱动设计电路,对系统抗干扰性和稳定性设计提出了具体解决办法,硬件设计中采用了传感器反馈的全伺服控制方法,软件上采用升频离散化处理,很好的解决了步进电机在高速启停过程中的堵转和丢步现象,提高了系统的稳定性和精度。 关键词:闭环控制;细分驱动;升频离散化 中图分类号:TP216文献标识码:A文章编号:1672-9870(2008)02-00093-03 收稿日期:200716 基金项目:国家863计划资助项目 作者简介:宋鸿飞(1980

角,并依靠电磁力锁定转轴在一定的位置上。因此在定位精度不高的场合下,一般的步进系统都采用开环控制。但由于步进电机固有的低频共振,高频扭矩小引起的失步和机械结构等因素的影响,都会造成实际位移值偏离指令设定值。因此在高定位精度的场合下,没有闭环反馈就无法知道电机是否丢步或过步,系统无法对其进行有效校正和补偿,导致不能准确定位。在步进系统中引入检测环节并对其进行闭环控制,可从根本上解决步进系统的定位精度问题,将使其性能大大提高。步进电机的闭环控制可采用各种不同的方法,其中包括步校验、无传感器反电动势检测和有传感器反馈的全伺服控制。 1系统构成 本电机系统设计应用精密在螺纹非接触光电测试系统中,两相步进电机通过精密滚珠螺杆把电机的轴角运动转化成直线位移运动,带动负载平台及上边安装的测试系统在螺管内部进行直线运动,实现对螺纹的实时检测。由于螺纹检测属于精密检测,对精密位移台的定位精度、速度范围和速度稳定性提出了很高的要求,因此步进电机采用开环控制方式是达不到系统的指标要求的,针对系统的要求步进电机要采用闭环细分控制方式。 电机控制系统设计采用有传感器反馈的全伺服控制方法。其系统组成包括四部分:(1)使用89S52单片机实现电机控制器设计;(2)电机细分驱动器采用东芝公司生产的TA8435电机驱动专业芯片实现电机细分驱动器的设计;(3)位置反馈传感器采用分辨率 1 图1步进电机闭环细分控制系统功能图 Fig.1Diagram for close-loop subdivision control system func- tion of stepper motor 2细分驱动器设计 结合螺纹检测系统对位移平台定位精度和速度范围的要求,步进电机步距角不能满足使用条件,在设计中采用细分驱动的方法,细分驱动电路是通过对步进电机的励磁绕组中电流的控制,来调整步进惦记步距角的大小,把原来的一个整步步距角细分成若干步来完成,从而实现步进电机的高精度定位,提高了步进电机的分辨率。实现细分驱动的方法有很多种,设计中使用了东芝公司生产的单片正弦细分二相步进电机驱动专用芯片TA8435,芯片采用的是脉宽调制式斩波驱动,该芯片有电路连接简单,工作稳定,特点如下: (1)工作电压范围宽(10 、B+、B 图2细分驱动电路原理图 Fig.2Circuit schematic diagram of subdivision driving 在系统中使用的位移平台螺杆导程L为4mm (即电机轴转动一周负载平台的直线位移量),细分数为为0.9° ,分数为 而转台的移动速度和脉冲频率、细分选择、电机本身的固有频率有关。在设计中由89S52的内部 定时器

MSP430单片机对步进电机的驱动控制设计

MSP430单片机对步进电机的驱动控制设计 单片机实现的步进电机控制系统具有成本低、使用灵活的特点,广泛应用于数控机床、机器人,定量进给、工业自动控制以及各种可控的有定位要求的机械工具等应用领域。步进电机是数字控制电机,将脉冲信号转换成角位移,电机的转速、停止的位置取决于脉冲信号的频率和脉冲数,而不受负载变化的影响,非超载状态下,根据上述线性关系,再加上步进电机只有周期性误差而无累积误差,因此步进电机适用于单片机控制。步进电机通过输入脉冲信号进行控制,即电机的总转动角度由输入脉冲总数决定,而电机的转速由脉冲信号频率决定。步进电机的驱动电路是根据单片机产生的控制信号进行工作。因此,单片机通过向步进电机驱动电路发送控制信号就能实现对步进电机的控制。 1 系统设计原理 步进电机控制系统主要由单片机、键盘LED、驱动/放大和PC上位机等4个模块组成,其中PC机模块是软件控制部分,该控制系统可实现的功能:1)通过键盘启动/暂停步进电机、设置步进电机的转速和改变步进电机的转向;2)通过LED管显示步进的转速和转向等工作状态;3)实现三相或四相步进电机的控制:4)通过PC上位机实现对步进电机的控制(启停、转速和转向等)。为保护单片机控制系统硬件电路,在单片机和步进电机之间增加过流保护电路。图l为步进电机控制系统框图。 2 系统硬件电路设计 2.1 单片机模块 单片机模块主要由MSP430FG4618单片机及外围滤波、电源管理和晶振等电路组成。MSP430FG4618单片机内部的8 KB RAM和116 KB Flash满足控制系统的存储要求,P1和P2端口在步进电机工作过程中根据按键状态判断是否跳入中断服务程序来改变步进电机的工作状态,USART模块实现单片机和PC上位机之间的通信,实现PC机对步进电机控制。电源管理电路提供稳定的3.3 V和5 V电压,分别给单片机、晶振电路和驱动和功率放大电路供电。32 kHz晶振给单片机、键盘/显示接口器件8279和脉冲分配器

相关主题