Control+Stepper-Motors步进电机控制

更新时间:2023-06-17 04:55:12 阅读: 评论:0

Mosaic Industries
Controlling Stepper Motors Using the Power I/O Wildcard
APPLICATION NOTE MI-AN-072 2005-09-15 pkc
The Mosaic Stepper Motor
The Mosaic stepper motor is a four-pha, unipolar stepping motor. It is a standard size, 200-steps-per-revolution, NEMA 17 (1.7 in. square footprint, 5 mm shaft diameter), 12 V motor. This motor, like most stepper motors is a permanentmagnet rotor motor. Stepper motors usually have two independent windings, with or without center taps. Tho without center taps require bipolar drive, while the center-tapped windings like the Mosaic Stepper are ud with unipolar drive. The Mosaic stepper is typical of common high-resolution motors – a full revolution requires 200 steps, while each step turns the shaft only 1.8°. This motor is commonly ud in houhold appliances, medical equipment, stage lighting devices, and in various industrial control applications. The following are the specifications of the motor:
Mosaic Part No.: STEPMOT-1 Manufacturer Part No.: 42BYG228 Pha / Windings: 4 / 2 Voltage &
Current: 12V, 400 mA Resistance per Pha: 30 ohms Inductance per Pha: 23 mH Holding Torque: 2000 g-cm Detent Torque: <200 g-cm Weight: 0.24 kg人参枸杞
The motor has six wires, connected to two split windings as is common for unipolar stepper motors:
Yellow A’ B Black (com) B’ Blue Pha Order A, B, A’, B’, … White (com) A Brown
Red
In u, the center taps of the windings are typically wired to the positive supply, and the two ends of each winding are alternately grounded through a drive circuit to rever the direction of the field provided by that winding. The Motor Wiring Diagram also illustrates the order of the stator poles in the motor: A, B, A’, B’. This is the order in which they must be energized to cau the motor to step in a clockwi direction. The following Figure shows the pin connections to the Power I/O Wildcard.
Mosaic Industries
Page 1 of 6
Any questions?
Call (510) 790 - 8222
Power I/O Wildcard Field Header Pins
16 14 12 10 17 9
Out 0 Out 1 Out 2 Out 3 V+Field
Brown Red Yellow Blue Black White Stepper Motor
学雷锋志愿服务活动
Out GND
+ 12V Field –
Supply
Wiring to the Power I/O Wildcard辣椒皮蛋
One output of the Power I/O Wildcard is connected to each of the four phas of the motor, a +12V supply is connected to both center taps of the motor and to the V+Field pin of the Wildcard, and the 12V supplies ground return is connected to any of the output field ground pins on the Wildcard. The f电子表格函数
ollowing Figure shows the internal drive circuitry of the Power I/O Wildcard, showing four of the eight outputs. Each output is controlled by a power MOSFET who gate bias is derived from the field supply which must be 4V or greater to provide sufficient gate voltage. Each MOSFET open-drain output is protected with a flyback diode to the V+Field supply and an internal drain-source rever diode.
+12V
A
V+Field Power I/O Wildcard Wildcard Bus Interface and Control Logic MOSFET Bias and Drive Circuitry Optical Isolation Out 0
A’
微信群公告范文Out 2
B
Out 1
B’
Out 3
Field GND
Stepper Motor Connected to the Power I/O Wildcard
Connecting to a Field Supply
The Power I/O Wildcard is rated for field voltages to 50V allowing a stepper motor to be driven with supply voltages up to 50 volts. The Mosaic stepper motor is rated for 12V continuous operation assuming that one pha at a time is energized. It can be run at significantly greater voltages if the duty cycle is correspondingly reduced. The Field supply should be wired to the V+Field pin on the Wildcard’s Field Header. This connection is necessary to enable the Wildcard’s internal diode clamps. The diodes prevent the voltage on the output pins from spiking to above the supply voltage when an output is turned off. If the supply is not connected to the V+Field pin, switching current OFF in inductive loads would cau a voltage spike great enough to cau the output transistors to break down. The stepper motor will run from lower voltages too, but a minimum 4V supply is needed to provide gate bias voltage for the Wildcard’s MOSFET transistors.
Mosaic Industries Page 2 of 6 Any questions? Call (510) 790 - 8222
Motor Current Stepper motor current is limited by winding resistance; each pha draws a maximum of 400 mA from a 12 V supply. This current consumption is well within the 2 A continuous rating of the Power I/O Wildcard’s outputs. If the motor is run in high-torque or half-stepping modes as described below it will draw more current from the 12V supply than its continuous power rating can support. Conquently, its must only be run intermittently in tho modes to prevent overheating, or turned off between us.
Step Sequences for Full and Half Stepping
When current is applied to one winding of the motor, the rotor (under no load) snaps into alignment with the stator poles corresponding to the energized winding. It will hold that position against an applied mechanical load, at least until the load exceeds the holding torque of the motor. At that point the rotor would slip, and try to catch at the next equilibrium point corresponding to the energized winding, four steps away. Conquently, when they slip stepper motors don’t slip by one step, but by multiples of 4 steps, to one of the equilibrium positions. For any pattern of winding actuation a 200 stepper-revolution motor has 50 equilibrium positions. To rotate this motor continuously, we just appl
y power to the four phas (or windings) in quence. We will assume positive logic, where a logic 1 means turning ON the current through a motor winding. This is the way the Power I/O Wildcard works, with a logic 1 turning ON an open-drain output, forcing the output to a low voltage and sinking current. Full Stepping (or Wave Stepping) The following control quence will step the motor clockwi one full step at a time:
Step Sequence for Full Stepping Step 1 2 3 4 5 A 1 0 0 0 1 Winding B A’ 0 1 0 0 0 0 0 1 0 0 B’ 0 0 0 1 0 Output Byte 08 04 02 01 08
Each row reprents the state of actuation of the four windings, successive rows indicate successive times. Note that there are four steps to a full waveform on each winding, with the fifth step repeating the first. The output byte reprents the hexadecimal data byte that is nt to the Power I/O Wildcard. Only the lower nibble (four bits) are ud. Two motors, corresponding to two axes of motion, could be controlled by a single Power I/O Wildcard by using the upper nibble for a cond motor. Full stepping with only one pha energized at a time is also called wave stepping. High Torque Full Stepping Energizing two adjacent phas provides greater torque. When two adjacent poles are turned ON together the rotor turns to just half-way between the two poles, with both poles exerting force. Twice the current is required, and the forces sum to provide a torque 1.4 times greate
r than that provided by energizing only one pha at a time. The following quence provides high-torque full stepping:
Mosaic Industries
Page 3 of 6
Any questions?
Call (510) 790 - 8222
Step Sequence for High Torque Full Stepping Step 1 2 3 4 5 A 1 0 0 1 1 Winding B A’ 1 1 0 0 1 0 1 1 0 0 B’ 0 0 1 1 0 Output Byte 0C 06 03 09 0C
Note that the two halves of each winding are never energized at the same time, but both windings are energized simultaneously. The two quences shown above will rotate a permanent magnet one step at a time. The first quence only powers one winding at a time; thus, it us less power. Half Stepping Interleaving the above quences provides for half stepping. A first winding is energized, aligning the rotor with a particular pole. Then that pole and an adjacent pole are both energized aligning the rotor halfway between them. Then the cond pole is energized alone, aligning the rotor
with it, and so on. Half stepping provides 400 steps per revolution and smoother motion. The following table provides an 8-step half-stepping quence:
Step Sequence for Half Stepping Step 1 2 3 4 5 6 7 8 9 A 1 1 0 0 0 0 0 1 1 Winding B A’ 0 1 1 1 0 0 0 0 0 0 0 0 1 1 1 0 0 0 B’ 0 0 0 0 0 1 1 1 0 Output Byte 08 0C 04 06 02 03 01 09 08
Steppers move more smoothly and are more resistant to resonance effects when half-stepping. Shaft oscillation occurs when the rotor snaps to the next winding during full stepping. The shaft first overshoots, then undershoots, continuing a decaying oscillation. If the load on the shaft happens to have a harmonic period that matches the rotor's oscillation, a resonance develops between the motor and the load. This can destroy the stepper's ability to rotate at certain rates. While still there, the resonance effects are much less pronounced when half-stepping. Micro-Stepping Perhaps the name “stepper” is a misnomer; this type of motor was originally conceived a century ago by the famous inventor Nikola Tesla to run on AC synchronous power. Instead of using smoothly varying AC, if DC is applied first to one winding, then to the next, the motor moves in step fashion, hence the name. However, instead of providing a fixed current into each winding, we can approximate AC drive by varying the DC current to mimic a sinusoidal waveform. This type of drive is called micro-stepping.
Mosaic Industries
Page 4 of 6
Any questions?
Call (510) 790 - 8222
Half-stepping is the most simple ca of microstepping – equal current is applied to two adjacent poles to align the rotor halfway between the poles. But if different currents are applied to the two adjacent poles we can in principle position the rotor anywhere we want between the two poles. For example, applying current to cond pole that is 60% of the first current will position the rotor one quarter of the way between the two poles. Micro-stepping is usually accomplished by pul width modulating (PWM) the currents in the windings to attain intermediate current values other than full ON and full OFF. To provide continuous motion between the two poles we would u PWM to ramp down the current to the first pole, following a cosine wave, while simultaneously ramping up the current to the cond, following a sine wave. Becau of the inver square nature of the electromagnetic force, moving smoothly between two poles calls for a cosine/sine current pattern to be applied to the their respective windings. While we could theoretically divide the step as finely as w
e like, there are practical limitations. The are caud by absolute tooth error (the variation in spacing of the rotor poles), typically about 1/25 of a full step, and a deflection error caud by torque loading. The deflection error is at a minimum when the rotor is positioned on a winding and at a maximum when positioned between windings. If the torque loading is 10%, then the shaft's error when between windings will be 10% of a full step. Microstepping at eight or ten microsteps per full step is a reasonable compromi between smoothness and rotor position accuracy. More microsteps can translate into a smoother motion, but will not likely result in incread rotor position accuracy under load. For insignificant loads micropositioning can be better, but still no better than the absolute tooth error.
系统需求
Stepping Speed
The maximum stepper motor speed is limited by the inductance of the windings. As the computer switches current to the windings ON and OFF, the rate of current change is limited by the winding inductance. When the winding is switched ON the current increas at an initial rate given by dI/dt = V/L and is eventually limited by the winding resistance. At high speeds there isn’t enough time for the current to attain its maximum. When the source of the current is switched OFF, the current is diverted through the flyback protection diodes and internal MOSFET diodes and decreas only slo
祖国的小花朵wly, at a rate determined by the small voltage across the diodes, effectively braking the motor. The result of the effects is ever lowering torque as the motor spins faster. There are veral ways to increa top speed. A zener diode may be ud in ries with the flyback diodes to increa the flyback voltage across the winding, allowing the current to decay more rapidly, while still protecting the switching transistors. Further, a greater supply voltage can be ud to quickly ramp up the winding current, followed by PWM switching to limit the average current to a safe level.
Example Software
The following FORTH program illustrates driving the stepper motor from the Power I/O Wildcard. The Wildcard should be mounted on Wildcard Port 1 with its address jumpers t to 0, providing a Wildcard address of 4. The stepper motor is connected as shown in the wiring diagram above. The Wildcard is controlled very simply. Writing (i.e., storing) a byte to the location x04C000 turns on the outputs for whichever bits are t in the written byte. Individual bits could be modified without changing the others in the output byte by using the kernel routines Set.Bits or Clear.Bits, but in this ca entire bytes are written. The program creates an array (called Cycle) of byte-sized constants at compile time in the program area of memory. This array contains the bytes to be written to the outputs to create a quence of half steps, taken from the table above. Three executable functions
make up the program. The first, StepperOff, merely turns OFF current to the stepper motor. The cond, TakeStep, steps the motor a single half step either clockwi or counterclockwi. It does this by incrementing a pointer into the array (CycleIndex), checking its bounds to wrap back around to the beginning or end of the array if needed, fetching the byte from the arrray, and nding it to the Power I/O Wildcard’s output register. The motor then steps forward. To step counterclockwi the pointer is merely decremented instead of incremented. A third procedure, Steps, takes as input the number of steps to move, a rate, and direction, and moves the motor the prescribed number of steps. It merely calls TakeStep in a loop, with a delay inrted to slow down the step rate to that required.
Mosaic Industries Page 5 of 6 Any questions? Call (510) 790 - 8222
The following is the full program:
\ \ \ \ \ \ \ \ \ \ \ \ \ This software assumes that the Power I/O Wildcard is mounted at on Wildcard Port 1 and its address jumpers are t to 0, providing a Wildcard address of 04. A unipolar stepper motor and power supply are connected to the lower four of the Wildcard's output lines, connecting to the field connector as follows: Field Pin Field Signal Name Motor Connection 16 Out 0 Brown (Pha A )
14 Out 1 Red (Pha B ) 12 Out 2 Yellow(Pha A') 10 Out 3 Blue (Pha B') 17 V+Field White (Winding A center tap) 17 V+Field Black (Winding B center tap) 17 V+Field +12 V Field Supply 9 Out GND Field Supply GND Return
ANEW StepperController HEX C000 04 XCONSTANT PwrOutput \ The address of the Power I/O Wildcard output byte \ with Wildcard mounted on Wildcard Port 1 with its address jumpers t to 0. 8 CONSTANT NumSteps \ Number of steps in the stepper cycle NumSteps 1- CONSTANT NumSteps-1 \ Number of steps - 1 \ Creat a constant array to hold step waveforms in the cycle as bytes, \ only lower 4 bits are valid, one bit for each motor winding (aka 'pha') NumSteps 1 1 DIM.CONSTANT.ARRAY: Cycle \ 1-dim array of bytes \ and store steps for a 4-pha 8-step cycle for 400 half-steps per revolution 01 0 Cycle C! 03 1 Cycle C! 02 2 Cycle C! 06 3 Cycle C! 04 4 Cycle C! 0C 5 Cycle C! 08 6 Cycle C! 09 7 Cycle C! VARIABLE CycleIndex \ Holds index into the Cycle array DECIMAL : StepperOff ( -- ) 0 PwrOutput C! ; : TakeStep ( flag -- ) \ move clockwi one step on true, ccw on fal \ Takes about 460 uc to execute IF \ We increment or decrement CycleIndex forcing it to be within \ range, so it never needs initialization CycleIndex @ 1+ DUP NumSteps-1 U> IF DROP 0 ENDIF ELSE CycleIndex @ DUP 0 = IF DROP NumSteps ENDIF 1ENDIF \ and fetch the byte from the array and output it to the Power I/O Wildcard DUP CycleIndex ! Cycle C@ PwrOut
put C! ; : Steps ( u1 \ u2 \ flag -- ) \ moves u1 steps at a rate of u2 steps/c, clockwi if flag is true, \ ccw otherwi. u2 is clamped to between 16 and 2000 steps per cond Locals{ &flag &Steps/c &Steps } \ Calculate the per loop delay time needed to implement &Steps/c \ The 487. is the loop execution time in ucs found by benchmarking 1E6 &Steps/c 16 MAX 2000 MIN FLOT F/ 487. F- FIXX TO &Steps/c &Steps 0 DO &Steps/c MICROSEC.DELAY &flag TakeStep LOOP
;
The information provided herein is believed to be reliable; however, Mosaic Industries assumes no responsibility for inaccuracies or omissions. Mosaic Industries assumes no responsibility for the u of this information and all u of such information shall be entirely at the ur's own risk.
Mosaic Industries刀锯
5437 Central Mosaic Industries Ave Suite 1, Newark, CA 94560 Telephone: Page 6 of 6 (510) 790-8222 Fax: (510) 790-0925 Any questions? Call (510) 790 - 8222

本文发布于:2023-06-17 04:55:12,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/82/973022.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:活动   枸杞   辣椒   电子表格   微信   需求   花朵
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图