System and method for controlling a stepper motor

The method and system for controlling stepper motors in AFS systems address the issue of dangerous headlight positions during power failures by implementing a failure mode that safely repositions headlights, ensuring driver safety.

DE102012019257B4Inactive Publication Date: 2025-05-08INFINEON TECHNOLOGIES AG
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
DE102012019257
Authority / Receiving Office
DE · DE
Patent Type
Patents
Current Assignee / Owner
Priority Date
2011-09-30
Filing Date
2012-09-28
Publication Date
2025-05-08
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing adaptive front lighting systems (AFS) using stepper motors to control headlight positions may set headlights to dangerous positions during power failures, potentially dazzling other drivers.

Method used

A method and system for controlling stepper motors in AFS systems, which includes operating in normal and failure modes. In normal mode, the stepper motor advances upon receiving step pulses. In failure mode, a fail counter is incremented with step pulses, and the motor is not advanced. This allows for safe repositioning of headlights after a failure.

Benefits of technology

The system ensures safe repositioning of headlights after a failure, preventing potential dazzling of other drivers by accurately tracking and correcting the stepper motor position.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

Method for controlling a stepper motor system, wherein the method comprises the following: A) Operating the stepper motor system in normal mode, wherein operating the stepper motor in normal mode includes moving the stepper motor and incrementing a step counter upon receiving a step pulse; B) Recording a failure event; and C) upon detection of a failure event, operating the stepper motor system in a failure mode, wherein operating the stepper motor in a failure mode includes incrementing a failure counter upon receiving the step pulse without continuing to move the stepper motor.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] The present invention relates generally to semiconductor circuits and methods, and more particularly to systems and methods for controlling a stepper motor.

[0002] Adaptive Front Lighting Systems (AFS) are commonly used to control and regulate the intensity and direction of automotive headlights. An AFS can be used to adjust the angular position of a headlight to compensate for position changes that occur during vehicle acceleration and deceleration. For example, when a car is accelerating, the front end of the car may tend to increase its angle upward from the road. This angular increase shifts the headlight beam upward from the road and into oncoming traffic, posing a hazard to other drivers. Furthermore, the horizontal angle of the headlights may be affected when the vehicle curves, turns, or reverses.In an AFS system, an electric motor can be used to control the angular direction of the headlights in such a way that the angle of the headlight relative to the road is reduced to compensate for the increase in angle due to acceleration or cornering, turning, or turning. Many AFS applications use one or more stepper motors to control and regulate the position of a headlight chassis. Some countries have even mandated the use of such systems for motor vehicles equipped with high-intensity discharge (HID) lamps.

[0003] In the event of a failure condition, such as a momentary power outage or loss of performance, or a shutdown in the motor driver circuit, the headlight position may be locked in a dangerous or unsafe position, which could pose a hazard to other drivers, such as blinding. In some systems, the position of the stepper motors that position the headlights is reset and reinitialized after the vehicle is turned off and the key is turned in the ignition.

[0004] US 4,187,455 A discloses a method for controlling a system with a stepper motor. At the beginning of the method, a counter provided in the system is set to a value that corresponds to the difference between the ultimately reached position of a valve controlled by the stepper motor and its current position. This set counter value serves to determine the number of step pulses / step commands that are to be sent via a step command line. For this purpose, the counter value is counted down until the desired number of step pulses / step commands has been generated on the step command line. The counter serves to prevent the transmission of step pulses / step commands on the step command line. The counter is controlled by the above-mentionedThe initially set counter value continues to decrement as long as it receives corresponding clock signals via a line.

[0005] According to the invention, methods for controlling a stepper motor system or for operating a stepper motor driver are provided, as well as a method for operating a motorized headlight system, a stepper motor controller, and a system for controlling a position of a motor vehicle headlight.

[0006] Advantageous further developments of the invention are specified in the subclaims.

[0007] In one embodiment, a method for controlling a stepper motor system includes operating the stepper motor system in a normal mode. In the normal mode, the stepper motor advances upon receiving a step pulse. If a failure event is detected, the stepper motor is operated in a failure mode. In the failure mode, a failure counter is incremented upon receiving the step pulse, and the stepper motor is stopped.

[0008] Advantageous: the step pulse has a positive step pulse or a negative step pulse; incrementing the pedometer in the normal mode comprises incrementing the pedometer in a positive direction upon receipt of the positive step pulse and incrementing the pedometer in a negative direction upon receipt of the negative step pulse, the negative direction being opposite to the positive direction; and advancing the stepper motor in the normal mode comprises advancing the stepper motor in a first direction upon receiving the positive step pulse and advancing the stepper motor in a second direction upon receiving the negative step pulse, the second direction being opposite to the first direction.

[0009] Advantageously, advancing the motor according to a value of the failure counter comprises positioning a motor vehicle headlight in an estimated last position.

[0010] Recording the failure event advantageously includes the following: Determine whether a recoverable failure event has occurred; and Determine whether a non-recoverable failure event has occurred.

[0011] Advantageous: a recoverable failure event includes at least one of a voltage spike or a temporary power interruption; and a non-recoverable failure event includes at least one of the stepper motor having an open-turn condition, the stepper motor having a short-turn condition, or one of an overvoltage condition, an undervoltage condition, and an overload condition.

[0012] Advantageously, the method further comprises subtracting a value of the failure counter from the step counter if the failure event is a recoverable failure event.

[0013] According to one aspect, a method is provided for operating a stepper motor driver, the method comprising: Detecting a failure condition; Determine a cause for the failure condition; if a failure condition is detected, then Deactivating the stepper motor driver, Signal to a controller that a failure has occurred, Signaling the cause of the failure condition to the controller, Incrementing a pedometer when a step pulse is received, Incrementing a failure counter when the step pulse is received; and If no failure condition is detected, then the stepper motor continues to move and the step counter increments when the step pulse is received.

[0014] Advantageously, signaling to the controller that the failure has occurred comprises sending an interrupt to the controller.

[0015] Advantageously, signaling the cause of the failure condition comprises writing a status register and sending contents of the status register to the controller.

[0016] Advantageously, the method further comprises sending values ​​of the pedometer and the failure counter to the controller.

[0017] According to one aspect, a method is provided for operating a stepper motor driver, the method comprising: detecting a failure indication signal from the stepper motor driver; if the failure indication signal is not detected, sending step pulses to the stepper motor driver; and if the failure indication signal is detected, then the Receiving a failure cause from the stepper motor driver, Receiving a step counter value from the stepper motor driver, the step counter value representing a number of step pulses received by the stepper motor driver, Receiving a failure counter value, wherein the failure counter value represents a number of step pulses received by the stepper motor driver after a failure detection, Determine, based on the cause of the failure, whether a recoverable failure has occurred, if the failure is recoverable, determining a number of correction step pulses based on a difference between the step counter value and the failure counter value, and sending the correction step pulses to the stepper motor driver.

[0018] Advantageous: detecting the failure indication signal includes receiving an interrupt; Receiving the cause of failure involves reading a status register of the stepper motor driver via a digital interface; receiving the pedometer value includes reading the pedometer value from the stepper motor driver via the digital interface; and Receiving the failure counter value involves reading the failure counter value from the stepper motor driver via the digital interface.

[0019] Advantageously, determining whether the failure is recoverable comprises determining a time elapsed since detecting the failure indication signal, wherein the failure is determined to be recoverable if the elapsed time is less than a threshold and the failure cause is one of a plurality of predetermined recoverable failure categories.

[0020] Advantageously, the failure is determined to be recoverable if the cause of the failure is one of a plurality of predetermined recoverable failure categories.

[0021] According to one aspect, a method is provided for operating a motorized headlight system having a stepper motor coupled to a headlight, the method comprising: Operating the system in a normal mode, wherein operating the system in the normal mode comprises advancing the stepper motor and incrementing a step counter upon receiving a step pulse; Recording a failure event; Diagnosing the failure event to determine whether the failure event is a recoverable failure event or a non-recoverable failure event; Incrementing a failure counter upon receipt of the step pulse without further moving the stepper motor after detecting the failure event; and if the failure event is a recoverable failure event, repositioning the headlamp to an estimated position based on a value of the failure counter.

[0022] Advantageously, determining whether the failure is a non-recoverable failure event comprises at least one of: determining whether there is an open or short circuit in the stepper motor; determining whether an open circuit condition exists in the stepper motor or in a stepper motor driver; determining whether an overvoltage condition exists in the stepper motor or stepper motor driver; or Determining whether the headlight is not working.

[0023] According to one aspect, a stepper motor controller is provided comprising: an input port configured to receive motor step commands; a stepper motor driver coupled to the input port, the stepper motor driver configured to couple to a stepper motor; a step counter coupled to the input port, the step counter configured to sum motor step commands when operating in a normal mode; and a failure counter coupled to the input port, the failure counter configured to sum motor step commands during a failure mode, wherein the stepper motor driver is configured to increment the stepper motor upon receipt of the stepper motor commands when operating in the normal mode, and the stepper motor driver is configured not to increment the stepper motor upon receiving stepper motor commands when operating in the failure mode.

[0024] Advantageously, the stepper motor controller further comprises a diagnostic block coupled to the stepper motor driver and configured to detect a cause of failure of the stepper motor.

[0025] Advantageously, the stepper motor is implemented on an integrated circuit.

[0026] Advantageously, the stepper motor controller is configured to control a stepper motor coupled to a motor vehicle headlight.

[0027] Advantageously, the stepper motor controller also has the stepper motor.

[0028] Advantageously, the stepper motor controller is configured to position the stepper motor in an estimated position corresponding to a value of the failure counter when a recoverable failure occurs.

[0029] Advantageously, the stepper motor controller further comprises a digital controller coupled to the input port, the controller configured to send the motor step commands to the stepper motor driver.

[0030] Advantageously, the digital controller includes a microcontroller.

[0031] Advantageously, the stepper motor controller further comprises a diagnostic block coupled to the stepper motor driver and configured to detect a cause of failure of the stepper motor, wherein the digital controller is further configured to determine whether a recoverable or non-recoverable failure event has occurred based on an output from the diagnostic block.

[0032] Advantageous: a recoverable failure event includes at least one of a voltage spike or a temporary power interruption; and a non-recoverable failure event includes at least one of the stepper motor having an open-turn condition, the stepper motor having a short-turn condition, or one of an overvoltage condition, an undervoltage condition, and an overload condition.

[0033] According to one aspect, a system is provided for controlling a position of a motor vehicle headlight, the system comprising: a stepper motor driver that has the following: an input port configured to receive motor step commands; a stepper motor interface circuit coupled to the input port, wherein the stepper motor driver is configured to couple to a stepper motor, a diagnostic block coupled to the stepper motor interface circuit that detects a stepper motor failure, a pedometer coupled to the input port, the pedometer configured to sum motor step commands when operating in a normal mode; and a failure counter coupled to the input port, the failure counter configured to sum motor step commands during a failure mode, wherein the stepper motor driver is configured to increment the stepper motor upon receipt of the stepper motor commands when operating in the normal mode, and the stepper motor driver is configured not to increment the stepper motor upon receiving stepper motor commands when operating in the failure mode.

[0034] Advantageously, the system further comprises a controller coupled to the input port, the controller configured to send the motor step commands to the stepper motor driver.

[0035] The details of one or more embodiments of the invention are set forth in the accompanying drawings and in the description below. Other features, objects, and advantages of the invention will become apparent from the description and drawings, as well as from the claims. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] For a more complete understanding of the present invention and its advantages, reference is now made to the following description taken in conjunction with the accompanying drawings, in which: Fig. 1a and Fig. 1b illustrates a headlight system in accordance with an embodiment of the present invention; Fig. 2 illustrates a flowchart of a method in accordance with the embodiment; and Fig. 3 illustrates a headlight control system in accordance with another embodiment of the present invention. DETAILED DESCRIPTION OF ILLUSTRATIVE EMBODIMENTS

[0037] The making and using of the presently preferred embodiments are discussed in detail below. However, it should be understood that the present invention provides many applicable inventive concepts that may be embodied in a wide variety of specific contexts. The specific embodiments discussed are merely illustrative of specific ways to make and use the invention and do not limit the scope of the invention.

[0038] The present invention will be described with respect to preferred embodiments in a specific context, namely a stepper motor driver for a motor vehicle headlight system. However, the invention can also be applied to other types of circuits and systems, such as (electric) motor controllers and security systems.

[0039] Bipolar stepper motors are often used to move a headlight chassis in automotive AFS systems. Because bipolar stepper motors typically lack position feedback, they are generally controlled in an open-loop fashion. For example, the position of the headlight chassis can be determined by tracking the number of step commands issued to the stepper motor. In one embodiment, these step commands can be a positive step command, which advances the stepper motor in one direction, or a negative step command, which advances the stepper motor in the opposite direction.However, if the motor driver circuit is turned off during operation so that the system can no longer track the stepper motor position, there is a risk that the headlight chassis will become stuck in a position or has the potential to be moved to a position where it will dazzle occupants of oncoming traffic.

[0040] In a headlight motor control system according to one embodiment, headlight system failures are detected and analyzed. If the failure is a recoverable failure, for example, a power supply fault that temporarily interrupts power to the motor controller, a number of motor step commands received by the motor are tracked. By knowing the exact position at the time the shutdown occurred, as well as an underlying cause of the failure, a controller can decide whether a possible restart without initialization would be feasible to avoid a period in which the headlights shine into oncoming traffic. In some embodiments, when the failure condition disappears, the contents of the failure counter are subtracted from the contents of a step counter so that the step counter value more accurately describes the stepper motor position.On the other hand, if the failure is irrecoverable, for example, due to a short-circuit or open-circuit in the engine control system, the system is shut down and / or deactivated. In some embodiments, the system can be restarted after initialization in the event of an irrecoverable failure.

[0041] Fig. Figure 1a illustrates a motor vehicle headlight system 100 in accordance with an embodiment of the present invention. In one embodiment, the headlight chassis 108 is mechanically coupled to the stepper motor 106. The stepper motor 106 may be a bipolar stepper motor or another type of stepper motor, such as a brushless DC motor. Although in Fig. 1a illustrates only a single stepper motor, it should be understood that more than one stepper motor may be coupled to a headlight or headlight chassis to provide more than one controllable axis of movement. For example, multiple motors may be used to control the headlight's side-to-side, as well as up and down, movement. A stepper motor driver 104 controls the position of the stepper motor 106 via an electrical interface 110. Step commands are issued by a microcontroller 102 via an interface 103. In some embodiments, the microcontroller 102 may also read and write command and status information to and from the stepper motor driver 104. In some embodiments, the microcontroller 102 may be a standalone controller dedicated to the headlight system 100.In other embodiments, microcontroller 102 may be dedicated to multiple headlights or other automotive system functions. In further embodiments, the function of microcontroller 102 may be implemented in other ways, for example, using a microprocessor, a computer, dedicated logic, or other systems.

[0042] Fig. Figure 1b illustrates a detailed view of the stepper motor driver 104, which includes a control block 122, a motor interface 124, a diagnostic block 120, a step counter 126, and a failure counter 128. The control block receives step counting commands via the interface 103. In one embodiment, the interface 103 is a two-wire interface or I 2C interface, in which the first signal indicates a step pulse and the second signal indicates polarity or direction. Alternatively, other interfaces may be used, such as a serial or parallel interface that outputs a command word. During normal operation, control block 122 increments or decrements step counter 126 depending on the polarity of the step command and the commands from motor interface 124 to rotate the stepper motor one step in the direction specified by the polarity of the step command. Motor interface 124 includes, for example, two full bridges for the two stepper motors and may be implemented using techniques known in the art.

[0043] In one embodiment, diagnostic block 120 monitors motor interface 124 as well as other parameters, such as line voltage and sensor status. In the event of a failure, the diagnostic block determines the cause of the failure. In some embodiments, diagnostic block 120 operates according to the principles set forth in U.S. Patent Application No. 13 / 248,586, entitled "Diagnosis of Over-Current Conditions in Bipolar Motor Controllers" (Attorney Docket No. INF 2011 P 50575 US), filed September 29, 2011, which application is hereby incorporated by reference in its entirety.

[0044] The microcontroller 102 uses the cause of the failure to determine if a recoverable failure has occurred. Examples of recoverable failures include voltage spikes or a temporary loss of power to the motor interface 124. For example, power supply disturbances during the cranking phase of starting an internal combustion engine or prime mover may temporarily shut off power to the stepper motor. If a fault is detected by the diagnostic block, the failure counter 128 increments with each incoming step pulse, while the step counter 126 continues to increment or decrement depending on the direction and / or polarity of the step pulse. Once the failure condition has ended, the contents of the step counter 126 may be adjusted based on the accumulated value in the failure counter. In one embodiment, the value of the failure counter is subtracted from the step counter.Normal operation then resumes, and the system operates as if the stepper motor position were reflected by the value in the step counter. In some cases, the adjusted step counter value may not exactly reflect the actual stepper motor position after the temporary failure. However, in many cases, the error between the actual and reflected position is small enough for the system to continue operating safely.

[0045] Examples of non-recoverable failures include, but are not limited to, a faulty stepper motor, an open-turn condition, an inter-turn short-circuit, an overcurrent condition due to a short circuit of the supply bus bars, an overvoltage shutdown condition, an undervoltage shutdown condition, and a lost sensor supply due to an underload or overload condition. In one embodiment, the sensor is a tilt sensor that detects the angle of the vehicle. This detected angle is used by the system to determine an angle to which the headlight chassis should be controlled. In some embodiments, a sensor failure is considered a non-recoverable failure because a failure prevents the availability of a parameter critical to the operation of the system. When a non-recoverable failure is detected, the motor driver is disabled until restarted by the microcontroller 102.

[0046] Fig. 2a illustrates a flowchart 200 illustrating a method in accordance with the embodiment for the stepper motor driver 104 ( Fig. 1a-b). In step 201, the system is initialized. Initialization may include rotating the stepper motor to an initial position and establishing a defined relationship between a step rate and a rotor angle, as well as resetting the step counter and the failure counter. In some embodiments, the failure counter and the step counter are initialized with initial values. In one embodiment, the step counter is initialized with a value indicating an initial position, and the failure counter is initialized to zero. In step 202, a determination is made as to whether a failure condition exists.

[0047] In the absence of a failure condition, when a step command is received from the controller (step 204), the step counter is incremented (step 206), and the stepper motor is advanced according to the polarity of the step command (step 208). On the other hand, if a failure is detected in step 202, the motor driver is disabled (step 210), and an interrupt is sent to the controller (step 212). In step 214, the cause of the failure is diagnosed, and a failure code corresponding to the cause of the failure is written to a status register in step 216.

[0048] If a step is received in step 218, the step counter 220 is incremented or decremented depending on the polarity of the step. If a failure condition still exists (step 222), then the failure counter (step 224) is also incremented or decremented depending on the polarity of the step. On the other hand, if the failure condition no longer exists (step 222), then the motor driver is allowed to be restarted by an external controller (step 226), and processes can proceed as normal, beginning again at step 202. In one embodiment, the failure condition is cleared by the microprocessor resetting a failure flag.Alternatively, the stepper motor driver can be enabled after receiving a reset signal or other signal recognized by the motor driver to resume moving the motor upon receiving step pulses.

[0049] Fig. 2b illustrates a flowchart 250 illustrating a method for controlling the stepper motor driver 104 ( Fig. 1a-b) in accordance with the embodiment showing a controller, such as the microcontroller 102 ( Fig. 1a). In step 252, the controller is initialized. In step 254, the controller determines whether an interrupt has been received from the stepper motor driver. If no interrupt has been received, the controller issues step commands to the stepper motor driver according to a normal operating mode. In step 256, for example, the controller determines whether the position of the stepper motor should be changed. This determination may be made based on sensor information coming from accelerometers, automotive control systems, tilt sensors, and the like. In one embodiment, the controller strives to maintain the position of the stepper motor such that an automotive headlight coupled to the stepper motor is positioned in a safe position.If it is determined that the stepper motor requires a position change (step 258), the controller outputs pulses to the stepper motor driver to further advance the motor's position. In one embodiment, these pulses may have a pulse and polarity such that the motor advances in a first direction according to a first polarity or advances in a second or opposite direction according to a second polarity.

[0050] When the controller receives a failure interrupt (step 254), the controller determines the cause of the failure and attempts to resume operation of the motor if the failure is determined to be a recoverable failure. The controller reads the stepper motor controller's status register (step 262), step counter (step 264), and failure counter (step 266). In some embodiments, the controller may also determine the time elapsed since the failure (step 268). In some embodiments, the time elapsed since the failure is a constraint used to minimize angular error due to continued rotor rotation after the motor driver is disabled.

[0051] In step 270, the controller determines whether the failure is a recoverable failure. In one embodiment, the controller analyzes the failure code contained in the status register read in step 262. For example, if the status register indicates that the failure was caused by a temporary overvoltage condition, the failure may be recoverable because there is a possibility that the stepper motor system is still functional. On the other hand, if the status register indicates that the failure is due to an inter-turn short or inter-turn open, then the failure is not recoverable. In one embodiment, if the failure is determined to be a non-recoverable failure, the process (step 274) ends at least until the system is reinitialized.

[0052] In some embodiments, the controller uses the time elapsed since the failure to help determine whether a recoverable failure has occurred. In some embodiments, the rotor of the stepper motor may continue to rotate due to inertia when field current is removed from the motor, as is done by the stepper motor when a failure is detected. If the failure is detected and processed within a short period of time, for example, less than one second, the motor position may be close to the motor position before the failure. In such a case, the current position of the motor can be estimated by subtracting the failure counter from the step counter to determine the position of the stepper motor before the failure. The smaller the time elapsed since the failure, the better the estimate.On the other hand, if a large amount of time has elapsed, the motor may have had the opportunity to rotate a significant amount, such that an estimate based on the step counter and the failure counter is inaccurate. In one embodiment, if the status register contents indicate the presence of a potentially recoverable failure, the controller compares the elapsed time to a threshold to determine whether the failure is recoverable. The actual time thresholds are embodiment- and implementation-specific and depend on the stepper motor type and load.

[0053] If the controller determines that the failure is recoverable (step 272), the controller next determines the current position of the motor and determines a recovery position of the motor (276). In one embodiment, this position may be determined, for example, by subtracting the contents of the failure counter from the step counter. The value of the step counter represents the number of pulses or the integrated pulses that occurred after the stepper motor controller detected the failure. Based on the determined position, the controller determines a recovery position as well as a number of step pulses that must be issued to advance the motor to the determined recovery position. The controller then issues a power-up command (step 276) to the stepper motor driver, signaling the stepper motor controller to resume normal operation.In some embodiments, this may be a reset command or another command. If no further failure interrupt is received (step 280), the controller transmits step pulses to the stepper motor driver to position the stepper motor in the recovery position. The process then continues as normal at step 254. If another failure interrupt is received, the process returns to step 262.

[0054] Fig.3 illustrates a motor control system 300 in accordance with another embodiment. The motor control system 300 is connected to the stepper motor 324 via a motor control interface 330 and provides power to the sensor 322 via a sensor power supply interface 340. In one embodiment, the sensor 322 is a tilt sensor and the motor 324 is a bipolar stepper motor. In alternative embodiments, the sensor 322 may also be a Hall sensor or a center position switch. In other embodiments, more than one sensor and / or type of sensor may be used in a system. For example, more than one tilt sensor may be used for motion on multiple axes.

[0055] The motor control system 300 includes a microcontroller 302 and a motor driver 303. In one embodiment, the microcontroller 302 and the motor driver 303 are each implemented as a separate integrated circuit. Alternatively, the microcontroller 302 and the motor driver 303 may be located on the same integrated circuit. In other embodiments, the system may be divided differently. In some embodiments, the microcontroller 302 and the motor driver 303 are present in one module.

[0056] In one embodiment, motor driver 303 includes a step counter 320 and a failure counter 318 that operate according to the principles of the embodiment described above. A sequencer 322 controls stepper motor drive blocks 306, 308, 310, and 312 according to techniques known in the art based on a STEP control signal 330 and a direction control signal 332. In one embodiment, sequencer 322 causes drive blocks 306, 308, 310, and 312 to move one step for each pulse received in STEP control signal 330. In one embodiment, the sequencer causes the stepper motor to advance in a first direction when the direction control signal 332 is in a first state and to advance in a second or opposite direction when the direction control signal 322 is in a second state.

[0057] In one embodiment, a diagnostic block 314 monitors the sensor power supply block 304, the stepper motor drive blocks 306, 308, 310, and 312, and the system supply voltage 334 to determine whether a fault condition exists in the system 300. In some embodiments, the diagnostic block 314 also monitors other parameters, such as an overcurrent condition, an open-turn condition, or a short-turn condition. The microcontroller 302 also determines whether the fault condition is a recoverable or non-recoverable fault condition. For example, diagnostic block 314 may detect an open or shorted winding condition in a motor 324 via motor drive blocks 306, 308, 310, and 312, or it may detect a broken sensor or a shorted power supply, and provides this status information to microcontroller 302 to determine that these fault conditions are unrecoverable.On the other hand, the diagnostic block 314 may detect a voltage spike in the power supply of the system 300 and determine that the fault condition is recoverable.

[0058] In one embodiment, upon detecting a fault condition, diagnostic block 314 writes a description of the fault condition to status register 316 and sends an interrupt to microcontroller 302. In one embodiment, writing to the status register includes setting one or more bits corresponding to the particular status condition. For example, one bit may correspond to an overcurrent condition in driver 306, while another bit may correspond to a winding break coupled to driver 308. In the event of a fault condition that causes the motor driver to shut down, the diagnostic block enables fail counter 318 via start signal 338 such that fail counter 318 begins accumulating step pulses from STEP control signal 330 during the time the sequencer is not advancing motor 324. In some embodiments, step counter 320 continues to increment during the fail condition.In some embodiments, the value of the failure counter 318 is subtracted from the step counter 320. This can be performed by the microcontroller 302 since there is no specific time for starting the subtraction.

[0059] The interface 326 of the microcontroller 302 communicates with the motor driver 303 via a bus interface 336. In one embodiment, the contents of the status register 316, the failure counter 318, and the step counter are accessible via the bus interface 336. The timer block 328 issues step commands via the STEP control signal 330 and the direction control signal 332. In one embodiment, the timer block 328 issues a pulse to advance the motor 324 one step. In some embodiments, any drift caused by runtime effects of the microcontroller 302 during operation can be periodically synchronized by reading the step counter value and comparing the value to an internal step counter in the microcontroller 302.In some embodiments, the determination of whether a detected failure is recoverable or unrecoverable is made by the microcontroller 302 based on information from the status register 316.

[0060] In one embodiment, a method for controlling a stepper motor system includes operating the stepper motor system in a normal mode. In the normal mode, the stepper motor advances upon receiving a step pulse. If a failure event is detected, the stepper motor is operated in a failure mode. In the failure mode, a failure counter is incremented upon receiving the step pulse, and the stepper motor is not advanced.

[0061] The method may further comprise advancing the motor according to a value of the failure counter if the failure event is a recoverable failure event. In one embodiment, the step pulse may comprise a positive step pulse or a negative step pulse. Incrementing the step counter in the normal mode may comprise incrementing the step counter in a positive direction upon receipt of the positive step pulse and incrementing the step counter in a negative direction upon receipt of the negative step pulse, wherein the negative direction is opposite to the positive direction.Furthermore, advancing the stepper motor in the normal mode may include advancing the stepper motor in a first direction upon receiving the positive step pulse and advancing the stepper motor in a second direction upon receiving the negative step pulse, wherein the second direction is opposite to the first direction. In some embodiments, advancing the motor according to a value of the failure counter includes positioning a motor vehicle headlight in an estimated last position.

[0062] In one embodiment, detecting the failure event includes determining whether a recoverable failure event has occurred and determining whether a non-recoverable failure event has occurred. A recoverable failure event may include at least one of a voltage spike or a momentary power interruption, and a non-recoverable failure event may include at least one of the stepper motor having an open-turn condition, the stepper motor having a short-turn condition, an overvoltage condition, an undervoltage condition, and an overload condition. In some embodiments, the method may include subtracting a value of the failure counter from the stepper counter if the failure event is a recoverable failure event.

[0063] In accordance with another embodiment, a method of operating a stepper motor driver includes detecting a failure condition and determining a cause of the failure condition. When a failure condition is detected, the stepper motor driver is disabled, and a signal is sent to the controller indicating that a failure has occurred. The stepper motor driver also signals the cause of the failure condition to the controller. In some embodiments, signaling to the controller is via an interrupt, and the cause of the failure is signaled by writing a status register and sending contents of the status register to the controller. When a step pulse is received after a failure is detected, a step counter and a failure counter are incremented. The values ​​of the step counter and the failure counter may also be transmitted to the controller.If no failure condition is detected, the stepper motor continues to move and the step counter is incremented when the step pulse is received.

[0064] In accordance with another embodiment, a method of operating a stepper motor driver includes detecting a failure indication signal from the stepper motor driver. If the failure indication signal is not detected, step pulses are transmitted to the stepper motor driver. If the failure indication signal is detected, a failure cause, a step counter value, and a failure counter value are received from the stepper motor driver. The step counter value represents a number of step pulses received by the stepper motor driver, and the failure counter value represents a number of step pulses received by the stepper motor driver after the failure is detected. The method also includes determining, based on the failure cause, whether a recoverable failure has occurred.If the failure is recoverable, a number of correction step pulses is determined based on a difference between the step counter value and the failure counter value, and the correction step pulses are sent to the stepper motor driver.

[0065] In one embodiment, detecting the failure indication signal comprises receiving an interrupt, receiving the failure cause comprises reading a status register of the stepper motor driver via a digital interface, receiving the step counter value comprises reading the step counter value from the stepper motor driver via the digital interface, and receiving the failure counter value comprises reading the failure counter value from the stepper motor driver via the digital interface.

[0066] In one embodiment, determining whether the failure is recoverable includes determining a time elapsed since detecting the failure indication signal. The failure is determined to be recoverable if the elapsed time is less than a threshold and / or the failure cause is one of a plurality of predetermined recoverable failure categories.

[0067] In one embodiment, a method of operating a motorized headlight system having a stepper motor coupled to a headlight includes operating the system in a normal mode. The normal mode includes advancing the stepper motor and incrementing a step counter upon receipt of a step pulse. The method also includes detecting a failure event and diagnosing the failure event to determine whether the failure event is a recoverable failure event or a non-recoverable failure event. After a failure event is detected, advancing the failure counter upon receipt of the step pulse without advancing the stepper motor. If the failure event is a recoverable failure event, repositioning the motorized headlight to an estimated position based on a value of the failure counter.

[0068] In one embodiment, determining whether the failure is a non-recoverable failure event comprises at least one of determining whether an open-turn or short-turn condition exists in the stepper motor, determining whether an open-circuit condition exists in the stepper motor or in a stepper motor driver, determining whether an over-voltage condition exists in the stepper motor or in the stepper motor driver, or determining whether the headlight is not functioning.

[0069] In one embodiment, a stepper motor controller includes an input port configured to receive motor step commands and a stepper motor driver coupled to the input port, the stepper motor driver configured to couple to a stepper motor. The controller also includes a step counter coupled to the input port and a failure counter coupled to the input port. The step counter is configured to total motor step commands when operating in a normal mode, and the failure counter is configured to total motor step commands during a failure mode.In one embodiment, the stepper motor driver is configured to increment the stepper motor upon receipt of the stepper motor commands when operating in the normal mode, and the stepper motor driver is configured not to increment the stepper motor upon receipt of the stepper motor commands when operating in the failure mode.

[0070] In some embodiments, the stepper motor controller includes a diagnostic block coupled to the stepper motor driver, the diagnostic block configured to detect a failure cause of the stepper motor. The diagnostic block may be further configured to determine whether a recoverable or non-recoverable failure event has occurred. In one embodiment, a recoverable failure event includes at least one of a voltage spike or a momentary power interruption, and a non-recoverable failure event includes at least one of the stepper motor experiencing an open-turn condition, the stepper motor experiencing a short-turn condition, an overvoltage condition, an undervoltage condition, and an overload condition.

[0071] In some embodiments, the stepper motor is implemented on an integrated circuit. In further embodiments, the stepper motor controller may be configured to control a stepper motor coupled to an automotive headlight. In one embodiment, the stepper motor controller is configured to position the stepper motor in an estimated position corresponding to a value of the failure counter when a recoverable failure occurs. The controller may further include a digital controller coupled to the input port, the controller configured to transmit the motor stepping commands to the stepper motor driver. In one embodiment, the digital controller may include a microcontroller. In some embodiments, the controller may also include the stepper motor.

[0072] In accordance with another embodiment, a system for controlling a position of an automotive headlight includes a stepper motor driver. The stepper motor driver includes an input port configured to receive motor step commands, a stepper motor interface circuit coupled to the input port, the stepper motor driver configured to couple to a stepper motor, a diagnostic block coupled to the stepper motor interface circuit and configured to detect a failure of the stepper motor, a step counter, and a failure counter coupled to the input port. The step counter is configured to total motor step commands when operating in a normal mode, and the failure counter is configured to total motor step commands during a failure mode.In some embodiments, the step counter is further configured to sum motor step commands when operating in the failure mode.

[0073] In one embodiment, the stepper motor driver is configured to increment the stepper motor upon receiving the stepper motor commands when operating in a normal mode, and the stepper motor driver is configured not to increment the stepper motor upon receiving the stepper motor commands when operating in a failure mode.

[0074] In one embodiment, the system also includes a controller coupled to the input port, the controller configured to send the motor step commands to the stepper motor driver.

[0075] Advantages of the embodiments include the availability of selective failure signals for root cause analysis and / or the option to synchronize the internal step counter with the estimated last rotor position by subtracting the failure counter from the step counter. In such embodiments, potential uncertainties regarding the estimated and actual rotor position of the stepper motor can be reduced to the uncontrolled step loss due to inertia. The decision to restart the system or to deactivate the system can be made by a control unit based on a summary of a detected or diagnosed underlying cause of the failure.

Claims

[1] A method for controlling a stepper motor system, the method comprising: A) operating the stepper motor system in a normal mode, wherein operating the stepper motor in a normal mode comprises advancing the stepper motor and incrementing a step counter upon receiving a step pulse; B) recording a failure event; and C) upon detecting a failure event, operating the stepper motor system in a failure mode, wherein operating the stepper motor in a failure mode comprises incrementing a failure counter upon receiving the step pulse without further moving the stepper motor. [2] The method of claim 1, further comprising advancing the motor according to a value of the failure counter when the failure event is a recoverable failure event. [3] The method of claim 1, wherein: the step pulse comprises a positive step pulse or a negative step pulse; incrementing the pedometer in the normal mode comprises incrementing the pedometer in a positive direction upon receipt of the positive step pulse and incrementing the pedometer in a negative direction upon receipt of the negative step pulse, wherein the negative direction is opposite to the positive direction; and advancing the stepper motor in the normal mode comprises advancing the stepper motor in a first direction upon receiving the positive step pulse and advancing the stepper motor in a second direction upon receiving the negative step pulse, the second direction being opposite to the first direction. [4] The method of claim 1, wherein advancing the motor according to a value of the failure counter comprises positioning a motor vehicle headlight in an estimated last position. [5] The method of claim 1, wherein detecting the failure event comprises: Determine whether a recoverable failure event has occurred; and Determine whether a non-recoverable failure event has occurred. [6] A method of operating a stepper motor driver of a stepper motor, the method comprising: A) Detecting a failure condition; B) Determine a cause for the failure condition; C) if a failure condition is detected, then Deactivating the stepper motor driver, Signal to a controller that a failure has occurred, Signaling the cause of the failure condition to the controller, Incrementing a pedometer when a step pulse is received, Incrementing a failure counter when the step pulse is received; and D) if no failure condition is detected, then the stepper motor continues to move and the step counter increments upon receiving the step pulse. [7] A method of operating a stepper motor driver, the method comprising: A) Detecting a failure indication signal from the stepper motor driver; B) if the failure indication signal is not detected, sending step pulses to the stepper motor driver; and C) if the failure indication signal is detected, then receiving a failure cause from the stepper motor driver, Receiving a step counter value from the stepper motor driver, the step counter value representing a number of step pulses received by the stepper motor driver, Receiving a failure counter value, wherein the failure counter value represents a number of step pulses received by the stepper motor driver after a failure detection, Determine, based on the cause of the failure, whether a recoverable failure has occurred, if the failure is recoverable, determining a number of correction step pulses based on a difference between the step counter value and the failure counter value, and sending the correction step pulses to the stepper motor driver. [8] A method of operating a motorized headlight system having a stepper motor coupled to a headlight, the method comprising: A) operating the system in a normal mode, wherein operating the system in the normal mode comprises advancing the stepper motor and incrementing a step counter upon receipt of a step pulse; B) Recording a failure event; C) Diagnosing the failure event to determine whether the failure event is a recoverable failure event or a non-recoverable failure event; D) incrementing a failure counter upon receipt of the step pulse without further moving the stepper motor after detecting the failure event; and E) if the failure event is a recoverable failure event, repositioning the headlamp to an estimated position based on a value of the failure counter. [9] Stepper motor controller with: A) an input port configured to receive motor step commands; B) a stepper motor driver coupled to the input port, the stepper motor driver configured to couple to a stepper motor; C) a pedometer coupled to the input port, the pedometer configured to sum motor step commands when operating in a normal mode; and D) a failure counter coupled to the input port, the failure counter configured to sum motor step commands during a failure mode, wherein E) the stepper motor driver is configured to increment the step counter upon receipt of the stepper motor commands when operating in the normal mode, and F) the stepper motor driver is configured not to increment the step counter upon receipt of stepper motor commands when operating in the failure mode. [10] A system for controlling a position of a motor vehicle headlight, the system comprising: a stepper motor driver that has the following: A) an input port configured to receive motor step commands; B) a stepper motor interface circuit coupled to the input port, wherein the stepper motor driver is configured to couple to a stepper motor, C) a diagnostic block coupled to the stepper motor interface circuit that detects a stepper motor failure, D) a pedometer coupled to the input port, the pedometer configured to sum motor step commands when operating in a normal mode; and E) a failure counter coupled to the input port, the failure counter configured to sum motor step commands during a failure mode, wherein F) the stepper motor driver is configured to increment the step counter upon receipt of the stepper motor commands when operating in the normal mode, and G) the stepper motor driver is configured not to increment the step counter upon receipt of stepper motor commands when operating in the failure mode.

Citation Information

Patent Citations

  • Circuit arrangement for controlling a stepping motor

    DE19938625A1

  • Device for controlling an electric stepper motor in a vehicle

    DE69937387T2

  • Stepper motor feedback in position servo loop

    US4187455A