# Patent

## Title
Power transfer based stall detection techniques for stepper motor

## Abstract

In accordance with at least one example of the description, a circuit is adapted to be coupled to a coil of a motor via an H-bridge circuit. The circuit includes a duty sensor, a subtractor, and a comparator. The duty sensor is coupled to the coil of the motor and is configured to provide raw run duty data responsive to a coil current through the coil. The subtractor is coupled to the duty sensor and is configured to provide a differential duty signal responsive to a stall duty signal and a run duty signal obtained using the raw run duty data. The comparator is coupled to the subtractor and is configured to provide a stall signal indicative of a stall condition for the motor responsive to the differential duty signal and a threshold value.

## Background
BACKGROUND
Stepper motors are synchronous electrical motors that convert pulsed signals into discrete mechanical rotational movements. A stepper motor may include two coils (e.g., inductive elements) orthogonally arranged about a rotor such that a 90-degree angle between coils to provide spatial separation. A stepper driver may control or regulate coil current flowing through each coil such that a phase separation of 90-degrees exists between the respective coil currents. Synchronization may exist between a rotational position of the rotor and a magnetic field provided by coil current flowing through each coil. Mechanical rotational movement by the rotor may be induced by controlling the coil current flowing through each coil to rotate the magnetic field.
SUMMARY
In accordance with at least one example of the description, a circuit is adapted to be coupled to a coil of a motor via an H-bridge circuit. The circuit includes a duty sensor, a subtractor, and a comparator. The duty sensor is coupled to the coil of the motor and is configured to provide raw run duty data responsive to a coil current through the coil. The subtractor is coupled to the duty sensor and is configured to provide a differential duty signal responsive to a stall duty signal and a run duty signal obtained using the raw run duty data. The comparator is coupled to the subtractor and is configured to provide a stall signal indicative of a stall condition for the motor responsive to the differential duty signal and a threshold value.
In at least one example, the duty sensor is further configured to provide raw stall duty data responsive to the coil current through the coil during the stall condition, the stall duty signal obtained using the raw stall duty data. In at least one example, the circuit further includes a weighting filter coupled to the duty sensor. The weighting filter is configured to provide a run duty signal responsive to the raw run duty data and a step coefficient Kn for step-n of the coil current. In at least one example, Kn=sin((90°/M)*n), and M denotes a total number of steps in a quarter-cycle of the coil current. In at least one example, a value of the differential duty signal increases as a load torque of the motor increases. In at least one example, the stall signal indicates detection of the stall condition when a value of the differential duty signal breaches the threshold value. In at least one example, the threshold value is below a value of the differential duty signal when the motor is in a no-load condition. In at least one example, the run duty signal is scalable with respect to: an angular velocity of the motor, a motor supply voltage, a peak coil current, a number of steps in a cycle of coil current, or a combination thereof.
In accordance with at least one example of the description, a circuit is adapted to be coupled to a coil of a motor via an H-bridge circuit. The circuit includes a duty sensor, a first subtractor, a second subtractor, and a comparator. The duty sensor is coupled to the coil and is configured to provide raw run duty data responsive to a coil current through the coil. The first subtractor is coupled to the duty sensor and is configured to provide a differential duty signal responsive to a stall duty signal and a run duty signal based on the raw run duty data. The first duty subset signal corresponds to a first quadrant of a half-cycle of the coil current and the second duty subset signal corresponds to a second quadrant of the half-cycle adjacent to the first quadrant. The second subtractor is coupled to the first subtractor and is configured to deduct the second duty subset signal from the first duty subset signal to provide a quadrant differential duty signal. The comparator is coupled to the second subtractor and is configured to provide a stall signal responsive to the quadrant differential duty signal and a threshold value.
In at least one example, the circuit further includes a divider coupled to the first subtractor. The divider is configured to partition the differential duty signal into duty subset signals corresponding to different quadrants of a cycle of the coil current. In at least one example, the first and second duty subset signals are weighted averages of the differential duty signal over the first and second quadrants of the half-cycle of the coil current, respectively. In at least one example, a value of the quadrant differential duty signal indicative of a no-load condition is an upper bound of a range of values for the quadrant differential duty signal. In at least one example, a value of the quadrant differential duty signal indicative of a stall condition is a lower bound of a range of values for the quadrant differential duty signal. In at least one example, the threshold value is defined using one or more of a no-load value and a stall value of the quadrant differential duty signal. In at least one example, an effective duty cycle value Dnr of the raw run duty data at step-n of the coil current is determined using a difference over a duration of step-n between a cumulative drive time and a cumulative fast decay time.
In accordance with at least one example of the description, a stepper motor driver is adapted to be coupled to a coil of a stepper motor. The stepper motor driver includes an H-bridge circuit, a gate driver, and a stall detection circuit. The H-bridge circuit is connected to the coil and is operable to provide a coil current to the coil. The gate driver is coupled to the H-bridge circuit and is operable to control the H-bridge circuit by providing a pulse modulated signal to the H-bridge circuit. The stall detection circuit is coupled to the coil and is configured to monitor power transferred to the stepper motor through a duty cycle of the pulse modulation signal. The stall detection circuit includes a duty sensor and a comparator. The duty sensor is coupled to the coil and is configured to provide raw duty data responsive to the coil current. The comparator is coupled to the duty sensor and is configured to provide a stall signal indicative of an operating condition of the stepper motor based on the raw duty data.
In at least one example, a control signal provided at an input of the stepper motor driver varies responsive to the stall signal transitioning to a value indicative of the operating condition of the stepper motor being a stall condition. In at least one example, the stall detection circuit further includes a subtractor coupled to the duty sensor. The subtractor is configured to provide a differential duty signal using the raw duty data and the comparator is configured to provide the stall signal responsive to the differential duty signal and a threshold value. In at least one example, the raw duty data is raw run duty data and the stall detection circuit further includes a first subtractor and a second subtractor. The first subtractor is coupled to the duty sensor and is configured to deduct a stall duty signal from a run duty signal obtained using the raw run duty data to provide a differential duty signal having a first duty subset signal and a second duty subset signal. The first duty subset signal corresponds to a first quadrant of a half-cycle of the coil current and the second duty subset signal corresponds to a second quadrant of the half-cycle that follows the first quadrant. The second subtractor is coupled to the comparator and is configured to deduct the second duty subset signal from the first duty subset signal to provide a quadrant differential duty signal. The comparator is configured to provide the stall signal responsive to the quadrant differential duty signal and a threshold value. In at least one example, a first value of the quadrant differential duty signal indicative of a no-load condition is an upper bound of a range of values for the quadrant differential duty signal and a second value of the quadrant differential duty signal indicative of a stall condition is a lower bound of the range of values.



BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 is a block diagram of an example stepper motor system.
FIG. 2 is a diagram of example sinusoidal coil currents, as a function of step position, in accordance with various examples.
FIG. 3 is a diagram of coil current at a given step as a function of time, in accordance with various examples.
FIG. 4 is a schematic diagram of an example implementation of an H-bridge circuit.
FIG. 5 is a diagram of coil current as a function of time, in accordance with various examples.
FIG. 6 is a block diagram illustrating power transfer within the system, in accordance with various examples.
FIG. 7 is a block diagram of an example circuit that is useful to implement aspects of the stall detection circuit of some examples.
FIG. 8 is a diagram of a differential duty signal as a function of load torque, in accordance with various examples.
FIG. 9 is a diagram of example signal waveforms that show interquadrant power transfer variations within the system.
FIG. 10 is a block diagram of an example circuit that is useful to implement aspects of the stall detection circuit, in accordance with various examples.
FIG. 11 is a diagram of example signal waveforms that show monitoring of interquadrant power transfer variations within the system.



The same reference numbers or other reference designators are used in the drawings to designate the same or similar (functionally and/or structurally) features.
DETAILED DESCRIPTION
Stepper motors may be operated/driven using a controller whereby the controller provides drive signals that selectively activate/drive one or more of the stepper coils. The drive signals may be a continuous signal (e.g., a sinusoidal signal) or a series of discrete or pulsed signals (e.g., a series of pulses that have a duty cycle). To control the speed and power/torque of the stepper motor, the duty cycle may be changed (e.g., by varying the width of the pulses or by varying the frequency of the pulses) during operation of the stepper motor. Stepper motors provide position control by partitioning one cycle (e.g., 360-degrees) of mechanical rotation into a number of equal step positions (e.g., 4, 16, and/or 256). Stepper motors operate in an open loop configuration in which the stepper motors do not provide any position feedback. That lack of position feedback may be problematic when a stepper motor encounters an operating condition (e.g., a stall condition and/or an overload condition) that obstructs further rotational movement. For example, continuing to drive the stepper motor in an operating condition that obstructs further rotational movement may involve negative impacts like overheating, increased vibrations, increased noise, system damage (e.g., damage to the stepper motor and/or damage associated with a mechanical load coupled to the stepper motor). It may be advantageous to provide a mechanism for detecting an operating condition of a stepper motor without position feedback to avoid such negative impacts.
One approach to detecting an operating condition (e.g., a stall condition and/or an overload condition) of a stepper motor that obstructs further rotational movement without position feedback involves external Hall sensors. While effective, adding external components to detect stepper motor operating conditions increases system costs, complexity, and/or size. Another such approach involves monitoring a relative phase angle difference between a back electromotive force voltage (VBemf) waveform and a coil current waveform. However, non-sinusoidal behavior by VBemf may negatively impact an accuracy of determining stepper motor operating conditions in some instances.
Aspects of this description relate to a stepper driver that includes integrated stall detection functionality for stepper motors. Providing integrated stall detection functionality within a stepper driver avoids increased system costs, complexity, and/or size associated with adding external components. In at least one example, the stepper driver includes a stall detection circuit that determines an operating condition of the stepper motor by monitoring power transferred to the stepper motor through a duty cycle of pulse width modulation (PWM) operation. The duty cycle of PWM operation may be unimpacted by non-sinusoidal behavior. Monitoring power transferred to the stepper motor through a duty cycle of PWM operation may mitigate negative impacts on accuracy associated with non-sinusoidal behavior.
FIG. 1 is a block diagram of an example stepper motor system 100. At least some implementations of the system 100 are representative of an application environment for a stepper driver with PWM duty cycle monitoring for stall detection during open-loop operation of stepper motors. Example application environments may include, but are not limited to: industrial applications (e.g., valve motors, printers, scanners, textile machines, automated teller machines) and automotive applications (e.g., automotive head-light motors, and/or heads-up displays). The system 100 can include a controller 110 having a controller output 111 and a controller input 112. Controller 110 may be implemented by a microcontroller, a processor, a microcomputer, digital circuitry, analog circuitry, field programmable gate array, an application specific integrated circuit, memory and/or software. The system 100 can also include a stepper driver 120 having a driver input 121 adapted to be coupled to the controller output 111, a driver output 122 adapted to be coupled to the controller input 112, and a stall detection circuit 123. Stepper driver 102 may be implemented by analog circuitry (e.g., one or more amplifiers, transistors, power devices, etc.) and/or digital circuitry (e.g., logic circuitry). The controller input 111 and/or the controller output 112 may be connected to a single conductor or a multi-conductor bus to facilitate communications with stepper driver 120. The system 100 can also include a stepper motor 130 having a rotor 131, a first coil 132, and a second coil 134. A spatial separation may be provided by orthogonally arranging the first coil 132 and the second coil 134 about the rotor 131 so that a 90-degrees angle exists between the first coil 132 and the second coil 134. In alternative examples, more than two coils are used to operate/drive the stepper motor 130. In such alternative examples, the coils may be separated by different angles.
In an example operation of the system 100, a control signal provided by the controller output 111 may be received at the driver input 121. The control signal may include a STEP signal and a direction (DIR) signal. The STEP signal may include an integer number of pulses. Each pulse of the STEP signal may have a rising edge that causes the stepper driver 120 to advance a rotational (or mechanical) position of the rotor 131 by one step. The DIR signal may define a direction, such as clockwise or counter-clockwise, of rotational (or mechanical) movement to advance the rotational position of the rotor 131. The stepper driver 120 is configured to, responsive to the control signal provided at the driver input 121, control or regulate coil current flowing through the first coil 132 and the second coil 134 to induce rotational movement of the rotor 131. For purposes of this description, current control or regulation by the stepper driver 120 with respect to one coil of the stepper motor 130 is an example of current control or regulation by the stepper driver 120 with respect to each coil of the stepper motor 130.
Controlling the respective coil currents flowing through the first coil 132 and the second coil 134 may involve the stepper driver 120 controlling PWM operation of an H-bridge circuit (e.g., H-bridge circuit 400 of FIG. 4) adapted to be coupled to each coil of the stepper motor 130. In at least one example, the stepper driver 120 may further comprise a gate driver (not shown) configured to control the PWM operation of the H-bridge circuit responsive to the control signal provided at the driver input 121. Controlling PWM operation of the H-bridge circuit is described in greater detail below with respect to FIG. 4. The stall detection circuit 123 is configured to monitor power transferred to the stepper motor through a duty cycle of the PWM operation, as described in greater detail below. The stall detection circuit 123 is further configured to provide a stall signal indicative of an operating condition of the stepper motor 130 based on such monitoring. The stall signal may facilitate communicating faulty behavior (e.g., the operating condition of the stepper motor 130 is a stall condition) to the controller 110. In at least one example, the control signal provided at the driver input 121 of the stepper driver 120 varies responsive to the stall signal transitioning to a value indicative of the operating condition of the stepper motor 130 being the stall condition. By way of example, a value of the DIR signal may define a different direction to mitigate the stall condition. As another example, the controller 110 may refrain from providing additional pulses via the STEP signal to mitigate the stall condition. As another example, the control signal provided at the driver input 121 may define a different (e.g., reduced) level of coil current for the first coil 132 and/or the second coil 134 to save power or reduce thermal problems (e.g., overheating).
FIG. 2 is a diagram 200 of example sinusoidal coil currents, as a function of step position, in accordance with various examples. The diagram 200 includes waveforms 202 and 204. Waveform 202 is one cycle of a first coil current (Im_1) through the first coil 132 of the stepper motor 130 that corresponds to rotational movement of the rotor 131. Waveform 204 is one cycle of a second coil current (Im_2) through the second coil 134 of the stepper motor 130 that corresponds to 360-degrees of rotational movement of the rotor 131. In at least one example, a relationship exists between a pole-pair construction of the stepper motor 130 and the rotational movement of the rotor 131 corresponding to the one cycle of coil current represented by waveforms 202 and/or 204. In this example, one cycle of coil current represented by waveforms 202 and/or 204 may correspond to 360-degrees of rotational movement for a given pole-pair construction or a fraction of 360-degrees of rotational movement for another pole-pair construction. A phase separation of 90-degrees exists between Im_1 and Im_2. In at least one example, the stepper driver 120 may provide the phase separation of 90-degrees by controlling Im_1 through the first coil 132 and Im_2 through the second coil 134 to approximate a sine wave and a cosine wave, respectively. Along with the spatial separation provided by orthogonally arranging the first coil 132 and the second coil 134 about the rotor 131, the phase separation of 90-degrees may facilitate inducing rotational movement of the rotor 131 by creating a rotating magnetic field for the rotor 131 to follow.
Im_1 and Im_2 may each be formed as a series of discrete steps (e.g., step 205). Each step in the series of discrete steps corresponds to a different rotational position of the rotor 131. The stepper driver 120 controls Im_1 and Im_2 at each step with the phase separation of 90-degrees to induce rotational movement of the rotor 131 to a particular rotational position corresponding to that step. If one cycle of a coil current Im (e.g., Im_1 and/or Im_2) corresponds to 360-degrees of rotational movement, each quadrant of the coil current Im_1 may correspond to 90-degrees of rotational movement of the rotor 131. In at least one example, each quadrant of the coil current Im_1 may correspond to different degrees of rotational movement of the rotor 131 based on a pole-pair construction of the stepper motor 130. In the example of FIG. 2, each quadrant of Im_1 and Im_2 is partitioned into sixteen steps. By controlling the coil current Im_1 to transition between adjacent steps, the stepper driver 120 may induce approximately 5.625-degrees (90-degrees/16 steps) of incremental rotational movement of the rotor 131. Transitioning between adjacent steps of waveforms 202 and/or 204 in a stair-stepped upward direction (e.g., waveform 202 in a direction from the y-axis towards the transition between Quadrant 1 and Quadrant 2) may involve increasing the coil current Im. Transitioning between adjacent steps of waveforms 202 and/or 204 in a stair-stepped downward direction (e.g., waveform 202 in a direction from the transition between Quadrant 1 and Quadrant 2 towards the y-axis) may involve decreasing the coil current Im. In other examples, each quadrant of Im_1 and/or Im_2 may be partitioned into less steps (e.g., two steps) or more steps (e.g., 256 steps) for coarser or finer rotational position control of the rotor 131, respectively.
FIG. 3 is a diagram 300 of the coil current Im_1 (e.g., Im_1 and/or Im_2) at a given step (e.g., step 205 of FIG. 2) as a function of time, in accordance with various examples. As shown by the diagram 300, the stepper driver 120 may implement multiple cycles of PWM operation at each step of the coil current Im. Implementing multiple cycles of PWM operation at each step of the coil current Im may involve peak current regulation by the stepper driver 120. Peak current regulation may involve the stepper driver 120 setting a peak coil current (Ipeak) for the given step responsive to detecting an edge (e.g., a rising edge, a falling edge, and/or both) of a STEP signal provided by the controller 110. Responsive to determining that the coil current Im_1 is less than Ipeak, the stepper driver 120 activates a pair of transistors within an H-bridge circuit (e.g., the H-bridge circuit 400 of FIG. 4) to implement a drive (DRV) mode. Implementing the DRV mode increases the coil current Im. When the coil current Im_1 reaches Ipeak, the stepper driver 120 activates a different pair of transistors within the H-bridge circuit to implement a decay mode (e.g., a fast decay (FD) mode or a slow decay (SD) mode). Implementing the decay mode decreases the coil current Im. The stepper driver 120 induces the rotor 131 to remain at a rotational position corresponding to the given step until another rising edge of the STEP signal is detected by controlling the H-bridge circuit to alternate between the DRV and decay modes. In FIG. 3, the stepper driver 120 implements the DRV mode: prior to time 302; between time 304 and time 306; between time 308 and time 310; and between time 312 and time 314. In FIG. 3, the stepper driver 120 implements the decay mode: between time 302 and time 304; between time 306 and time 308; between time 310 and time 312; and subsequent to time 314.
FIG. 4 is a schematic diagram of an example implementation of an H-bridge circuit 400 that, in some examples, may be incorporated into stepper driver 120 (FIG. 1). In at least one example, the stepper driver 120 of FIG. 1 may further comprise a gate driver (not shown) configured to control the PWM operation of the H-bridge circuit 400 responsive to the control signal provided at the driver input 121. The H-bridge circuit 400 includes a first transistor 402, a second transistor 404, a third transistor 406, and a fourth transistor 408. In the example of FIG. 4, each transistor comprises an n-type field-effect transistor (NFET). In other examples, one or more transistors of the H-bridge circuit 400 may comprise another switching device, such as a p-type field-effect transistor (PFET), a metal-oxide-semiconductor field-effect transistor (MOSFET), or a bipolar junction transistor (BJT). The first transistor 402 and the second transistor 404 may be high side transistors. The third transistor 406 and the fourth transistor 408 may be low side transistors. The H-bridge circuit 400 also includes a first output node 410 and a second output node 412 that are adapted to be coupled to opposing sides of the first coil 132 of the stepper motor 130. The second coil 134 of the stepper motor 130 is adapted to be coupled to output nodes of a separate H-bridge circuit (not shown). In some examples where stepper motor 130 utilizes multiple coils, each coil may be connected to different H-bridge circuits.
In an example architecture of the H-bridge circuit 400, a drain of the first transistor 402 is adapted to be coupled to a drain of the second transistor 404 and is adapted to be coupled to a supply voltage Vm. A source of the first transistor 402 is coupled to the first output node 410 and to a drain of the third transistor 406. A source of the second transistor 404 is coupled to the second output node 412 and to a drain of the fourth transistor 408. A source of the third transistor 406 is coupled to a source of the fourth transistor 408 and is adapted to be coupled to a common potential (e.g., ground). A gate of each transistor of the H-bridge circuit 400 is adapted to be coupled to a gate driver (not shown) of the stepper driver 120 of FIG. 1. The gate driver(s) incorporated into stepper driver 120 selectively turn on/off transistors 402, 404, 406 and/or 408 based on the control signal received at terminal 121 so as to operate/drive stepper motor 130. The gate of each of transistors 402, 404, 406 and/or 408 may be connected to a separate gate driver or one gate driver may be connected to the gates of one or more of the transistors 402, 404, 406 and/or 408.
The stepper driver 120 is configured to independently activate each transistor of the H-bridge circuit 400 via the respective gates to implement one of three conduction modes for controlling Im_1 through the first coil 132 of the stepper motor 130. The three conduction modes may include the DRV mode, the FD mode, and the SD mode. In the following description, transistors that are not identified to be activated (e.g., turned on) are deactivated (e.g., turned off). To implement the DRV mode, the stepper driver 120 may activate the first transistor 402 and the fourth transistor 408 to drive the coil current Im_1 from the supply voltage Vm to ground through the first transistor 402, the first coil 132, and the fourth transistor 408, as represented by the solid arrow (marked as “DRV” in FIG. 4). During the DRV mode, the coil current Im_1 may increase in the first coil 132 at a rate of Vm/L, where L is an inductance of the first coil 132. In at least one example, the coil current Im_1 may increase in the first coil 132 at a rate of (Vm−Vbemf)/L during the DRV mode when Vbemf is present at the first coil 132. When a value of the coil current Im_1 meets or exceeds a value of a peak coil current Ipeak, the DRV mode may be turned off by the stepper driver 120 by deactivating (e.g., turning off) the first transistor 402 and the fourth transistor 408.
To implement the FD mode, the stepper driver 120 may activate the second transistor 404 and the third transistor 406. In the FD mode, responsive to the inductance of the first coil 132, the coil current Im_1 may flow from ground to the supply voltage Vm through the third transistor 406, the first coil 132, and the second transistor 404, as represented by the dashed arrow (marked as “FD” in FIG. 4). During the FD mode, the coil current Im_1 may decay at a rate of −Vm/L. In at least one example, the coil current Im_1 may decay at a rate of −(Vm−Vbemf)/L during the FD mode when Vbemf is present at the first coil 132. To implement the SD mode, the stepper driver 120 may activate the third transistor 406 and the fourth transistor 408. In the SD mode, responsive to the inductance of the first coil 132 (e.g., energy stored in the coil or energy created in the coil by the continued movement of the rotor of stepper motor 130), the coil current Im_1 may flow from ground to ground through the third transistor 406, the first coil 132, and the fourth transistor 408, as represented by the circular arrow (marked as “SD” in FIG. 4). During the SD mode, the coil current Im_1 may decay at a rate that is less than a rate at which the coil current in the first coil 132 decays during the FD mode. In alternative embodiments, transistors 404 and 406 may be activated (turned on), thereby causing current to flow from voltage source Vm to ground (through coil 132), to cause the motor to operate in the opposite direction (and to cause Im_1 to flow in the opposite direction through coil 132) as discussed with reference to the DRV operation above. In these alternative embodiments, the FD mode would be implemented by activating (turning on) transistors 402 and 408, and the SD mode would be implemented as is described above.
FIG. 5 is a diagram 500 of coil current Im (e.g., Im_1 and/or Im_2) as a function of time, in accordance with various examples. The diagram 500 includes waveform 502 and waveform 504. Waveform 502 illustrates a half-cycle of the coil current Im. In at least one example, waveform 502 represents waveform 202 (e.g., Im_1) of FIG. 2 at Quadrant-1 and Quadrant-2. In at least one example, waveform 502 represents waveform 204 (e.g., Im_2) of FIG. 2 at Quadrant-4 and Quadrant-1. Waveform 504 illustrates the coil current Im of adjacent steps (e.g., step n and step n+1) within the half-cycle of the coil current Im. In FIG. 5, a duration of step n within the coil current Im is represented by Tn and a duration of step n+1 is represented by Tn+1.
Waveform 504 shows scaling of Ipeak at each step of the coil current Im by the stepper driver 120 to induce incremental rotational movement of the rotor 131. The stepper driver 120 may scale Ipeak at each step of the coil current Im using different step coefficients. The stepper driver 120 may scale Ipeak at step n of the coil current Im using step coefficient Kn. In at least one example, step coefficient Kn is determined by sin((90°/M)*n), where M denotes a total number of steps in a quadrant of the half-cycle (or one quarter-cycle) of the coil current Im. Each quadrant of the half-cycle of the coil current Im of waveform 502 is divided into eight steps. As such, the step coefficient Kn for step n of waveform 502 may be determined by sin((90°/8)*n). The stepper driver 120 may set a new peak coil current for step n (Ipeak_n) using the step coefficient Kn to scale Ipeak for step n. In at least one example, a relationship between Ipeak_n and Ipeak is determined by: Ipeak_n=Ipeak*Kn.
Prior to Tn+1, the stepper driver 120 may detect a rising edge of the STEP signal provided by the controller 110. The DIR signal provided by the controller 110 when the stepper driver 120 detects the rising edge of the STEP signal may define a direction of rotational movement for the rotor 131. In the example of FIG. 5, the DIR signal defines the direction of rotational movement for the rotor 131 that advances the rotor 131 from a rotational position corresponding to step n to a rotational position corresponding to step n+1. Responsive to detecting the rising edge of the STEP signal, the stepper driver 120 may induce rotational movement of the rotor 131 to the rotational position corresponding to step n+1. Inducing rotational movement of the rotor 131 to the rotational position corresponding to step n+1 may involve the stepper driver 120 setting a new peak coil current for step n+1 (Ipeak_n+1). The stepper driver may set Ipeak_n+1 using the step coefficient Kn+1 to scale Ipeak for step n+1.
In another example, the DIR signal may specify an opposite direction of rotational movement for the rotor 131. That opposite direction of rotational movement may advance the rotor 131 from a rotational position corresponding to step n to a rotational position corresponding to step n−1. In this example, the stepper driver 120 may induce rotational movement of the rotor 131 to the rotational position corresponding to step n−1 by setting a new peak coil current for step n−1 (Ipeak_n−1). The stepper driver may set Ipeak_n−1 using the step coefficient Kn−1 to scale Ipeak for step n−1.
Waveform 504 also shows that, within a duration of each step, the stepper driver 120 may implement different combinations of conduction modes to control the coil current Im. Within time Tn of waveform 504, the stepper driver 120 implements the SD mode twice (e.g., one instance for a duration of TSD_1 and another instance for a duration of TSD_2) and the DRV mode twice (e.g., one instance for a duration of TDRV_1 and another instance for a duration of TDRV_2). The stepper driver 120 does not implement the FD mode within Tn of waveform 504. Within time Tn+1 of waveform 504, the stepper driver 120 implements the FD mode once (e.g., for a duration of TFD_1), the SD mode twice (e.g., one instance for a duration of TSD_3 and another instance for a duration of TSD_4) and the DRV mode twice (e.g., one instance for a duration of TDRV_3 and another instance for a duration of TDRV_4).
In addition to implementing different combinations of conduction modes within a duration of each step to control the coil current Im, the stepper driver 120 may implement a given conduction mode for different durations. Within Tn of waveform 504, the stepper driver 120 implements the SD mode one instance for the duration of TSD_1 and another instance for the duration of TSD_2 that is greater than the duration of TSD_1.
A cycle of PWM operation at an H-bridge circuit (e.g., H-bridge circuit 400 of FIG. 4) may comprise a combination of conduction modes implemented by the stepper driver 120 that includes one implementation of the DRV mode. In at least one example, the stepper driver 120 can implement the combination of conduction modes for the H-bridge circuit without regards to (e.g., independently from) a combination of conduction modes that the stepper driver 120 implements for another H-bridge circuit (e.g., an H-bridge circuit coupled to the second coil 134 of FIG. 1). A given step of the coil current Im may include multiple cycles of PWM operation at the H-bridge circuit. By way of example, step n of the coil current Im represented by waveform 504 includes two cycles of PWM operation at the H-bridge circuit. One cycle of PWM operation includes the implementation of the SD mode for the duration of TSD_1 and the implementation of the DRV mode for the duration of TDRV_1. Another cycle of PWM operation includes the implementation of the SD mode for the duration of TSD_2 and the implementation of the DRV mode for the duration of TDRV_2.
In at least one example, a duty value for one cycle of PWM operation within a given step of the coil current Im may be determined according to:

(TDRV−TFD)/(TDRV+TFD+TSD)  (1)

In accordance with this example, a duty cycle of the first cycle of PWM operation within step n of the coil current Im represented by waveform 504 may be determined according to:

(TDRV_1−0)/(TDRV_1+0+TSD_1)  (2)

A value of zero may be used for TFD in determining the duty cycle of that first cycle of PWM operation inasmuch as that first cycle of PWM operation does not include an implementation of the FD mode. In at least one example, an effective duty cycle value for a given step of the coil current Im may be determined according to:

(ΣTDRV−ΣTFD)/Tstep  (3)

where ΣTDRV denotes a cumulative drive time within the given step, ΣTFD denotes a cumulative fast decay time within the given step, and Tstep denotes a duration of the given step. In accordance with this example, an effective duty cycle value for step n+1 of the coil current Im represented by waveform 504 may be determined according to:

[(TDRV_3+TDRV_4)−TFD_1]/Tn+1  (4)

FIG. 6 is a block diagram illustrating power transfer within the system 100, in accordance with various examples. In operation, the system 100 converts input power Pin provided to the system 100 as electrical energy into mechanical energy that the system 100 delivers to a mechanical load coupled to the stepper motor 130 as output power Pout. An electrical energy source (e.g., a voltage rail connected to an alternating current power supply, a voltage regulator, a direct current power supply and/or a battery) may provide the input power Pin to the system 100 as a product of an input current Iin and the supply voltage Vm. The output power Pout that the system 100 delivers is a product of load torque τL and an angular velocity ω of the rotor 131 of the stepper motor 130.
The system 100 may provide a non-zero portion of the input power Pin to the controller 110. That non-zero portion of the input power Pin may, at least, include a quiescent power PQ provided to the controller 110 as a product of a quiescent current IQ and the supply voltage Vm. The portion of the input power Pin supplied to the controller 110 may slightly increase as the controller 110 draws additional current to provide logic input (e.g., the control signal) to the stepper driver 120. The remaining portion of the input power Pin is provided by the system 100 to the stepper driver 120 as motor power Pmtr. In at least one example, the motor power Pmtr may be determined according to:

Vm*[(Ipeak_1*+D1)+(Ipeak_2*D2)]  (5)

where Ipeak_1 denotes a peak coil current for the first coil 132, D1 denotes an effective duty cycle value for one-half cycle of Im_1, Ipeak_2 denotes a peak coil current for the second coil 134, and D2 denotes an effective duty cycle value for one-half cycle of Im_2. The motor power Pmtr provided to the stepper driver 120 may be partitioned among the output power Pout, IC losses (e.g., drain-source on resistance (RDSon) losses, switching losses, and/or other resistive losses) at the stepper driver 120, and/or motor losses (e.g., direct current resistance (DCR) losses, damping losses, and/or other resistive or inertial losses) at the stepper motor 130.

FIG. 6 shows that power transfer exists between the stepper driver 120 and the stepper motor 130. Such power transfer between the stepper driver 120 and the stepper motor 130 relates to the stepper driver 120 controlling the coil current Im (e.g., Im_1 and/or Im_2) of the stepper motor 130 to induce rotational movement of the rotor 131. Different conduction modes implemented by the stepper driver 120 to control the coil current Im of the stepper motor 130 have different impacts on power transfer between the stepper driver 120 and the stepper motor 130. Implementing the DRV mode to control the given coil current transfers power (represented by Pdrive) from the stepper driver 120 towards the stepper motor 130. One aspect of Pdrive may involve the given coil current flowing from the supply voltage Vm to ground responsive to the stepper driver 120 implementing the DRV mode. Implementing the FD mode to control the given coil current transfers power (represented by Pbrake) from the stepper motor 130 towards the stepper driver 120. One aspect of Pbrake may involve the given coil current flowing from ground to the supply voltage Vm responsive to the stepper driver 120 implementing the FD mode. Implementing the SD mode to control the given coil current recirculates within an H-bridge circuit (e.g., H-bridge circuit 400 of FIG. 4) of the stepper driver 120. Recirculation of the given coil current within the H-bridge circuit reduces or substantially eliminates power transfer between the stepper driver 120 and the stepper motor 130. Accordingly, monitoring PWM operations corresponding to the different conduction modes that the stepper driver 120 implements at the H-bridge circuit may be useful in determining power transfer within the system 100.
FIG. 7 is a block diagram of an example circuit 700 that is useful to implement aspects of the stall detection circuit 123. In at least some examples, the stall detection circuit 123 can include a duty sensor 702, memory 704, a weighting filter 706, a subtractor 708, and a comparator 710. Stall detection circuit 123 may be implemented using digital circuitry, analog circuitry, memory, a processor, software and/or a combination of any of the above. An input of the duty sensor 702 is adapted to be coupled to an output node (e.g., output nodes 410 and/or 412 of FIG. 4) of an H-bridge circuit of the stepper driver 120. The H-bridge circuit is adapted to be coupled to a coil (e.g., the first coil 132 and/or the second coil 134) of the stepper motor 130. An output of the comparator 710 is adapted to be coupled to the driver output 122 of the stepper driver 120.
The duty sensor 702 is configured to, responsive to a coil current Im (e.g., Im_1 and/or Im_2 provided at the output node of the H-bridge circuit, provide raw duty data (e.g., D1, D2 . . . , Dn; where Dn denotes an effective duty cycle value at step-n of the coil current Im). In at least one example, an effective duty cycle value (e.g., Dn) at a given step (e.g., step-n) of the coil current Im may be determined by equation (3). In at least one example, the raw duty data provided by the duty sensor 702 includes cycle-to-cycle duty information for the coil current Im provided at the output node of the H-bridge circuit. When an operating condition of the stepper motor 130 is in a stall condition (e.g., when the coil current Im is non-zero and the angular velocity ω of the rotor 131 is zero or approximately zero), the raw duty data that the duty sensor 702 provides is raw stall duty data (e.g., D1s, D2s . . . , Dns; where Dns denotes an effective duty cycle value at step-n of the coil current Im when the operating condition of the stepper motor 130 is the stall condition). The duty sensor 702 may be further configured to store the raw stall duty data in the memory 704. In at least one example, the memory 704 comprises volatile memory, non-volatile memory, or a combination thereof. When an operating condition of the stepper motor 130 is a running condition (e.g., when the angular velocity ω of the rotor 131 is non-zero), the raw duty data that the duty sensor 702 provides is raw run duty data (e.g., D1r, D2r . . . , Dnr; where Dnr denotes an effective duty cycle value at step-n of the coil current Im when the operating condition of the stepper motor 130 is the running condition).
The weighting filter 706 facilitates averaging the raw duty data provided by the duty sensor 702 over a half-cycle of the coil current Im using step coefficients (e.g., K1, K2 . . . , where Kn denotes a step coefficient for step-n of the coil current Im). In at least one example, the control signal provided at the driver input 121 further includes the step coefficients (e.g., K1, K2 . . . , Kn).
The weighting filter 706 is configured to, responsive to the raw run duty data and a step coefficient Kn for step-n of the coil current Im, provide a run duty signal Drun. The weighting filter 706 is further configured to, responsive to the raw stall duty data and the step coefficient Kn for step-n of the coil current Im, provide a stall duty signal Dstall.
Mechanical energy-related aspects (e.g., the load torque τL and/or a frictional (or default) torque τd) of power transfer within the system 100 are proportional to the angular velocity ω of the rotor 131. The mechanical energy-related aspects of power transfer within the system 100 may be reduced or become negligible when the angular velocity ω of the rotor 131 is zero or approximately zero. Electrical energy-related aspects (e.g., resistive losses R, such as DCR losses at the stepper motor 130 and RDSon losses at the stepper driver 120) of power transfer within the system 100 may be unrelated to the angular velocity ω of the rotor 131. The motor power Pmtr provided to the stepper driver 120 when the operating condition of the stepper motor 130 is the stall condition (Pmtr_stall) may be attributed to the electrical energy-related aspects of power transfer within the system 100. In at least one example, Pmtr_stall may be determined according to:

Vm*Im*Dstall=Im2*R  (6)

With the supply voltage Vm and the coil current Im being measurable attributes of Pmtr stall, the stall duty signal Dstall may be useful to determine the electrical energy-related aspects (e.g., the resistive losses R) of power transfer within the system 100.

The mechanical energy-related and electrical energy-related aspects of power transfer within the system 100 may each be non-negligible when the angular velocity ω of the rotor 131 is non-zero. The motor power Pmtr provided to the stepper driver 120 when the operating condition of the stepper motor 130 is the running condition (Pmtr_run) may be attributed to both the mechanical energy-related aspects and the electrical energy-related aspects of power transfer within the system 100. In at least one example, Pmtr_run at a given angular velocity ω of the rotor 131 may be determined according to:

Vm*Im*Drun=(Im2*R)+(τL*ω)+(τd*ω)  (7)

In at least one example, Pmtr over a quadrant of the coil current Im without averaging the duty signal provided by the duty sensor 702 may be determined according to:

Vm*[I1*D1+I2*D2+In*Dn]  (8)

where In and Dn denote the coil current Im and effective duty cycle value at step-n, respectively. In this example, determining Pmtr over a quadrant of the coil current Im without averaging the duty signal provided by the duty sensor 702 may involve determining a value of the coil current Im at each step of sinusoidal current regulation by the stepper driver 120. In at least one example, Pmtr over a quadrant of the coil current Im with averaging of the duty signal provided by the duty sensor 702 may be determined according to:

Vm*Ipeak*[K1*D1+K2*D2+Kn*Dn]  (9)

In this example, with averaging of the duty signal and with each quadrant of the coil current Im being partitioned into four steps (e.g., 1⁄4 micro-step current regulation), Pmtr over a half-cycle of the coil current Im may be determined according to:

Vm*Ipeak*[0.383*D1+0.707*D2+0.924*D3+D4+0.924*D5+0.707*D6+0.383*D7]  (10)

When averaging the duty signal provided by the duty sensor 702, Pmtr over a quadrant of the coil current Im may be determined without determining a value of the coil current Im at each step of sinusoidal current regulation by the stepper driver 120. In at least one example, the weighting filter 706 may be omitted from the circuit 700.

The subtractor 708 is configured to, responsive to the run duty signal Drun and the stall duty signal Dstall, provide a differential duty signal Ddiff. As described above, the stall duty signal Dstall may be useful to determine the electrical energy-related aspects (e.g., the resistive losses R) of power transfer within the system 100. In contrast, Pmtr_run, may be attributed to both the mechanical energy-related aspects (e.g., the load torque τL and/or the frictional torque τd) and the electrical energy-related aspects of power transfer within the system 100. Deducting the stall duty signal Dstall from the run duty signal Drun (an element of Pmtr_run) to provide the differential duty signal Ddiff may facilitate distinguishing the electrical energy-related aspects of Pmtr_run from the mechanical energy-related aspects. Accordingly, the differential duty signal Ddiff may facilitate indirectly determining the mechanical energy-related aspects of power transfer within the system 100 independent of the electrical energy-related aspects.
By way of example, Pmtr_run at a given angular velocity ω of the rotor 131 may be determined by equation (7). The electrical energy-related aspects of Pmtr_run may relate to (Im2*R). The mechanical energy-related aspects of Pmtr_run may relate to (τL*ω)+(τd*ω). In at least one example, Pmtr_run at a given angular velocity ω of the rotor 131 without the electrical energy-related aspects of power transfer within the system 100 may be determined according to:

Vm*Im*(Drun−Dstall)=(τL+τd)*ω  (11)

where (Drun−Dstall) denotes Ddiff. With the supply voltage Vm, the coil current Im, and the angular velocity ω of the rotor 131 being measurable attributes of Pmtr_run, the differential duty signal Ddiff may be useful to determine the mechanical energy-related aspects of power transfer within the system 100 independent of the electrical energy-related aspects. Also, the differential duty signal Ddiff, the supply voltage Vm, the coil current Im, and the angular velocity ω of the rotor 131 are each independently varying attributes of Pmtr_run. Accordingly, the differential duty signal Ddiff may be scalable with respect to: the angular velocity ω of the rotor 131, the supply voltage Vm, the coil current Im, or a combination thereof. The comparator 710 is configured to, responsive to the differential duty signal Ddiff and a threshold value, provide a stall signal. In at least one example, the stall signal is indicative of an operating condition of the stepper motor 130 based on the run duty signal.

FIG. 8 is a diagram 800 of the differential duty signal Ddiff as a function of load torque τL in Newton-meter (Nm), in accordance with various examples. In at least one example, values of the differential duty signal Ddiff may be unitless. The diagram 800 represents example values of the differential duty signal Ddiff provided at an output of the subtractor 708 responsive to variations in the load torque τL at the stepper motor 130. A threshold value 802 (e.g., the threshold value provided at an input of the comparator 710 of FIG. 7) may be useful for monitoring such variations in the load torque τL at the stepper motor 130. The threshold value 802 may be: provided by a user; established during fabrication and/or testing of the devices; determined during operation of stepper motor 130; established during system integration; and/or specific stepper to the motor 130 (e.g., the brand and/or model). The differential duty signal Ddiff provided at the output of the subtractor 708 may have a value 804 indicating that an operating condition of the stepper motor 130 is a no-load condition when the load torque τL is zero or substantially zero Nm (e.g., at or near the threshold value 802). The threshold value 802 is below the value 804 of the differential duty signal Ddiff indicative of the no-load condition. The differential duty signal Ddiff provided at the output of the subtractor 708 may have a value 806 when the load torque τL at the stepper motor 130 is approximately 2.4 Nm. Values of the differential duty signal Ddiff provided at the output of the subtractor 708 between the value 804 and the value 806 may indicate that the operating condition of the stepper motor 130 is a partial-load condition.
Values of the differential duty signal Ddiff provided at the output of the subtractor 708 may increase as the load torque τL at the stepper motor 130 increases from zero (or substantially zero) to approximately 2.4 Nm. The stepper motor 130 may be rated to handle a certain range of load torque τL. The diagram 800 shows that the load torque τL of approximately 2.4 Nm is approaching an upper limit of that certain range of load torque τL. Values of the differential duty signal Ddiff provided at the output of the subtractor 708 may decrease as the load torque τL at the stepper motor 130 exceeds the upper limit. In at least one example, decreasing values of the differential duty signal Ddiff provided at the output of the subtractor 708 that are above the threshold value 802 may be indicative of an over-load condition at the stepper motor 130.
The differential duty signal Ddiff provided at the output of the subtractor 708 may have a value 808 indicating that the operating condition of the stepper motor 130 is a stall condition when the load torque τL is approximately 3.0 Nm. The value 808 of the differential duty signal Ddiff breaches the threshold value 802 indicative of the stall condition at the stepper motor 130. In at least one example, the threshold value 802 is defined using one or more of a no-load value (e.g., the value 804) and a stall value (e.g., the value 808) of the differential duty signal Ddiff. One aspect of defining the threshold value 802 may involve setting the threshold value 802 sufficiently low to facilitate distinguishing between the no-load condition and the stall condition at the stepper motor 130. Another aspect of defining the threshold value 802 may involve setting the threshold value 802 sufficiently high to facilitate distinguishing between a load torque τL of zero or substantially zero Nm at the stepper motor 130 and the stall condition at the stepper motor 130.
FIG. 9 is a diagram 900 of example signal waveforms that show interquadrant power transfer variations within the system 100 responsive to different operating conditions at the stepper motor 130. The diagram 900 includes plots 902, 904, 906, and 908. Plot 902 represents the coil current Im of the stepper motor 130 as a function of radians. The coil current Im of plot 902 may be determined according to: Im sin(ωt), where t denotes time. Plot 904 represents Pmtr_run as a function of radians when the operating condition of the stepper motor 130 is the no-load condition. Plot 906 represents Pmtr_run as a function of radians when the operating condition of the stepper motor 130 is a partial-load condition. Plot 908 represents Pmtr_run as a function of radians when the operating condition of the stepper motor 130 is a maximum-load condition. As describe above with respect to FIG. 8, the stepper motor 130 may be rated to handle a certain range of load torque τL. In at least one example, the maximum-load condition represents an operating condition in which a non-zero load torque τL at the stepper motor 130 approaches an upper limit of that certain range of load torque τL. In this example, the stepper motor 130 may be described as approaching a stall-load condition. Negative values (e.g., values below an x-axis) of Pmtr_run in plots 904, 906, and 908, are indicative of power being transferred from the stepper motor 130 to the stepper driver 120 within the system 100. Such negative values of Pmtr_run may occur responsive to the stepper driver 120 implementing the FD mode. Positive values (e.g., values above an x-axis) of Pmtr_run in plots 904, 906, and 908, are indicative of power being transferred from the stepper driver 120 to the stepper motor 130 within the system 100. Such positive values of Pmtr_run may occur responsive to the stepper driver 120 implementing the DRV mode.
The stepper driver 120 induces rotational movement of the rotor 131 by controlling the coil current Im to create a rotating magnetic field for the rotor 131 to follow. The rotational movement of the rotor 131 induces VBemf. VBemf may have a substantially sinusoidal waveform. VBemf opposes the rotational movement of the rotor 131 by reducing the coil current Im. A positive correlation may exist between the rotational movement of the rotor 131 and VBemf. Increasing the rotational movement of the rotor 131 may increase VBemf. Inversely, decreasing the rotational movement of the rotor 131 may decrease VBemf.
When the operating condition of the stepper motor 130 is the no-load condition, a 90-degrees phase difference may exist between the coil current Im and VBemf such that VBemf may be determined according to: VBemf sin(ωt−(π/2)). Pmtr_run comprises negative values for approximately a duration of Quadrant 1 in Plot 904 responsive to the no-load condition at the stepper motor 130. Pmtr_run comprises positive values for approximately a duration of Quadrant 2 in Plot 904 responsive to the no-load condition at the stepper motor 130. In at least one example, Pmtr_run under the no-load condition is zero (or substantially zero) over the one-half cycle of coil current Im represented by Quadrants 1 and 2 in Plot 904. When the operating condition of the stepper motor 130 is the partial-load condition, a 45-degrees phase difference may exist between the coil current Im and VBemf such that VBemf may be determined according to: VBemf sin(ωt−(π/4)). Pmtr_run comprises both positive values and negative values within a duration of Quadrant 1 in Plot 906 responsive to the partial-load condition at the stepper motor 130. In plot 906, Pmtr_run may comprise negative values between value 910 and value 912. In plot 906, Pmtr_run may comprise positive values between value 912 and value 914. Pmtr_run comprises positive values for approximately a duration of Quadrant 2 in Plot 906 responsive to the partial-load condition at the stepper motor 130. In at least one example, Pmtr_run under the partial-load condition is positive over the one-half cycle of coil current Im represented by Quadrants 1 and 2 in Plot 906, such that more power is being transferred to the stepper motor 130 than is being transferred from the stepper motor 130. When the operating condition of the stepper motor 130 is the maximum-load condition, a 0-degree phase difference may exist between the coil current Im and VBemf such that VBemf may be determined according to: VBemf sin(ωt). Pmtr_run comprises positive values for approximately a duration of Quadrant 1 and a duration of Quadrant 2 in Plot 908 responsive to the maximum-load condition at the stepper motor 130. In at least one example, Pmtr_run under the maximum-load condition zero Pmtr_run may approach or approximate an upper limit of a range of values that Pmtr_run may assume inasmuch as Pmtr_run comprises positive values for both Quadrants 1 and 2 of Plot 908.
The diagram 900 shows that variations may exist in how the system 100 transfers power within a given quadrant of the coil current Im under different operating conditions of the stepper motor 130. Phase differences between the coil current Im and VBemf may be indicative of such power transfer variations within the system 100. Non-sinusoidal behavior by VBemf may negatively impact an accuracy of determining an operating condition of the stepper motor 130 using phase differences between the coil current Im and VBemf. As described above, Pmtr_run at a given angular velocity ω of the rotor 131 without the electrical energy-related aspects of power transfer within the system 100 may be determined according to equation (11), where (Drun−Dstall) denotes Ddiff. In at least one example, Pmtr_run at a given angular velocity ω of the rotor 131 without the electrical energy-related aspects of power transfer within the system 100 may also be determined according to:

Vm*Im*(Drun−Dstall)=Vbemf*Im  (12)

The differential duty signal Ddiff may also be indicative of such power transfer variations within the system 100. The differential duty signal Ddiff may be unimpacted by non-sinusoidal behavior. Using the differential duty signal Ddiff to determine an operating condition of the stepper motor 130 may mitigate negative impacts on accuracy associated with non-sinusoidal behavior.

FIG. 10 is a block diagram of an example circuit 1000 that is useful to implement aspects of the stall detection circuit 123. Example circuit 1000 may be implemented using digital circuitry, analog circuitry, memory, a processor, software and/or a combination of any of the above. In at least some examples, the stall detection circuit 123 can include the duty sensor 702, the memory 704, the weighting filter 706, and the subtractor 708. In at least some examples, the stall detection circuit 123 can also include a divider 1002, a subtractor 1004, and a comparator 1006. The divider 1002 is configured to partition the differential duty signal Ddiff provided at an input of the divider 1002 into duty subset signals corresponding to different quadrants of a cycle of the coil current Im. The duty subset signals may include a first duty subset signal Ddiff_Q1 and a second duty subset signal Ddiff_Q2. The first duty subset signal Ddiff_Q1 may correspond to a first quadrant (e.g., Quadrant 1 of the diagram 900) of a half-cycle of the coil current Im. The second duty subset signal Ddiff_Q2 may correspond a second quadrant (e.g., Quadrant 2 of the diagram 900) of the half-cycle adjacent to the first quadrant. In at least one example, the first duty subset signal Ddiff_Q1 and the second duty subset signal Ddiff_Q2 are weighted averages of the differential duty signal Ddiff over the first and second quadrants of the half-cycle of the coil current Im, respectively. The subtractor 1004 is configured to deduct the second duty subset signal Ddiff_Q2 from the first duty subset signal Ddiff_Q1 to provide a quadrant differential duty signal DQ_diff. As described above, variations may exist in how the system 100 transfers power within a given quadrant of the coil current Im under different operating conditions of the stepper motor 130. The quadrant differential duty signal DQ_diff facilitates monitoring interquadrant power transfer variations within the system 100. The comparator 1006 is configured to, responsive to the quadrant differential duty signal DQ_diff and a threshold value, provide a stall signal. In at least one example, the stall signal is indicative of an operating condition of the stepper motor 130 based on the run duty signal.
In at least one example, the quadrant differential duty signal DQ_diff may include a range of values that extends between a lower value (e.g., zero, approximately zero or at/less than a threshold value) corresponding to an operating condition of the stepper motor 130 being a stall-condition and an upper value corresponding to the operating condition being a no-load condition. In this example, the lower value of the quadrant differential duty signal DQ_diff may involve a value of VBemf being zero under the stall-condition. In this example, the upper value of the quadrant differential duty signal DQ_diff may involve Pmtr_run comprising positive values for a duration of the second quadrant (e.g., Quadrant 2 of Plot 904) of the half-cycle of the coil current Im while having negative values for a duration of the first quadrant (e.g., Quadrant 1 of Plot 904) under the no-load condition. In at least one example, the range of values for the quadrant differential duty signal DQ_diff may include a first value between the lower value and the upper value that corresponds to the operating condition being a partial-load condition. In this example, the first value of the quadrant differential duty signal DQ_diff may involve Pmtr_run having positive values for a duration of the second quadrant (e.g., Quadrant 2 of Plot 906) of the half-cycle of the coil current Im while having both positive and negative values for a duration of the first quadrant (e.g., Quadrant 1 of Plot 906) under the partial-load condition. In at least one example, the range of values for the quadrant differential duty signal DQ_diff may also include a second value (e.g., almost zero) between the lower value and the first value that corresponds to the operating condition being a maximum-load condition. In this example, the second value of the quadrant differential duty signal DQ_diff may involve Pmtr_run comprising substantially similar positive values for both the first and second quadrants (e.g., Quadrants 1 and 2 of Plot 908) of the half-cycle of the coil current Im under the maximum-load condition.
FIG. 11 is a diagram 1100 of example signal waveforms that show monitoring interquadrant power transfer variations within the system 100 to determine an operating condition at the stepper motor 130. The diagram 1100 includes plots 1102, 1104, and 1106. Plot 1102 represents the coil current Im of the stepper motor 130 as a function of time. Plot 1104 represents the load torque τL at the stepper motor 130 (in Nm) as a function of time. Plot 1106 represents example values of the quadrant differential duty signal DQ_diff provided at an output of the subtractor 1004 as a function of time. In at least one example, values of the quadrant differential duty signal DQ_diff may be unitless. Prior to time 1110, the quadrant differential duty signal DQ_diff provided at the output of the subtractor 1004 may have a value 1108 indicating that an operating condition of the stepper motor 130 is a no-load condition when the load torque τL is zero or substantially zero Nm. At time 1110, the load torque τL increases from zero or substantially zero Nm towards a level 1112 (e.g., 5 Nm) indicative of a partial-load condition at the stepper motor 130. Responsive to the load torque τL increasing towards the level 1112, the quadrant differential duty signal DQ_diff provided at the output of the subtractor 1004 may decrease from the value 1108 indicative of the no-load condition towards a value 1114 indicative of the partial-load condition at the stepper motor 130.
At time 1116, the load torque τL decreases from the level 1112 indicative of the partial-load condition to zero or substantially zero Nm that is indicative of the no-load condition at the stepper motor 130. Responsive to the load torque τL decreasing to zero or substantially zero Nm, the quadrant differential duty signal DQ_diff provided at the output of the subtractor 1004 may increase to the value 1108 indicative of the no-load condition. At time 1118, the load torque τL increases from zero or substantially zero Nm towards a level 1120 (e.g., 15 Nm) indicative of a stall condition at the stepper motor 130. Responsive to the load torque τL increasing towards the level 1120, the quadrant differential duty signal DQ_diff provided at the output of the subtractor 1004 may decrease from the value 1108 indicative of the no-load condition towards a value 1122 indicative of the stall condition at the stepper motor 130. At time 1124, the load torque τL decreases from the level 1120 indicative of the stall condition to zero or substantially zero Nm that is indicative of the no-load condition at the stepper motor 130. Responsive to the load torque τL decreasing to zero or substantially zero Nm, the quadrant differential duty signal DQ_diff provided at the output of the subtractor 1004 may increase to the value 1108 indicative of the no-load condition.
The diagram 1100 shows that the quadrant differential duty signal DQ_diff provided at the output of the subtractor 1004 may transition within a range of values as the operating condition at the stepper motor 130 changes. The value 1108 of the quadrant differential duty signal DQ_diff indicative of the no-load condition may be an upper bound of that range of values. The value 1122 of the quadrant differential duty signal DQ_diff indicative of the stall condition may be a lower bound of that range of values. In at least one example, the threshold value provided at an input of the comparator 1006 of FIG. 10 may be defined using one or more of a no-load value (e.g., the value 1108) and a stall value (e.g., the value 1122) of the quadrant differential duty signal DQ_diff.
The term “couple” is used throughout the specification. The term may cover connections, communications, or signal paths that enable a functional relationship consistent with this description. For example, if device A generates a signal to control device B to perform an action, in a first example device A is coupled to device B, or in a second example device A is coupled to device B through intervening component C if intervening component C does not substantially alter the functional relationship between device A and device B such that device B is controlled by device A via the control signal generated by device A.
A device that is “configured to” perform a task or function may be configured (e.g., programmed and/or hardwired) at a time of manufacturing by a manufacturer to perform the function and/or may be configurable (or re-configurable) by a user after manufacturing to perform the function and/or other additional or alternative functions. The configuring may be through firmware and/or software programming of the device, through a construction and/or layout of hardware components and interconnections of the device, or a combination thereof.
A circuit or device that is described herein as including certain components may instead be adapted to be coupled to those components to form the described circuitry or device. For example, a structure described as including one or more semiconductor elements (such as transistors), one or more passive elements (such as resistors, capacitors, and/or inductors), and/or one or more sources (such as voltage and/or current sources) may instead include only the semiconductor elements within a single physical device (e.g., a semiconductor die and/or integrated circuit (IC) package) and may be adapted to be coupled to at least some of the passive elements and/or the sources to form the described structure either at a time of manufacture or after a time of manufacture, for example, by an end-user and/or a third-party.
While certain components may be described herein as being of a particular process technology, these components may be exchanged for components of other process technologies. Circuits described herein are reconfigurable to include the replaced components to provide functionality at least partially similar to functionality available prior to the component replacement. Components shown as resistors, unless otherwise stated, are generally representative of any one or more elements coupled in series and/or parallel to provide an amount of impedance represented by the shown resistor. For example, a resistor or capacitor shown and described herein as a single component may instead be multiple resistors or capacitors, respectively, coupled in parallel between the same nodes. For example, a resistor or capacitor shown and described herein as a single component may instead be multiple resistors or capacitors, respectively, coupled in series between the same two nodes as the single resistor or capacitor.
As used herein, the terms “terminal”, “node”, “interconnection”, “pin” and “lead” are used interchangeably. Unless specifically stated to the contrary, these terms are generally used to mean an interconnection between or a terminus of a device element, a circuit element, an integrated circuit, a device or other electronics or semiconductor component. While the use of particular transistors are described herein, other transistors (or equivalent devices) may be used instead with little or no change to the remaining circuitry. For example, a metal-oxide-silicon FET (“MOSFET”) (such as an n-channel MOSFET, nMOSFET, or a p-channel MOSFET, pMOSFET), a bipolar junction transistor (BJT—e.g. NPN or PNP), insulated gate bipolar transistors (IGBTs), and/or junction field effect transistor (JFET) may be used in place of or in conjunction with the devices disclosed herein. The transistors may be depletion mode devices, drain-extended devices, enhancement mode devices, natural transistors or other type of device structure transistors. Furthermore, the devices may be implemented in/over a silicon substrate (Si), a silicon carbide substrate (SiC), a gallium nitride substrate (GaN) or a gallium arsenide substrate (GaAs). While certain elements of some example embodiments may be included in an integrated circuit and other elements are external to the integrated circuit, in other example embodiments, additional or fewer features may be incorporated into the integrated circuit. In addition, some or all of the features illustrated as being external to the integrated circuit may be included in the integrated circuit and/or some features illustrated as being internal to the integrated circuit may be incorporated outside of the integrated. As used herein, the term “integrated circuit” means one or more circuits that are: (i) incorporated in/over a semiconductor substrate; (ii) incorporated in a single semiconductor package; (iii) incorporated into the same module; and/or (iv) incorporated in/on the same printed circuit board.
Uses of the phrase “ground voltage potential” in the foregoing description include a chassis ground, an Earth ground, a floating ground, a virtual ground, a digital ground, a common ground, and/or any other form of ground connection applicable to, or suitable for, the teachings of this description. Unless otherwise stated, “about,” “approximately,” or “substantially” preceding a value means+/−10 percent of the stated value. Modifications are possible in the described examples, and other examples are possible within the scope of the claims.

## Claims

1. A circuit adapted to be coupled to a coil of a motor via an H-bridge circuit, the circuit comprising:
a duty sensor coupled to the coil of the motor and configured to provide raw run duty data responsive to a coil current through the coil;
a subtractor coupled to the duty sensor and configured to provide a differential duty signal responsive to a stall duty signal and a run duty signal obtained using the raw run duty data; and
a comparator coupled to the subtractor and configured to provide a stall signal indicative of a stall condition for the motor responsive to the differential duty signal and a threshold value.

2. The circuit of claim 1, wherein the duty sensor is further configured to provide raw stall duty data responsive to the coil current through the coil during the stall condition, the stall duty signal obtained using the raw stall duty data.

3. The circuit of claim 1, further comprising:
a weighting filter coupled to the duty sensor and configured to provide a run duty signal responsive to the raw run duty data and a step coefficient Kn for step-n of the coil current.

4. The circuit of claim 3, wherein Kn=sin((90°/M)*n), and M denotes a total number of steps in a quarter-cycle of the coil current.

5. The circuit of claim 1, wherein a value of the differential duty signal increases as a load torque of the motor increases.

6. The circuit of claim 1, wherein the stall signal indicates detection of the stall condition when a value of the differential duty signal breaches the threshold value.

7. The circuit of claim 1, wherein the threshold value is below a value of the differential duty signal when the motor is in a no-load condition.

8. The circuit of claim 1, wherein the run duty signal is scalable with respect to: an angular velocity of the motor, a motor supply voltage, a peak coil current, a number of steps in a cycle of coil current, or a combination thereof.

9. A circuit adapted to be coupled to a coil of a motor via an H-bridge circuit, the circuit comprising:
a duty sensor coupled to the coil and configured to provide raw run duty data responsive to a coil current through the coil;
a first subtractor coupled to the duty sensor and configured to provide a differential duty signal responsive to a stall duty signal and a run duty signal based on the raw run duty data, the differential duty signal having a first duty subset signal and a second duty subset signal, wherein the first duty subset signal corresponds to a first quadrant of a half-cycle of the coil current and the second duty subset signal corresponds to a second quadrant of the half-cycle adjacent to the first quadrant;
a second subtractor coupled to the first subtractor and configured to deduct the second duty subset signal from the first duty subset signal to provide a quadrant differential duty signal; and
a comparator coupled to the second subtractor and configured to provide a stall signal responsive to the quadrant differential duty signal and a threshold value.

10. The circuit of claim 9, further comprising:
a divider coupled to the first subtractor and configured to partition the differential duty signal into duty subset signals corresponding to different quadrants of a cycle of the coil current.

11. The circuit of claim 9, wherein the first and second duty subset signals are weighted averages of the differential duty signal over the first and second quadrants of the half-cycle of the coil current, respectively.

12. The circuit of claim 9, wherein a value of the quadrant differential duty signal indicative of a no-load condition is an upper bound of a range of values for the quadrant differential duty signal.

13. The circuit of claim 9, wherein a value of the quadrant differential duty signal indicative of a stall condition is a lower bound of a range of values for the quadrant differential duty signal.

14. The circuit of claim 9, wherein the threshold value is defined using one or more of a no-load value and a stall value of the quadrant differential duty signal.

15. The circuit of claim 9, wherein an effective duty cycle value Dnr of the raw run duty data at step-n of the coil current is determined using a difference over a duration of step-n between a cumulative drive time and a cumulative fast decay time.

16. A stepper motor driver adapted to be coupled to a coil of a stepper motor, the stepper motor driver comprising:
an H-bridge circuit connected to the coil and operable to provide a coil current to the coil;
a gate driver coupled to the H-bridge circuit and operable to control the H-bridge circuit by providing a pulse modulated signal to the H-bridge circuit; and
a stall detection circuit coupled to the coil and configured to monitor power transferred to the stepper motor through a duty cycle of the pulse modulation signal, the stall detection circuit including:
a duty sensor coupled to the coil and configured to provide raw duty data responsive to the coil current; and
a comparator coupled to the duty sensor and configured to provide a stall signal indicative of an operating condition of the stepper motor based on the raw duty data.

17. The stepper motor driver of claim 16, wherein a control signal provided at an input of the stepper motor driver varies responsive to the stall signal transitioning to a value indicative of the operating condition of the stepper motor being a stall condition.

18. The stepper motor driver of claim 16, wherein the stall detection circuit further includes:
a subtractor coupled to the duty sensor and configured to provide a differential duty signal using the raw duty data, wherein the comparator is configured to provide the stall signal responsive to the differential duty signal and a threshold value.

19. The stepper motor driver of claim 16, wherein the raw duty data is raw run duty data, and wherein the stall detection circuit further includes:
a first subtractor coupled to the duty sensor and configured to deduct a stall duty signal from a run duty signal obtained using the raw run duty data to provide a differential duty signal having a first duty subset signal and a second duty subset signal, wherein the first duty subset signal corresponds to a first quadrant of a half-cycle of the coil current and the second duty subset signal corresponds to a second quadrant of the half-cycle that follows the first quadrant; and
a second subtractor coupled to comparator and configured to deduct the second duty subset signal from the first duty subset signal to provide a quadrant differential duty signal, wherein the comparator is configured to provide the stall signal responsive to the quadrant differential duty signal and a threshold value.

20. The stepper motor driver of claim 19, wherein a first value of the quadrant differential duty signal indicative of a no-load condition is an upper bound of a range of values for the quadrant differential duty signal, and a second value of the quadrant differential duty signal indicative of a stall condition is a lower bound of the range of values.