# US 10,248,135 B2 · Method for adaptively driving a stepper motor, and corresponding device

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 10,248,135 B2
- Document ID: US10248135B2
- Status: Granted
- Kind: B2
- Application number: 15/608,596
- Filed: 2017-05-30
- Published: 2018-05-10
- Granted: 2019-04-02
- Earliest claimed: 2016-11-04
- Assignees: STMicroelectronics (Grand Ouest) SAS
- Applicants: STMicroelectronics (Grand Ouest) SAS
- Inventors: Emmanuel Langouet; Samuel Rousselin
- Web page: https://patentgrep.com/patent/US10248135B2

## CPC

- G05D 3/183: {using stepping motor}
- G04C 3/022: {with constant impulses}
- G05B 19/40: Open loop systems, e.g. using stepping motor
- G06K 13/20: Details
- H02K 37/22: Damping units
- H02P 8/22: Control of step size; Intermediate stepping, e.g. microstepping
- H02P 8/32: Reducing overshoot or oscillation, e.g. damping
- G05D: SYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
- G04C: ELECTROMECHANICAL CLOCKS OR WATCHES
- G05B: CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS (systems for controlling or regulating non-electric variables G05D; systems for regulating electric or magnetic variables G05F; control devices or systems insofar as characterised by mechanical features only G05G)
- G06K: GRAPHICAL DATA READING (image or video recognition or understanding G06V); PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- H02K: DYNAMO-ELECTRIC MACHINES (dynamo-electric relays H01H53/00; conversion of DC or AC input power into surge output power {H03K3/53})
- H02P: CONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS

## Abstract

A stepper motor is driven according to step driving modes including a full-step driving mode, a half-step driving mode and micro-stepping modes. The stepper motor may also be driven in an acceleration phase. A method of controlling the stepper motor includes controlling the current step driving mode of the motor by a processing unit. During the acceleration phase of the stepper motor and the stepper motor being in driven in a current step driving mode other than the full-step driving mode, the processing unit tests, after each speed increase, if a remaining computing power of the processing unit is sufficient for control of the stepper motor to remain in the current step driving mode, and if not the processing unit, in presence of a first switching condition, switches control of the stepper motor to the driving mode having the closest coarser step.

## Claims

### Claim 1

A method for driving a stepper motor, comprising:
controlling the stepper motor in a current step driving mode of the stepper motor and in an acceleration phase of the stepper motor, the current step driving mode including a full-step driving mode, a half-step driving mode, and micro-stepping driving modes;
determining, if the current step driving mode is not the full-step driving mode and the stepper motor is being controlled in the acceleration phase, after each speed increase of the stepper motor whether a remaining computing power associated with controlling the stepper motor in the current step driving mode is sufficient for the stepper motor to remain being controlled in the current step driving mode; and
switching to one of the full-step, half-step, and micro-stepping driving modes having a closest coarser step in presence of a first switching condition in response to determining the remaining computing power is not sufficient for the stepper motor to remain being controlled in the current step driving mode, wherein switching to the one of the step full-step, half-step, and micro-stepping driving modes having a closest coarser step in presence of the first switching condition further includes said first switching condition including a correspondence of a current position of the motor in said current step driving mode with a position of the motor defined in said one of the full-step, half-step, and micro-stepping driving modes having the closest coarser step.

### Claim 2 (depends on 1)

The method according to claim 1, wherein controlling said stepper motor comprises controlling motor phases of the stepper motor, and wherein switching to one of the full-step, half-step, and micro-stepping driving modes having a closest coarser step in presence of the first switching condition comprises said first switching condition further including a minimum current gap on the motor phases.

### Claim 3 (depends on 1)

The method according to claim 1, wherein determining whether the remaining computing power associated with controlling the stepper motor in the current step driving mode is sufficient comprises:
evaluating a computing time needed to determine control parameters to be applied to the stepper motor in order for the stepper motor to reach a next position in said current step driving mode; and
determining a switching time required by the stepper motor to switch to said next position taking into account a current speed of the stepper motor; and
determining the remaining computing power is sufficient for remaining in said current step driving mode if said switching time is greater than or equal to said computing time plus a first margin.

### Claim 4 (depends on 3)

The method according to claim 3, wherein determining the remaining computing power is sufficient further comprises the first margin being greater than a first parameter equal to a length of a micro-step in said current step driving mode divided by the product of an acceleration and said switching time.

### Claim 5 (depends on 4)

The method according to claim 4, further comprising, in absence of said first switching condition, controlling the stepper motor in said current step driving mode for at least one new step in said current step driving mode, and wherein determining the remaining computing power comprises determining a value of said first margin that allows for performing said at least one new step in said current step driving mode.

### Claim 6 (depends on 1)

The method according to claim 1, further comprising controlling the stepper motor in a deceleration phase, wherein the controlling the stepper motor in the deceleration phase comprises, if the stepper motor is being controlled in the current step driving mode other than a finest one of the micro-stepping modes, evaluating, after each speed decrease of the stepper motor, if a second switching condition is fulfilled to permit switching control of the stepper motor into the one of the full-step, half-step, and micro-stepping driving modes having a closest finer step.

### Claim 7 (depends on 6)

The method according to claim 6, wherein evaluating, after each speed decrease of the stepper motor, if the second switching condition is fulfilled comprises said second switching condition including verifying if the remaining computer power is sufficient for allowing switching control of said stepper motor to said one of the full-step, half-step and micro-stepping driving modes having the closest finer step.

### Claim 8 (depends on 7)

The method according to claim 7, wherein verifying if the remaining computing power is sufficient comprises:
evaluating a computing time needed to determine control parameters to be applied to the stepper motor in order for the stepper motor to reach a next position in said current step driving mode;
determining a switching time required by the stepper motor to switch to said next position taking into account the current speed of the stepper motor; and
determining that said remaining computing power is sufficient for allowing switching the stepper motor to said one of the full-step, half-step and micro-stepping driving modes having the closest finer step if said switching time is greater than or equal to said computing time plus a second margin.

### Claim 9 (depends on 8)

The method according to claim 8, wherein determining that said remaining computing power is sufficient further comprises the second margin being greater than a second parameter equal to the difference between the current switching time in said current step driving mode and a next switching time in said driving mode having the closest finer step.

### Claim 10 (depends on 9)

The method according to claim 9, wherein if determining that said remaining computing power is sufficient determines said remaining computer power is not sufficient for allowing switching to said driving mode having the closest finer step, then determining if a difference between a final position and a current position of the motor is smaller than one full step of the current driving mode, and if said final position is not accessible with the current step driving mode, decreasing the speed of the stepper motor for obtaining a sufficient remaining computer power for allowing switching to said one of the full-step, half-step and micro-stepping driving modes having the closest finer step.

### Claim 11 (depends on 10)

The method according to claim 10, wherein controlling said stepper motor comprises controlling motor phases of the stepper motor, and wherein evaluating, after each speed decrease of the stepper motor, if the second switching condition is fulfilled comprises said second switching condition further including a minimum current gap on the motor phases.

### Claim 12 (depends on 11)

The method according to claim 11, further comprising, if said second switching condition is not fulfilled, controlling the stepper motor for a new step in said current step driving mode.

### Claim 13 (depends on 1)

The method according to claim 1, further comprising progressively changing, responsive to the stepper motor running at a constant speed, the current step driving mode until reaching the full step driving mode independent of the remaining computing power.

### Claim 14 (depends on 1)

The method according to claim 1, further comprising progressively changing, in response to the stepper motor running at constant speed, the current step driving mode until reaching a finest one of the micro-stepping modes.

### Claim 15

A device for driving a stepper motor configured to be driven in step driving modes including a full-step driving mode, a half-step driving mode and micro-stepping modes, and the stepper motor configured to be driven in an acceleration phase, the device comprising a processing unit configured to control a current step driving mode of the motor and, in response to the stepper motor being driven in the acceleration phase and the current step driving mode being other than the full-step driving mode, the processing unit configured to determine, after each speed increase of the motor in the acceleration phase, if a remaining computing power of the processing unit is sufficient for continuing to control the stepper motor in said current step driving mode and, if the remaining computing power is not sufficient, to switch control of the stepper motor to a closest coarser step driving mode in presence of a first switching condition including a correspondence of a current position of the stepper motor in said current step driving mode with a position defined in said step driving mode having the closest coarser step.

### Claim 16 (depends on 15)

The device according to claim 15, wherein said stepper motor includes motor phases, and wherein said first switching condition further comprises a minimum current gap on the motor phases.

### Claim 17

A device for driving a stepper motor configured to be driven in step driving modes including a full-step driving mode, a half-step driving mode and micro-stepping modes, and the stepper motor configured to be driven in an acceleration phase, the device comprising a processing unit configured to control a current step driving mode of the motor (SM) and, in response to the stepper motor being driven in the acceleration phase and the current ep driving mode being other than the full-step driving mode, the processing unit configured to determine, after each speed increase of the motor in the acceleration phase, if a remaining computing power of the processing unit is sufficient for continuing to control the stepper motor in said current step driving mode and, if the remaining computing power is not sufficient, to switch control of the stepper motor to a closest coarser step driving mode in presence of a first switching condition, wherein the processing unit is further configured to evaluate a computing time needed to determine control parameters to be applied to the stepper motor in order for the stepper motor to reach a next position in said current step driving mode, and is configured to determine a switching time required by the stepper motor to switch to said next position based on a current speed of the stepper motor, and wherein said processing unit is configured to determine said remaining computing power is sufficient to remain in said current step driving mode if said switching time is greater than or equal to said computing time plus a first margin.

### Claim 18 (depends on 17)

The device according to claim 17, wherein the first margin is greater than a first parameter equal to a length of a micro-step in said current step driving mode divided by the product of an acceleration and said switching time.

### Claim 19 (depends on 18)

The device according to claim 18, wherein the processing unit is configured, in response to said first switching condition not being satisfied, to control the stepper motor to perform at least one new step in said current step driving mode, wherein said first margin has a value to allow the performance of at least one new step in said current step driving mode.

### Claim 20 (depends on 19)

The device according to claim 19, wherein the stepper motor is further configured to be driven in a deceleration phase , and wherein the processing unit is further configured, in response to the stepper motor being driven in a current step driving mode other than a finest one of the micro-stepping modes, to determine, after each speed decrease of the stepper motor in the deceleration phase, if a second switching condition is fulfilled to allow switching of the stepper motor to the driving mode having a closest finer step.

### Claim 21 (depends on 20)

The device according to claim 20, wherein the processing unit is further configured, in determining whether said second switching condition is fulfilled, to verify if the remaining computer power of the processing unit is sufficient for allowing switching of the stepper motor to said driving mode having the closest finer step.

### Claim 22 (depends on 21)

The device according to claim 21, wherein, during said the processing unit is further configured, in verifying if the remaining computing power is sufficient, to evaluate a computing time needed to determine control parameters to be applied to the stepper motor in order for the stepper motor to reach a next position in said current step driving mode, to determine a switching time required by the stepper motor to switch to said next position taking into account a current speed of the stepper motor, and to determine that said remaining computing power is sufficient to allow switching to said driving mode having the closest finer step if said switching time is greater than or equal to said computing time plus a second margin.

### Claim 23 (depends on 22)

The device according to claim 22, wherein the second margin comprises a second temporal margin that is greater than a second parameter equal to the difference between the current switching time in said current step driving mode and a next switching time in said driving mode having the closest finer step.

### Claim 24 (depends on 23)

The device according to claim 23, wherein if said remaining computer power is not sufficient for allowing switching to said driving mode having the closest finer step, if the difference between the final position and the current position of the stepper motor is smaller than one full step of the current driving mode, and if said final position is not accessible with the current step driving mode, the processing unit is configured to decrease the speed of the stepper motor to obtain a sufficient remaining computer power to allow switching to said driving mode having the closest finer step.

### Claim 25 (depends on 24)

The device according to claim 24, wherein said stepper motor includes motor phases, and wherein said second switching condition further comprises a minimum current gap on the motor phases.

### Claim 26 (depends on 25)

The device according to claim 25, wherein if said second switching condition is not fulfilled, the processing unit is configured to control the stepper motor to perform a new step in said current step driving mode.

### Claim 27 (depends on 15)

The device according to claim 15, wherein the processing unit is further configured to change progressively the current step driving mode until reaching the full step driving mode regardless of the remaining computing power of the processing unit responsive to the stepper motor running at a constant speed.

### Claim 28 (depends on 15)

The device according to claim 15, wherein the processing unit is further configured to change progressively the current step driving mode until reaching the driving mode having the finest possible step.
