HomeElectronicsNo extra missed steps: Unlocking precision with closed-loop stepper management

No extra missed steps: Unlocking precision with closed-loop stepper management



No extra missed steps: Unlocking precision with closed-loop stepper management

Bipolar stepper motors present exact place management whereas working in an open loop. Industrial automation purposes—resembling robots and processing and packaging equipment—and shopper merchandise—resembling 3D printers and workplace gear—successfully benefit from the stepper’s inherent place retention. This eliminates the necessity for convoluted sensor expertise, processing energy necessities, or advanced management algorithms.

Nevertheless, driving a stepper motor in an open-loop methodology requires the movement profile to be errorless. Any glitch through which the stepper’s load abruptly adjustments leads to step loss, which desynchronizes the stepper place from the appliance’s perceived place. Usually, this place monitoring loss is problematic. For instance, in a label printer, step loss might trigger the print to be skewed with the label, leading to skewed label prints.

This text will describe a easy implementation that provides stepper motor the power to sense its place and actively appropriate any error which may accrue throughout actuation.

 

Design assumptions

For this text, we are going to assume {that a} bipolar stepper motor with 200 steps per revolution is employed to drive a mechanism that’s accountable for opening and shutting some type of flap or valve whereas servicing a manufacturing line. To make movement easy, we are going to make the most of a bipolar stepper driver with 8 levels of microstepping, leading to 1,600 step instructions per full rotor revolution.

With a purpose to totally open or shut mentioned mechanism, we are going to want a number of rotor turns; for simplicity, assume we’d like 10 full turns. On this case, the controller would want to ship 16,000 step instructions on every course to efficiently actuate the mechanism.

When the present is excessive sufficient to beat any torque variation, the stepper strikes accordingly and might totally open and shut the management floor. On this situation, the place is preserved. If steps are misplaced, nonetheless, the controller loses synchronization with the motor, and the actuation turns into compromised.

Newer applied sciences try to offer checks, resembling stall detection, by measuring the motor winding’s again electromotive power (BEMF) when the utilized revolving magnetic subject crosses the zero-current magnitude. Stall detection solely tells the appliance whether or not the motor is shifting; it fails to report what number of steps have been successfully misplaced. In instances like this, it’s worthwhile to discover closing the loop on the rotor place utilizing sensing expertise.

Sensor choice

In some instances, utilizing easy restrict switches—like magnetic, optical, or mechanical—may suffice to drive the stepper motor till the bounds are met. Nevertheless, there are many instances the place the obtainable area doesn’t enable the usage of such switches. If a swap can’t be used, it would make sense to populate an optical shaft encoder (relative or absolute) on the motor’s again facet shaft, however there’s a excessive price related to these options.

An inexpensive answer for this dilemma is a contactless angular place sensor. This sort of sensor includes the usage of available magnetics with exact and correct semiconductors that make use of Corridor sensors, which extract the rotor’s place with as a lot as 15 bits value of decision. Meaning every rotor revolution might be encoded to as a lot as 215 = 32,768 models, or 0.01 levels (360/32,768).

For this instance, an 11.5-bit decision was chosen, as that shall be adequate to encode the 1,600 microsteps. By utilizing 11.5 bits of decision, we will receive 2,896.31 efficient angle segments. A Corridor-effect primarily based contactless sensor such because the MA732 supplies absolute place encoding with 11.5 bits of decision.

When coupled to a diametrically magnetized spherical magnet, the sensor is periodically sampled by means of its serial peripheral interface (SPI) port at 1-ms intervals (Determine 1). When a learn command is issued, the sensor responds with a 16-bit phrase. The applying makes use of the 16 bits value of knowledge, though the system’s accuracy is pushed by the efficient 11.5-bit decision.

Determine 1 The Corridor-effect sensor is linked to the MCU by means of the SPI ports. Supply: Monolithic Energy Methods

Energy stage choice

Driving bipolar steppers require two full H-bridges. The 2 most important implementations to drive bipolar stepper motors are utilizing a twin H-bridge energy stage with a microcontroller unit (MCU) to generate sine/cosine wave pairs or utilizing a totally built-in step indexer engine with microstepping help. Utilizing an MCU and twin H-bridge mixture supplies extra flexibility when it comes to methods to regulate the sine wave currents, however it additionally will increase complexity.

For this text, a totally built-in step indexer with as a lot as 16 levels of microstepping was chosen (Determine 2). The built-in step indexer on this article is MP6602, which supplies as much as 4 A of present drive and is able to driving NEMA 17 and NEMA 23 bipolar stepper motors. In the meantime, the MCU drives all management alerts, communicates with the indexer by means of the SPI port, and samples the fault info.

Determine 2 The step indexer is linked to an MCU to drive the bipolar stepper motor. Supply: Monolithic Energy Methods

Remaining implementation

For a closed-loop stepper implementation, the sensor and energy stage needs to be managed by an off-the-shelf ARM Cortex M4F MCU. The MCU communicates with each gadgets by means of a single SPI port with two chip selects. An inside timer generates the steps. The board measures 1.35”x1.35” and is sufficiently small to suit behind a NEMA17 stepper motor (Determine 3). This permits the reference design for use in a bigger motor body measurement such because the NEMA 23.

Determine 3 The PCB’s backside facet has the MA732 angle sensor. Supply: Monolithic Energy Methods

Determine 4 exhibits the motor meeting, through which Determine 4a (above) exhibits the motor meeting with a diametrically magnetized spherical magnet going through MA732 sensor, and Determine 4b (under) exhibits the ultimate answer.

Determine 4 Assemble the motor such that the housing is invisible. Supply: Monolithic Energy Methods

Absolute place and sensor overflow

Though the contactless magnetic primarily based sensor is an absolute place encoder, that is solely true on a per-revolution foundation. That’s, all through the rotor’s angular journey by means of every revolution, the sensor supplies a 16-bit quantity that the MCU reads, which basically permits the firmware to study the rotor’s absolute place at any given time.

Because the motor revolves, nonetheless, every new revolution is indistinguishable from the earlier revolution. We are able to add angular place readings right into a a lot bigger quantity, which might be expressed as a variable that takes all of the angle readings to acquire your complete place as an absolute worth (referred to as Rotor_Angle_Absolute). This variable is a 32-bit signed integer.

If the motor strikes ahead, increment the variable, and vice versa. Assuming 16-bit readings, 1,600 microsteps per revolution, and a 1,000-rpm step price, it might take 22.37 hours for the variable to overflow. The MCU should make sure that the sensor readings are added accurately, even because the rotor goes by means of its overflow area. This absolute place correction should be executed whether or not the motor is rotating clockwise or counterclockwise; in different phrases, the sensor place is incrementing or decrementing.

Determine 5 exhibits how the angle place adjustments over time.

Determine 5 The angle place adjustments over time because the motor revolves. Supply: Monolithic Energy Methods

Determine 5 exhibits that the angular displacement (MA732_Angle_Delta, denoted as AD in determine) is computed at periodic intervals (1ms). Throughout every pattern, the earlier learn is saved inside MA732_Angle_Prev (denoted as Prev Angle in determine), the brand new pattern is saved at MA732_Angle_New (denoted as New Angle in determine). MA732_Angle_Delta might be calculated with Equation 1:

The results of Equation 1 is added to MA732_Angle_Absolute. If the rotor moved clockwise (ahead), the displacement is optimistic; if the motor strikes counterclockwise (reverse), the displacement is unfavourable.

A particular consideration should be made throughout angle sensor overflows. If the sensor strikes ahead previous the utmost of 0xFFFF (denoted as OvF+AD in Determine 5), or if the sensor decrements its place previous 0x0000 (denoted as OvF-AD in Determine 5), the earlier equation can not be used. In each eventualities, the FW logic chooses one of many following equations, relying on which case we’re servicing.

If the angle displacement overflows when counting up and exceeds the utmost (OvF+AD), then MA732_Angle_Delta might be calculated with Equation 2:

If the angle displacement overflows when counting down and falls under the minimal (OvF-AD), then MA732_Angle_Delta might be calculated with Equation 3:

Stepper motor: New frontiers

Utilizing an off-the-shelf MCU, we will interface the stepper motor driver and Corridor-sensor primarily based sensor through an SPI port. The firmware can then repeatedly interrogate the place sensor and extrapolate the motor rotor place always. By evaluating this place to a commanded place, the motor might be commutated to achieve the commanded place in a well timed style.

If an exterior power causes the motor to lose steps, the sensor info tracks what number of steps have been misplaced, which then permits the MCU to shut the loop on place and efficiently convey the stepper motor to the commanded place.

Though stepper motors are largely utilized in open-loop purposes, there are many benefits in closing the loop on place. By using cost-effective, Corridor-sensing applied sciences, and an easy-to-use index-based stepper drivers, the appliance can now add servo-like properties to their stepper-based purposes.

Jose Quinones is senior software engineer at Monolithic Energy Methods (MPS).

Associated Content material

The put up No extra missed steps: Unlocking precision with closed-loop stepper management appeared first on EDN.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments