CN221326726U - Multiplexing circuit capable of adjusting light and detecting keys and electronic product - Google Patents

Multiplexing circuit capable of adjusting light and detecting keys and electronic product Download PDF

Info

Publication number
CN221326726U
CN221326726U CN202322758178.XU CN202322758178U CN221326726U CN 221326726 U CN221326726 U CN 221326726U CN 202322758178 U CN202322758178 U CN 202322758178U CN 221326726 U CN221326726 U CN 221326726U
Authority
CN
China
Prior art keywords
key
mcu
ports
light adjustment
resistor
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
CN202322758178.XU
Other languages
Chinese (zh)
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.)
Shenzhen Zhenbang Technology Co ltd
Original Assignee
Shenzhen Zhenbang Technology Co ltd
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 Shenzhen Zhenbang Technology Co ltd filed Critical Shenzhen Zhenbang Technology Co ltd
Priority to CN202322758178.XU priority Critical patent/CN221326726U/en
Application granted granted Critical
Publication of CN221326726U publication Critical patent/CN221326726U/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

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

Abstract

The utility model discloses a multiplexing circuit capable of adjusting light and detecting keys and an electronic product, comprising an MCU, a light adjusting unit and a key detecting unit, wherein the MCU comprises a plurality of IO ports, and the IO ports are used for outputting level signals; the lamplight adjusting unit is connected with the plurality of IO ports; the key detection unit is connected with the light adjustment unit and the IO ports, and adjusts the brightness of the LED lamp in the light adjustment unit or detects keys in the key detection unit through level signals. The multiplexing circuit capable of adjusting the light and detecting the keys disclosed by the utility model can adjust the brightness of the LED lamp in the light adjusting unit or detect the keys in the key detecting unit by multiplexing the level signals output by the IO ports, can meet the application scene of resource requirements of multiple IO ports, does not need to replace MCU of more IO ports, and saves the production design cost.

Description

Multiplexing circuit capable of adjusting light and detecting keys and electronic product
Technical Field
The utility model relates to the technical field of electronic circuits, in particular to a multiplexing circuit capable of adjusting light and detecting keys and an electronic product.
Background
At present, when the dimming and key detection of the LED lamps are realized, the MCU is required to occupy the IO port resources of the MCU, and each dimming LED lamp and key are required to independently occupy the IO port resources of the MCU. Therefore, when the number of the LED lamps and the number of the keys in the circuit are more, the IO port resources of the MCU are insufficient, more MCU with IO port pins are required to be replaced, the cost of the MCU is increased along with the increase of the IO ports, and the cost of the circuit design is increased by replacing the MCU with multiple IO ports.
Therefore, in order to solve the problems, the utility model provides the multiplexing circuit capable of realizing light adjustment and key detection and the electronic product which can meet the resource requirements of multiple IO ports and are low in cost.
Disclosure of utility model
The utility model provides a multiplexing circuit capable of adjusting light and detecting keys and an electronic product, and aims to solve the problem that the circuit design cost is high due to the fact that the IO port resources of the existing MCU are few.
In order to solve the technical problem, an aspect of the present utility model provides a multiplexing circuit capable of light adjustment and key detection, which includes: the MCU comprises a plurality of IO ports, and the IO ports are used for outputting level signals; the lamplight adjusting unit is connected with the IO ports; the key detection unit is connected with the lamplight adjusting unit and the IO ports; and the brightness of the LED lamp in the light adjusting unit is adjusted through the level signal or the keys in the key detecting unit are detected.
Further, the number of the IO ports is M, the light adjusting unit comprises a switch module and N groups of light adjusting modules, the key detecting unit comprises N groups of key modules, N is more than or equal to 1, and M is more than or equal to N+2.
Further, the first connection end of the switch module is used for receiving input voltage, the second connection end of the switch module is connected with the MCU, the third connection end of the switch module is connected with one end of the light adjusting module, and the other end of the light adjusting module is connected with the key detection unit and the MCU.
Further, the switch module comprises a triode, an emitter of the triode is used for receiving the input voltage, a base electrode of the triode is connected with the MCU, and a collector electrode of the triode is connected with the light adjusting module.
Further, the light adjusting module comprises a resistor and an LED lamp, one end of the resistor is connected with a collector electrode of the triode, the other end of the resistor is connected with an anode of the LED lamp, and a cathode of the LED lamp is connected with the key detection unit and the MCU.
Further, one end of the key module is connected with the light adjusting module and the MCU, and the other end of the key module is connected with the MCU.
Further, the key module comprises a key and a diode, one end of the key is connected with the light adjusting module and the MCU, the other end of the key is connected with the anode of the diode, and the cathode of the diode is connected with the MCU.
Further, the key module further comprises a third resistor, one end of the third resistor is connected with the cathode of the diode, and the other end of the third resistor is grounded.
Further, the switch module further comprises a first resistor and a second resistor, one end of the first resistor is connected with the MCU, and the other end of the first resistor is connected with the base electrode of the triode; one end of the second resistor is connected with the emitting electrode of the triode and the input voltage, and the other end of the second resistor is connected between the base electrode of the triode and the first resistor.
The utility model also provides an electronic product, which is provided with the multiplexing circuit capable of adjusting the light and detecting the keys.
The multiplexing circuit capable of adjusting light and detecting keys comprises an MCU, a light adjusting unit and a key detecting unit, wherein the MCU comprises a plurality of IO ports, the IO ports are used for outputting level signals, the IO ports are connected with the light adjusting unit and the key detecting unit, the level signals output by the IO ports are used for adjusting the brightness of an LED lamp in the light adjusting unit or detecting keys in the key detecting unit, therefore, the application scene of resource requirements of the IO ports can be met, the MCU of more IO ports is not required to be replaced, and the production design cost is saved. The multiplexing circuit capable of light adjustment and key detection solves the problem that the circuit design cost is high due to the fact that the IO port resources of an MCU are few.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present utility model, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present utility model, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a multiplexing circuit capable of light adjustment and key detection according to an embodiment of the present utility model;
FIG. 2 is a schematic circuit diagram of a multiplexing circuit for light adjustment and key detection according to an embodiment of the present utility model;
FIG. 3 is a schematic diagram of an electronic product according to an embodiment of the present utility model;
Reference numerals:
10. Multiplexing circuit capable of light adjustment and key detection; 11. a light adjusting unit; 111. a switch module; 112. a light adjusting module; 12. a key detection unit; 121. a key module; 100. an electronic product.
Detailed Description
The following description of the embodiments of the present utility model will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the utility model. All other embodiments, which can be made by those skilled in the art based on the embodiments of the utility model without making any inventive effort, are intended to be within the scope of the utility model.
It should be understood that the terms "comprises" and "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the utility model herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the utility model. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
Fig. 1 to 3 illustrate an embodiment of a multiplexing circuit capable of light adjustment and key detection according to the present utility model. The multiplexing circuit 10 capable of light adjustment and key detection of the present embodiment is used for an electronic product 100 that requires light brightness adjustment and key detection, and includes an MCU, a light adjustment unit 11, and a key detection unit 12, where the MCU includes a plurality of IO ports, and the IO ports are used for outputting level signals; the lamplight adjusting unit 11 is connected with a plurality of IO ports; the key detection unit 12 is connected with the light adjustment unit 11 and a plurality of IO ports, and the brightness of the LED lamps in the light adjustment unit 11 is adjusted or keys in the key detection unit 12 are detected through the level signals, so that the application scene of the resource requirements of a plurality of IO ports can be met, the MCU of more IO ports is not required to be replaced, and the production design cost is saved. It should be noted that, the level signal in this embodiment includes a high-low level signal, that is, the IO port of the MCU may output a high-level or low-level signal.
In an embodiment, for example, in this embodiment, the number of the IO ports is M, the light adjusting unit 11 includes a switch module 111 and N groups of light adjusting modules 112, the key detecting unit 12 includes N groups of key modules 121, N is greater than or equal to 1, and M is greater than or equal to n+2. Specifically, in the present embodiment, the light adjustment unit 11 includes 6 groups of light adjustment modules 112, and the key detection unit 12 includes 6 groups of key modules 121, i.e., n=6; the number m=8 of the plurality of the IO ports. It should be noted that, the number of the light adjusting modules 112 and the key modules 121 is not limited to 6 groups, but may be other numbers, for example, n=5 groups or n=7 groups, and the number of the IO ports of the MCU may be more, and only the relationship m++2 needs to be satisfied, which is not particularly limited herein.
In an embodiment, for example, in this embodiment, the first connection end of the switch module 111 is configured to receive the input voltage VDD, the second connection end of the switch module 111 is connected to the MCU, the third connection end of the switch module 111 is connected to one end of the light adjustment module 112, and the other end of the light adjustment module 112 is connected to the key detection unit 12 and the MCU. Specifically, the switch module 111 includes a triode T2, an emitter of the triode T2 is configured to receive the input voltage VDD, a base of the triode T2 is connected to the MCU, and a collector of the triode T2 is connected to the light adjusting module 112. Further, the switch module 111 further includes a first resistor R55 and a second resistor R56, wherein one end of the first resistor R55 is connected to the emitter of the triode T2 and the input voltage VDD, and the other end is connected between the base of the triode T2 and the second resistor R56; one end of the second resistor R56 is connected with the MCU, and the other end is connected with the base electrode of the triode T2. It should be noted that, in this embodiment, the triode T2 is a PNP triode, where when the IO port connected to the base of the triode T2 outputs a high level, the triode T2 is turned off; when the IO port connected with the base electrode of the triode T2 outputs low level, the triode T2 is conducted.
In an embodiment, for example, as shown in fig. 2, the light adjusting module 112 includes a resistor and the LED lamp, one end of the resistor is connected to the collector of the triode T2, the other end is connected to the anode of the LED lamp, and the cathode of the LED lamp is connected to the key detecting unit 12 and the MCU. Specifically, the light adjusting modules 112 are 6 groups, each group of light adjusting modules 112 includes a resistor and an LED lamp (i.e., includes 6 groups of resistors R5 to R10 and 6 groups of LED lamps LED1 to LED 6), the resistor and the LED lamps are connected in series, and each group of light adjusting modules 112 is connected in parallel. The LED lamp in the light adjusting module 112 can adjust brightness according to the high level time and the low level time output by the IO port of the MCU, so as to achieve the purpose of dimming.
In an embodiment, for example, in this embodiment, one end of the key module 121 is connected to the light adjusting module 112 and the MCU, and the other end is connected to the MCU. The key modules 121 are 6 groups, each group of key modules 121 comprises keys and diodes (namely, each group of key modules comprises 6 groups of keys SW 1-SW 6 and 6 groups of diodes D1-D6), one end of each key is connected with the light adjusting module 112 and the MCU, the other end of each key is connected with the anode of each diode, and the cathode of each diode is connected with the MCU. Further, the key module 121 further includes a third resistor R21, one end of the third resistor R21 is connected to the cathodes of the diodes (D1 to D6), and the other end is grounded.
For convenience of understanding, the operation of the multiplexing circuit 10 for light adjustment and key detection when the key detection unit 12 performs key detection and the light adjustment unit 11 performs brightness adjustment will now be described as follows:
The timer of the MCU is used for setting 50us interrupt timing, a timer interrupt is generated every 50us and used for key detection and LED lamp brightness adjustment, and 100 50us interrupts are taken as a period, so that the whole period time is 100 times 50 us=5 ms, wherein the previous 10 interrupt processing modes are as follows:
a. The first interrupt, the IO port of MCU outputs the high level, namely "KEY" node in figure 2 outputs the high level, triode T2 is turned off, non-conductive, the light regulating module 112 can' T cut in the input voltage VDD, begin the KEY detection scans at this moment;
b. The second interrupt, the IO port connected with the LED1 outputs a high-level signal, the IO ports corresponding to the other LED lamps (LED 2-LED 6) output a low-level signal, if the KEY SW1 is pressed, the high-level signal output by the IO port corresponding to the LED1 is output to a key_C node through a diode D1 to be input to the MCU, if the MCU reads the key_C node, the high-level signal can be read, the KEY SW1 is detected to be pressed, otherwise, the KEY SW1 is not pressed;
c. The third interrupt, the IO port connected with the LED2 outputs a high-level signal, the IO ports corresponding to the other LED lamps (LED 1, LED 3-LED 6) output a low-level signal, if the KEY SW2 is pressed, the high-level signal output by the IO port corresponding to the LED2 is output to a key_C node through a diode D2 to be input to the MCU, if the MCU reads the key_C node, the MCU can read the high-level signal, the KEY SW2 is detected to be pressed, otherwise, the KEY SW2 is not pressed;
d. A fourth interrupt, the IO port connected with the LED3 outputs a high-level signal, the IO ports corresponding to the other LED lamps (LEDs 1-2 and LEDs 4-6) output a low-level signal, if the KEY SW3 is pressed, the high-level signal output by the IO port corresponding to the LED3 is output to a key_C node through a diode D3 to be input to the MCU, if the MCU reads the key_C node, the high-level signal can be read, the KEY SW3 is detected to be pressed, otherwise, the KEY SW3 is not pressed;
e. A fifth interrupt, the IO port connected with the LED4 outputs a high-level signal, the IO ports corresponding to the other LED lamps (LEDs 1-3 and LEDs 5-6) output a low-level signal, if the KEY SW4 is pressed, the high-level signal output by the IO port corresponding to the LED4 is output to a key_C node through a diode D4 to be input to the MCU, if the MCU reads the key_C node, the high-level signal can be read, the KEY SW4 is detected to be pressed, otherwise, the KEY SW4 is not pressed;
f. A sixth interrupt, wherein the IO port connected with the LED5 outputs a high-level signal, the IO ports corresponding to the other LED lamps (LEDs 1-4 and LED 6) output a low-level signal, if the KEY SW5 is pressed, the high-level signal output by the IO port corresponding to the LED5 is output to a key_C node through a diode D5 to be input to the MCU, if the MCU reads the key_C node, the high-level signal can be read, the KEY SW5 is detected to be pressed, otherwise, the KEY SW5 is not pressed;
g. Seventh interrupt, the IO port connected with the LED6 outputs a high-level signal, the IO ports corresponding to the other LED lamps (LEDs 1-5) output a low-level signal, if the KEY SW6 is pressed, the high-level signal output by the IO port corresponding to the LED6 is output to the key_C node through the diode D6 to be input to the MCU, if the MCU reads the key_C node, the high-level signal can be read, which indicates that the KEY SW6 is pressed, otherwise, the KEY SW6 is not pressed.
The eighth to tenth interruption, the key detection is completed, and in order to keep the time sequence alignment, the transistor T2 can be kept off, and the LED lamp is still in an off state. The number of interrupts is 90 from the 11 th interrupt to the 100 th interrupt, when the 'KEY' node receives the low level signal output by the IO port of the MCU within 4.5ms of the 90-time interrupt, the triode T2 works in a saturation region and is saturated and conducted, the light adjusting module 112 is connected with the input voltage VDD, wherein the IO ports corresponding to the LEDs 1 to 6 in the light adjusting module 112 output the low level signal or output the high level signal, and the LED lamp can be turned on or off.
Furthermore, the high-level and low-level time can be distributed and output within 90 times of interruption time by the IO ports corresponding to the LEDs 1-6 according to the dimming brightness requirement of the LED lamp, so that the dimming purpose is achieved. For example, if the LED lamp is set to be on at low level and off at high level, then:
When the required brightness of the LED1 is 50%, in 90 times of interrupt time, the IO port corresponding to the LED1 outputs high level in 45 times of interrupt time, and the LED1 outputs low level in 45 times of interrupt time, so that the brightness of the LED1 is 50%;
When the required brightness of the LED2 is 100%, the IO port corresponding to the LED2 always outputs a low level in 90 interrupt times.
When the brightness of the LED3 is 80%, the IO port corresponding to the LED3 outputs high level in the 90 times of interrupt time, and the IO port corresponding to the LED3 outputs low level in the 18 times of interrupt time, and the brightness of the LED3 is 80%.
And so on, the brightness adjustment of all the LED lamps is carried out according to the adjustment mode.
In sum, the operation of the key detection and the LED lamp brightness adjustment is circulated, so that the purposes of realizing the LED lamp brightness adjustment and the key detection by multiplexing the IO ports of the MCU can be realized, and the problem that the MCU has higher circuit design cost due to less IO port resources can be effectively solved under the condition that the MCU with more IO ports is not required to be replaced.
In an embodiment, for example, in this embodiment, still further provide an electronic product 100, referring to fig. 3, the electronic product 100 is provided with the multiplexing circuit 10 capable of adjusting light and detecting keys, where the electronic product 100 is a product that needs light brightness adjustment and key detection, for example, an electronic product such as a coffee machine, an air fryer, etc.
The multiplexing circuit capable of adjusting light and detecting keys comprises an MCU, a light adjusting unit and a key detecting unit, wherein the MCU comprises a plurality of IO ports, the IO ports are used for outputting level signals, the IO ports are connected with the light adjusting unit and the key detecting unit, the level signals output by the IO ports are used for adjusting the brightness of an LED lamp in the light adjusting unit or detecting keys in the key detecting unit, therefore, the application scene of resource requirements of the IO ports can be met, the MCU of more IO ports is not required to be replaced, and the production design cost is saved. The multiplexing circuit capable of light adjustment and key detection solves the problem that the circuit design cost is high due to the fact that the IO port resources of an MCU are few.
While the utility model has been described with reference to certain preferred embodiments, it will be understood by those skilled in the art that various changes and substitutions of equivalents may be made and equivalents will be apparent to those skilled in the art without departing from the scope of the utility model. Therefore, the protection scope of the utility model is subject to the protection scope of the claims.

Claims (10)

1. Multiplexing circuit capable of adjusting light and detecting keys, which is characterized by comprising:
The MCU comprises a plurality of IO ports, and the IO ports are used for outputting level signals;
the lamplight adjusting unit is connected with the IO ports;
The key detection unit is connected with the lamplight adjusting unit and the IO ports;
And the brightness of the LED lamp in the light adjusting unit is adjusted through the level signal or the keys in the key detecting unit are detected.
2. The multiplexing circuit for light adjustment and key detection according to claim 1, wherein the number of the IO ports is M, the light adjustment unit comprises a switch module and N groups of light adjustment modules, the key detection unit comprises N groups of key modules, N is greater than or equal to 1, and M is greater than or equal to N+2.
3. The multiplexing circuit for light adjustment and key detection according to claim 2, wherein a first connection end of the switch module is used for receiving an input voltage, a second connection end of the switch module is connected with the MCU, a third connection end of the switch module is connected with one end of the light adjustment module, and the other end of the light adjustment module is connected with the key detection unit and the MCU.
4. A multiplexing circuit for light adjustment and key detection according to claim 3 wherein said switching module comprises a triode, an emitter of said triode is configured to receive said input voltage, a base of said triode is connected to said MCU, and a collector of said triode is connected to said light adjustment module.
5. The multiplexing circuit for light adjustment and key detection according to claim 4, wherein the light adjustment module comprises a resistor and the LED lamp, one end of the resistor is connected with a collector of the triode, the other end of the resistor is connected with an anode of the LED lamp, and a cathode of the LED lamp is connected with the key detection unit and the MCU.
6. The multiplexing circuit for light adjustment and key detection according to claim 2, wherein one end of the key module is connected to the light adjustment module and the MCU, and the other end is connected to the MCU.
7. The multiplexing circuit for light adjustment and key detection according to claim 6, wherein the key module comprises a key and a diode, one end of the key is connected with the light adjustment module and the MCU, the other end is connected with an anode of the diode, and a cathode of the diode is connected with the MCU.
8. The multiplexing circuit for light adjustment and key detection according to claim 7, wherein the key module further comprises a third resistor, one end of the third resistor is connected to the cathode of the diode, and the other end is grounded.
9. The multiplexing circuit for light adjustment and key detection according to claim 4, wherein the switch module further comprises a first resistor and a second resistor, one end of the first resistor is connected with the MCU, and the other end is connected with the base electrode of the triode; one end of the second resistor is connected with the emitting electrode of the triode and the input voltage, and the other end of the second resistor is connected between the base electrode of the triode and the first resistor.
10. An electronic product, characterized in that the electronic product is provided with a multiplexing circuit for light adjustment and key detection as claimed in any one of claims 1-9.
CN202322758178.XU 2023-10-13 2023-10-13 Multiplexing circuit capable of adjusting light and detecting keys and electronic product Active CN221326726U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202322758178.XU CN221326726U (en) 2023-10-13 2023-10-13 Multiplexing circuit capable of adjusting light and detecting keys and electronic product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202322758178.XU CN221326726U (en) 2023-10-13 2023-10-13 Multiplexing circuit capable of adjusting light and detecting keys and electronic product

Publications (1)

Publication Number Publication Date
CN221326726U true CN221326726U (en) 2024-07-12

Family

ID=91783839

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202322758178.XU Active CN221326726U (en) 2023-10-13 2023-10-13 Multiplexing circuit capable of adjusting light and detecting keys and electronic product

Country Status (1)

Country Link
CN (1) CN221326726U (en)

Similar Documents

Publication Publication Date Title
CN110191539B (en) Drive circuit, drive chip, display system and display method
TWI697883B (en) Display system and its driving circuit
CN213583061U (en) Digital LED control circuit with address and capable of being connected in series and parallel at will
TWI692747B (en) Display system and its shared driving circuit
US20120038287A1 (en) Lighting system, dimming control apparatus and dimming control method
CN112397015B (en) Driving device, display control chip, display device and display control method
CN212183780U (en) Drive circuit and lamp
CN221326726U (en) Multiplexing circuit capable of adjusting light and detecting keys and electronic product
CN211909244U (en) LED drive circuit with variable color temperature
CN214381497U (en) Digital LED module capable of being randomly connected in series and parallel
CN113891523B (en) Driving circuit, driving chip, driving system and driving method suitable for pulsating voltage
CN214954937U (en) Partial pressure drive circuit, infrared touch signal drive circuit and infrared touch screen
US10455673B1 (en) Light string with a non-extinguishing function and an independent LED blinking function
CN211720785U (en) Alternating current linear module, LED lamp and LED remote control system
CN115116382A (en) LED display screen
CN216596235U (en) IO port expansion prompting circuit
CN116647956B (en) Parallel time-sharing multiplexing brightness control system based on series switch
CN215815132U (en) Backlight protection circuit
CN213694233U (en) LED constant-brightness adjusting circuit and electronic equipment
CN221652812U (en) Dimming control circuit set by using switch and switch dimming LED lamp circuit
CN215773647U (en) Light and color adjusting circuit, driving device and lamp
CN216956736U (en) Multifunctional control circuit based on port function multiplexing and electrical appliance
CN213244404U (en) Multi-LED driving and multi-key pin multiplexing circuit
US11184966B2 (en) Method and means for setting a current source for a light-emitting diode array
CN220123106U (en) Constant current control circuit for double light sources

Legal Events

Date Code Title Description
GR01 Patent grant
GR01 Patent grant