A scanning circuit of LED matrix and key matrix and fire protection product

By designing the LED matrix and key matrix scanning circuit that share I/O ports, using transistor drive and current sharing resistors, the problems of waste of MCU resources and inconsistent LED brightness are solved, and efficient and low-cost multi-LED and multi-key scanning are achieved.

CN222706499UActive Publication Date: 2025-04-01GERUITONG ELECTRONICS (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202420569778.3
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2024-03-22
Publication Date
2025-04-01
Estimated Expiration
2034-03-22

AI Technical Summary

Technical Problem

In existing fire protection products, MCUs need to provide I/O pin resources for LED scanning circuits and key matrix scanning circuits respectively, resulting in waste of resources; adding additional driver chips will increase cost and circuit complexity, and may lead to problems of inconsistent LED brightness.

Method used

A scanning circuit of LED matrix and key matrix is ​​designed. The LED matrix scanning module and key matrix scanning module share the scanning I/O port, and the transistor drive and current-sharing resistor are used to realize the scanning of multiple LEDs and multiple keys, avoiding the use of additional chips.

Benefits of technology

It realizes scanning multiple buttons and LEDs under a small number of I/O ports, saving MCU resources, reducing hardware costs and circuit complexity, avoiding the problem of inconsistent LED brightness, and improving the reliability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN222706499U_ABST
    Figure CN222706499U_ABST
Patent Text Reader

Abstract

The utility model relates to a scanning circuit and a fire protection product of an LED matrix and a key matrix, comprising an LED matrix scanning module and a key matrix scanning module, and an MCU connected through an I / O port, wherein the LED matrix scanning module comprises a plurality of groups of M*N matrix-arranged LEDs, wherein the anode of each group of LEDs is connected to the collector of an anode triode, the base is connected to the I / O port through a COL terminal, the cathode of each group of LEDs is connected to the collector of a cathode triode, the emitter of the cathode triode is grounded, and the base is connected to the I / O port through a ROW terminal, and the key matrix scanning module comprises the same number of keys as the LED matrix scanning module, wherein each group of LEDs corresponds to a group of keys so that the keys are arranged in an M*N matrix, one end of the key is connected to the I / O port and the LED matrix scanning module through a COL terminal, and the other end of the key is connected to a pull-up input I / O port through a KEY terminal. The LED matrix scanning module and the key matrix scanning module share a scanning I / O port, and a small number of I / O ports are used to realize scanning of multiple keys and multiple LEDs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The utility model relates to an LED and a key scanning circuit, in particular to a scanning circuit of an LED matrix and a key matrix and a fire protection product. Background Art

[0002] Generally, LED scanning and key matrix scanning arrange the LEDs or keys in rows and columns, and then use the chip's I / O pins to scan row by row or column by column. However, some fire protection products currently require a large number of LEDs and keys, and the MCU needs to provide I / O pin resources for the LED scanning circuit and the key matrix scanning circuit respectively, which wastes MCU resources. If additional driver chips are added for expansion, the cost and circuit complexity will increase, and the brightness of LEDs in the same row or column will be different.

[0003] Chinese patent announcement number CN201878131U relates to a matrix button and LED scanning circuit, which includes a matrix button scanning matrix LED scanning respectively connected to the corresponding I / O port of the main control chip. The utility model can achieve: scanning multiple buttons and LED light-emitting diodes under a small number of ports without increasing the cost and circuit complexity. Although the patent also realizes a small number of I / O ports to scan multiple buttons and LEDs, it directly drives, and it is easy for the LED to burn out when the short-term current is large, and there is a lack of protection measures. And because there is no current-sharing resistor, the brightness of the LED lamp may be different. Utility Model Content

[0004] The technical problem to be solved by the utility model is that some fire protection products currently need to be configured with a large number of LEDs and buttons, and the MCU needs to provide I / O pin resources to the LED scanning circuit and the button matrix scanning circuit respectively, which will waste MCU resources. If additional driver chips are added for expansion, the cost and circuit complexity will increase, and the LEDs in the same row or column will have different brightness. In view of the above-mentioned defects of the prior art, a scanning circuit of an LED matrix and a button matrix and a fire protection product are provided.

[0005] In order to solve the above technical problems, the technical solution adopted by the utility model is:

[0006] A scanning circuit for an LED matrix and a key matrix is ​​constructed, comprising an LED matrix scanning module and a key matrix scanning module, and an MCU connected to the LED matrix scanning module and the key scanning module, wherein the MCU is connected to the LED matrix scanning module and the key scanning module through an I / O port, wherein the LED matrix scanning module comprises a plurality of groups of LED lamps, wherein the plurality of groups of LED lamps are arranged in an M*N matrix according to M rows and N columns, wherein the anode of each group of LEDs is connected to the collector of an anode triode, wherein the emitter of the anode triode is connected to a constant voltage source, and the base is connected to the I / O port through a COL connecting terminal, wherein the cathode of each group of LEDs is connected to the collector of a cathode triode, wherein the emitter of the cathode triode is grounded, and the base is connected to the I / O port through a ROW terminal, wherein the key matrix scanning module comprises the same number of keys as the LED matrix scanning module, wherein each group of LEDs corresponds to a group of keys so that the keys are arranged in an M*N matrix, wherein one end of the key is connected to the I / O port and the LED matrix scanning module through a COL connecting terminal, and the other end of the key is connected to a pull-up input I / O port through a KEY connecting terminal.

[0007] Preferably, the LED matrix scanning module further includes an anode transistor driving resistor, and the anode transistor is connected to the COL connection terminal via the anode transistor driving resistor.

[0008] Preferably, the LED matrix scanning module further includes a cathode triode driving resistor, the base of the cathode triode is connected to the ROW connection terminal via the cathode triode driving resistor, and the cathode triode driving resistor is connected between the emitter and the base of the cathode triode.

[0009] Preferably, the collector of the cathode transistor is connected to the cathode of the LED lamp through a current-sharing resistor, the LED lamps in each row share a set of current-sharing resistors and cathode transistors, and the LED lamps in each column share a set of anode transistors.

[0010] Preferably, the anode transistor is a PNP transistor, and the cathode transistor is an NPN transistor.

[0011] Preferably, one end of the button is connected to the COL connection end via a current limiting resistor, and the other end is connected to the KEY connection end via a current limiting resistor.

[0012] Preferably, the other end of the button is also connected to a pull-up resistor, and the other end of the pull-up resistor is connected to a constant voltage source.

[0013] Preferably, each row of keys shares a set of current limiting resistors and pull-up resistors, and each column of keys shares a set of current limiting resistors.

[0014] A fire protection product is constructed, comprising a plurality of groups of LED lights and buttons of the same number, wherein the LED lights and buttons are arranged in a matrix in the same manner. The fire protection product also contains a scanning circuit for the LED matrix and button matrix as described above for scanning.

[0015] The beneficial effects of the utility model are: the LED matrix scanning module and the button matrix scanning module share the scanning I / O port, using a small number of I / O ports to realize the scanning of multiple buttons and multiple LEDs; using the same scanning mode and scanning cycle, saving MCU timer resources; directly using the MCU's I / O port and transistor drive, avoiding the use of expansion chips, saving hardware costs, reducing circuit complexity, and improving reliability. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the embodiments of the utility model or the technical solutions in the prior art, the utility model will be further described below in conjunction with the accompanying drawings and embodiments. The drawings described below are only some embodiments of the utility model. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work:

[0017] Figure 1 A circuit framework diagram of a scanning circuit of a preferred embodiment of the utility model;

[0018] Figure 2 This is a circuit diagram of an LED matrix scanning module of a preferred embodiment of the utility model;

[0019] Figure 3 This is a circuit structure diagram of a key matrix scanning module according to a preferred embodiment of the utility model. DETAILED DESCRIPTION

[0020] In order to make the purpose, technical solution and advantages of the embodiments of the utility model clearer, the following will be described clearly and completely in combination with the technical solution in the embodiments of the utility model. Obviously, the described embodiments are partial embodiments of the utility model, not all embodiments. Based on the embodiments of the utility model, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of the utility model.

[0021] A scanning circuit of an LED matrix and a key matrix in a preferred embodiment of the utility model; Figure 1 As shown, it includes an LED matrix scanning module and a key matrix scanning module, and both the LED matrix scanning module and the key scanning module are connected to the I / O port of the control module MCU for electrical signal transmission.

[0022] Specifically, Figure 2As shown, the LED matrix scanning module includes 45 groups of LED lights, which are distributed in 5 rows and 9 columns to form a 5*9 matrix arrangement. Since the connection method of each group of LED lights is the same, only the first LED light is described here. The anode of the first LED lamp is connected to the collector of the ninth anode transistor Q9, the base of the ninth anode transistor Q9 is connected to the COL connection end through the ninth anode transistor driving resistor R9 and then connected to the I / O port of the MCU, and the emitter of the ninth anode transistor Q9 is connected to a 3.3V constant voltage source. The cathode of the first LED lamp is connected to the collector of the tenth cathode transistor Q10 through the current-sharing resistor R10, the emitter of the tenth cathode transistor Q10 is connected to SGND, and the base and emitter of the tenth cathode transistor Q10 are also connected to the twentieth cathode transistor driving resistor R20, and the base of the tenth cathode transistor Q10 is connected to the ROW connection end through the fifteenth cathode transistor driving resistor R15 and then connected to the I / O port of the MCU.

[0023] Furthermore, if Figure 2 As shown, the anode transistors Q1-Q9 are PNP transistors, the anode transistor driving resistors R1-R9 are anode PNP transistor driving resistors, the cathode transistors Q10-Q14 are NPN transistors, and the cathode transistor driving resistors R15-R24 are cathode NPN transistor driving resistors. Since the LEDs are arranged in a matrix of rows and columns, the collector of each group of anode PNP transistors Q1-Q9 is connected to the anode of the LED in the same column, the emitter is connected to a 3.3V constant voltage source, and the base is connected to the I / O port of the MCU through the driving resistors R1-R9 and the C0L0-C0L8 interface, and the output is configured through the I / O port to drive the anode transistors. Similarly, the collector of each column cathode NPN transistor Q10-Q14 is connected to the LED cathode in the same column through the current-sharing resistor R10-R14, the emitter is grounded, and the base is connected to the I / O port of the MCU through the driving resistor R15-R19 and the ROW interface, and the push-pull output is configured through the I / O port to drive the cathode transistor. Since each row of LED lights uses a common current-sharing resistor, when more than two LED lights in the same column are lit at the same time, the current flowing through the two LED lights is balanced to avoid inconsistent LED brightness. When the LED matrix is ​​scanned, COL0-COL8 outputs a low level in turn, driving the anode PNP transistors Q1-Q9 to turn on in turn, so that the LED anodes obtain the 3.3V power supply voltage in turn by column, and ROW1-ROW5 outputs a high level according to the content to be displayed, driving the cathode NPN transistors Q10-Q14, connecting the LED cathode of the corresponding row to GND, and performing a cyclic scan according to this process.

[0024] Furthermore, if Figure 3As shown, the key matrix scanning module includes 45 groups of keys corresponding to the number of LED lights, which are also distributed in 5 rows and 9 columns to form a 5*9 matrix arrangement, and each group of LED lights corresponds to the keys in the same matrix position. Since the structure of each group of keys is the same, only the first key is used for illustration here. One end of the first key is connected to the COL end through the current limiting resistor R25 and connected to the LED light at the corresponding position. The other end of the first key is connected to the KEY connection end through the limiting resistor R34, and then connected to the I / O port of the MCU. This I / O port is configured as a pull-up input. At the same time, the other end of the first key is connected to the constant voltage source through the pull-up resistor R39.

[0025] Furthermore, if Figure 3 As shown, because COL0-COL8 are connected to the LED matrix scanning module and the key matrix scanning module at the same time, the scanning mode and cycle of the key matrix scanning and the LED matrix scanning are the same. When COL0-COL8 output low level in turn, the MCU reads 5-bit data from KEY_A1~KEY_A5, and all key information can be obtained by looping in this way.

[0026] A fire protection product is constructed, on which a plurality of groups of LEDs and buttons of the same number are provided, and the LEDs and buttons are arranged in a matrix in the same form, and are scanned and cyclically used by a scanning circuit of an LED matrix and a button matrix as described above.

[0027] It should be understood that the present invention is described by some embodiments, and those skilled in the art are aware that various changes or equivalent substitutions may be made to these features and embodiments without departing from the spirit and scope of the present invention. In addition, under the teachings of the present invention, these features and embodiments may be modified to adapt to specific circumstances and materials without departing from the spirit and scope of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application belong to the scope protected by the present invention.

Claims

1. A scanning circuit for an LED matrix and a key matrix, comprising an LED matrix scanning module and a key matrix scanning module, and an MCU connected to the LED matrix scanning module and the key scanning module, wherein the MCU is connected to the LED matrix scanning module and the key scanning module through an I / O port, and is characterized in that: The LED matrix scanning module includes multiple groups of LED lights, which are arranged in an M*N matrix with M rows and N columns. The anode of each group of LEDs is connected to the collector of the anode transistor, the emitter of the anode transistor is connected to a constant voltage source, and the base is connected to the I / O port through the COL connection terminal. The cathode of each group of LEDs is connected to the collector of the cathode transistor, the emitter of the cathode transistor is grounded, and the base is connected to the I / O port through the ROW terminal. The key matrix scanning module includes the same number of keys as the LED matrix scanning module, each group of LEDs corresponds to a group of keys so that the keys are arranged in an M*N matrix, one end of the key is connected to the I / O port and the LED matrix scanning module through the COL connection terminal, and the other end of the key is connected to the pull-up input I / O port through the KEY connection terminal.

2. The scanning circuit according to claim 1, characterized in that: The LED matrix scanning module further includes an anode transistor driving resistor, and the anode transistor is connected to the COL connection terminal via the anode transistor driving resistor.

3. The scanning circuit according to claim 1, characterized in that: The LED matrix scanning module also includes a cathode triode driving resistor, the base of the cathode triode is connected to the ROW connection end through the cathode triode driving resistor, and the cathode triode driving resistor is connected between the emitter and the base of the cathode triode.

4. The scanning circuit according to claim 3, characterized in that: The collector of the cathode triode is connected to the cathode of the LED lamp through a current-sharing resistor. The LED lamps in each row share a set of current-sharing resistors and cathode triodes, and the LED lamps in each column share a set of anode triodes.

5. The scanning circuit according to any one of claims 1 to 4, characterized in that: The anode transistor is a PNP transistor, and the cathode transistor is an NPN transistor.

6. The scanning circuit according to claim 1, characterized in that: One end of the button is connected to the COL connection end through a current limiting resistor, and the other end is connected to the KEY connection end through a current limiting resistor.

7. The scanning circuit according to claim 6, characterized in that: The other end of the button is also connected to a pull-up resistor, and the other end of the pull-up resistor is connected to a constant voltage source.

8. The scanning circuit according to claim 7, characterized in that: Each row of buttons shares a set of current limiting resistors and pull-up resistors, and each column of buttons shares a set of current limiting resistors.

9. A fire protection product, comprising a plurality of groups of LED lights and buttons of the same number, wherein the LED lights and buttons are arranged in a matrix in the same manner, characterized in that: The fire protection product also contains a scanning circuit for an LED matrix and a key matrix as described in any one of claims 1-8 for scanning.

Citation Information

Patent Citations

  • Matrix key and light-emitting diode (LED) scanning circuit

    CN201878131U