Multi-level dimming desk lamp
By introducing a Type-C female input circuit, a PD protocol communication circuit, and a rotary encoder circuit into the desk lamp, the problem of traditional desk lamps being unable to achieve multi-level dimming is solved, realizing multi-level dimming and flexible control of the Type-C interface.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- SHENZHEN JIUNIU YIMAO INTELLIGENT IOT TECH CO LTD
- Filing Date
- 2025-04-21
- Publication Date
- 2026-06-30
AI Technical Summary
Traditional desk lamps use a direct 220V power supply or an external power adapter with a fixed voltage level. They do not use a Type-C interface and do not support the PD protocol, so they cannot perform multi-level dimming and the control method is not flexible enough.
A multi-level dimming desk lamp was designed, comprising a microcontroller, a Type-C female input circuit, an LDO voltage regulator circuit, a PD protocol communication circuit, a rotary encoder circuit, and a matrix LED lamp circuit. It is connected to a power adapter through the Type-C female input circuit, uses the PD protocol communication circuit to select the voltage level, the LDO voltage regulator circuit to regulate the voltage to the working voltage, the rotary encoder to control the switching and dimming of the LED lamp circuit, and the microcontroller to collect encoder signals for multi-level dimming.
It enables power supply to devices supporting the PD protocol via a Type-C interface and allows for multi-level flexible dimming, improving the flexibility and efficiency of the control method.
Smart Images

Figure CN224439242U_ABST
Abstract
Description
Technical Field
[0001] This utility model relates to the field of lighting device technology, specifically to a multi-level dimming table lamp. Background Technology
[0002] With the widespread adoption of various types of devices such as smartphones, tablets, laptops, and gaming devices, users' demand for a universal, high-performance interface is growing. The Type-C interface (a new type of USB connector) has become an ideal choice due to its reversible design, smaller size, and high transmission speed. Furthermore, users are increasingly demanding portability, and the Type-C interface, with its smaller size, aligns with the design trend of thin and light devices.
[0003] Furthermore, early charging technologies (such as 5V / 2A) have low charging efficiency and long charging times. Traditional power adapters have only one voltage level, with 5V or 12V voltage not adjustable. With the increasing prevalence of high-capacity batteries, there is an urgent need for higher power, faster, and more flexible charging solutions. The USB PD (Power Delivery) protocol was developed to address this need. The PD protocol supports power delivery up to 240W, providing efficient charging for high-power-consuming devices (such as laptops), and can adjust the voltage and current in real time to accommodate devices with varying power requirements. Moreover, Type-C offers universality and portability, and can be plugged in either direction.
[0004] Currently, most traditional desk lamps are directly plugged into a 220V power source or connected to an external power adapter with a fixed voltage range, but they do not use a Type-C interface and do not support the PD protocol. Moreover, traditional desk lamps are controlled by buttons or switches, which have drawbacks such as the inability to perform multi-level dimming and a lack of flexibility in control. Utility Model Content
[0005] This utility model provides a power transmission protocol for describing fast charging technology, aiming to solve the problem that in the prior art, desk lamps are directly plugged into 220V power supply or external fixed voltage power adapters, and are controlled by buttons or switches, without using a Type-C interface and not supporting the PD protocol. This not only prevents them from being connected to other device power adapters or charging devices that support the PD protocol for power supply, but also prevents multi-level dimming.
[0006] This utility model proposes a multi-level dimming desk lamp, which includes a microcontroller, a Type-C female input circuit, an LDO voltage regulator circuit, a PD protocol communication circuit, a rotary encoder circuit, and a matrix LED lamp circuit. The Type-C female input circuit is connected to the microcontroller through the PD protocol communication circuit and also through the LDO voltage regulator circuit. The rotary encoder circuit is connected to both the LDO voltage regulator circuit and the microcontroller. The matrix LED lamp circuit is connected to the Type-C female input circuit, the LDO voltage regulator circuit, and the microcontroller. The Type-C female input circuit... The circuit is used to connect to a power adapter and input the stepped-down input voltage of the power adapter to the PD protocol communication circuit and the LDO voltage regulator circuit respectively; the LDO voltage regulator circuit is used to regulate the input voltage to the operating voltage and output it to the microcontroller and the rotary encoder circuit; the rotary encoder circuit is used to control the switching and multi-level dimming of the matrix LED circuit; the microcontroller is used to acquire the level signal and waveform output by the rotary encoder circuit and determine the dimming signal for the matrix LED circuit; the matrix LED circuit is used to perform multi-level dimming according to the dimming signal output by the microcontroller.
[0007] Furthermore, the microcontroller includes an MCU chip, a first capacitor, and a second capacitor; the PA4 / T1C3N / T2C2_ / ADCE pin and the PA6 / RST / A0 pin of the MCU chip are connected to the rotary encoder circuit; the PB0 / SWIO / CC1 / RX_ / A10 pin of the MCU chip is connected to the PD protocol communication circuit; the PA2 / T1C1N / T1C3 pin of the MCU chip is connected to the matrix LED circuit; the VHV pin of the MCU chip is connected to the LDO voltage regulator circuit, and is also grounded through the first capacitor and the second capacitor connected in parallel.
[0008] Furthermore, the Type-C female input circuit includes a 16-pin Type-C female connector; pins B4, B9, and A9 of the Type-C female connector are connected to the input voltage; pin A5 of the Type-C female connector is connected to the PD protocol communication circuit; pins B1, B12, A1, and A12 of the Type-C female connector are grounded.
[0009] Furthermore, the IN pin of the LDO voltage regulator circuit is connected to the input voltage, and the OUT pin of the LDO voltage regulator circuit outputs the operating voltage to the VHV pin of the MCU chip in the microcontroller and the rotary encoder circuit; the GND pin of the LDO voltage regulator circuit is grounded.
[0010] Furthermore, the PD protocol communication circuit includes a first resistor; the first end of the first resistor is connected to the A5 pin of the Type-C female connector in the Type-C female connector input circuit, and is also connected to the PB0 / SWIO / CC1 / RX_ / A10 pins of the MCU chip in the microcontroller.
[0011] Further, the rotary encoder circuit includes a rotary encoder, a second resistor, a third resistor, and a fourth resistor; the E terminal of the rotary encoder is connected to the OUT pin of the LDO voltage regulator circuit through the second resistor, and also to the PB8 / Q11 / A9 pins of the MCU chip in the microcontroller; the B terminal of the rotary encoder is connected to the OUT pin of the LDO voltage regulator circuit through the third resistor, and also to the PA4 / T1C3N / T2C2_ / ADCE pins of the MCU chip; the A terminal of the rotary encoder is connected to the OUT pin of the LDO voltage regulator circuit through the fourth resistor, and also to the PA6 / RST / A0 pins of the MCU chip; the C and D terminals of the rotary encoder are grounded.
[0012] Furthermore, the matrix LED circuit includes an LED lamp board matrix, a fifth resistor, a sixth resistor, a first transistor, a first MOSFET, a third capacitor, and a fourth capacitor; the first end of the fifth resistor is connected to the PA2 / T1C1N / T1C3 pin of the MCU chip in the microcontroller, and the second end of the fifth resistor is connected to the base of the first transistor; the collector of the first transistor is connected to the input voltage through the sixth resistor, the collector of the first transistor is also connected to the gate of the first MOSFET, and the emitter of the first transistor is connected to the LED lamp board matrix; the drain of the first MOSFET is connected to the input voltage, and the source of the first MOSFET is grounded through the parallel third capacitor and the fourth capacitor, and is also connected to the LED lamp board matrix.
[0013] Furthermore, the LED light panel matrix includes a first LED light panel, a second LED light panel, a third LED light panel, and a fourth LED light panel connected in parallel; each of the first LED light panel to the fourth LED light panel includes three light-emitting diodes connected in parallel; wherein each of the first LED light panel to the fourth LED light panel is connected to the source of the first MOS transistor in the matrix LED light circuit.
[0014] Furthermore, the multi-level dimming desk lamp also includes a current sampling circuit; the current sampling circuit includes a seventh resistor and a fifth capacitor; the first end of the seventh resistor is connected to the first LED light board to the fourth LED light board, the first end of the seventh resistor is connected to the ISP / A8 pin of the MCU chip in the microcontroller, and the second end of the seventh resistor is grounded; the fifth capacitor is connected in parallel with the seventh resistor.
[0015] Furthermore, the multi-pole dimming desk lamp also includes an input voltage ADC sampling circuit; the voltage ADC sampling circuit includes an eighth resistor, a ninth resistor, and a sixth capacitor; the first end of the eighth resistor is connected to the input voltage, the second end of the eighth resistor is grounded through the ninth resistor, the second end of the eighth resistor is grounded through the sixth capacitor, and the second end of the eighth resistor is also connected to the PA6 / RST / A0 pin of the MCU chip in the microcontroller.
[0016] Compared with the prior art, this utility model provides a multi-level dimming desk lamp, including a microcontroller, a Type-C female input circuit, an LDO voltage regulator circuit, a PD protocol communication circuit, a rotary encoder circuit, and a matrix LED lamp circuit; the Type-C female input circuit 200 is connected to the microcontroller through the PD protocol communication circuit and also through the LDO voltage regulator circuit; the rotary encoder circuit is connected to both the LDO voltage regulator circuit and the microcontroller; the matrix LED lamp circuit is connected to the Type-C female input circuit, the LDO voltage regulator circuit, and the microcontroller; the Type-C female input circuit is used to connect to the power adapter and to reduce the power adapter's dimming power. The input voltage after compression is input to the PD protocol communication circuit and the LDO voltage regulator circuit respectively. The PD protocol communication circuit is used to select a voltage level from multiple preset voltage levels via PD protocol communication and output it to the microcontroller. The LDO voltage regulator circuit is used to regulate the input voltage to the working voltage and output it to the microcontroller and the rotary encoder circuit. The rotary encoder circuit is used to control the switching and multi-level dimming of the matrix LED lamp circuit. The microcontroller is used to acquire the level signal and waveform output by the rotary encoder circuit and determine the dimming signal for the matrix LED lamp circuit. The matrix LED lamp circuit is used to perform multi-level dimming according to the dimming signal output by the microcontroller. In this embodiment of the invention, it can not only be powered by connecting to other device power adapters or charging devices that support the PD protocol through the Type-C interface, but also perform multi-level flexible dimming. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of the embodiments of this utility model, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this utility model. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 A schematic block diagram of the multi-level dimming desk lamp provided by this utility model;
[0019] Figure 2 This is a circuit diagram of the multi-level dimming desk lamp provided by this utility model. Detailed Implementation
[0020] The technical solutions of the present utility model will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present utility model, not all embodiments. Based on the embodiments of the present utility model, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of the present utility model.
[0021] The directional terms used in this invention, such as "up," "down," "front," "back," "left," "right," "inner," "outer," and "side," are merely for reference to the accompanying drawings. Therefore, the directional terms used are for explanation and understanding of this invention, and not for limiting it. Furthermore, in the accompanying drawings, structures that are similar or identical are indicated by the same reference numerals.
[0022] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0023] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0024] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0025] Please also refer to Figure 1and Figure 2 , Figure 1 This is a schematic block diagram of the multi-level dimming desk lamp provided by this utility model. Figure 2 This is a circuit diagram of the multi-level dimming desk lamp provided by this utility model. Figure 1 and Figure 2 As shown in the figure, the multi-level dimming desk lamp provided in this embodiment of the present invention includes: a microcontroller 100, a Type-C female input circuit 200, an LDO voltage regulator circuit 300, a PD protocol communication circuit 400, a rotary encoder circuit 500, and a matrix LED lamp circuit 600; the Type-C female input circuit 200 is connected to the microcontroller 100 through the PD protocol communication circuit 400, and is also connected to the microcontroller 100 through the LDO voltage regulator circuit 300; the rotary encoder circuit 500 is connected to both the LDO voltage regulator circuit 300 and the microcontroller 100; the matrix LED lamp circuit 600 is connected to the Type-C female input circuit 200, the LDO voltage regulator circuit 300, and the microcontroller 100; the Type-C female input circuit 200 is connected to both ... The PE-C female input circuit 200 is used to connect to the power adapter and input the stepped-down input voltage of the power adapter to the PD protocol communication circuit 400 and the LDO voltage regulator circuit 300 respectively; the LDO voltage regulator circuit 300 is used to regulate the input voltage to the working voltage and output it to the microcontroller 100 and the rotary encoder circuit 500; the rotary encoder circuit 500 is used to control the switching and multi-level dimming of the matrix LED circuit 600; the microcontroller 100 is used to acquire the level signal and waveform output by the rotary encoder circuit 500 and determine the dimming signal for the matrix LED circuit 600; the matrix LED circuit 600 is used to perform multi-level dimming according to the dimming signal output by the microcontroller 100.
[0026] In this embodiment, when the multi-level dimming desk lamp uses a Type-C female input circuit 200, a PD protocol communication circuit 400, and a rotary encoder circuit 500, if the Type-C female input circuit 200 is connected to the power adapter of another terminal (such as a smartphone supporting the Type-C protocol) and then connected to the mains power, or if the Type-C female input circuit 200 is directly connected to a power bank, the microcontroller 100 is connected to the PD protocol communication circuit 400 (which is used to select one voltage level from multiple preset voltage levels and output it to the microcontroller 100 via PD protocol communication), supporting multiple input voltage levels, thus achieving flexible power supply. Furthermore, the LDO voltage regulator circuit 300 is used to regulate the input voltage to the operating voltage and output it to the microcontroller 100, achieving stable power supply to the microcontroller 100. The microcontroller 100 acquires the signal output by the rotary encoder circuit 500 and can flexibly adjust the switching and brightness of the matrix LED light circuit 600. More specifically, the matrix LED light circuit 600 of the microcontroller 100 is used to perform multi-level dimming according to the dimming signal output by the microcontroller 100. Multi-level dimming divides the brightness range of the desk lamp into multiple discrete levels, and the brightness of the light is adjusted by switching different levels.
[0027] In one embodiment, such as Figure 1 and Figure 2 As shown, the microcontroller 100 includes an MCU chip U1, a first capacitor C1, and a second capacitor C2; the PA4 / T1C3N / T2C2_ / ADCE pin and the PA6 / RST / A0 pin of the MCU chip U1 are connected to the rotary encoder circuit 500; the PB0 / SWIO / CC1 / RX_ / A10 pin of the MCU chip U1 are connected to the PD protocol communication circuit 400; the PA2 / T1C1N / T1C3 pin of the MCU chip U1 are connected to the matrix LED circuit 600; the VHV pin of the MCU chip U1 is connected to the LDO voltage regulator circuit 300, and is also grounded through the first capacitor C1 and the second capacitor C2 connected in parallel.
[0028] In this embodiment, the microcontroller 100 serves as the core control device, with its corresponding pins connected to the LDO voltage regulator circuit 300, the PD protocol communication circuit 400, the rotary encoder circuit 500, and the matrix LED light circuit 600, respectively. After the LDO voltage regulator circuit 300 and the PD protocol communication circuit 400 jointly provide a stable operating voltage, the microcontroller 100 can also acquire the signal output from the rotary encoder circuit 500 and flexibly adjust the switching brightness of the matrix LED light circuit 600.
[0029] In one embodiment, such as Figure 1 and Figure 2 As shown, the Type-C female input circuit 200 includes a 16-pin Type-C female connector; pins B4, B9, and A9 of the Type-C female connector are connected to the input voltage; pin A5 of the Type-C female connector is connected to the PD protocol communication circuit 400; pins B1, B12, A1, and A12 of the Type-C female connector are grounded.
[0030] In this embodiment, the Type-C female input circuit 200 specifically adopts a 16-pin Type-C female connector (such as its model TYPE-C-2.0-16PIN-SMT-3). Pins B4, B9, A4, and A9 can all be used as power input points, while pin A5 of the Type-C female connector serves as a PD protocol communication terminal. Moreover, the Type-C female connector can be connected to a power adapter or power bank in either direction, making full use of the flexible reversible nature of the Type-C female connector.
[0031] In one embodiment, such as Figure 1 and Figure 2 As shown, the IN pin of the LDO voltage regulator circuit 300 is connected to the input voltage, and the OUT pin of the LDO voltage regulator circuit 300 outputs the operating voltage to the VHV pin of the MCU chip U1 and the rotary encoder circuit 500; the GND pin of the LDO voltage regulator circuit 300 is grounded.
[0032] In this embodiment, the LDO voltage regulator circuit 300 can specifically be an HT7550 LDO voltage regulator circuit, and specifically as follows: Figure 2 U2 in the circuit is used to stabilize the 5-15V operating voltage to 5V and then supply power to the MCU chip U1. Furthermore, the LDO voltage regulator circuit 300 can also power the rotary encoder circuit 500.
[0033] In one embodiment, such as Figure 1 and Figure 2 As shown, the PD protocol communication circuit 400 includes a first resistor R1; the first end of the first resistor R1 is connected to the A5 pin of the Type-C female connector, and also to the PB0 / SWIO / CC1 / RX_ / A10 pin of the MCU chip U1.
[0034] In this embodiment, the PD protocol communication circuit 400 uses the PD protocol, and after the Type-C female input circuit 200 is connected to the power adapter, the specific PD protocol power supply process is as follows: The power adapter, acting as the host source, sends a cap broadcast (e.g., 5V / 3A, 9V / 2A, 12V / 2A) → The slave sink (e.g., MCU chip U1) sends a Good CRC (meaning the cyclic redundancy check result is correct) and a request (e.g., 9V / 2A) to the host source based on the received broadcast cap → The host source sends a Good CRC and an accept request → The host source sends an RDY message (RDY message can represent a Ready message, used to indicate the notification message corresponding to the ready state) → The slave sink replies with a Good CRC → The host source adjusts the VBUS output voltage to the sink's requested level (e.g., 9V / 2A) to complete the power supply output. Through the PD protocol communication circuit, a wide voltage input is achieved, that is, the working voltage can be flexibly selected, supporting 5V, 9V, 12V, 15V, etc. Specifically, when the A5 pin of the Type-C female connector is connected to the first end of the first pull-down resistor R1 via the CC line, and is also connected to the PB0 / SWIO / CC1 / RX_ / A10 pins of the MCU chip U1, and the second end of the first resistor R1 is grounded, the first resistor R1 connected to the CC line is configured as a slave mode, which can only draw power.
[0035] In one embodiment, such as Figure 1 and Figure 2 As shown, the rotary encoder circuit 500 includes a rotary encoder U3, a second resistor R2, a third resistor R3, and a fourth resistor R4; the E terminal of the rotary encoder U3 is connected to the LDO voltage regulator circuit 300 (e.g., ...) through the second resistor R2. Figure 2 The OUT pin of the rotary encoder U2 is connected (i.e., the operating voltage VCC is input), and is also connected to the PB8 / Q11 / A9 pins of the MCU chip U1; the B terminal of the rotary encoder U3 is connected to the OUT pin of the LDO voltage regulator circuit 300 through the third resistor R3, and is also connected to the PA4 / T1C3N / T2C2_ / ADCE pins of the MCU chip U1; the A terminal of the rotary encoder U3 is connected to the OUT pin of the LDO voltage regulator circuit 300 through the fourth resistor R4, and is also connected to the PA6 / RST / A0 pins of the MCU chip U1; the C and D terminals of the rotary encoder U3 are grounded.
[0036] In this embodiment, the rotary encoder circuit 500 can specifically be an EC115 type rotary encoder, which is a component used for switching and brightness control of the matrix LED light circuit 600. The MCU chip U1 reads the SW1 line connected to the E terminal of the rotary encoder U3 (…). Figure 2 The low-level signal on the connection between the KEY signal terminal and the E terminal of the rotary encoder U3 (considered as line SW1) is used for on / off detection. Furthermore, the MCU chip U1 reads the pulse waveforms from the A and B terminals of the rotary encoder U3. If the A phase corresponding to terminal A leads the B phase of terminal B, the rotary encoder U3 is determined to rotate clockwise; if the A phase corresponding to terminal A lags the B phase of terminal B, the rotary encoder U3 is determined to rotate counterclockwise. The MCU chip U1 can also record the number of pulses output from terminals A and B, which serves as the increment and decrement of the dimming level. This allows a single rotary encoder to replace buttons for controlling the on / off and multi-level dimming of the control light, simplifying the control method.
[0037] In one embodiment, such as Figure 1 and Figure 2 As shown, the matrix LED light circuit 600 includes an LED light board matrix ( Figure 2 The components include (not shown in the diagram), a fifth resistor R5, a sixth resistor R6, a first transistor Q1, a first MOSFET Q2, a third capacitor C3, and a fourth capacitor C4. The first end of the fifth resistor R5 is connected to the PA2 / T1C1N / T1C3 pin of the MCU chip U1, and the second end of the fifth resistor R5 is connected to the base of the first transistor Q1. The collector of the first transistor Q1 is connected to the input voltage through the sixth resistor R6, and the collector of the first transistor Q1 is also connected to the gate of the first MOSFET Q2. The emitter of the first transistor Q1 is connected to the LED light panel matrix. The drain of the first MOSFET Q2 is connected to the input voltage, and the source of the first MOSFET Q2 is grounded through the parallel third capacitor C3 and the fourth capacitor C4, and is also connected to the LED light panel matrix.
[0038] In this embodiment, the LED light panel matrix consists of multiple parallel-connected light-emitting diodes. Its front-end uses a PWM pulse width modulation control circuit composed of a first transistor Q1 (specifically an NPN transistor) and a first MOSFET Q2 (specifically a P-MOS transistor) to control the output current of the light panel. The third capacitor C3 and the fourth capacitor C4 filter the output voltage ripple. By adjusting the PWM pulse output of the PWM control circuit, the LED light panel matrix can adapt to different voltage levels and dimming settings.
[0039] Furthermore, the LED light panel matrix includes a first LED light panel 610, a second LED light panel 620, a third LED light panel 630, and a fourth LED light panel 640 connected in parallel; each of the first LED light panel to the fourth LED light panel includes three light-emitting diodes connected in parallel; wherein, each of the first LED light panel 610 to the fourth LED light panel 640 is connected to the source of the first MOS transistor Q2.
[0040] In this embodiment, the LED light panel matrix may specifically include four LED light panels arranged in parallel, and are respectively designated as the first LED light panel 610, the second LED light panel 620, the third LED light panel 630, and the fourth LED light panel 640. Each of the four LED light panels includes three LEDs connected in parallel. For example, the first LED light panel 610 includes the tenth LED (LED10), the eleventh LED (LED11), and the tenth LED (LED12); the second LED light panel 620 includes the first LED (LED1), the second LED (LED2), and the fifth LED (LED5); the third LED light panel 630 includes the third LED (LED3), the fourth LED (LED4), and the sixth LED (LED6); and the fourth LED light panel 640 includes the seventh LED (LED7), the eighth LED (LED8), and the ninth LED (LED9). The positive terminal of each LED in the first LED light panel 610 to the fourth LED light panel 640 is connected to the source of the first MOSFET Q2. The LED light board matrix with the above circuit structure can be flexibly turned on / off and its brightness adjusted by the MCU chip.
[0041] In one embodiment, such as Figure 1 and Figure 2 As shown, the multi-level dimming desk lamp also includes a current sampling circuit; the current sampling circuit includes a seventh resistor R7 and a fifth capacitor C5; the first end of the seventh resistor R7 is connected to the first LED light board to the fourth LED light board, the first end of the seventh resistor R7 is connected to the ISP / A8 pin of the MCU chip U1 in the microcontroller, and the second end of the seventh resistor R7 is grounded; the fifth capacitor C5 is connected in parallel with the seventh resistor R7.
[0042] In this embodiment, the ISP / A8 pin of the MCU chip U1 can be used as the AD_IN8 sampling port. The seventh resistor R7 in the current sampling circuit (which can be considered a load power resistor and can convert current to voltage) converts the current into voltage Vin, which is then detected by the AD_IN8 sampling port of the MCU chip U1. After amplification by the operational amplifier inside the MCU chip U1, V2 is obtained, and Vin = V2 / B (where B is the amplification factor). This allows the calculation of the actual current through the seventh resistor R7, which is Vin / R7's resistance value, or V2 / (B*R7's resistance value). The MCU chip U1 compares the actual current through the seventh resistor R7 with the feedback current to adjust the PWM pulse output pulse width of the PA2 / T1C1N / T1C3 pins of the MCU chip U1 (its output signal is used as follows...). Figure 2 The PWM_OUT parameter in the code indicates that the system can adapt to different voltage levels and dimming settings. Furthermore, current feedback control is used on the LED light panel matrix to flexibly control the brightness of the lights and prevent overcurrent.
[0043] In one embodiment, such as Figure 1 and Figure 2 As shown, the multi-pole dimming desk lamp also includes an input voltage ADC sampling circuit; the voltage ADC sampling circuit includes an eighth resistor R8, a ninth resistor R9, and a sixth capacitor C6; the first end of the eighth resistor R8 is connected to the input voltage, the second end of the eighth resistor R8 is grounded through the ninth resistor R9, the second end of the eighth resistor R8 is grounded through the sixth capacitor C6, and the second end of the eighth resistor R8 is also connected to the PA6 / RST / A0 pin of the MCU chip U1.
[0044] In this embodiment, the input voltage ADC sampling circuit is used to sample the input voltage connected to the Type-C female input circuit to confirm whether the PD protocol has successfully negotiated power supply. In this way, the PD protocol completes the design of wide voltage power supply and controllable output current for Type-C.
[0045] This utility model provides a multi-level dimming desk lamp, including a microcontroller, a Type-C female input circuit, an LDO voltage regulator circuit, a PD protocol communication circuit, a rotary encoder circuit, and a matrix LED lamp circuit. The Type-C female input circuit 200 is connected to the microcontroller through the PD protocol communication circuit and also through the LDO voltage regulator circuit. The rotary encoder circuit is connected to both the LDO voltage regulator circuit and the microcontroller. The matrix LED lamp circuit is connected to the Type-C female input circuit 200, the LDO voltage regulator circuit, and the microcontroller. The Type-C female input circuit 200 is used to connect to a power adapter and step down the voltage of the power adapter. The input voltage is fed into the PD protocol communication circuit and the LDO voltage regulator circuit respectively. The PD protocol communication circuit selects a voltage level from multiple preset voltage levels via PD protocol communication and outputs it to the microcontroller. The LDO voltage regulator circuit regulates the input voltage to the operating voltage and outputs it to the microcontroller and the rotary encoder circuit. The rotary encoder circuit controls the switching and multi-level dimming of the matrix LED light circuit. The microcontroller acquires the level signal and waveform output by the rotary encoder circuit and determines the dimming signal for the matrix LED light circuit. The matrix LED light circuit performs multi-level dimming according to the dimming signal output by the microcontroller. In this embodiment, it can not only connect to other device power adapters or charging devices that support the PD protocol for power supply, but also perform multi-level flexible dimming.
[0046] The above description is merely a specific embodiment of this utility model, but the protection scope of this utility model is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this utility model, and these modifications or substitutions should all be covered within the protection scope of this utility model. Therefore, the protection scope of this utility model should be determined by the scope of the claims.
Claims
1. A multi-level dimming desk lamp, characterized in that, The system includes a microcontroller, a Type-C female input circuit, an LDO voltage regulator circuit, a PD protocol communication circuit, a rotary encoder circuit, and a matrix LED circuit. The Type-C female input circuit is connected to the microcontroller via the PD protocol communication circuit and also via the LDO voltage regulator circuit. The rotary encoder circuit is connected to both the LDO voltage regulator circuit and the microcontroller. The matrix LED circuit is connected to the Type-C female input circuit, the LDO voltage regulator circuit, and the microcontroller. The Type-C female input circuit is used to connect to a power adapter. The input voltage after being stepped down by the power adapter is then input to the PD protocol communication circuit and the LDO voltage regulator circuit, respectively. The LDO voltage regulator circuit is used to regulate the input voltage to the operating voltage and output it to the microcontroller and the rotary encoder circuit. The rotary encoder circuit is used to control the switching and multi-level dimming of the matrix LED light circuit. The microcontroller is used to acquire the level signal and waveform output by the rotary encoder circuit and determine the dimming signal for the matrix LED light circuit. The matrix LED light circuit is used to perform multi-level dimming according to the dimming signal output by the microcontroller.
2. The multi-level dimming desk lamp according to claim 1, characterized in that, The microcontroller includes an MCU chip, a first capacitor, and a second capacitor; the PA4 / T1C3N / T2C2_ / ADCE pin and the PA6 / RST / A0 pin of the MCU chip are connected to the rotary encoder circuit; the PB0 / SWIO / CC1 / RX_ / A10 pin of the MCU chip is connected to the PD protocol communication circuit; the PA2 / T1C1N / T1C3 pin of the MCU chip is connected to the matrix LED circuit; the VHV pin of the MCU chip is connected to the LDO voltage regulator circuit, and is also grounded through the first capacitor and the second capacitor connected in parallel.
3. The multi-level dimming desk lamp according to claim 1, characterized in that, The Type-C female input circuit includes a 16-pin Type-C female connector; pins B4, B9, and A9 of the Type-C female connector are connected to the input voltage; pin A5 of the Type-C female connector is connected to the PD protocol communication circuit; pins B1, B12, A1, and A12 of the Type-C female connector are grounded.
4. The multi-level dimming desk lamp according to claim 1, characterized in that, The IN pin of the LDO voltage regulator circuit is connected to the input voltage, and the OUT pin of the LDO voltage regulator circuit outputs the operating voltage to the VHV pin of the MCU chip in the microcontroller and the rotary encoder circuit; the GND pin of the LDO voltage regulator circuit is grounded.
5. The multi-level dimming desk lamp according to claim 1, characterized in that, The PD protocol communication circuit includes a first resistor; the first end of the first resistor is connected to the A5 pin of the Type-C female connector in the Type-C female connector input circuit, and is also connected to the PB0 / SWIO / CC1 / RX_ / A10 pins of the MCU chip in the microcontroller.
6. The multi-level dimming desk lamp according to claim 1, characterized in that, The rotary encoder circuit includes a rotary encoder, a second resistor, a third resistor, and a fourth resistor. The E terminal of the rotary encoder is connected to the OUT pin of the LDO voltage regulator circuit through the second resistor, and also to the PB8 / Q11 / A9 pins of the MCU chip in the microcontroller. The B terminal of the rotary encoder is connected to the OUT pin of the LDO voltage regulator circuit through the third resistor, and also to the PA4 / T1C3N / T2C2_ / ADCE pins of the MCU chip. The A terminal of the rotary encoder is connected to the OUT pin of the LDO voltage regulator circuit through the fourth resistor, and also to the PA6 / RST / A0 pins of the MCU chip. The C and D terminals of the rotary encoder are grounded.
7. The multi-level dimming desk lamp according to claim 1, characterized in that, The matrix LED circuit includes an LED light panel matrix, a fifth resistor, a sixth resistor, a first transistor, a first MOSFET, a third capacitor, and a fourth capacitor. The first terminal of the fifth resistor is connected to the PA2 / T1C1N / T1C3 pin of the MCU chip in the microcontroller, and the second terminal of the fifth resistor is connected to the base of the first transistor. The collector of the first transistor is connected to the input voltage through the sixth resistor, and the collector of the first transistor is also connected to the gate of the first MOSFET. The emitter of the first transistor is connected to the LED light panel matrix. The drain of the first MOSFET is connected to the input voltage, and the source of the first MOSFET is grounded through the parallel third and fourth capacitors and is also connected to the LED light panel matrix.
8. The multi-level dimming desk lamp according to claim 7, characterized in that, The LED light panel matrix includes a first LED light panel, a second LED light panel, a third LED light panel, and a fourth LED light panel connected in parallel; each of the first LED light panel to the fourth LED light panel includes three light-emitting diodes connected in parallel; wherein each of the first LED light panel to the fourth LED light panel is connected to the source of the first MOS transistor in the matrix LED light circuit.
9. The multi-level dimming desk lamp according to claim 8, characterized in that, It also includes a current sampling circuit; the current sampling circuit includes a seventh resistor and a fifth capacitor; the first end of the seventh resistor is connected to the first LED light board to the fourth LED light board, the first end of the seventh resistor is connected to the ISP / A8 pin of the MCU chip in the microcontroller, and the second end of the seventh resistor is grounded; the fifth capacitor is connected in parallel with the seventh resistor.
10. The multi-level dimming desk lamp according to any one of claims 1-9, characterized in that, It also includes an input voltage ADC sampling circuit; the voltage ADC sampling circuit includes an eighth resistor, a ninth resistor and a sixth capacitor; the first end of the eighth resistor is connected to the input voltage, the second end of the eighth resistor is grounded through the ninth resistor, the second end of the eighth resistor is grounded through the sixth capacitor, and the second end of the eighth resistor is also connected to the PA6 / RST / A0 pin of the MCU chip in the microcontroller.