Summary of the invention
It is above-mentioned to solve the problems, such as that the purpose of this utility model is to provide a kind of LED light control circuits.
To achieve the above object, the technical solution adopted in the utility model are as follows: a kind of LED light control circuit, including chargingSwitch module, charge management module, single chip control module, the first drive module, the second drive module, multiple warm whitesLED light and a RGB LED light, the input of the charge switch module terminate power input, the charge switch module it is defeatedOutlet is battery charging by charge management module, and the control signal of the charge switch module connects single chip control moduleFirst control output end, the battery are single chip control module power supply, and the LED light of the multiple warm white is arranged in parallel, andThe LED light of multiple warm whites of connection is connected with the first drive module to be followed by between the output end and ground of battery, and described first drivesThe control signal of dynamic model block connects the PWM output end of single chip control module, and the RGB LED light is connected with the second drive moduleIt is followed by between the output end and ground of battery, the control signal of second drive module connects the second of single chip control moduleControl output end.
It further, further include power detection module, the input of the power detection module terminates power input, describedThe output end of power detection module connects the control signal of single chip control module.
Further, the power detection module includes resistance R1, R2 and R26, and the resistance R1 and R2 series connection are followed byBetween power input and ground, the node series resistance R26 between the resistance R1 and R2 connects the control of single chip control moduleInput terminal processed.
It further, further include that counnter attack fills module, the counnter attack fills block coupled in series in the charging and discharging circuit of battery.
Further, it includes resistance R27, resistance R28 and NMOS tube Q2 that the counnter attack, which fills module, the NMOS tube Q2'sDrain electrode meets the cathode BAT- of battery, source electrode ground connection, and gate series resistance R27 meets the positive BAT+ of battery, the NMOS tube Q2'sGrid also series resistance R28 ground connection.
It further, further include key module, the key module is connect with single chip control module, for controlling LEDThe brightness of the LED light of the light-emitting mode of lamp and multiple warm whites.
Further, the quantity of the LED light of the warm white is 8, and the LED light and RGB LED light of 8 warm whites are all provided withIt sets on pcb board, and the LED light of 8 warm whites is centered around outside RGB LED light.
Further, the LED light of the warm white is the paster LED lamp of model 2835.
Further, the charge management module is realized by the charging chip U1 of model XC5101.
Further, the single chip control module is realized by the single-chip microcontroller U2 of model SN8F570210S.
The advantageous effects of the utility model:
The utility model realizes glory effect by the LED light and centre RGB LED light of warm white, and does not need constant currentIC controls the brightness of LED light, and circuit structure is simple, at low cost and good to the protecting effect of battery, extends the use of batteryService life.
Specific embodiment
Now in conjunction with the drawings and specific embodiments, the present invention will be further described.
As shown in Figure 1, a kind of LED light control circuit, including power detection module, charge switch module, Charge Management mouldBlock, single chip control module, the first drive module, the second drive module, the LED light of multiple warm whites and a RGB LED lampThe input of LED0, the charge switch module terminate power input, and the output end of the charge switch module passes through charging valveModule is managed as battery charging, the control signal of the charge switch module connects the first control output of single chip control moduleEnd, the battery are single chip control module power supply, and the LED light of the multiple warm white is arranged in parallel, multiple warm whites in parallelThe LED light of color is connected with the first drive module to be followed by between the output end and ground of battery, the control of first drive moduleInput terminal connects the PWM output end of single chip control module, and the RGB LED light is connected with the second drive module to be followed by batteryBetween output end and ground, the control signal of second drive module connects the second control output end of single chip control module,The input of the power detection module terminates power input, and the output end of the power detection module connects single chip control moduleControl signal.
In this specific embodiment, power input is USB interface, the power detection module include resistance R1, R2 andR26, the charge switch module include PMOS tube Q6 and NPN triode Q7, and the charge management module includes modelThe charging chip U1 of XC5101, the single chip control module include the single-chip microcontroller U2 of model SN8F570210S.
The resistance R1 and R2 series connection be followed by between the power positive end V+ and ground of USB interface, the resistance R1 and R2 itBetween node series resistance R26 connect the P14 foot (control signal) of single-chip microcontroller U2, the power positive end V+ of USB interface connects PMOSPipe Q6 connects the end VCC of charging chip U1, and the gate series resistance R8 of PMOS tube Q6 connects the collector of NPN triode Q7, tri- pole NPNThe emitter of pipe Q7 is grounded, and the base series resistor R13 of NPN triode Q7 connects (the first control output of the P02 foot of single-chip microcontroller U2End), the BAT foot of charging chip U1 meets the positive BAT+ of battery, the cathode BAT- ground connection of battery, the power end VDD of single-chip microcontroller U2The positive BAT+ of battery is met, more specific circuit is detailed in Fig. 1, this is no longer described in detail.
When USB interface is inserted into 5V voltage, the P14 foot of single-chip microcontroller U2 detects high level, then makes the P02 foot of single-chip microcontroller U2For high level, NPN triode Q7 conducting, so that PMOS tube Q6 is connected.5V voltage is charged the battery by charging chip U1, resistanceR7 is sampled as constant current resistance, and the CHRG foot of charging chip U1 is low level in charging process, and LED light LED9 (red light) is lighted.At the end of charging, the CHRG of charging chip U1 is high-impedance state, and the STDBY of charging chip U1 is low level, and LED light LED9 is (redLamp) it goes out, LED light LED10 (green light) is lighted, and resistance R3 and R4 are in parallel, it is used as current limliting, in the present embodiment, because usingPMOS tube Q6 itself has the conducting resistance of very little, therefore resistance R3 and R4 are replaced with 0R.
When input voltage always exists, and at the end of charging, the charging of charging chip U1 can be closed, and cell voltage can be slowlyIt falls down.When voltage drops to 4.05V, charging chip U1 can be reconnected automatically.In this way can service life to battery intoRow extends.Battery is avoided to be in tricke phase stage for a long time.
It further include that counnter attack fills module, the counnter attack fills block coupled in series in the charging and discharging circuit of battery in this specific embodimentIn, specifically, counnter attack, which fills the drain electrode that module includes resistance R27, resistance R28 and NMOS tube Q2, the NMOS tube Q2, connects batteryCathode BAT-, source electrode ground connection, gate series resistance R27 connect the positive BAT+ of battery, the grid also series electrical of the NMOS tube Q2Hinder R28 ground connection.
In the loop using NMOS tube Q2 series connection, when due to artificial fault or other reasons, by the positive and negative anodes of batteryWhen reversed, since the pole G of NMOS tube Q2 becomes low level, then battery can not be discharged by circuit.In the present embodiment, do not use generalLogical diode is handled to do anti-filling, is because the pressure drop of general-purpose diode is 0.7V, according to diode, then battery is practical existsVoltage in circuit is then voltage -0.7V, is unfavorable for the use of battery.Certainly, in other embodiments, P ditch can also be usedThe metal-oxide-semiconductor in road is handled, this is that those skilled in the art can realize easily, no longer describe in detail.
In this specific embodiment, the quantity of the LED light of warm white is 8, respectively LED1-LED8, preferably model2835 paster LED lamp, but not limited to this, in other embodiments, the quantity and model of the LED light of warm white can be according to realitiesBorder is selected, this is that those skilled in the art can realize easily, is no longer described in detail.First drive module includesNPN triode Q1, the positive BAT+ of the positive termination battery after LED light LED1-LED8 is in parallel, negative terminal series connection NPN triode Q1 connectGround, the base stage of NPN triode Q1 connect the P05 foot (PWM output end) of single-chip microcontroller U2, and the PWM wave exported by change P05 foot accounts forBrightness of the sky than can change LED light LED1-LED8.
RGB LED light LED0 includes blue LED die B1, green LED chip G1 and red LED chips R1, and described secondDrive module includes NPN triode Q3-Q5, the blue LED die B1, green LED chip G1 and red LED chips R1 differenceConnect and be followed by between the positive BAT+ and ground of battery with NPN triode Q3-Q5, the base stage of NPN triode Q3-Q5 respectively with listP12, P13 and P06 foot (the second control output end) of piece machine U2 connects, and single-chip microcontroller U2 is answered by P12, P13 and P06 foot output phaseSignal control RGB lamp shines in a certain order, dark blue-purplish red-dark blue-green for green-cyan-in this specific embodimentColor-green, but not limited to this.
In this specific embodiment, LED light LED1-LED8 and RGB LED light LED0 is arranged on pcb board, and LED lightLED1-LED8 is centered around outside RGB LED light LED0.
It further include key module in this specific embodiment, the key module is connect with single chip control module, for controllingThe brightness of the light-emitting mode and LED light LED1-LED8 of LED light LED1-LED8 processed and RGB LED light LED0.Specifically, keyModule includes touch key SW1 and SW2, and touch key SW1 is for controlling the three of LED light LED1-LED8 and RGB LED light LED0Kind light-emitting mode: 1.LED lamp LED1-LED8 is bright;2.RGB LED light LED0 is bright.3.LED lamp LED1-LED8 and RGB LED lightLED0 is bright together, this Three models is that circulation occurs, and realizes easy glory effect.Touch key SW2 controls LED light LED1-The brightness of LED8, the cyclic switching between 10%-100% back and forth.
Certainly, in other embodiments, the control mode of key can be by bluetooth, 2.4G module, and WIFI etc. is realized, thisIt is that those skilled in the art can realize easily, no longer describes in detail.
Although specifically showing and describing the utility model in conjunction with preferred embodiment, those skilled in the art is answeredThis is understood, in the spirit and scope for not departing from the utility model defined by the appended claims, in form and detailsOn the utility model can be made a variety of changes, be the protection scope of the utility model.