This invention relates generally to semiconductor circuits, and more particularly to a system and method for non-linear dimming of a light source.
In places that require variable illumination, such as homes, theaters, auditoriums, and the interiors of automobiles, it is desirable to gradually change the level of illumination in order for the human eye to comfortably adapt to changes in light intensity. Such a change in illumination is achievable via electronic and computer control, from computer controlled interior lighting systems to simple light dimmer circuits.
As the requirements for lighting systems have become more sophisticated, however, the circuitry required to support time variable lighting control has required high system and circuit complexity, precise analog components, and high resource demands both in terms of circuit board area and the number of required electronic components. The interior of an automobile, for example, may require at least a dozen lights, each of which are independently controllable. While a microcontroller can be used to generate independent pulse modulated signals to vary the intensity of each light, the disadvantage of such an approach is that microcontrollers typically have a limited number of available hardware resources such as timers, interrupt lines, and general purpose I/O pins. The use of software and CPU resources to track and control dimming profiles of multiple lights leaves fewer resources available to other automotive applications such as power train and safety systems.
In the field of illumination systems, what are needed are cost effective systems for the control of light intensity.
In one embodiment, a light dimming module is disclosed. The light dimming module has a dimming engine coupled to a digital input interface and an output interface. The dimming engine is configured to provide a N-segment piecewise linear exponential digital control signal, and the output interface is configured to control the intensity of a light source.
The foregoing has outlined, rather broadly, features of the present invention. Additional features of the invention will be described, hereinafter, which form the subject of the claims of the invention. It should be appreciated by those skilled in the art that the conception and specific embodiment disclosed may be readily utilized as a basis for modifying or designing other structures or processes for carrying out the same purposes of the present invention. It should also be realized by those skilled in the art that such equivalent constructions do not depart from the spirit and scope of the invention as set forth in the appended claims.
For a more complete understanding of the present invention, and the advantages thereof, reference is now made to the following descriptions taken in conjunction with the accompanying drawings, in which:
a illustrates another embodiment dimming engine;
b illustrates a threshold diagram of an embodiment dimming engine;
a-c illustrate timing diagrams and dimming curves of the further embodiment dimming engine;
Corresponding numerals and symbols in different figures generally refer to corresponding parts unless otherwise indicated. The figures are drawn to clearly illustrate the relevant aspects of embodiments of the present invention and are not necessarily drawn to scale. To more clearly illustrate certain embodiments, a letter indicating variations of the same structure, material, or process step may follow a figure number.
The making and using of embodiments are discussed in detail below. It should be appreciated, however, 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.
The present invention will be described with respect to embodiments in a specific context, namely a light-dimming engine. Embodiments of this invention may also be applied to other circuits and systems that require non-linear control of time varying signals.
An automotive light control system 100 according to an embodiment of the present invention is illustrated in
Controller 102 is implemented as a microcontroller and serial interface 106 is implemented as a local interconnect network (LIN) in an embodiment of the present invention. In automotive applications, a single controller 102 can address multiple light dimming modules 104 via bus 118. In alternative embodiments of the present invention, other bus types can be used besides a LIN bus, for example, a controller area network (CAN) bus, a SPI bus, I2C bus, UART bus, and many others.
To change the illumination intensity of LED 114, a digital command is transmitted from controller 102 to digital interface 106. In an embodiment, the digital control word contains a starting intensity level D0, a final intensity level D1 and a transition time factor N. In other embodiments, the digital control word can contain other command words representative of illumination intensities and illumination transition times. Dimming engine 108 receives a command from serial interface 106 via bus 120 and generates a time varying digital signal 122 representative of a controlled illumination level that smoothly transitions from starting intensity level D0 to final intensity level D1 over a predetermined transition time controlled by transition time factor N. The transition from D0 to D1 can be a linear transition or a non-linear transition. In other embodiments, other digital formats can be used, for example, a format that provides a command for a dim up transition time, a dim down transition time, and a desired final illumination level, in which case the starting illumination level is derived from a final state of the dimming engine, or is zero if the dimming engine was started from a reset state.
In an embodiment of the present invention, pulse modulator 110 is implemented by a sigma-delta modulator that generates a pulse train of a particular density at output 124 of pulse modulator 110. In alternative embodiments, other architectures for pulse modulator 110 can be used, for example, a pulse width modulator (PWM), or other forms of pulse density modulators (PDM). Current driver 112 converts the pulse train at output 124 to an appropriate drive current for LED 114. In alternative embodiments of the present invention, pulse modulator 110 can be implemented with other circuits such as counters, decimators, and other circuits that use other pulse modulation methods besides sigma-delta modulation. In further embodiments of the present invention, digital output 112 of dimming engine 108 can be converted to the analog domain and used to directly drive a light source. Furthermore, in alternative embodiments of the present invention, other illumination sources besides a LED can be used, for example, an incandescent light bulb. In the case of alternative light sources, an appropriate driving circuit can replace current driver 112.
Turning to
p=k ln(S/S0),
where p is a variable related to perception, S is a level of stimulus, and S0 is a threshold of stimulus below which stimulus is not perceived, and k is an experimentally derived constant.
In an embodiment of the present invention, an exponential dimming profile is approximated by a piecewise linear approximation as shown, for example, in
In an embodiment of the present invention, piecewise linear segments are implemented digitally by a counter whose clock frequency is set for each segment according to the slope to be reproduced. Thresholds are identified so that fading up and down between two contiguous thresholds follows a linear trajectory. The time duration each segment is preferably chosen to be less than a predetermined time, so that steps in illumination intensity are imperceptible or barely perceptible by the human eye, having a frequency at about or greater than 25 Hz. In some embodiments, the duration of all piecewise linear segments are the same, whereas in other embodiments, the time duration of some segments may exceed the time duration of other segments. For example, in some embodiments, the time duration of piecewise linear segments at low light intensities are extended to provide a smoother transition and to better approximate the exponential characteristic.
In embodiments of the present invention, circuit 500 is configured to provide a predetermined transition time Ttot from an initial level to a final level. Preferably, the predetermined transition time is different for a positive dimming transition time Ttot(up) than for a negative dimming transition time Ttot(down). For example, in an embodiment, Ttot(up) is about 0.7 seconds and Ttot(down) is about 1.7 seconds. In alternative embodiments of the present invention, Ttot(up) and Ttot(down) can comprise other transition times. For 12 bits of dim resolution (0-4095) at Dimming_value, and for a tail (0-31) with a constant slope factor of 256, the maximum time for having dim steps occur at a frequency greater than 25 Hz is 2 seconds. In some embodiments, slower transition periods can also be used. Curve and level modifications are preferably greater than a dim step frequency of 25 Hz.
In order to achieve a predetermined transition time regardless of the number of segments, the frequency of Clk_slope is scaled to achieve a predetermined transition time, Ttot(up) or Ttot(down), regardless of the number of segments between initial and final values. For example, consider two cases with reference to the diagram of
Freq_Clk_slope(Case 2, Sx)= 2/4 *Freq_Clk_slope(Case 1, Sx), where x=1, 2. Where Freq_Clk_slope is the frequency of Clk_slope.
Generally, the relationship between the frequency of Clk_slope, the number of piecewise linear segments is:
Freq_slope—N(Sx)=Freq_slope_tot(Sx)*N/D,x=0, 1, . . . , D−1 (Formula A)
where,
N is the number of segments between the start level and the stop level;
D is the total number of segments of the dimming curve (in the example the number of segment between L_0 and L_4→D=4);
Freq_slope_tot(Sx) the frequency needed to set the slope of a single segment Sx of the curve when the start level is the lower(L_0) and the stop level is the higher(L_4); and
Freq_slope_N(Sx) the frequency needed to set the slope of a single segment Sx of the curve when the number of segments between start level and stop level is N. Formula A indicates that Clock Dividers 506 provides an output signal whose frequency is linked to an input frequency by a ratio of N/D. In embodiments of the present invention, Clock Dividers 506 adapts the frequency of Clk_slope as a linear function of N and Freq_slope_tot(Sx). (i.e., Freq_Clk_slope(Sx)=Function (N, Freq_slope_tot(Sx)).)
With respect to clock divider 610, Clk_Divider_N 612 produces Clk_N as a function of the number of segments N, as described by Formula A hereinabove. Clk_Divider_T 614 produces Clk_T, the frequency of which is a function of a duration of the transition Ttot and Clk_Divider_S 616 produces Clk_S as a function of a slope of a current piecewise linear segment. In some embodiments, Clk_Divider_N 612 can be replaced by a decimator that generates Clk_N to have an average frequency of
FClk—N=(N/D)*Fclk—T (Formula B)
where,
FClk_N is the average frequency of Clk_N;
Fclk_T is the average frequency of Clk_T;
N is the number of segments between the start level and the stop level; and
D is the total number of segments of the dimming curve.
In an embodiment, the decimator removes (D-N) pulses in a group of D elements using, for example, pulse swallowing or other decimation techniques. Division ratios Div_N and Div_T are preferably set at the beginning of an intensity transition or dimming cycle and their values remain constant during the intensity transition or dimming cycle. On the other hand, Div_S changes when a threshold is reached in order that the output of Dim Counter 606 follows a piecewise linear curve. In alternative embodiments of the present invention, Div_N and Div_T can vary during an intensity transition or dimming cycle.
a illustrates embodiment dimming engine 800, configured to implement 12 piecewise linear segments, in which Clk_Divider_N 612 of
To eliminate all the visible steps of the dimming curve in an embodiment of the present invention, the lower tail of the exponential curve is accelerated. As shown in Table 1, the first five segments have the same slope, in order to create a single segment with double length 2*Tseg, where Tseg is the number of periods of Prescaled_clk that compose a basic segment. In some embodiments, acceleration of the tail may be insufficient to eliminate all the visible steps, so programmable levels are set only for levels 6-12. This is to ensure that dim levels are incremented at a rate of greater than about 24 Hz. If the dim levels are incremented at a lower rate, visible blinking of the LED could result. Therefore, when the transition is between the levels 0 and 6 the curve consists of 2 segments. The first segment has a slope of 255 and a length of 2*Tseg, while the second segment has a slope of 127 and a duration of Tseg, for a total time duration of 3*Tseg. In an embodiment, dimming engine 800 produces a curve having 8 segments with a same length of Tseg, except for the first segment that has a length of 3*Tseg.
Logic_block 808 outputs parameter timesteps2go to N/12 decimator 812. Timesteps2go represents the number (N) of segments between the start and stop level. In an embodiment, N/12 decimator 812 removes (12−timesteps2go) pulses every 12 Clk_main—2 clock cycles with a few exceptions where the first segment is compensated, in which case, 3 is subtracted from timesteps2go. These subtractions preferably occur at the beginning of the dimming period. For example:
Start level=0,Stop level=6→“timesteps2go”=6−3=3;
Start level=12,Stop level=0→“timesteps2go”=12−3=9; and
Start level=6,Stop level=11→“timesteps2go”=(11−6)=5.
In an alternative embodiment of the present invention, the first few segments are not compensated or are compensated by different values. Inputs to Logic_block 808 includes dimlevel, which represents a target illumination level, and Duration, which represents an up/down transition time.
In an embodiment, the dimming module system uses a clock source Clk_main—2 with a frequency of 256 kHz that is input to N/12 Decimator 812. The output of N/12 Decimator 812 is a clock whose frequency is function of the number of segments to be crossed during the intensity transition. In an embodiment, the device is set to provide two transition durations: a fade-up time of about 0.7 seconds and a fade-down time of about 1.7 seconds. In alternative embodiments, different valued for fade-up and fade-down time can be used, or the durations of the fade-up and fade-down times can be made to be programmable.
Prescaler_T 814 adjusts the frequency of decimated_clk, depending on whether dimming engine 800 is experiencing a fade-up transition or a fade-down transition. In the case of a fade-up transition, prescaler_T 814 divides the frequency of Decimated_clk by 4, and, in case of a fade-down transition, prescaler_T 814 divides the frequency of Decimated_clk by 9 to produce Prescaled_clk. In alternative embodiments of the present invention, other division ratios can be used for Prescaler_T 814.
Clock generator 816 divides Prescaled_clk by a factor of Lut_data+1. The +1 addendum to Lut Data is due to the particular implementation of the divider block because the embodiment divider counter counts from 0 to Lut_data. In alternative embodiments, other adjustments, or no adjustments may be necessary. Lut_data changes every time that a comparison threshold is reached by dim_out, and its value is inversely proportional to the slope of the segments. Lut_data value is listed as a function of the comparison threshold in Table 1 hereinabove. Exponential clock Exp_clk provided by Clock Generator 816 is provided to Dimming Counter that increments or decrements Dim_out by a unit at each edge of Exp_clk, to correspond to a fade up or down transition. Dim_out is the output of the Dimming Engine and could be used as an input to pulse modulator 110 shown in
In alternative embodiments of the present invention, other transition values can be associated with the codes. These values are hard coded in some embodiments, and programmable in other embodiments. For example, programmable values can be stored in the same memory as the counter thresholds. Decimation action is performed prior to transition prescaling in order to minimize time resolution error, since the clock period is lower at this point.
Up_dwn_prescaled_clk is used by exp clock generator 968, which generates expclk according to the lut_data input. The frequency of expclk modulates the counting slope of the exponential in/decrementer 970 to follow a trajectory of a piecewise linear approximation of an exponential curve. Dimout is used by level discriminator 966 to provide a current level sector of the curve so that dimcurrentlevel[4:0] becomes the address of exponential LUT 964 (lookup table), whose output is lut_data.
Dim level threshold generator 952 determines a desired output threshold to be reached by the dimming module. When the dimming function is not being used, the desired output threshold represents an output set point. Dimlevel_threshold is used by exponential in/decrementer 970 and also by the transition level number calculator 960, whose output timesteps2go is used by decimator 956. For example, if dimlevel_threshold is greater than dimout, in/decrementer 970 is incremented. If, on the other hand, dimlevel_threshold not is less than dimout, in/decrementer 970 is decremented. If the current value of in/decrementer 970 is held. Transition level number calculator 960 calculates the number of transition levels to cross at the beginning of a transition, based to the current dim level (dimout) and the desired level (dimlevel also coded as dimlevel_threshold).
Dim enable generator 962 enables all the other dimming engine components when the current dim output value dimout[11:0] and the desired dim value (dimlevel threshold[11:0]) do not match. Acknowledge generator 972 asserts signal acknowledge at the end of a dimming transition.
Table 3 illustrates slopes of the linear sections of the piecewise linear approximated exponential curve of the embodiment dimming engine 950 shown in
It should be noted that alternative embodiment dimming engines can possess an arbitrary number of dimming levels depending on the particular application and its specifications.
a-c illustrates a waveform diagrams illustrating the operation of the embodiment dimming engine 950 of
One advantage of embodiments of the present invention includes structural simplicity in that embodiment systems include basic digital blocks. Another advantage is that, in embodiments, smooth fading down to no-light and smooth fading up from no-light is achievable without the need of a high frequency clock and/or complicated arithmetic.
It will also be readily understood by those skilled in the art that materials and methods may be varied while remaining within the scope of the present invention. It is also appreciated that the present invention provides many applicable inventive concepts other than the specific contexts used to illustrate embodiments. Accordingly, the appended claims are intended to include within their scope such processes, machines, manufacture, compositions of matter, means, methods, or steps.
This application is a continuation of U.S. patent application Ser. No. 12/564,362, entitled “System and Method for Non-Linear Dimming of a Light Source,” filed on Sep. 22, 2009, which application is incorporated herein by reference. This application relates to the following co-pending and commonly assigned EPO patent application: Application number EP09155019.4, filed Mar. 12, 2009, entitled “Sigma Delta Current Source and LED Driver,” which application is hereby incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
Parent | 12564362 | Sep 2009 | US |
Child | 13661928 | US |