PULSE WIDTH MODULATION FAULT MODE FOR ILLUMINATING DEVICE DRIVERS
A PWM architecture of a microcontroller is disclosed that includes a fault module for regulating and detecting faults in current sensing or illuminating devices (e.g., LED strings). The fault module is part of a hardware regulation loop of LED voltage and LED current that allows the CPU to be placed in idle mode (“IDLE”) while an LED string is regulated in illumination. The microcontroller includes a PWM generator having a double channels PWM timer with a specific fault mode and an amplified comparator with a voltage reference. The architecture allows tuning of various parameters, including LED peak current, LED voltage supply, LED voltage regulation step and LED dimming value. In IDLE mode, the hardware regulation loop can regulate LED peak current and LED voltage supply without any CPU resource (microcontroller in IDLE mode). The fault module part of the hardware regulation loop can also detect and inform the CPU of: 1) an open LED; 2) a weak battery; and 3) an LED voltage that is under a target value.
Latest ATMEL NANTES S.A.S. Patents:
This disclosure relates generally to electronics, and more particularly to circuitry for driving illuminating devices, such as Light Emitting Diode (LEDs).
BACKGROUNDIlluminating devices, such as LEDs, are used in electronics for signaling in replacement of traditional incandescent illuminating devices. An example application is a microcontroller-based system which manages several LEDs or LED strings of car backlighting. The cost of a microcontroller is directly dependent on the amount of hardware resources needed to regulate the system, especially the analogue resources like analog to digital conversion (ADC) resources, which can consume significant silicon area.
SUMMARYA PWM architecture embedded in a microcontroller is disclosed that includes a fault mode module for regulating and detecting failures in current sensing or illuminating devices (e.g., LED strings). The fault mode module is part of a hardware regulation loop of LED voltage and LED current that does not need any ADC and allows the CPU of the microcontroller to be placed in idle mode (“IDLE”) while an LED string is illuminated. In some implementations, the microcontroller includes a PWM generator having a double channels PWM timer with a specific fault mode and an amplified comparator with a voltage reference. The PWM with its fault mode module allows tuning of various parameters, including LED peak current, LED voltage supply, LED voltage regulation step and LED dimming value. The hardware regulation loop can regulate LED peak current and LED voltage supply without any CPU source (microcontroller in IDLE mode). The fault mode module part of the hardware regulation loop can also detect and inform the CPU of: 1) an open LED; 2) a weak battery; and 3) an LED voltage that is under a target value. Upon failure detection, the CPU can be awakened using an interrupt generated by the fault mode module.
Particular implementations of the PWM architecture provide one or more of the following advantages. The PWM architecture avoids the use of a voltage supply feedback measurement and its associated ADC resources, and allows the CPU of the microcontroller to be placed in IDLE mode while an LED string is illuminated.
The details of one or more disclosed implementations are set forth in the accompanying drawings and the description below. Other features, aspects, and advantages will become apparent from the description, the drawings and the claims.
Circuit 200 applies to LED string 104 a voltage adapted to the sum (plus a few millivolts) of all forward LED voltages of LED string 104, and controls the peak and average current flowing into LED string 104. The illumination of each LED in LED string 104 is directly dependent on the average current flowing into the LED. The power supply of LED string 104 (Vpwr) can be generated through DC/DC converter 202, which can be a Buck or Boost DC/DC converter. LED string 104 can have different numbers of LEDs (or LEDs with different characteristics), as shown in
Referring to
DC/DC converter 202 can be controlled through the duty cycle of PWM_B. The duty cycle depends on Vpwr, which is measured by ADC 208. The duty cycle of PWM_B can be shortened or lengthened depending on the measured Vpwr.
The current rising slope is limited by inductor 206, which makes the current grow progressively into LED string 104. The current flowing into LED string 104 is controlled via the PWM_A pulse having a width that is wider than the time needed to get LED string 104 to reach its peak current value. This enables the base terminal of FET 108 and, by comparator 320, disables the PWM_A pulse when the current into LED string 104 reaches its peak current value. LED string 104 peak current is checked by comparator 320 through shunt resistor 212. When the comparison is reached, the actual current is equal to the targeted LED peak current. The desired average LED current on which illumination of LED string 104 depends can be modified by adapting the PWM_A frequency.
Example LED Control SystemIn some implementations, PWM generator 308 includes period counter (PER) 301 on which compare channel registers 305, 307 are compared, base counter register 303 for storing a reloadable period count for PER 301, compare channel registers 305, 307 for generating PWM waveforms, interrupts register 309 for storing failure interrupts generated by fault mode module 318, no overlap module 316 and fault mode module 318. Fault mode module 318 replaces the conventional Vpwr feedback measurement circuit and its associated ADC resources, shown in
In some implementations, analog part 310 includes optional amplifier 319, comparator 320 and a digital-to-analog converter (DAC) 322. A shunt voltage (Vshunt) across shunt resistor 212 is optionally amplified by amplifier 319 and input into comparator 320 to be compared with a fixed or adjustable reference voltage (Vref) selectable by control unit 306. The current LED string 104 is controlled by FET 108, which is driven by PWM_A (also referred to as FAb pulse). LED string 104 current rising slope is limited by inductor 206 and the running LED current value is accessible via Vshunt.
Signal Ab output by no overlap module 316 has an “on time” value that is set by control unit 306 to a predefined time needed for LED string 104 current to reach its peak value at an optimal Vpwr level. If the LED current peak value is reached during Ab “on time,” comparator 320 in analog part 310 emits a fault signal to fault mode module 318, which adjusts FAb to place FET 108 into an “off state.” When FET 108 is in an “off state,” the current into inductor 206 is diverted through LED string 104 and back-off diode 214.
Microcontroller 302 can be placed in IDLE mode while LED string 104 is illuminated because analog part 310 and fault mode module 318 regulates the voltage and current of LED string 104 without using any ADC or CPU calculation resources of microcontroller 302.
Example Timing Diagrams For LED Control SystemIf an LED in LED string 104 fails, an open circuit will result suppressing any current through shunt resistor 212. In this case, system 300 thinks that as there is no fault and Vpwr is lower than its optimal value. In this state, DC/DC converter 202 will continue to add quantums of energy onto capacitor 204, making Vpwr growing until Zener diode 312 reaches its breakdown voltage. If the quantum of energy injected by DC/DC converter 202 is more than two times higher than the energy needed by LED string 104 at each cycle, such a situation can be detected by monitoring for the presence of a fault during the subsequent FAb pulse to an unmasked FBb pulse.
After an FBb pulse with no fault occurring during the subsequent FAb pulse (when FaultStateA and PreFaultStateB are both low at the end of the PWM cycle), fault mode module 318 can emit to CPU 306 a signal (interruption) to alert to the CPU which can activate a spare LED string to replace the failing LED string or stop the system. A shorted LED can also be detected at the time the short failure occurs by detecting an abnormal series of adjacent cycles, where the FBb pulse is disabled (FaultStateB at active level for abnormal consecutive cycles), or during startup time, when the starting error disappears after an abnormally short time. Abnormal consecutive cycles where the FBb pulse is disabled can be detected by the overflow of a cycle counter incremented on the EOC signal and reset on the FBb signal.
Referring to the example of
In some implementations, control unit 306 can use four independent parameters to control LED string 104 and detect faults. Control unit 306 uses a PWM period value for controlling LED dimming, an output A pulse width for controlling LED voltage supply (Vpwr), an output B pulse width value for controlling the level of quantum energy injected by DC/DC converter 202 and a DAC value (Vref) for controlling the LED peak current. In some implementations, the output pulse A and output pulse B can be provided by timer module 316 of PWM generator 308 shown in
In some implementations, three example fault cases can be managed by system 300. The faults cases are summarized as follows.
Case 1: A fault occurs during pulse A
-
- 1. Next pulse B will be disabled.
- 2. Pulse A is shrunk, clamped to its inactive value from the fault to the end of the current PWM cycle.
Case 2/3: No fault during pulse A:
-
- 1. The next pulse B will be enabled.
- 2. Pulse A is not altered.
- Case 3: the previous Pulse B was enabled:
- An error signal (interrupt setting) is generated on the next PWM cycle.
- Case 3: the previous Pulse B was enabled:
The logic of fault mode module 318 can be implemented in four different PWM pulse configurations as summarized in Table I below.
Signals Bb, Ab, Fault, EOC and Clk are received as inputs into logic 600. In some implementations, and referring to
In fault case 2/3 (no fault occurs during pulse Ab), the next pulse FBb is not disabled. In fault case 3, an error is generated on the next cycle because of the simultaneous low level on either of FaultStateA and PreFaultStateB, which denote the absence of fault after a DC/DC active pulse.
Signals A, B, Fault, MOC and Clk are received as inputs into logic 800. In some implementations, and referring to
In fault case 2/3 (no fault occurs during pulse A), the next pulse FB is not disabled. In fault case 3, an error is generated on the MOC signal because of the simultaneous low level on either of FaultStateA and PreFaultStateB, which denote the absence of fault after a DC/DC active pulse.
Signals Ab, Bb, Fault, EOC and Clk are received as inputs into logic 1000. In some implementations, and referring to
In fault case 2/3 (no fault occurs during pulse Ab), the next pulse FB is not disabled. In fault case 3, an error is generated on the next cycle because of the simultaneous low level on either of FaultState and PreFaultState signals, which denote the absence of fault after a DC/DC active pulse.
Signals A, Bb, Fault, MOC and Clk are received as inputs into logic 1200. In some implementations, and referring to
In fault case 2/3 (no fault occurs during pulse A), the next pulse FB is not disabled. In fault case 3, an error is generated on the MOC signal because of the simultaneous low level on either of FaultState and PreFaultState signals, which denote the absence of fault after a DC/DC active pulse.
Signals Ab, Bb, Fault, Cycle, EOC and Clk are received as inputs into logic 1400. In some implementations, and referring to
In fault case 2/3 (no fault occurs during pulse Ab), the next pulse FBb is not disabled. In fault case 3, an error is generated on the next cycle because of the simultaneous low level on either of FaultStateA and PreFaultStateB, which denote the absence of fault after a DC/DC active pulse.
While this document contains many specific implementation details, these should not be construed as limitations on the scope what may be claimed (by example case E could be implemented with the same variation than case (A, B), (Ab, Bb), (A, Bb) and (Ab, B)), but rather as descriptions of features that may be specific to particular embodiments. Certain features that are described in this specification in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable sub combination. Moreover, although features may be described above as acting in certain combinations and even initially claimed as such, one or more features from a claimed combination can, in some cases, be excised from the combination, and the claimed combination may be directed to a sub combination or variation of a sub combination.
Claims
1. A system, comprising:
- one or more current sensing devices;
- detection circuitry coupled to the one or more current sensing devices; and
- a microcontroller having a Pulse Width Modulation (PWM) fault mode configured to receive a signal from the detection circuitry indicative of one or more regulated parameters of the one or more current sensing devices, to regulate at least one of the one or more regulated parameters based on the signal and to monitor for a fault in the one or more current sensing devices based on the signal.
2. The system of claim 1, where the one or more current sensing devices include illuminating devices, such as Light Emitting Diodes (LEDs).
3. The system of claim 1, where the one or more regulated parameters include voltage across or current through the one or more current sensing devices.
4. The system of claim 1, where the detection circuitry is configured to compare a measurement of at least one of the one or more regulated parameters with a reference value and to generate the signal based on results of the comparing.
5. The system of claim 1, where the reference value is based on a value defined by a control unit in the microcontroller.
6. The system of claim 1, further comprising:
- circuitry for adding quantums of energy to the one or more current sensing devices, the circuitry configured for receiving output from the microprocessor based on logic implementing the PWM fault mode.
7. The system of claim 6, where the circuitry is a DC/DC converter.
8. The system of claim 1, where the PWM fault mode is configured to manage at least two PWM outputs for performing the parameter regulating and fault detecting.
9. The system of claim 8, where the PWM fault mode is configured to force a first PWM output to an inactive value starting from a fault event to the end of a PWM cycle.
10. The system of claim 9, where the PWM fault mode is configured to cancel a subsequent active pulse on a second PWM output when a fault event occurs during an active period of the first PWM output.
11. The system of claim 10, where the PWM fault mode is configured to send an error signal when an active pulse on the second PWM output is not followed by an error detection during the subsequent active pulse on the first PWM output.
12. The system of claim 1, where the PWM fault mode is configured to maintain fault state information, and uses the fault state information in the fault detecting.
13. The system of claim 12, where the fault state information is reinitialized at each PWM cycle.
14. A method comprising:
- receiving a signal indicative of a state of one or more regulated parameters of one or more current sensing devices;
- regulating at least one of the one or more regulated parameters based on the signal; and
- monitoring for a fault in the one or more current sensing devices based on the signal,
- where the regulating and monitoring is at least partially implemented by two Pulse Width Modulation (PWM) signals that are generated based at least partially on the signal and PWM fault mode.
15. The method of claim 14, where the PWM fault mode is configured to force a first PWM signal to an inactive value starting from a fault event to the end of a PWM cycle.
16. The method of claim 15, where the PWM fault mode is configured to cancel a subsequent active pulse on a second PWM signal when a fault event occurs during an active period of the first PWM signal.
17. The method of claim 16, where the PWM fault mode is configured to send an error signal when an active pulse on the second PWM signal is not followed by an error detection during the subsequent active pulse on the first PWM signal.
18. The method of claim 14, where the PWM fault mode is configured to maintain fault state information, and the method further comprises using the fault state information in the fault detecting.
19. The method of claim 18, where the fault state information is reinitialized at each PWM cycle.
20. The method of claim 14, where monitoring for a fault further comprises:
- monitoring for at least one of an open current sensing device, a weak battery, or an current sensing device voltage that is under a target value.
Type: Application
Filed: Jun 8, 2011
Publication Date: Dec 13, 2012
Patent Grant number: 9167646
Applicant: ATMEL NANTES S.A.S. (Nantes)
Inventor: Karl Jean-Paul Courtel (Reze)
Application Number: 13/156,310
International Classification: H05B 41/16 (20060101);