LED constant-current driver and LED constant current driving method
Technical field
The present invention relates to circuit protection, particularly relate to a kind of LED constant-current driver and a kind of LED constant current driving method.
Background technology
Need when LED normally works to provide a constant direct current to it, so need a LED constant-current driver to convert line voltage to direct current be supplied to LED.As shown in Figure 1, LED constant-current driver structurally generally comprises by semiconductor diode D, inductance L, electric capacity C, resistance R and master power switch S.
In order to realize the accurate control to the electric current being supplied to LED load, general LED constant-current driver all needs a sampling resistor to be connected in main loop of power circuit, the information of output current can be obtained by carrying out the voltage signal at sampling resistor two ends sampling, and then realize the accurate control to output current by the mode of the ON time changing master power switch S.As shown in Figure 2, sampling resistor Rsen is connected in main loop of power circuit, and LED constant current driving chip IC obtains the electric current of sampling resistor Rsen, and master power switch S1 controls according to certain duty ratio turn-on and turn-off by LED constant current driving chip IC, thus controls output voltage.
In addition, in order to the input current reducing LED constant-current driver reduces the volume of driver to the harmonic pollution of electrical network, general LED constant-current driver also needs to adopt Active Power Factor Correction control technology, namely allows the waveform of input current follow input voltage waveform by controlling master power switch S1.
The potential danger that traditional LED constant-current driver exists is, once after sampling resistor is short-circuited, because the voltage signal at sampling resistor two ends is much smaller than output current benchmark, cause the ON time of power switch also to become large thereupon, cause the peak value of inductive current also to become large gradually thus.Under the effect of the inductive current increased gradually, output voltage can increase, and in circuit, the current stress of device also increases thereupon.If before output voltage does not reach the over-voltage protection point of output voltage, when inductive current has exceeded the maximum current that some device in circuit can bear, device can damaged or blast.When particularly the output capacitance of circuit employing is larger.
Summary of the invention
Based on this, be necessary to provide a kind of and can avoid sampling resistor short circuit and cause the LED constant-current driver of the damaged or blast of device in circuit.
In addition, a kind of LED constant current driving method is also provided.
A kind of LED constant-current driver, comprising: output electric current measure module, for obtaining power switch reset signal; Inductive current zero passage detection module, connects the inductance of external circuit, obtains inductive current; Rest-set flip-flop, set end connects described inductive current zero passage detection module, carries out set when receiving zero cross signal; Reset terminal connects the output of described output electric current measure module, resets receiving low level to during the signal of high level transition; Power switch driver, is connected between the output of rest-set flip-flop and the power switch of outside, for driving described external power switch according to the output signal of rest-set flip-flop; Also comprise: cycle tiemr, be connected with the set end of described rest-set flip-flop and receive the output of described inductive current zero passage detection module, start timing when receiving zero cross signal and after timing arrives Preset Time reset timer; Short circuit protection module, input connects described cycle tiemr, and output connects the clear terminal of described rest-set flip-flop, judge sampling resistor whether short circuit, if so, provide signal and turn off master power switch, otherwise holding circuit normally works, described cycle tiemr enters next cycle period; Wherein, described Preset Time is more than or equal to line voltage the most macrocyclic 1/2nd.
Wherein in an embodiment, described output electric current measure module comprises: current sample module, connects the sampling resistor of external circuit, obtains sample rate current; Operational amplifier, inverting input connects described current sample module and receives sample rate current input, and in-phase input end is connected with reference current source and receives reference current input; Output connects outside resistance-capacitance network; First comparator, inverting input connects the output of described operational amplifier, and output connects the reset terminal of described rest-set flip-flop; Waveform generator, is connected with described first comparator in-phase input end, transmits the ripple signal exported.
Wherein in an embodiment, described short circuit protection module comprises: voltage sample module, connects the sampling resistor of external circuit, obtains sampled voltage; Second comparator, in-phase input end connects described voltage sample module and receives sampled voltage input; Inverting input connects reference voltage source and also receives reference voltage input, and described reference voltage is the short-circuit voltage judging sampling resistor whether short circuit; Short-circuit protection unit; be connected respectively with the output of described cycle tiemr and the second comparator; judge whether the sampled voltage of described sampling resistor is less than or equal to described reference voltage all the time within a time-count cycle when described cycle tiemr timing arrives; if so, then exporting reset signal makes described rest-set flip-flop reset.
Wherein in an embodiment, the ripple signal that the waveform generator in described output electric current measure module exports is fixing, and when its peak value normally works with circuit, external resistor-capacitor network output end voltage value is equal, and its cycle is consistent with inductive current period of change.
Wherein in an embodiment, described waveform generator is triangular-wave generator.
A kind of LED constant current driving method, comprises the steps:
Detect the inductance of external circuit that is connected with LED constant-current driver and obtain the zero cross signal of inductive current;
Detect the resistance-capacitance network of the external circuit be connected with LED constant-current driver and obtain its output end voltage signal;
Detect the sampling resistor in the external circuit be connected with LED constant-current driver and obtain sample rate current;
Using the asserts signal of described zero cross signal as the rest-set flip-flop in described LED constant-current driver, described sample rate current is carried out processing the reset signal as described rest-set flip-flop;
Described rest-set flip-flop is according to described asserts signal and reset signal output drive signal;
Also comprise:
Utilize described zero cross signal trigger cycle timer, carry out the timing of Preset Time;
In described Preset Time, continue to judge the whether short circuit of described sampling resistor, if the sampling resistor still short circuit when described cycle tiemr timing arrives, then output reset signal makes described rest-set flip-flop reset.
Wherein in an embodiment, describedly judge that the step of sampling resistor whether short circuit specifically comprises:
The sampled voltage of sampling resistor and reference voltage are compared, the result that both compare exports short-circuit protection unit to by the second comparator;
When cycle tiemr timing arrives, whether described short-circuit protection unit judges sampling resistor voltage is less than or equal to reference voltage all the time within a time-count cycle, if so, then sampling resistor short circuit.
Wherein in an embodiment, describedly sample rate current carried out the step processed as the reset signal of described rest-set flip-flop specifically comprise:
Sample rate current and reference current are compared, the error signal that both produce is exported to the output of the resistance-capacitance network of external circuit and converts voltage signal to by operational amplifier;
Compared by the ripple signal of described voltage signal and waveform generator, the result that both compare exports the reset terminal of rest-set flip-flop to by the first comparator: reset to during the signal of high level transition receiving low level.
Above-mentioned LED constant-current driver and LED constant current driving method, the single-stage LED constant-current driver that can automatically identify band Active Power Factor Correction function normally works and the situation of sampling resistor short circuit, and the inductive current of the superelevation occurred in circuit after avoiding sampling resistor short circuit well causes blast or the damage of device.
Accompanying drawing explanation
Fig. 1 is the topology diagram of LED constant-current driver;
Fig. 2 is the main loop of power circuit circuit diagram of LED constant-current driver;
Fig. 3 is the LED constant-current driver function structure chart of an embodiment;
Fig. 4 is the schematic diagram of the LED constant-current driver of an embodiment;
Fig. 5 is the relevant conducting oscillogram that in LED constant-current driver embodiment illustrated in fig. 4, inductive current is corresponding;
Fig. 6 is the waveform correlation figure that constant current driver circuit for LED embodiment illustrated in fig. 4 normally works;
Fig. 7 is the waveform correlation figure of sampling resistor short circuit in traditional LED constant-current driver;
Fig. 8 is the waveform correlation figure of sampling resistor short circuit in the present invention;
Fig. 9 is the LED constant current driving method flow chart of an embodiment.
Embodiment
As shown in Figure 3, be the LED constant-current driver function structure chart of an embodiment.This LED constant-current driver comprises output electric current measure module 110, inductive current zero passage detection module 120, rest-set flip-flop 130, power switch driver 140, cycle tiemr 150 and short circuit protection module 160.Wherein output electric current measure module 110 is connected with the reset terminal of rest-set flip-flop 130, for obtaining the sample rate current of external sampling resistance, and exports reset signal according to described sample rate current.The input of inductive current zero passage detection module 120 connects the inductance of external circuit, obtain inductive current, it exports the set end of termination rest-set flip-flop 130, and after inductive current is completely discharged, inductive current zero passage detection module 120 pairs of rest-set flip-flops 130 send asserts signal.Between the output that power switch driver 140 is connected to rest-set flip-flop 130 and the power switch of external circuit, for driving described power switch according to the output signal of rest-set flip-flop 130, i.e. driving power switch conduction during rest-set flip-flop 130 set, when rest-set flip-flop 130 resets, driving power switch is turned off.Cycle tiemr 150 is connected with the set end of described rest-set flip-flop 130 and receives the output of described inductive current zero passage detection module 120, starts timing and arrive reset timer after Preset Time in timing when receiving zero cross signal.Short circuit protection module 160 is for judging sampling resistor whether short circuit.Concrete, when sampling resistor both end voltage is greater than sampling resistor short reference voltage, holding circuit normally works; When sampling resistor both end voltage is less than sampling resistor short reference voltage, sampling resistor short circuit is described, provides signal and turn off master power switch.
As shown in Figure 4, be the schematic diagram of LED constant-current driver of an embodiment.Output electric current measure module 110 comprises: current sample module 111, operational amplifier U1, the first comparator U2 and triangular-wave generator 114.Current sample module 111 connects the sampling resistor (D, E pin by figure) of external circuit, obtains sample rate current and is input to the inverting input (-) of operational amplifier U1.The inverting input (-) of operational amplifier U1 connects current sample module 111 and receives sample rate current input, and in-phase input end (+) is connected with reference current source and receives reference current input; The output of operational amplifier U1 connects outside resistance-capacitance network (the C pin by figure).The output of the first comparator U2 inverting input (-) concatenation operation amplifier U1, in-phase input end (+) is connected with triangular-wave generator 114 and receives triangular wave input.The output of the first comparator U2 connects the reset terminal of rest-set flip-flop 130.
The input of inductive current zero passage detection module 120 connects the inductance (the B pin by figure) of external circuit, obtain inductive current, it exports the set end of termination rest-set flip-flop 130, after inductive current is completely discharged, inductive current zero passage detection module 120 pairs of rest-set flip-flops 130 send asserts signal.Between the output that power switch driver U4 is connected to rest-set flip-flop 130 and the power switch of outside, for driving described power switch according to the output signal of rest-set flip-flop 130, i.e. driving power switch conduction during rest-set flip-flop 130 set, when rest-set flip-flop 130 resets, driving power switch is turned off.Cycle tiemr 150 is connected with the set end of described rest-set flip-flop 130 and receives the output of described inductive current zero passage detection module 120, starts timing and arrive reset timer after Preset Time in timing when receiving zero cross signal.
Short circuit protection module 160 comprises: voltage sample module 161, second comparator U3, short-circuit protection unit 163.Voltage sample module 161 connects the sampling resistor (D, E pin by figure) of external circuit, obtains sampled voltage; Second comparator U3 in-phase input end (+) connects described voltage sample module 161 and receives sampled voltage input; Inverting input (-) connects reference voltage source and also receives reference voltage input, and described reference voltage is the short-circuit voltage judging sampling resistor whether short circuit.One of them input of short-circuit protection unit 163 is connected with described cycle tiemr 150; another input is connected with the output of the second comparator U3; judge whether the sampled voltage of described non-essential resistance is less than or equal to described short-circuit voltage all the time within a time-count cycle when described cycle tiemr 150 timing arrives; if so, then exporting reset signal makes described rest-set flip-flop 130 reset.
The operation principle of circuit is described with the circuit diagram shown in Fig. 4 below.
Current sample module 111 is connected with external circuit port pinout E and D, obtains the voltage signal at external circuit sampling resistor two ends, and then through current sample module 111 output current sampled result, this result inputs as the homophase of operational amplifier U1.The anti-phase input of operational amplifier U1 is reference current, the error signal that both produce is by the external resistor-capacitor network exporting the connection of C end to of operational amplifier U1, then convert voltage signal to, hold the time constant of the resistance-capacitance network connected that C terminal voltage signal can be made to change by control C very little.C terminal voltage signal is as the anti-phase input of the first comparator U2, input with the triangular signal of the fixed slope positive as the first comparator U2, the reset terminal that both export rest-set flip-flop to by the first comparator U2 more afterwards can obtain fixing ON time Ton.After the ON time in each switch periods reaches Ton, the master power switch change that A end connects is turned off.Inductive current zero passage detection module 120 obtains external circuit inductive current by outside port pin B, its output is connected with the set end of rest-set flip-flop, after the inductive current in external circuit is completely discharged, send signal by rest-set flip-flop set, the power switch driver U4 be then connected between the output of rest-set flip-flop and the power switch pin A of outside drives master power switch to make its conducting again.The relevant conducting oscillogram that in LED constant-current driver embodiment illustrated in fig. 4, inductive current is corresponding as shown in Figure 5.
Figure 6 shows that the waveform correlation figure that LED constant-current driver embodiment illustrated in fig. 4 normally works, because the time cycle of the master power switch conducting of the main loop of power circuit that LED constant-current driver is external is fixing, the electric current at inductive current, sampling resistor two ends can realize the line voltage sinusoidal variations of following input.Traditional LED constant-current driver does not have short block, once after sampling resistor is short-circuited, just there will be situation as shown in Figure 7, sampling resistor both end voltage signal can much smaller than reference current, under the effect of feedback loop, C pin voltage will raise gradually, so rest-set flip-flop can to obtain master power switch ON time elongated because can not get reset enable signal, thus cause the peak value of inductive current followed by becoming large gradually, finally can cause device failure or blast because inductive current exceedes electric current that in circuit, some device can bear.So the present invention adds short circuit protection module and cycle tiemr on the basis of previous circuit, specific as follows:
The positive of sampling resistor voltage sample result as the second comparator U3 inputs by the voltage sample module be connected with external circuit port pinout E and D; short-circuit voltage connects the inverting input of the second comparator U3 as sampling resistor short reference, both through the second comparator U3 relatively after export short-circuit protection unit to.
After inductive current zero crossing is detected, after the inductive current namely in external circuit is completely discharged, circulation timing module starts to start timing, and after timing time reaches, timing module automatically resets timer.After each timing terminates, whether the voltage at short-circuit protection unit judges sampling resistor two ends is greater than over-sampling resistive short reference voltage before timing terminates: if the voltage at sampling resistor two ends was greater than this reference voltage, then illustrate that circuit working is normal; Otherwise sampling resistor short circuit is described, forces immediately to reset rest-set flip-flop, make A hold the master power switch of connection to stop conducting.During owing to normally working, the voltage at sampling resistor two ends also may lower than sampling resistor short reference, so be more than or equal to line voltage the most macrocyclic 1/2nd time-count cycle of cycle tiemr.The waveform correlation figure of the sampling resistor short circuit that the present invention is concrete as shown in Figure 8; once sampling resistor is short-circuited; at the end of the timing of cycle tiemr current period, just can start short-circuit protection unit, thus force rest-set flip-flop reset and stop the conducting of master power switch in time.
As shown in Figure 9, be the LED constant current driving method flow chart of an embodiment, the method specifically comprises the steps.
Step S101: the inductance, resistance-capacitance network, the sampling resistor that detect the external circuit be connected with LED constant-current driver respectively.
In the present embodiment, detect the inductance of the external circuit be connected with LED constant-current driver mainly in order to obtain the zero cross signal of inductive current, detect the resistance-capacitance network of the external circuit be connected with LED constant-current driver mainly in order to obtain its output end voltage signal, the sampling resistor in the external circuit that detection is connected with LED constant-current driver is mainly in order to obtain sample rate current.
The set of step S102:RS trigger or reset at set trigger cycle timer simultaneously.
In the present embodiment, using the zero cross signal of acquisition as the asserts signal of the rest-set flip-flop in described LED constant-current driver, the sample rate current of acquisition is carried out processing the reset signal as rest-set flip-flop.Such rest-set flip-flop will according to described asserts signal and reset signal output drive signal.And utilize described zero cross signal trigger cycle timer, carry out the timing of Preset Time.
Step S103: judge the whether short circuit of described sampling resistor when cycle tiemr timing arrives.
In the present embodiment, in Preset Time, can continue to judge the whether short circuit of described sampling resistor.If sampling resistor does not have short circuit when cycle tiemr timing arrives, then turn back to step S101.Otherwise perform step S104.
Step S104: export reset signal and described rest-set flip-flop is reset.
Wherein, step S103 judge that the step of sampling resistor whether short circuit specifically comprises:
The sampled voltage of sampling resistor and reference voltage are compared, the result that both compare exports short-circuit protection unit to by the second comparator.When cycle tiemr timing arrives, whether described short-circuit protection unit judges sampling resistor voltage is less than or equal to reference voltage all the time in a cycle period, if so, then sampling resistor short circuit.
In addition, sample rate current carried out the step processed as the reset signal of described rest-set flip-flop specifically the comprising of step S101:
Sample rate current and reference current are compared, the error signal that both produce is exported to the output of the resistance-capacitance network of external circuit and converts voltage signal to by operational amplifier.Then compared by the ripple signal of described voltage signal and waveform generator, the result that both compare exports the reset terminal of rest-set flip-flop to by the first comparator: reset to during the signal of high level transition receiving low level, otherwise do not reset.
The above embodiment only have expressed several execution mode of the present invention, and it describes comparatively concrete and detailed, but therefore can not be interpreted as the restriction to the scope of the claims of the present invention.It should be pointed out that for the person of ordinary skill of the art, without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection range of patent of the present invention should be as the criterion with claims.