PWM dimming circuit based on STC single-chip microcomputer

Through the PWM dimming circuit based on STC microcontroller, the STC8G1K08-SOP20 microcontroller and voltage conversion chip, combined with the optocoupler and MOS tube, the existing dimming circuit has been solved, and the adjustment in a wide range of applications has been achieved Wide range, high accuracy and fast response speed.

CN222216002UActive Publication Date: 2024-12-20HEZE QIANGUANG LIGHTING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202420612375.2
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2024-03-27
Publication Date
2024-12-20
Estimated Expiration
2034-03-27

AI Technical Summary

Technical Problem

The existing dimming circuit has high complexity and high manufacturing cost, making it difficult to meet the needs of wide adjustment range, high adjustment accuracy and fast response speed in a wide range of applications.

Method used

The PWM dimming circuit based on the STC microcontroller is adopted, including relay circuit, voltage conversion circuit, switching circuit, PWM dimming circuit and MCU circuit, and the STC8G1K08-SOP20 microcontroller, HT7533-1 and CJ7805 voltage conversion chip, optocoupler and MOS tube are used. The dimming function is realized through the MCU control of the PWM signal.

Benefits of technology

It realizes dimming effect with a wide adjustment range, high adjustment accuracy and fast response speed, while reducing manufacturing costs and is suitable for dynamic dimming scenes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN222216002U_ABST
    Figure CN222216002U_ABST
Patent Text Reader

Abstract

The utility model discloses a PWM dimming circuit based on an STC single-chip microcomputer, comprising a relay circuit, a voltage conversion circuit, a switch circuit, a PWM dimming circuit, a potentiometer circuit and an MCU circuit, the relay circuit is respectively connected with the voltage conversion circuit, the switch circuit and the PWM dimming circuit, the voltage conversion circuit is also respectively connected with the potentiometer circuit and the MCU circuit, and the switch circuit is connected with the potentiometer circuit and the MCU circuit. The MCU circuit is further connected with the switching circuit, the PWM dimming circuit and the potentiometer circuit. The PWM dimming circuit based on the STC single-chip microcomputer has the following advantages: 1) the adjusting range is wide, and the dimming requirements of different scenes can be met; 2) the adjustment precision is high, and the illumination brightness can be accurately controlled; 3) the response speed is high, the brightness can be quickly adjusted, and the method is suitable for dynamic dimming scenes; and 4) the cost is low, common components are adopted, and the manufacturing cost is low.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The utility model relates to the technical field of dimming, in particular to a PWM dimming circuit based on an STC single chip microcomputer. Background Art

[0002] Traditional dimming circuits mostly use analog dimming methods, which have problems such as narrow adjustment range and poor stability. Circuits based on PWM dimming have been widely used due to their advantages such as wide adjustment range, high adjustment accuracy and fast response speed. However, existing PWM dimming circuits are often more complex and have higher manufacturing costs. Utility Model Content

[0003] The purpose of the utility model is to provide a PWM dimming circuit based on an STC single chip microcomputer to solve the problems raised in the above background technology.

[0004] In order to achieve the above purpose, the utility model provides the following technical solutions:

[0005] A PWM dimming circuit based on an STC single-chip microcomputer comprises a relay circuit, a voltage conversion circuit, a switch circuit, a PWM dimming circuit, a potentiometer circuit and an MCU circuit, wherein the relay circuit is respectively connected to the voltage conversion circuit, the switch circuit and the PWM dimming circuit, the voltage conversion circuit is also respectively connected to the potentiometer circuit and the MCU circuit, and the MCU circuit is also respectively connected to the switch circuit, the PWM dimming circuit and the potentiometer circuit.

[0006] As a further technical solution of the utility model: the relay circuit includes a relay RELAY1 and a relay RELAY2.

[0007] As a further technical solution of the utility model: the voltage conversion circuit includes a voltage conversion chip U1 and a voltage conversion chip U14. The voltage conversion chip U14 converts the input DC12V voltage into a DC5V voltage. The voltage conversion chip U1 converts the 5V voltage into a 3V3, i.e., 3.3V voltage. The model of the voltage conversion chip U1 is HT7533-1, and the model of the voltage conversion chip U14 is CJ7805.

[0008] As a further technical solution of the utility model: the PWM dimming circuit includes optocoupler U9, optocoupler U19, MOS tube U15, MOS tube U21, MOS tube U20, MOS tube U22, optocoupler U9 is respectively connected to optocoupler U19 and MOS tube U15, and optocoupler U19 is respectively connected to optocoupler U20 and MOS tube U22.

[0009] As a further technical solution of the utility model: the MCU circuit adopts the STC8G1K08-SOP20 single-chip microcomputer, pins 8 and 10 are powered by 3.3V, pin 8 is connected to 3.3V, pin 10 is connected to GND, and two capacitors C57 / C1 are connected in parallel, which are 22UF and 100NF respectively; P30 / P31 are MCU burning pins, which lead to the burning update program; P12 / P13 / P14 open high and low level IO input interfaces, corresponding to the switch light button P12, the high beam button P13, and the horn button P14 respectively; pin P1.0 inputs the ADC0 potentiometer signal.

[0010] Compared with the prior art, the beneficial effects of the utility model are:

[0011] The utility model adopts a PWM dimming circuit based on an STC single-chip microcomputer, which has the following advantages: 1) a wide adjustment range to meet the dimming needs of different scenes; 2) high adjustment accuracy to accurately control the lighting brightness; 3) fast response speed to quickly adjust the brightness, suitable for dynamic dimming scenes; 4) low cost, using common components and low manufacturing cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 The utility model is a circuit diagram of the MCU circuit.

[0013] Figure 2 The utility model is a circuit diagram of a relay circuit.

[0014] Figure 3 The utility model is a circuit diagram of a voltage conversion circuit.

[0015] Figure 4 The utility model is a circuit diagram of the switch circuit.

[0016] Figure 5 The figure is a circuit diagram of the PWM dimming circuit of the utility model.

[0017] Figure 6 The utility model is a circuit diagram of a potentiometer circuit.

[0018] Figure 7 It is the overall circuit diagram of the utility model. DETAILED DESCRIPTION

[0019] The technical solutions in the embodiments of the utility model are described clearly and completely below. Obviously, the described embodiments are only part of the embodiments of the utility model, not all of them. Based on the embodiments of the utility model, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the utility model.

[0020] Embodiment 1:

[0021] Reference Figure 1-Figure 7 A PWM dimming circuit based on an STC single-chip microcomputer includes a relay circuit, a voltage conversion circuit, a switch circuit, a PWM dimming circuit, a potentiometer circuit and an MCU circuit. The relay circuit is respectively connected to the voltage conversion circuit, the switch circuit and the PWM dimming circuit, the voltage conversion circuit is also respectively connected to the potentiometer circuit and the MCU circuit, and the MCU circuit is also respectively connected to the switch circuit, the PWM dimming circuit and the potentiometer circuit.

[0022] Embodiment 2:

[0023] like Figure 1 As shown, the MCU circuit uses the STC8G1K08-SOP20 microcontroller, pins 8 and 10 are powered by 3.3V, pin 8 is connected to 3.3V, pin 10 is connected to GND, and two capacitors C57 / C1 are connected in parallel, which are 22UF and 100NF respectively; P30 / P31 are MCU burning pins, which lead to the burning update program; P12 / P13 / P14 open high and low level IO input interfaces, corresponding to the switch light button P12, high beam button P13, and horn button P14 respectively; pin P1.0 inputs the ADC0 potentiometer signal.

[0024] like Figure 2 As shown, the relay circuit includes relay RELAY1 and relay RELAY2, IN12V is the motorcycle battery input power, POWER is the power switch signal input, after POWER is connected to IN12V, the circuit board power is turned on, the relay pins 4 and 5 are connected, and the 12V group light source is powered.

[0025] like Figure 3 As shown, the voltage conversion circuit includes a voltage conversion chip U1 and a voltage conversion chip U14. The model of the voltage conversion chip U1 is HT7533-1, and the model of the voltage conversion chip U14 is CJ7805. The CJ7805 chip converts the input DC12V voltage into a DC5V voltage for the circuit. In U14, the 1st and 2nd pins are connected in parallel with the C59 / 330NF capacitor, and the 3rd and 2nd pins are connected in parallel with the C58 / 100NF capacitor. The HT7533-1 chip converts the 5V voltage into a 3V3, i.e., 3.3V voltage, to power the MCU. In U1, the 2nd and 1st pins are connected in parallel with the C9 / 10UF capacitor, and the 3rd and 1st pins are connected in parallel with the C10 / 10UF capacitor.

[0026] like Figure 4As shown, the switch circuit includes transistor Q1 and transistor Q2. P14IN / P13IN is the touch IN12V voltage signal, which passes through the R6 / R38 current limiting resistor to control the Q1 / Q2 transistor to output a low level to the P14 / P13 pin of the MCU. At the same time, the collector of the transistor is pulled up to 12V and connected to the R3 / 180K resistor in series, and a pull-down resistor R4 / 100K is connected between the base and the emitter.

[0027] like Figure 5 As shown, the PWM dimming circuit includes optocoupler U9, optocoupler U19, MOS tube U15, MOS tube U21, MOS tube U20, MOS tube U22, and optocoupler U9 is connected to optocoupler U19 and MOS tube U15 respectively, and optocoupler U19 is connected to optocoupler U20 and MOS tube U22 respectively. The PWM dimming output of the NPN type MOS tube is controlled by the optocoupler, and the 5V current limiting resistors R15 / 1K R24 / 1K are connected to the optocoupler 1 pin. PMW33 / PWM34 is the PWM signal output by the MCU, which is connected to the optocoupler 2 pin. The output 4 pin drives the MOS tube U15 / U20 to output a 12V voltage to the OUT1 / OUT2 interface to power the light source for dimming. The gate of the MOS tube is pulled up by 12V and connected to the R23 / R26 resistor 10K. The gate and source are connected to the R22 / R25 resistor 100K, and the source is connected to the GND ground. ADC13 is the voltage detection ADC signal, which is connected in series with a 100K resistor to GND and a 300K resistor to 12V to detect that the battery power is too low and turn off the light source.

[0028] like Figure 6 As shown, the potentiometer circuit includes a potentiometer U25. In the figure, P14IN / P13IN are the motorcycle input high beam and horn signals, 2# pin is the POWER ACC switch power signal, 5 / 6 / 7 / 8 pins are potentiometer pin signals, ADC0 potentiometer is 0-100K range adjustment, and 3.3V voltage is connected in series to the ACD interface of the MCU, which is converted from 0-100K gear to 0-3.3V voltage signal for MCU to read dimming.

[0029] Here’s how it works:

[0030] like Figure 7As shown, the power supply IN12V is the input power of the motorcycle battery, and POWER is the power switch signal input. After POWER is connected to IN12V, the circuit board power is turned on, and the relay pins 4 and 5 are connected, and the 12V group light source is powered. 12V then goes to the CJ7805 chip to convert the input DC12V voltage into a DC5V voltage for the circuit. CJ7085 outputs DC5V to the HT7533-1 chip, converting the 5V voltage into 3V3, i.e. 3.3V voltage, to power the MCU. The positive pole of the light source 12V is directly connected to the voltage output from the normally open point 5 of the RELAY1 and RELAY2 relays, and the light source 0V is connected to the PWM-regulated 0V power supply given by the OUT1 and OUT2 outputs of the MOS tube.

[0031] In the signal input and output part, P14IN / P13IN is the touch IN12V voltage signal, which controls the Q1 / Q2 transistor to output a low level to the P14 / P13 pin of the MCU. After receiving the corresponding pin signal, the MCU outputs the corresponding MOS tube PWM dimming action. PMW33 / PWM34 is the PWM signal output by the MCU, which is output to the NPN MOS tube through the optical coupler, and outputs the 0V power supply signal of PWM dimming. The 0V power supply is connected to the negative pole of the light source. The ADC0 potentiometer is 0-100K range adjustment, and the 3.3V voltage is connected to the ACD interface of the MCU to control the linear adjustment of the light source from 5% brightness to 100% brightness.

[0032] The U25 interface also includes high beam, horn strobe and ACC switch light IO signals, among which:

[0033] 1. ACC switch control: Click the switch to turn on or off the light, and rotate it to adjust the brightness after turning on the light;

[0034] 2. Strobe function: Press the switch for 2 seconds to strobe simultaneously --- Press the switch for 2 seconds to switch to left and right strobe alternately --- Press the switch for 2 seconds to switch to synchronous slow flash, during which time single-click the button to restore to normal (this operation can also turn on strobe in off state) --- When the light is normally on, press and hold the switch for 4 seconds to turn on the breathing light, and the brightness of the strobe and breathing lights can be adjusted with the knob;

[0035] 3. Speaker linkage: Press the horn switch for 2 seconds to start strobing, and the strobing lasts for 2 seconds. Long press the horn switch to continue strobing, and single click the horn switch to stop strobing.

[0036] ADC13 is the low voltage detection ADC signal, low voltage protection: if the voltage is lower than 12.3V for 20 seconds, the light will be automatically turned off. Click the button to turn on the light quickly.

[0037] U26 is the STC8G1K08 main control chip, which inputs and outputs PWM signals. This chip performs the corresponding dimming action according to the planned program code. The signal points are:

[0038] 1. P30 / P31 is the program download port;

[0039] 2. P12 / P13 / P14 are the light switch button / high beam button / horn button respectively;

[0040] 3. ADC0 / ADC13 are dimming potentiometer 0-3.3V signal / 12V voltage reading signal respectively;

[0041] 4. PWM33 / PWM24 are dimming PWM 1 and 2 output signals respectively;

[0042] 5. Pins 8 and 10 of the chip are 3.3V voltage power supply interfaces.

[0043] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above and that the present invention can be implemented in other specific forms without departing from the spirit or essential features of the present invention. Therefore, the embodiments should be considered exemplary and non-restrictive in all respects, and the scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims be included in the present invention.

[0044] In addition, it should be understood that although this specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This narrative method of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment have also been appropriately combined to form other implementation modes that are easy for those skilled in the art to understand.

Claims

1. A PWM dimming circuit based on an STC single chip microcomputer, comprising a relay circuit, a voltage conversion circuit, a switch circuit, a PWM dimming circuit, a potentiometer circuit and an MCU circuit, characterized in that: The relay circuit is respectively connected to the voltage conversion circuit, the switch circuit and the PWM dimming circuit, the voltage conversion circuit is also respectively connected to the potentiometer circuit and the MCU circuit, and the MCU circuit is also respectively connected to the switch circuit, the PWM dimming circuit and the potentiometer circuit.

2. A PWM dimming circuit based on STC single chip microcomputer according to claim 1, characterized in that: The relay circuit includes a relay RELAY1 and a relay RELAY2.

3. The PWM dimming circuit based on STC single chip microcomputer according to claim 1, characterized in that: The voltage conversion circuit includes a voltage conversion chip U1 and a voltage conversion chip U14. The voltage conversion chip U14 converts the input DC12V voltage into a DC5V voltage. The voltage conversion chip U1 converts the 5V voltage into a 3V3, i.e., 3.3V voltage. The model of the voltage conversion chip U1 is HT7533-1, and the model of the voltage conversion chip U14 is CJ7805.

4. The PWM dimming circuit based on STC single chip microcomputer according to claim 1, characterized in that: The PWM dimming circuit includes an optocoupler U9, an optocoupler U19, a MOS tube U15, a MOS tube U21, a MOS tube U20, and a MOS tube U22. The optocoupler U9 is connected to the optocoupler U19 and the MOS tube U15 respectively, and the optocoupler U19 is connected to the optocoupler U20 and the MOS tube U22 respectively.

5. The PWM dimming circuit based on STC single chip microcomputer according to claim 4, characterized in that: The MCU circuit adopts STC8G1K08-SOP20 single-chip microcomputer, and pins 8 and 10 are powered by 3.3V. Pin 8 is connected to 3.3V and pin 10 is connected to GND. At the same time, two capacitors C57 / C1 are connected in parallel, which are 22UF and 100NF respectively; P30 / P31 are MCU burning pins, which lead to the burning update program; P12 / P13 / P14 open high and low level IO input interfaces, corresponding to the switch light button P12, high beam button P13, and horn button P14 respectively; pin P1.0 inputs ADC0 potentiometer signal.