CN108112125B - Five-in-one dimming circuit and dimming method - Google Patents

Five-in-one dimming circuit and dimming method Download PDF

Info

Publication number
CN108112125B
CN108112125B CN201711453790.9A CN201711453790A CN108112125B CN 108112125 B CN108112125 B CN 108112125B CN 201711453790 A CN201711453790 A CN 201711453790A CN 108112125 B CN108112125 B CN 108112125B
Authority
CN
China
Prior art keywords
dimming
resistor
circuit
mode
microcontroller
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711453790.9A
Other languages
Chinese (zh)
Other versions
CN108112125A (en
Inventor
陈培国
俞才龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yang Xu
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CN201711453790.9A priority Critical patent/CN108112125B/en
Publication of CN108112125A publication Critical patent/CN108112125A/en
Application granted granted Critical
Publication of CN108112125B publication Critical patent/CN108112125B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H05ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
    • H05BELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
    • H05B45/00Circuit arrangements for operating light-emitting diodes [LED]
    • H05B45/10Controlling the intensity of the light
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02BCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
    • Y02B20/00Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
    • Y02B20/30Semiconductor lamps, e.g. solid state lamps [SSL] light emitting diodes [LED] or organic LED [OLED]

Landscapes

  • Circuit Arrangement For Electric Light Sources In General (AREA)

Abstract

The invention discloses a five-in-one dimming circuit and a dimming method, wherein the five-in-one dimming circuit comprises a microcontroller working circuit, a dimming output circuit, a communication interface circuit, a resistor or voltage sampling circuit and a PWM sampling dimming circuit, the microcontroller working circuit comprises a microcontroller, a communication receiving end RXD and a communication transmitting end TXD of the communication interface circuit are correspondingly connected with the microcontroller, a DIM access end is arranged on each of the communication interface circuit, the resistor or voltage sampling circuit and the PWM sampling dimming circuit, and the microcontroller is connected with the PWM sampling dimming circuit, the resistor or voltage sampling circuit and the communication interface circuit to realize automatic switching of the resistor and 0-10V, PWM and switching of time preset time. The invention can realize multiple dimming functions in one circuit, has the independent dimming or combined dimming functions of 0-10V, PWM, resistance and time control, and finally has more powerful dimming function.

Description

Five-in-one dimming circuit and dimming method
Technical Field
The invention relates to an intelligent lighting dimming circuit, in particular to a five-in-one dimming circuit and a dimming method.
Background
Energy conservation and environmental protection have become a new subject of world facing research, and LED lighting has been generated to initiate the world lighting revolution. By replacing the traditional light source with the LED light source, primary energy saving can be realized; the introduction of intelligent illumination can realize the secondary energy conservation of the LEDs and the conversion of illumination management modes on the basis of primary energy conservation.
To embody the advantage of intelligent illumination, the illumination terminal has to be provided with sensitive response, rich functions, safety and reliability. The lighting terminal in an LED intelligent lighting system is composed of an LED light source, an LED driver and a dimming controller. The dimming controller controls the LED driver by outputting PWM signals or 0-10V analog signals, and the LED driver outputs different levels of current to the LED light source according to the dimming signals, so that the LEDs generate different brightness.
According to the types of dimming control signals, the dimming control signals can be divided into silicon controlled dimming, 0-10V dimming, variable resistance dimming, pulse Width Modulation (PWM) dimming and the like, and the collected signals of the dimming of the structural circuit cannot be combined due to different signals, so that the current dimming circuit has a single dimming function, different ports are required to be connected for diversifying the dimming function, thereby bringing trouble to customers, and therefore, how to relate to a multifunctional dimming circuit which is convenient for the customers to operate is particularly important.
Disclosure of Invention
The invention aims to solve the defects of the prior art and provide a five-in-one dimming circuit and a dimming method which have a multifunctional dimming function, can realize automatic combination dimming and are convenient for customers to operate.
In order to achieve the above purpose, the five-in-one dimming circuit designed by the invention comprises a microcontroller working circuit, a dimming output circuit, a communication interface circuit, a resistor or voltage sampling circuit and a PWM sampling dimming circuit, wherein the microcontroller working circuit comprises a microcontroller U1, a communication receiving end RXD of the communication interface circuit is connected with a USART_RX/AIN6/PD6 end of the microcontroller U1, a communication transmitting end TXD of the communication interface circuit is connected with a USART_TX/AIN5/PD5 end of the microcontroller U1, a DIM access end is arranged on each of the communication interface circuit, the resistor or voltage sampling circuit and the PWM sampling dimming circuit, and the microcontroller U1 is also connected with the PWM sampling dimming circuit, the resistor or voltage sampling circuit and the communication interface circuit to realize automatic switching of resistor dimming, 0-10V dimming and PWM dimming and switching of time preset timing through detection and judgment of DIM signals.
Further, in order to make the circuit simpler and more stable, the microcontroller work circuit further comprises a first capacitor C1, a second capacitor C2, a third capacitor C3, a fourth capacitor C4, a second resistor R2, a crystal oscillator CY1 and a programming interface PROG, the VDD pin of the microcontroller U1 is connected with one end of the third capacitor C3, the VCAP pin of the microcontroller U1 is grounded GND through one end of the fourth capacitor C4, two ends of the crystal oscillator CY1 are respectively connected with one end of the first capacitor C1 and one end of the second capacitor C2, the other end of the first capacitor C1 and the other end of the second capacitor C2 are connected with the ground GND, the common end of the crystal oscillator CY1 and the first capacitor C1 is connected with the OSCIN/PA1 pin of the microcontroller U1, the common end of the crystal oscillator CY1 and the second capacitor C2 is connected with the OSCOUT/PA2 pin of the microcontroller U1, and the PD1 (HS)/SWIM pin and the NRST pin of the microcontroller U1 are respectively connected with the 2 pin and the 4 pins of the programming interface PROG.
Further, in order to make the circuit simpler and more stable, the resistor or voltage sampling circuit includes a second PNP triode Q2, a third NPN triode Q3, an eleventh resistor R11, a twelfth resistor R12, a thirteenth resistor R13, a fourteenth resistor R14, a first voltage regulator Z1 and a first diode D1, wherein a base of the third NPN triode Q3 is connected with a PC4 (HS)/AIN 2/tim1_cc4/clk_cco end of the microcontroller U1 through the eleventh resistor R11, a collector of the third NPN triode Q3 is connected with a base of the second PNP triode Q2 through the thirteenth resistor R13, an emitter of the second PNP triode Q2 is connected with a +12v supply voltage through the fourteenth resistor R14, the twelfth resistor R12 and the first voltage regulator Z1 are connected in parallel between the base of the second PNP triode Q2 and the +12v supply voltage, a collector of the second triode Q2 is connected with an anode end of the first diode D1, and a cathode end of the first diode D1 is connected with a cathode end of the PNP.
Further, in order to make the circuit simpler and more stable, the PWM sampling dimming circuit 5 includes a first operational amplifier U2B, a twelfth capacitor C12 and a twenty-second resistor R22 connected in parallel, a twenty-third resistor R23 and a twenty-first resistor R21, where the non-inverting input end of the first operational amplifier U2B is connected to one end of the twenty-third resistor R23, the other end of the twenty-third resistor R23 is used as a DIM access end, the non-inverting input end of the first operational amplifier U2B and the common end of the twenty-third resistor R23 are connected to one end of the common end of the twelfth capacitor C12 and the twenty-second resistor R22, the inverting input end of the first operational amplifier U2B is connected to the output end of the first operational amplifier U2B, and the output end of the first operational amplifier U2B is connected to the PD3 (HS)/AIN 4/tim2_cc2/adc_etr end of the microcontroller U1 through the twenty-first resistor R21.
Further, in order to make the circuit simpler and more stable, the communication interface circuit includes a fifteenth resistor R15, a sixteenth resistor R16, a seventeenth resistor R17, a twentieth resistor R20, a nineteenth resistor R19, a fifth fet Q5, a fourth fet Q4, a seventh fet Q7 and a sixth fet Q6, wherein a common terminal connected between the drain D of the fourth fet Q4 and the +5v voltage is connected through the fifteenth resistor R15, and the fifteenth resistor R15 and the drain D of the fourth fet Q4 is used as a communication receiving terminal RXD, a gate G of the fourth fet Q4 is connected with a +5v voltage through the sixteenth resistor R16, and a common terminal connected between the gate G of the fourth fet Q4 and the sixteenth resistor R16 is used as a PWM detection receiving control terminal CHKPWM and is connected with a PD4 (HS)/2_cc 1/BEEP/usck of the microcontroller U1, a gate G of the fourth fet Q4 is also connected with the drain of the fifth fet Q5 through the fifteenth resistor R15, and the drain D5 is connected with the drain of the seventeenth resistor Q7 through the seventeenth resistor R16, and the drain 7 is connected with the drain 7 of the seventeenth resistor Q7 through the seventeenth resistor R17, and the drain 7 is connected with the drain 7 of the seventeenth resistor Q5.
Further, in order to make the circuit simpler, the dimming output circuit includes a second operational amplifier U2A, a fifth resistor R5, a fourth resistor R4, a third resistor R3 and a tenth capacitor C10, where the non-inverting input end of the second operational amplifier U2A is connected to the PC3 (HS)/TLI/tim1_cc3/usart_ck end of the microcontroller U1 through the fourth resistor R4, and a fifth resistor R5 and a tenth capacitor C10 are connected in parallel between the non-inverting input end of the second operational amplifier U2A and the common end of the fourth resistor R4 and the ground GND, the inverting input end of the second operational amplifier U2A is connected to the output end of the second operational amplifier U2A, the output end of the second operational amplifier U2A is connected to the third resistor R3, and the other end of the third resistor R3 serves as a dimming output port.
In order to make the circuit output more stable, no interference signal influences, be connected with ninth electric capacity C9 between this light modulation delivery outlet and the ground GND.
The invention also discloses a dimming method of the five-in-one dimming circuit, which specifically comprises the following steps:
s1, initializing a system, and reading the voltage of a DIM access terminal by acquiring the closing and opening of a constant current source formed by a resistor or a voltage sampling circuit;
s2, judging whether the voltage of the two-time read DIM access terminal is larger than 5V; if yes, go to step S3, if not, go to step S5;
s3, forcibly pulling down the short voltage of the DIM access terminal voltage, and entering a step S4;
s4, judging whether the voltage is pulled down or not; if yes, the current source is started, and the current mode is set into a data communication mode, so that the communication interface circuit works; if not, the step S5 is entered;
s5, reading data of an EEPROM memory in the microcontroller U1, judging whether the data is in an automatic dimming mode, if so, automatically judging the mode of a dimming input signal, and dimming according to the output of the mode; if not, the step S6 is entered;
s6, judging whether the communication dimming mode is adopted; if yes, turning on a current source, setting a data communication mode in the current mode, otherwise, entering step S7;
s7, judging whether the timing dimming mode is adopted; if yes, turning off the current source, setting the current mode as a timing dimming mode, otherwise, entering step S8;
s8, judging whether the resistance dimming mode is adopted; if yes, turning on a current source, setting the current mode as a resistance dimming mode, otherwise, entering step S9;
s9, judging whether the dimming mode is a 0-10V dimming mode; if yes, turning on a current source, setting the current mode as a 0-10V dimming mode, otherwise, entering step S10;
s10, judging whether the PWM dimming mode exists or not; if yes, the current source is turned off, the current mode is set as a PWM dimming mode, if not, the current source is turned on, and the current mode is set as a data communication mode.
Further convenient operation, the specific steps of automatically judging the mode of the dimming input signal in the step S5 and dimming according to the output of the mode are as follows:
s51, three dimming modes of 0-10V, PWM and resistance are automatically judged;
s52, starting PWM capturing;
s53, if a PWM signal is detected, closing a current source formed by a resistor or a voltage sampling circuit, and setting the current mode as a PWM dimming mode; no, go to step S54;
s54, closing PWM capturing;
s56, judging whether the voltage is smaller than 0.5V when the current source is turned off or larger than 5V when the current source is turned on, if so, turning off the current source, setting the mode as full power output, and suspending the input end; no, go to step S56;
s56, judging whether the voltage is smaller than 0.5V when the current source is turned off or larger than 0.1V when the current source is turned on, if so, the current source is turned on, and the current source setting mode is a resistance dimming mode; no, step S57 is entered;
s57, turning on a current source, and setting the current mode as a 0-10V dimming mode.
The five-in-one dimming circuit and the dimming method have the following advantages:
1. the dimming input of 0-10V is supported (1-10V compatible), the upper limit and the lower limit can be flexibly set during specific setting, for example, the required input range is 1-9V, the corresponding output is 0% -100%, the lower limit of 0-10V is set to be "=10, and the upper limit is set to be" =90.
2. The PWM input dimming is supported, the high-level voltage is input by 4-10V, the PWM frequency is 100HZ-2KHZ, and the upper limit and the lower limit can be flexibly set. For example, when 5% PWM input is desired, 0% is output, 100% is output when 95% PWM input is output, and PWM "lower limit" =5, and "upper limit" =95 may be set.
3. In support of resistance dimming, the maximum resistance value is 100K ohms, and upper and lower limits can be flexibly set when specific settings are performed, for example, 0% is output when 3K ohms are expected to be input, 100% is output when 85K ohms are input, and PWM "lower limit" =3 and "upper limit" =85 can be set.
4. In support of time-controlled dimming, for example, 8 periods of time are set at specific setting, each period of time is 255 minutes at maximum, the power is 0-100%, and meanwhile, the gradual change time in time period change can be set, for example, the gradual change time is set to 10 minutes, the power is 100% in time period 1, the power is 50% in time period 2, and when the time period 1 is switched to the time period 2, the power gradually falls from 100% to 50% in 10 minutes, and no suddenly-jumping dimming is seen.
5. Because the microcontroller U1 is internally provided with a digital addressable dimming control function, single control, group control and group control can be finally realized, and the digital addressable dimming control system has a main function similar to DALI dimming.
Therefore, the invention has the five-in-one dimming circuit which realizes multifunctional dimming and automatic combined dimming and is finally convenient for customers to operate.
Drawings
Fig. 1 is a schematic diagram of a part of a five-in-one dimming circuit of embodiment 1;
fig. 2 is a schematic diagram of a communication interface circuit in a five-in-one dimming circuit according to embodiment 1;
fig. 3 is a partial flow chart of a five-in-one dimming method of embodiment 1;
fig. 4 is a flow chart of the rest of a five-in-one dimming method in embodiment 1;
fig. 5 is a flowchart illustrating a specific method of step S5 in the dimming method of embodiment 1.
In the figure: a microcontroller operating circuit 1, a dimming output circuit 2, a communication interface circuit 3, a resistor or voltage sampling circuit 4, and a PWM sampling dimming circuit 5.
Detailed Description
The invention will be further described with reference to the drawings and examples.
Example 1:
as shown in fig. 1 and 2, the five-in-one dimming circuit provided in this embodiment includes a microcontroller working circuit 1, a dimming output circuit 2, a communication interface circuit 3, a resistor or voltage sampling circuit 4 and a PWM sampling dimming circuit 5, where the microcontroller working circuit 1 includes a microcontroller U1, a communication receiving end RXD of the communication interface circuit 3 is connected with a usart_rx/AIN6/PD6 end of the microcontroller U1, a communication transmitting end TXD of the communication interface circuit 3 is connected with a usart_tx/AIN5/PD5 end of the microcontroller U1, and a DIM access end is disposed on each of the communication interface circuit 3, the resistor or voltage sampling circuit 4 and the PWM sampling dimming circuit 5, and the microcontroller U1 is further connected with the PWM sampling dimming circuit 5, the resistor or voltage sampling circuit 4 and the communication interface circuit 3, so as to implement automatic switching of resistor, 0-10V dimming, PWM dimming and automatic switching of time preset dimming through detection and judgment of DIM signals.
Further, in order to make the circuit simpler and more stable, the microcontroller work circuit 1 further includes a first capacitor C1, a second capacitor C2, a third capacitor C3, a fourth capacitor C4, a second resistor R2, a crystal oscillator CY1 and a programming interface PROG, the VDD pin of the microcontroller U1 is connected to one end of the third capacitor C3, the VCAP pin of the microcontroller U1 is grounded GND through one end of the fourth capacitor C4, two ends of the crystal oscillator CY1 are respectively connected to one end of the first capacitor C1 and one end of the second capacitor C2, the other end of the first capacitor C1 is connected to the other end of the second capacitor C2 and then grounded GND, the common end of the crystal oscillator CY1 and the first capacitor C1 is connected to the OSCIN/PA1 pin of the microcontroller U1, the common end of the crystal oscillator CY1 and the second capacitor C2 is connected to the OSCOUT/PA2 pin of the microcontroller U1, and the PD1 (HS/SWIM pin and NRST pin are respectively connected to the 2 pin and 4 pin of the programming interface (PROG).
Further, in order to make the circuit simpler and more stable, the resistor or voltage sampling circuit 4 includes a second PNP triode Q2, a third NPN triode Q3, an eleventh resistor R11, a twelfth resistor R12, a thirteenth resistor R13, a fourteenth resistor R14, a first voltage regulator Z1 and a first diode D1, where a base of the third NPN triode Q3 is connected to a PC4 (HS)/AIN 2/tim1_cc4/clk_cco end of the microcontroller U1 through the eleventh resistor R11, a collector of the third NPN triode Q3 is connected to a base of the second PNP triode Q2 through the thirteenth resistor R13, an emitter of the second PNP triode Q2 is connected to a +12v supply voltage through the fourteenth resistor R14, a twelfth resistor R12 and the first voltage regulator Z1 are connected in parallel between the base of the second PNP triode Q2 and the +12v supply voltage, an anode end of the second PNP triode Q2 is connected to the first diode D1, and a cathode end of the first PNP triode D1 is connected to a cathode end of the second PNP triode m.
Further, in order to make the circuit simpler and more stable, the PWM sampling dimming circuit 5 includes a first operational amplifier U2B, a twelfth capacitor C12 and a twenty-second resistor R22 connected in parallel with each other, a twenty-third resistor R23 and a twenty-first resistor R21, wherein the in-phase input terminal of the first operational amplifier U2B is connected to one terminal of the twenty-third resistor R23, the other terminal of the twenty-third resistor R23 is used as a DIM access terminal, the in-phase input terminal of the first operational amplifier U2B is connected to one terminal of the common terminal of the twenty-third resistor R23 with the twelfth capacitor C12 and the twenty-second resistor R22, the inverting input terminal of the first operational amplifier U2B is connected to the output terminal of the first operational amplifier U2B, the output terminal of the first operational amplifier U2B is connected to the PD3 (HS)/AIN 2/CC 2/adc_etr terminal of the microcontroller U1 through the twenty-first resistor R21, the voltage division circuit is formed by connecting the TIM 3/CC 2/adc_etr 2 between the in-first resistor U2B and the common terminal of the TIM 3 (HS 2/CC 2/V2) at the voltage division point of the twenty-first resistor R21 and the common terminal of the twenty-third resistor R2B is connected to the voltage division circuit of the air 2+ltd 10+ltd 2/V2.
Further, in order to make the circuit simpler and more stable, the communication interface circuit 3 includes a fifteenth resistor R15, a sixteenth resistor R16, a seventeenth resistor R17, a twentieth resistor R20, a nineteenth resistor R19, a fifth fet Q5, a fourth fet Q4, a seventh fet Q7, and a sixth fet Q6, where the voltage between the drain D of the fourth fet Q4 and the +5v voltage is connected through the fifteenth resistor R15, and the common end of the fifteenth resistor R15 connected to the drain D of the fourth fet Q4 is used as a communication receiving end RXD, the gate G of the fourth fet Q4 is connected to +5v voltage through the sixteenth resistor R16, and the common end of the gate G of the fourth fet Q4 connected to the sixteenth resistor R16 is used as a PWM detection receiving control end CHKPWM and is connected to the PD4 (HS)/2_cc 1/BEEP/usck of the microcontroller U1, and the gate G of the fourth fet Q4 is also connected to the drain of the fifth fet Q5 through the fifteenth resistor R15, and the common end of the gate of the seventeenth resistor R7 is connected to the drain 7 through the seventeenth resistor R16, and the drain end of the drain 7 is connected to the drain 7 of the seventeenth resistor Q7, and the drain 7 is connected to the drain 7 through the drain 7 of the seventeenth resistor 17, and the drain 7 is connected to the drain 7 of the twentieth resistor Q5.
Further, in order to make the circuit simpler and more stable, the dimming output circuit 2 includes a second operational amplifier U2A, a fifth resistor R5, a fourth resistor R4, a third resistor R3 and a tenth capacitor C10, where the non-inverting input end of the second operational amplifier U2A is connected to the PC3 (HS)/TLI/tim1_cc3/usart_ck end of the microcontroller U1 through the fourth resistor R4, and a fifth resistor R5 and a tenth capacitor C10 are connected in parallel between the common end of the non-inverting input end of the second operational amplifier U2A and the fourth resistor R4 and the ground GND, the inverting input end of the second operational amplifier U2A is connected to the output end of the second operational amplifier U2A, the output end of the second operational amplifier U2A is connected to the third resistor R3, and the other end of the third resistor R3 is used as a dimming output port.
In order to make the circuit output more stable, no interference signal influences, be connected with ninth electric capacity C9 between this light modulation delivery outlet and the ground GND.
As shown in fig. 3 and 4, the embodiment also discloses a dimming method of the five-in-one dimming circuit, which specifically includes the following steps:
s1, initializing a system, and reading the voltage of a DIM access terminal by acquiring the closing and opening of a constant current source formed by a resistor or a voltage sampling circuit 4;
s2, judging whether the voltage of the two-time read DIM access terminal is larger than 5V; if yes, go to step S3, if not, go to step S5;
s3, forcibly pulling down the short voltage of the DIM access terminal voltage, and entering a step S4;
s4, judging whether the voltage is pulled down or not; if yes, the current source is started, and the current mode is set into a data communication mode, so that the communication interface circuit 3 works; if not, the step S5 is entered;
s5, reading data of an EEPROM memory in the microcontroller U1, judging whether the data is in an automatic dimming mode, if so, automatically judging the mode of a dimming input signal, and dimming according to the output of the mode; if not, the step S6 is entered;
s6, judging whether the communication dimming mode is adopted; if yes, turning on a current source, setting a data communication mode in the current mode, otherwise, entering step S7;
s7, judging whether the timing dimming mode is adopted; if yes, turning off the current source, setting the current mode as a timing dimming mode, otherwise, entering step S8;
s8, judging whether the resistance dimming mode is adopted; if yes, turning on a current source, setting the current mode as a resistance dimming mode, otherwise, entering step S9;
s9, judging whether the dimming mode is a 0-10V dimming mode; if yes, turning on a current source, setting the current mode as a 0-10V dimming mode, otherwise, entering step S10;
s10, judging whether the PWM dimming mode exists or not; if yes, the current source is turned off, the current mode is set as a PWM dimming mode, if not, the current source is turned on, and the current mode is set as a data communication mode.
As shown in fig. 5, the specific steps of automatically determining the mode of the dimming input signal and dimming according to the output of the mode in step S5 are as follows:
s51, three dimming modes of 0-10V, PWM and resistance are automatically judged;
s52, starting PWM capturing;
s53, if a PWM signal is detected, closing a current source formed by a resistor or the voltage sampling circuit 4, and setting the current mode as a PWM dimming mode; no, go to step S54;
s54, closing PWM capturing;
s56, judging whether the voltage is smaller than 0.5V when the current source is turned off or larger than 5V when the current source is turned on, if so, turning off the current source, setting the mode as full power output, and suspending the input end; no, go to step S56;
s56, judging whether the voltage is smaller than 0.5V when the current source is turned off or larger than 0.1V when the current source is turned on, if so, the current source is turned on, and the current source setting mode is a resistance dimming mode; no, step S57 is entered;
s57, turning on a current source, and setting the current mode as a 0-10V dimming mode.
In this embodiment, the microcontroller U1 adopts a controller with a model STM8S003, and in operation, the signal of the DIM access terminal is obtained in real time to detect the dimming input signal, and determine that the dimming input signal is the dimming input signal, and finally, the dimming effect of the LED is controlled by adjusting the output according to the preset dimming signal. The applicant needs to explain that the software writing part after the design of the circuit is completed can be simply compiled by a person skilled in the art after taking the creation of the invention, and belongs to the conventional technical means in the art, and is not the technical gist of the creation of the invention, so that the description is not specifically made.
The invention is thus described by this example with the following advantages:
1. the dimming input of 0-10V is supported (1-10V compatible), the upper limit and the lower limit can be flexibly set during specific setting, for example, the required input range is 1-9V, the corresponding output is 0% -100%, the lower limit of 0-10V is set to be "=10, and the upper limit is set to be" =90.
2. The PWM input dimming is supported, the high-level voltage is input by 4-10V, the PWM frequency is 100HZ-2KHZ, and the upper limit and the lower limit can be flexibly set. For example, when 5% PWM input is desired, 0% is output, 100% is output when 95% PWM input is output, and PWM "lower limit" =5, and "upper limit" =95 may be set.
3. In support of resistance dimming, the maximum resistance value is 100K ohms, and upper and lower limits can be flexibly set when specific settings are performed, for example, 0% is output when 3K ohms are expected to be input, 100% is output when 85K ohms are input, and PWM "lower limit" =3 and "upper limit" =85 can be set.
4. In support of time-controlled dimming, for example, 8 periods of time are set at specific setting, each period of time is 255 minutes at maximum, the power is 0-100%, and meanwhile, the gradual change time in time period change can be set, for example, the gradual change time is set to 10 minutes, the power is 100% in time period 1, the power is 50% in time period 2, and when the time period 1 is switched to the time period 2, the power gradually falls from 100% to 50% in 10 minutes, and no suddenly-jumping dimming is seen.
5. Because the microcontroller U1 is internally provided with a digital addressable dimming control function, single control, group control and group control can be finally realized, and the digital addressable dimming control system has a main function similar to DALI dimming.
In summary, the invention can realize multiple dimming functions in one circuit, and has the independent dimming and combined dimming functions of 0-10V dimming, PWM dimming, resistance dimming and time control dimming, and finally, the dimming function of the structure is more powerful.

Claims (4)

1. The utility model provides a trinity dimming circuit, includes microcontroller work circuit (1), dimming output circuit (2), communication interface circuit (3), resistance or voltage sampling circuit (4) and PWM sampling dimming circuit (5), characterized by: the microcontroller working circuit (1) comprises a microcontroller (U1), a communication receiving end (RXD) of the communication interface circuit (3) is connected with a USART_RX/AIN6/PD6 end of the microcontroller (U1), a communication transmitting end (TXD) of the communication interface circuit (3) is connected with a USART_TX/AIN5/PD5 end of the microcontroller (U1), a DIM access end is arranged on each of the communication interface circuit (3), the resistor or voltage sampling circuit (4) and the PWM sampling dimming circuit (5), and the microcontroller (U1) is also connected with the PWM sampling dimming circuit (5), the resistor or voltage sampling circuit (4) and the communication interface circuit (3) to realize automatic switching of resistor dimming, 0-10V dimming and PWM dimming and switching of time preset timing through detection and judgment of DIM signals;
wherein the microcontroller working circuit (1) further comprises a first capacitor (C1), a second capacitor (C2), a third capacitor (C3), a fourth capacitor (C4), a second resistor (R2), a crystal oscillator (CY 1) and a programming interface (PROG), the VDD pin of the microcontroller (U1) is connected with one end of the third capacitor (C3), the VCAP pin of the microcontroller (U1) is Grounded (GND) through one end of the fourth capacitor (C4), two ends of the crystal oscillator (CY 1) are respectively connected with one end of the first capacitor (C1) and one end of the second capacitor (C2), the other end of the first capacitor (C1) and the other end of the second capacitor (C2) are Grounded (GND) after being connected, the common end of the crystal oscillator (CY 1) and the first capacitor (C1) is connected with the OSCIN/PA1 pin of the microcontroller (U1), the common end of the crystal oscillator (CY 1) and the second capacitor (C2) is connected with the OSCOUT/PA2 pin of the microcontroller (U1), the PD1 (HS)/SWIM pin and the NRST pin of the microcontroller (U1) are respectively connected with the 2 pin and the 4 pin of the programming interface (PROG), the resistor or the voltage sampling circuit (4) comprises a second PNP triode (Q2), a third NPN triode (Q3), an eleventh resistor (R11), a twelfth resistor (R12), a thirteenth resistor (R13), a fourteenth resistor (R14), A first voltage stabilizer (Z1) and a first diode (D1), wherein the base of the third NPN triode (Q3) is connected with the PC4 (HS)/AIN 2/TIM1_CC4/CLK_CCO end of the microcontroller (U1) through an eleventh resistor (R11), the collector of the third NPN triode (Q3) is connected with the base of the second PNP triode (Q2) through a thirteenth resistor (R13), the emitter of the second PNP triode (Q2) is connected with a +12V supply voltage through a fourteenth resistor (R14), a twelfth resistor (R12) and the first voltage stabilizer (Z1) are connected in parallel between the base of the second PNP triode (Q2) and the +12V supply voltage, the collector of the second PNP triode (Q2) is connected with the positive end of the first diode (D1), the negative end of the first diode (D1) is used as a DIM access end, the sampling light adjusting circuit (5) comprises a first operational amplifier (U2B), a second capacitor (C12) and a twenty-first capacitor (R23) which are connected with the other end of the twenty-first resistor (R23) in parallel, the twenty-first resistor (R23) is connected with the twenty-first end (R23), the common end of the non-inverting input end of the first operational amplifier (U2B) and the twenty-third resistor (R23) is connected to one end point of the common end of the twelfth capacitor (C12) and the twenty-second resistor (R22), the inverting input end of the first operational amplifier (U2B) is connected to the output end of the first operational amplifier (U2B), the output end of the first operational amplifier (U2B) is connected to the PD3 (HS)/AIN 4/TIM2_CC2/ADC_ETR end of the microcontroller (U1) through the twenty-first resistor (R21), the communication interface circuit (3) comprises a fifteenth resistor (R15), a sixteenth resistor (R16), a seventeenth resistor (R17), a twenty-ninth resistor (R20), a nineteenth resistor (R19), a fifth field effect transistor (Q5), a fourth field effect transistor (Q4), a seventh field effect transistor (Q7) and a sixth field effect transistor (Q6), the drain electrode (Q4) is connected to the drain electrode (D4) through the fifteenth resistor (R5) through the sixteenth resistor (R16), and the drain electrode (R4) is connected to the drain electrode (R4) through the fifteenth resistor (R4), and the public end that grid G of fourth field effect tube (Q4) and sixteenth resistance (R16) are connected is regarded as PWM detection and receives control end CHKPWM and is connected with PD4 (HS)/TIM2_CC1/BEEP/USART_CK of microcontroller (U1), grid G of fourth field effect tube (Q4) still is connected with drain electrode D of fifth field effect tube (Q5), grid G one end of fifth field effect tube (Q5) is connected with one end of seventeenth resistance (R17), the other end of seventeenth resistance (R17) is regarded as the DIM access terminal, be connected with second steady voltage tube (Z2) between grid G of fifth field effect tube (Q5) and Ground (GND), grid G of sixth field effect tube (Q6) is regarded as communication transmitting end (TXD), drain electrode D of sixth field effect tube (Q6) is connected +5V voltage through twentieth resistance (R20), and drain electrode D of sixth field effect tube (Q6) is connected with public end of seventeenth resistance (R17) and is connected with drain electrode (Q7) through drain electrode D of nineteenth resistance (Q7).
2. The five-in-one dimming circuit of claim 1, wherein: the dimming output circuit (2) comprises a second operational amplifier (U2A), a fifth resistor (R5), a fourth resistor (R4), a third resistor (R3) and a tenth capacitor (C10), wherein the non-inverting input end of the second operational amplifier (U2A) is connected with the PC3 (HS)/TLI/TIM1_CC3/USART_CK end of the microcontroller (U1) through the fourth resistor (R4), the non-inverting input end of the second operational amplifier (U2A) and the common end of the fourth resistor (R4) are connected with the Ground (GND) in parallel, the inverting input end of the second operational amplifier (U2A) is connected with the output end of the second operational amplifier (U2A), the output end of the second operational amplifier (U2A) is connected with the third resistor (R3), and the other end of the third resistor (R3) is used as a dimming output port.
3. The five-in-one dimming circuit as claimed in claim 2, wherein: a ninth capacitor (C9) is connected between the dimming output port and Ground (GND).
4. A dimming method of a five-in-one dimming circuit, comprising adopting the five-in-one dimming circuit as claimed in any one of the above claims 1 to 3, characterized in that: the method specifically comprises the following steps:
s1, initializing a system, and reading the voltage of a DIM access terminal by acquiring the closing and opening of a constant current source formed by a resistor or a voltage sampling circuit (4);
s2, judging whether the voltage of the two-time read DIM access terminal is larger than 5V; if yes, go to step S3, if not, go to step S5;
s3, forcibly pulling down the short voltage of the DIM access terminal voltage, and entering a step S4;
s4, judging whether the voltage is pulled down or not; if yes, the current source is started, and the current mode is set into a data communication mode, so that the communication interface circuit (3) works; if not, the step S5 is entered;
s5, reading data of an EEPROM (electrically erasable programmable read Only memory) in the microcontroller (U1), judging whether the data is in an automatic dimming mode, if so, automatically judging the mode of a dimming input signal, and dimming according to the output of the mode; if not, the step S6 is entered;
s6, judging whether the communication dimming mode is adopted; if yes, turning on a current source, setting a data communication mode in the current mode, otherwise, entering step S7;
s7, judging whether the timing dimming mode is adopted; if yes, turning off the current source, setting the current mode as a timing dimming mode, otherwise, entering step S8;
s8, judging whether the resistance dimming mode is adopted; if yes, turning on a current source, setting the current mode as a resistance dimming mode, otherwise, entering step S9;
s9, judging whether the dimming mode is a 0-10v dimming mode; if yes, turning on a current source, setting the current mode as a 0-10v dimming mode, otherwise, entering step S10;
s10, judging whether the PWM dimming mode exists or not; if yes, the current source is turned off, the current mode is set as a PWM dimming mode, if not, the current source is turned on, and the current mode is set as a data communication mode, wherein in step S5, the mode judgment is automatically performed on the dimming input signal, and the specific steps of dimming according to the output of the mode are as follows:
s51, three dimming modes of 0-10v, PWM and resistance are automatically judged;
s52, starting PWM capturing;
s53, if a PWM signal is detected, closing a current source formed by a resistor or a voltage sampling circuit (4), and setting the current mode as a PWM dimming mode; no, go to step S54;
s54, closing PWM capturing;
s56, judging whether the voltage is smaller than 0.5V when the current source is turned off or larger than 5V when the current source is turned on, if so, turning off the current source, setting the mode as full power output, and suspending the input end; no, go to step S56;
s56, judging whether the voltage is smaller than 0.5V when the current source is turned off or larger than 0.1V when the current source is turned on, if so, the current source is turned on, and the current source setting mode is a resistance dimming mode; no, step S57 is entered;
s57, turning on a current source, and setting the current mode as a 0-10v dimming mode.
CN201711453790.9A 2017-12-28 2017-12-28 Five-in-one dimming circuit and dimming method Active CN108112125B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711453790.9A CN108112125B (en) 2017-12-28 2017-12-28 Five-in-one dimming circuit and dimming method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711453790.9A CN108112125B (en) 2017-12-28 2017-12-28 Five-in-one dimming circuit and dimming method

Publications (2)

Publication Number Publication Date
CN108112125A CN108112125A (en) 2018-06-01
CN108112125B true CN108112125B (en) 2024-01-30

Family

ID=62213873

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711453790.9A Active CN108112125B (en) 2017-12-28 2017-12-28 Five-in-one dimming circuit and dimming method

Country Status (1)

Country Link
CN (1) CN108112125B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108990242A (en) * 2018-06-11 2018-12-11 江苏联宏智慧能源股份有限公司 A kind of multi-functional street lamp intelligent controller
CN109348597B (en) * 2018-12-04 2020-01-14 东莞永冠电子科技有限公司 Control circuit compatible with 0-10V dimmer and TRAIC dimmer

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012152641A2 (en) * 2011-05-06 2012-11-15 Osram Ag A dimmable led driver and a method for controlling the same
CN103152939A (en) * 2013-02-26 2013-06-12 茂硕电源科技股份有限公司 Four-in-one light-dimming circuit of light-emitting diode (LED) power source
CN104735877A (en) * 2015-03-25 2015-06-24 东莞市石龙富华电子有限公司 Method and device for remote comprehensive illumination control over LED lamp
CN104797065A (en) * 2015-04-10 2015-07-22 浙江宇光照明科技有限公司 Electrodeless lamp circuit

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012152641A2 (en) * 2011-05-06 2012-11-15 Osram Ag A dimmable led driver and a method for controlling the same
CN103152939A (en) * 2013-02-26 2013-06-12 茂硕电源科技股份有限公司 Four-in-one light-dimming circuit of light-emitting diode (LED) power source
CN104735877A (en) * 2015-03-25 2015-06-24 东莞市石龙富华电子有限公司 Method and device for remote comprehensive illumination control over LED lamp
CN104797065A (en) * 2015-04-10 2015-07-22 浙江宇光照明科技有限公司 Electrodeless lamp circuit

Also Published As

Publication number Publication date
CN108112125A (en) 2018-06-01

Similar Documents

Publication Publication Date Title
CN201374838Y (en) LED driving power source
CN206041465U (en) Take switching power supply circuit of excess temperature protection
CN208572500U (en) Linearity constant current control circuit and LED matrix for LED light
CN101711071B (en) LED control circuit and LED device
CN108112125B (en) Five-in-one dimming circuit and dimming method
CN103354685B (en) LED driving chip
CN107995721A (en) DALI adjusting control circuits
CN106211475A (en) A kind of acoustic control photovoltaic LED illumination device
CN103079310B (en) Dimming control circuit for spotlight
CN103025028A (en) Solar LED street lamp controller
CN205566746U (en) Can eliminate control circuit , control chip and LED illuminator of electric current ripple
CN208424846U (en) The circuit of power switch adjustment electrical parameter
CN104135793A (en) Circuit using power switch to adjust electrical parameters
CN103369766A (en) A head lamp and a lighting circuit capable of sensing ambient illumination
CN108566701A (en) The LED controller integrated circuit of self-induction self-regulated
CN104750003A (en) Smart on-off input output module and control method thereof
CN204069439U (en) Self-inspection LED acousto-optic control lamp
CN204536809U (en) A kind of intelligent switch quantity constrained input module
CN113411931B (en) LED silicon controlled rectifier dimming quick response circuit and LED lighting device
CN214544874U (en) Intelligent dimming lamp
CN202269063U (en) Control circuit of zero light attenuation of LED road illumination lamp
CN204761767U (en) LED's automatic control drive circuit
CN202026508U (en) Solar energy controller
CN104768259B (en) Adaptive LED booster driving circuit
CN209592617U (en) A kind of level meter mode of laser group driving circuit

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20231226

Address after: Door 1, 2nd Floor, No. 4 Xiang'an Street, Xiangfang District, Harbin City, Heilongjiang Province, 150000 RMB

Applicant after: Yang Xu

Address before: 315100 Private Industrial Zone in Qiuai Town, Yinzhou District, Ningbo City, Zhejiang Province (Ningbo Longyuan Lighting Electrical Appliance Co., Ltd.)

Applicant before: NINGBO LONGYUAN ILLUMINATE APPLIANCE CO.,LTD.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant