How to simplify the design of stepping motor syste

2022-08-06
  • Detail

How to simplify the design of stepping motor system

modern stepping motor drive systems usually use integrated circuit power chips to drive the motor, and sometimes they may integrate some simple control functions, such as current control. Some advanced control chips also integrate a state machine to control the stepping sequence of the stepping motor. Generally speaking, the step timing and motion curve are controlled by an external microcontroller or a dedicated ASIC logic circuit. If it is necessary to control multiple motors, the solution is to install special logic circuits for each motor or install the control software for each motor on the microcontroller. By integrating a digital control core and drive circuit on one chip, the new product l6470 of STMicroelectronics can simplify the design of multi motor control system. This new IC adopts the voltage control mode, which can manage the motion curve set by the user in 1/128 micro steps, and these operations have little impact on the load of the main microcontroller. In the system using this controller, because the microcontroller only needs to send advanced motion commands to the controller, it can easily manage multiple motors with only one microcontroller

preface

the newly introduced stepping motor control chip l6470 of Italy France semiconductor integrates a power level and a digital control core on one chip. This stepping motor control chip can receive the motion curve command from the microcontroller through the SPI interface, automatically execute the motion according to the preset acceleration and speed curve, and automatically accelerate the running speed of the motor and keep it at the preset speed

the structure of the controller is shown in Figure 1. The control logic circuit is a state machine that can be set and can receive and save various parameters, such as acceleration, deceleration, starting speed, speed, phase current control (PWM) and stepping mode. From full step to 1/128 micro step, the controller supports a total of 8 step modes. The internal absolute position counter is responsible for calculating the number of steps or micro steps of the selected step mode, and tracking the motor rotor position with a resolution equivalent to the step mode. Rotate 1.8 degrees per step, and the position counter will automatically increase 25600 (128 × 200 steps)

Figure 1: structure block diagram

all motion parameters and commands are sent to the controller through SPI interface. The control logic circuit is responsible for interpreting the forward step number and other motion commands, controlling the step time and step number output required for the motor to accelerate from standstill and then return to the stop state, and executing the total number of steps in the command at the same time. The chip can also queue and send these motion commands for complex motion control, which can greatly reduce the overhead of the microcontroller

motion and position commands

the digital core can execute five motion commands and four stop commands:

run (direction, speed): accelerate the operation until the stop command is received

move (direction, nu st fatigue testing machine is installed to measure the fatigue characteristics of metal, alloy materials and their components (such as operating joints, fasteners, spiral moving parts, etc.) under the tensile, compressive or tension compression alternating load at room temperature Fatigue life Pre crack and crack propagation test EPS): move n steps along the command direction

goto (position): move to the absolute position along the most direct path

goto (direction, position): move to the absolute position along the command direction

gountil (act, direction, speed): accelerate the operation until an external event occurs

softstop: decelerate until stop

hard stop: emergency braking (no deceleration process)

softhiz: decelerate until stop, Then turn off the bridge

hardhiz: emergency braking, and turn off the bridge

before starting any movement, use the SetParam command through the SIP interface to set the operating parameters: minimum speed, maximum speed, acceleration, deceleration and other motion parameter values. To ensure the integrity of the movement, many parameter values of the movement curve are locked during the motor movement, and these parameters can only be changed after the motor is braked

Figure 2 shows a typical motion curve of the move command. When a move command is received, the controller will calculate the motion curve of the steps n required for the motor to accelerate from standstill and then return to the starting position. The whole process is completed independently by the digital core hardware

Figure 2: typical motion curve

goto command instructs the driver to use the value of 22 bit absolute position counter to drive the motor to rotate to a specific position according to the internal value if you purchase 1 piece of our experimental machine similar to their model. Goto commands are divided into two types: one is to rotate in a specific direction; The other is to rotate along the most direct path, that is, to determine the direction of motion to reach the desired position with the minimum number of steps. For a 1/128 micro step motor rotating 1.8 degrees per step, the resolution rate of the 22 bit counter is equivalent to about 164 cycles of motor rotation. Even if the gear reduction ratio is large, the effective resolution rate is still within the range of the position counter. The motion curve of the goto command looks the same as that of the move command, but there is one difference. In the goto command, the number of steps required to reach the absolute position specified by the command is automatically calculated

run and gountil commands are used to keep the motor rotating at a constant speed until a braking command is received (applicable to run command) or an external event occurs (applicable to gountil). When a braking command is received, the controller performs one of the following two operations: emergency braking or deceleration braking. The device can also perform emergency braking or deceleration stop, and then provide three state output

as shown in Figure 3, complex motions can be performed using a series of run commands. After receiving a new run command, the controller will drive the motor to accelerate or decelerate to the position specified by the new command, and keep rotating at the specified speed until the next run command or stop command is received. When a reverse operation command is received, the motor reduces to the minimum speed, and then accelerates in the opposite direction

figure 3: multiple run commands can realize complex motion

voltage controlled micro stepping

generally, the stepping motor drive circuit is designed with current control, and the current controller monitors and controls the winding current intensity. This structure allows designers to maintain the required torque in a wide speed range, and the power supply voltage fluctuation is very small. This design is very suitable for full step and half step drives and is easy to implement. Many designers avoid using the voltage control method in the micro stepping driver, because the peak current changes greatly due to the change of power supply voltage, and the back electromotive force (EMF) of the motor will also increase with the increase of rotating speed. However, these disadvantages can be corrected by using digital control technology

in order to realize this voltage controlled driving circuit, a PWM counter/timer circuit is required to control the output pulse width and set the output duty cycle digitally. L6470 controls the phase current by applying voltage to the motor winding. Although the amplitude of the phase current cannot be directly controlled, the phase current is closely related to the magnitude of the phase voltage, and the load, torque, electrical characteristics of the motor and the speed of the products at some levels that are specially designed for elite athletes. The effective output voltage is proportional to the product of the motor supply voltage and Kval coefficient. The value range of Kval is 0% to 100% of the power supply voltage. In a micro step driver, this maximum value is multiplied by the modulation index to produce a sine wave of the selected number of steps. The peak voltage is obtained from the following formula:

kval value is obtained from the following formula: kval= (ipk x R)/vs

where: ipk= required peak current, vs= typical power supply voltage, r= motor winding resistance

the registers of the device support different Kval settings such as acceleration, deceleration, constant speed operation and holding position. Different torque settings can be easily realized in each part of the motion curve

bemf compensation

if the same peak voltage is always supplied to the motor within the whole speed range, the current intensity will gradually decrease as the motor speed increases, because the BEMF of the motor will significantly reduce the voltage applied to the coil. The waveform on the left side of Figure 4 describes the working condition of the motor without BEMF compensation technology. It is not difficult to see from the figure that as the motor speed increases, the BEM increases in a linear manner. Because the voltage on the coil is the difference between the actually applied phase voltage and the BEMF voltage, the current will decrease

figure 4: phase current with BEMF compensation circuit and without BEMF compensation circuit

in order to correct the influence of BEMF increase on current, this product adds a factor of F to correct the good decoration performance of BEM in Kval coefficient. In essence, a correction value is added to the initial setting value of Kval to offset the influence of BEMF. Since BEMF is directly proportional to the speed, the correction factor is a slope, and the real-time correction value is calculated according to the slope and current speed. The product provides different correction values: the first value is a standard value, which is applicable to the acceleration of the motor from zero speed until the intersection speed parameter int_ Up to the maximum speed set by speed. Above the intersection speed, the standard slope can be adjusted with two additional slopes, one for constant speed operation and acceleration, and the other for deceleration operation. When the BEMF correction value is set appropriately, the peak current remains constant within the whole speed range of the motor, as shown in Figure 5. Figure 6 depicts the actual current waveform when a motor accelerates

figure 5: BEMF correction curve

figure 6: phase current with BEMF correction function

power supply and phase resistance correction

power supply voltage and phase resistance of motor are the other two main factors affecting phase current. Because the controller adopts the voltage control mode to control the output duty cycle, any change in the two elements will affect the phase current

when the motor has no regulated power supply, a large number of pulsating voltages will appear on the voltage from the power supply to the motor drive circuit. As the supply voltage changes, the motor current will fluctuate. If the pulsating voltage on the power supply is large, when the motor current becomes too small, the motor is likely to stop running. The controller has a built-in power supply voltage correction circuit, as shown in Figure 7. In this circuit, the internal analog-to-digital converter is responsible for measuring the power supply voltage, and then the correction factor is calculated by the correction algorithm implemented in the digital core, which is applied to the PWM duty cycle to keep the output voltage constant in the whole power supply voltage variation range

figure 7: power correction

as the motor heats up, the change of phase resistance will also directly affect the phase current. The ktherm setting is used to correct the phase resistance change caused by the internal heating of the motor. The software of the driver controller can monitor or estimate the temperature rise of the motor, set the ktherm value, and correct the change of the motor phase resistance caused by the temperature rise. For example, a simple algorithm can be used to measure the phase resistance when the motor stops running at the running interval, and the ktherm value can be adjusted according to the measurement results

conclusion

l6470 enables designers to realize the voltage controlled micro stepping driver and correct the typical system problems that can only be solved by using the current controlled driver in the past. On the whole, the system control becomes smoother without the common restrictive problems of current controlled drives. Using the digital voltage controlled PWM method, the micro step driver with up to 128 micro steps per step can be easily realized

Copyright © 2011 JIN SHI