A key detection method

By using driving voltage signals with different frequency components and frequency sampling technology in the matrix circuit, the problems of false detection and inaccuracy in matrix keyboard circuits are solved, achieving more efficient and reliable key detection.

CN119247123BActive Publication Date: 2025-11-18SUZHOU ZHONGKE GUANGJU TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411439915.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-15
Publication Date
2025-11-18
Estimated Expiration
2044-10-15

AI Technical Summary

Technical Problem

Existing matrix keyboard circuit designs are easily affected by the external environment when detecting keys, leading to false detections and failure to recognize keys. Furthermore, the short power-on time of the scan lines results in inaccurate detection.

Method used

A matrix circuit is formed by interleaved scan lines and output lines. By passing drive voltage signals with different frequency components to the scan lines and sampling the frequency components of the voltage signals of the output lines, the triggered button switch can be determined.

Benefits of technology

It improves the accuracy of key detection, reduces latency, minimizes the impact of external environmental interference, and ensures the reliability and stability of key detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119247123B_ABST
    Figure CN119247123B_ABST
Patent Text Reader

Abstract

The application discloses a kind of key detection methods, the key detection method is executed by key detection circuit, the key detection method includes the following steps: S21. in the first voltage end of all the scan line, drive voltage signal is passed in the preset mode, and the frequency component of drive voltage signal passed in different scan line is different, and the voltage signal of the voltage output end of all the output line is continuously received;S22. voltage signal received voltage output end is sampled, and the frequency component information of voltage signal of different voltage output end is obtained;S23. according to the frequency component information of voltage signal, the key switch triggered is judged.Because in key detection, scan line can be simultaneously passed in drive voltage signal, and can continuously sample detection to output line, therefore, effectively guarantee the detection time, it is favorable to improve the accuracy of detection, reduce the delay of key detection, and it is not susceptible to external environment influence, and detection result is more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of key detection, and in particular to a key detection method. BACKGROUND

[0002] With the development of technology, electronic devices are increasingly diversified. In order to realize human-computer interaction, electronic devices are usually provided with keys. For example, computers are usually equipped with keyboards to perform typing, gaming, and other operations.

[0003] In order to receive the information of the keys, it is necessary to accurately detect which key is pressed. As far as the applicant knows, the commonly used key detection circuit design at present is the circuit design of a matrix keyboard, which includes a plurality of scanning lines and a plurality of output lines. The scanning lines and the output lines are coupled through the switches of the keys, and the scanning lines and the output lines are respectively connected to the IO interfaces of the chip. Since the scanning lines and the output lines can be connected to the switches of multiple keys, by inputting high level to different scanning lines, and by detecting the level of the output lines, it can be determined which key or keys are pressed, thereby realizing the detection of more key states by using fewer IO interfaces.

[0004] However, this kind of circuit design still has some shortcomings. For example, it needs to input high level to the scanning lines one by one. Only when the switch corresponding to the scanning line to which high level is input is pressed, the key can be detected to be pressed. If the switch corresponding to the scanning line to which high level is not input is pressed, it cannot be detected. At present, the time during which each scanning line is input with high level is usually shortened, and the time interval between two times of inputting high level to the same scanning line is also shortened, so as to ensure that the operation of the keyboard can be reliably recognized. However, the shorter the time during which the scanning line is input with high level, the shorter the sampling time of the output line corresponding thereto, and there may be inaccurate detection. Further, by detecting the voltage to determine the key operation, the key operation may be misdetected due to the influence of the external environment (such as static electricity). In addition, since the time interval during which the scanning line is not powered is objective, in extreme cases, the key may still not be recognized.

[0005] The above content is only used to help understand the technical solutions of the present application and does not constitute an acknowledgement of the above as prior art. SUMMARY

[0006] The present application aims to provide a key detection method to solve at least one technical problem pointed out in the background.

[0007] To achieve the above object, in a first aspect, the application provides a key detection method, which is performed by a key detection circuit, the key detection circuit comprising a plurality of scanning lines arranged at intervals and a plurality of output lines arranged at intervals, the plurality of output lines and the plurality of scanning lines being staggered to form a matrix circuit, the scanning lines having a first voltage terminal and a second voltage terminal, the output lines having a voltage output terminal and a plurality of switch circuits connected to the plurality of scanning lines respectively, the switch circuits comprising key switches.

[0008] The key detection method comprises the following steps:

[0009] S21. A driving voltage signal is applied to the first voltage terminal of each scanning line in a preset manner, and the frequency components of the driving voltage signals applied to different scanning lines are different, and the voltage signals of the voltage output terminals of all the output lines are continuously received;

[0010] S22. The voltage signals of the voltage output terminals are sampled to obtain frequency component information of the voltage signals of different voltage output terminals;

[0011] S23. The key switch triggered is determined according to the frequency component information of the voltage signals.

[0012] Further, in the step S21, the difference between the center frequencies of the driving voltage signals applied to the first voltage terminals of the scanning lines is not less than one percent of the highest sampling rate of the detection lines.

[0013] Further, in the step S21, the application of the driving voltage signal to the first voltage terminal of each scanning line in a preset manner comprises the following steps:

[0014] The driving voltage signal is continuously applied to the first voltage terminal of each scanning line; or the driving voltage signal is applied to each scanning line according to a preset energization period of each scanning line, the energization period comprising an energization time and a non-energization time, and within a certain time, all the scanning lines or at least two of the scanning lines are simultaneously applied with the driving voltage signal.

[0015] Further, the step S23 comprises the following steps:

[0016] S231. The scanning line applied with the driving voltage signal of the corresponding frequency component is identified according to the frequency component information of the voltage signals of the voltage output terminals of the output lines;

[0017] S232. The key switch connected between the output line and the scanning line having the same voltage frequency component is identified, and the key switch is the key switch triggered.

[0018] Further, the second voltage terminal is a ground voltage terminal, the scan line has a main line and a plurality of parallel branch lines connected to the main line, the main line has the first voltage terminal, and the branch lines have the second voltage terminal, and each of the branch lines is provided with one of the switch circuits corresponding thereto;

[0019] The branch line and the main line are connected at a connection position, and a diode and a first resistor are connected in series between the connection position and the second voltage terminal, the diode allows unidirectional conduction of current towards the first resistor, and the diode is a general diode or a light-emitting diode used for realizing keyboard backlighting; the switch circuit is connected to the branch line between the diode and the first resistor; or,

[0020] The branch line and the main line are connected at a connection position, and a first resistor is connected between the connection position and the second voltage terminal, and the switch circuit is connected to the branch line between the first resistor and the connection position of the branch line and the main line, and the switch circuit includes a diode connected in series with the key switch, the diode allows unidirectional conduction of current towards the voltage output terminal, and the diode is a general diode or a light-emitting diode.

[0021] Further, the scan line has a main line and a plurality of parallel branch lines connected to the main line, the main line has the first voltage terminal, and the branch lines have the second voltage terminal, and each of the branch lines is provided with one of the switch circuits corresponding thereto, the switch circuit is connected to the second voltage terminal of the branch line, and the switch circuit includes a diode connected in series with the key switch.

[0022] In a second aspect, the application provides a key detection method, which is performed by a key detection circuit, the key detection circuit includes a plurality of scan lines arranged at intervals and a plurality of output lines arranged at intervals, the plurality of output lines and the plurality of scan lines are arranged alternately to form a matrix circuit, the scan line has a first voltage terminal and a second voltage terminal, the key detection circuit includes a light-emitting diode used for keyboard backlighting, the output line has a voltage output terminal and a plurality of switch circuits connected to the plurality of scan lines respectively, and the switch circuit includes a key switch.

[0023] The key detection method includes the following steps:

[0024] S1. driving the light-emitting diode to emit light as needed in a first time period t10;

[0025] S2. performing key detection in a second time period t11;

[0026] S3. repeating steps S1 and S2 in turn;

[0027] In the step S2, the key detection includes the following steps:

[0028] S21. applying driving voltage signals to the first voltage terminals of all the scan lines in a preset manner, and the frequency components of the driving voltage signals applied to different scan lines are different, and continuously receiving the voltage signals of the voltage output terminals of all the output lines;

[0029] S22. sampling the received voltage signals of the voltage output terminals to obtain frequency component information of the voltage signals of different voltage output terminals;

[0030] S23. determining the triggered key switch according to the frequency component information of the voltage signals.

[0031] Further, in the step S21, the difference between the center frequencies of the driving voltage signals applied to the first voltage terminals of the scan lines is not less than one percent of the highest sampling rate of the detection lines.

[0032] Further, in the step S21, applying the driving voltage signals to the first voltage terminals of all the scan lines in a preset manner comprises the following steps:

[0033] continuously applying the driving voltage signals to the first voltage terminals of all the scan lines; or, applying the driving voltage signals to the scan lines according to a preset energizing period of each scan line, the energizing period comprising an energizing time and a non-energizing time, and within a certain time, all the scan lines or at least two of the scan lines are simultaneously applied with the driving voltage signals.

[0034] Further, the step S23 comprises the following steps:

[0035] S231. identifying the scan line applied with the driving voltage signal of the corresponding frequency component according to the frequency component information of the voltage signals of the voltage output terminals of the output lines;

[0036] S232. identifying the key switch connected between the output line and the scan line with the same voltage frequency component as the triggered key switch.

[0037] Further, the first time period t10 and the second time period t11 form a light emitting period T2, and in the step S1, the light emitting diode generates a light effect within the first time period t10, or a high level is continuously input to the first voltage terminals of all the scan lines to drive all the light emitting diodes to continuously emit light, and the first time period t10 is greater than or equal to the second time period t11.

[0038] Further, the first time period t10 and the second time period t11 form a light emitting period T2, and the length of the light emitting period T2 is less than or equal to 41.6 ms.

[0039] Further, the second voltage terminal is a ground voltage terminal, the scan line has a main line and a plurality of parallel branch lines connected to the main line, the main line has the first voltage terminal, the branch line has the second voltage terminal, and each of the branch lines is provided with one of the switch circuits;

[0040] The branch line is further provided with a first resistor connected in series with the light emitting diode, the light emitting diode and the first resistor are arranged in sequence between the connection position of the branch line and the main line and the second voltage terminal, the light emitting diode allows unidirectional conduction of current to the first resistor, and the switch circuit is connected to the part of the scan line between the diode and the first resistor.

[0041] Compared with the prior art, the key detection method has the following beneficial effects: the key detection method includes the following steps: applying driving voltages with different frequency components to the first voltage terminals of all the scan lines, receiving voltage signals of the voltage output terminals of all the output lines; sampling the received voltage signals of the voltage output terminals to obtain frequency component information of the voltage signals of different voltage output terminals. The position of the pressed key is determined according to the frequency component information of the voltage signals. Since the scan lines can be applied with driving voltage signals at the same time and the output lines can be continuously sampled and detected during key detection, the detection time is effectively ensured, the detection accuracy is improved, the key detection delay is reduced, in addition, the voltage frequency component detection is less affected by the external environment (such as static electricity) than the voltage size detection, and the detection result is more accurate. BRIEF DESCRIPTION OF DRAWINGS

[0042] Figure 1 is a circuit diagram of a key detection circuit in an embodiment of the application.

[0043] Figure 2 is a circuit diagram of a key detection circuit in an embodiment of the application.

[0044] Figure 3 is a circuit diagram of a key detection circuit in an embodiment of the application.

[0045] Figure 4 is a timing diagram of the power supply to the scan lines in an embodiment of the application.

[0046] Figure 5 is a timing diagram of the power supply to the scan lines in an embodiment of the application.

[0047] Figure 6 is a timing diagram of the power supply to the scan lines in an embodiment of the application.

[0048] Figure 7is a circuit diagram of a control circuit of one embodiment of the present application, in the drawing, the scan line is provided with a common diode.

[0049] Figure 8 is a circuit diagram of a control circuit of one embodiment of the present application, in the drawing, the scan line is provided with a light emitting diode.

[0050] Figure 9 is Figure 8 is a schematic diagram of the circuit shown in the drawing for preventing false detection.

[0051] Figure 10 is a circuit diagram of a key detection circuit of one embodiment of the present application, in the drawing, the switch circuit is provided with a second resistor.

[0052] Figure 11 is a timing diagram of one light emitting period of one embodiment of the present application.

[0053] Figure 12 is a circuit diagram of a control circuit of one embodiment of the present application.

[0054] Figure 13 is a structural schematic diagram of a key input device of one embodiment of the present application.

[0055] Figure 14 is a structural schematic diagram of a key input device of one embodiment of the present application. DETAILED DESCRIPTION

[0056] In order to make the above objectives, features and advantages of the present application more obvious and easy to understand, the specific embodiments of the present application are described in detail below with reference to the drawings. It can be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application. In addition, it should be noted that, for the purpose of description, only the parts related to the present application are shown in the drawings, but not all the structures. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of the present application.

[0057] The terms "comprising" and "having" and any variations thereof in the present application are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to the process, method, product or device.

[0058] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0059] Example 1

[0060] This embodiment proposes a button detection method, which is used to detect buttons and determine which button on the device is pressed.

[0061] The key detection method is executed through a key detection circuit, such as... Figure 1 As shown, Figure 1 An embodiment of a key detection circuit is shown, which includes multiple scan lines 10 and multiple output lines 11. The multiple scan lines 10 are arranged at intervals, and the multiple output lines 11 are also arranged at intervals, with the scan lines 10 and output lines 11 interleaved to form a matrix circuit. Figure 1 As shown, Figure 1 The number of scan lines 10 and output lines 11 shown are both 3. For ease of description, the three scan lines 10 from top to bottom are called the first scan line 10a, the second scan line 10b and the third scan line 10c, respectively, and the three output lines 11 from left to right are called the first output line 11a, the second output line 11b and the third output line 11c, respectively.

[0062] It should be noted that in this document, the terms "multiple," "more than," or similar expressions indicate a quantity of at least two; that is, "more" means two or more. Therefore, in other embodiments, the number of scan lines 10 and output lines 11 can be two or more than three. Furthermore, although the number of scan lines 10 and output lines 11 is the same in the illustrated embodiment, this is not mandatory. The number of scan lines 10 and output lines 11 can differ; for example, one may have two lines, and the other three, etc.

[0063] Output line 11 has a voltage output terminal 110 and multiple switch circuits 12 respectively connected to multiple scan lines 10. The switch circuits 12 include push-button switches. Figure 1 The SW1 to SW9 marked in the diagram are push-button switches. The push-button switches correspond to the positions of the buttons (usually located below the buttons). When a button is pressed, the button will move down, triggering the push-button switch to close and making the switch circuit 12 conduct. Conversely, when the push-button switch is released, the button will reset and the push-button switch will open.

[0064] The scan line 10 has a first voltage terminal 100 and a second voltage terminal 101, and the number of the second voltage terminals 101 can be multiple, for example Figure 1 In the illustrated embodiment, the scan line 10 includes a main line 102 and a plurality of branch lines 103 connected to the main line 102, and the plurality of branch lines 103 are arranged in parallel, each of the branch lines 103 is provided with a second voltage terminal 101, and the plurality of switch circuits 12 of the output line 11 are respectively connected to the branch lines 103 of the plurality of scan lines 10, and each of the branch lines 103 is provided with a corresponding switch circuit 12. The first voltage terminal 100 is used to input a driving voltage signal. In some embodiments, referring to Figure 1 The branch line 103 is provided with a first resistor between the connection position of the branch line 103 and the second voltage terminal 101, and the R1 to R9 in the figure are the first resistors. In this embodiment, the second voltage terminal 101 is grounded, which is a ground voltage terminal. The switch circuit 12 is connected to the part of the branch line 103 between the connection position of the branch line 103 and the first resistor, and optionally, referring to Figure 2 The switch circuit 12 further includes a diode connected in series with the key switch, and the D1 to D9 in the figure are the diodes. In other embodiments, referring to Figure 3 The switch circuit 12 further includes a diode connected in series with the key switch, but in this embodiment, the second voltage terminal 101 is directly connected to the switch circuit 12, which is not a ground voltage terminal. In yet other embodiments, referring to Figure 7 and Figure 8 The branch line 103 is provided with a diode and a first resistor connected in series between the connection position of the branch line 103 and the second voltage terminal 101, and the diode allows the current to flow in one direction to the first resistor, and the switch circuit 12 is connected to the part of the branch line 103 between the diode and the first resistor.

[0065] It can be understood that when the key switch (for example, SW1) is pressed and the first voltage terminal 100 of the scan line 10 (for example, the first scan line 10a) connected to the key switch is applied with a high level, the voltage output terminal 110 of the output line 11 (for example, the first output line 11a) connected to the key switch will detect a voltage, which is also a high level, and the characteristics (for example, size and frequency, etc.) of the detected voltage are related to the characteristics of the voltage applied to the first voltage terminal 100, so that it can be determined which key is pressed.

[0066] In this embodiment, the key detection method includes the following steps:

[0067] S21. Referring to Figure 4 The first voltage terminal 100 of all scan lines 10 is input with a driving voltage signal in a predetermined manner, and the frequency components of the driving voltage signals input to different scan lines 10 are different, and the voltage signals of the voltage output terminals 110 of all output lines 11 are continuously received;

[0068] S22. Sampling the voltage signal of the voltage output end 110 to obtain the frequency component information of the voltage signal of the different voltage output end 110;

[0069] S23. Judging the triggered key switch according to the frequency component information of the voltage signal.

[0070] The driving voltage signal can be a sine signal or a square wave signal or other quadrature signal with certain frequency. Since the voltage output end 110 of the output line 11 can only detect the voltage signal containing the corresponding frequency component when the key switch of the switch circuit 12 connected with the output line 11 and the scan line 10 is pressed, the key which is pressed can be determined by the frequency component of the voltage signal of the voltage output end 110. In addition, since the triggered key switch is judged by detecting the frequency component of the voltage signal, the driving voltage signal can be input to multiple (at least two or even all) scan lines 10 at the same time without inputting the driving voltage signal one by one. When the same output line 11 detects the voltage signal containing multiple different frequency components, it indicates that multiple key switches connected with different scan lines 10 are pressed.

[0071] Specifically, the step S23 can include the following steps:

[0072] S231. Identifying the scan line 10 inputting the driving voltage signal with the corresponding frequency component according to the frequency component information of the voltage signal of the voltage output end 110 of the output line 11;

[0073] S232. Identifying the key switch connected between the output line 11 and the scan line 10 with the same voltage frequency component, which is the triggered key switch. It can be understood that the position information of each key switch corresponding to the scan line 10 and the output line 11 has been recorded and stored in advance. Therefore, when the scan line 10 and the output line 11 with the same voltage frequency component are known, the position information of the key switch can be obtained, the triggered key switch can be identified, and the position information of the key switch corresponds to the position of the key.

[0074] For example, the first scan line 10a, the second scan line 10b and the third scan line 10c are respectively inputted with the driving voltage signal containing the frequency component of 1 KHz, 2 KHz and 3 KHz, when the voltage output end 110 of the first output line 11a detects the voltage signal containing the frequency component of 1 KHz, the key switch SW1 connected between the first output line 11a and the first scan line 10a can be found at this time (indicating that the key switch SW1 is pressed), and the position information corresponding to the key switch can be obtained to determine the pressed key. When the voltage output end 110 of the first output line 11a detects the voltage signal containing the frequency component of 1 KHz, 2 KHz and 3 KHz, it can be identified that the key switches connected between the first output line 11a and the first scan line 10a, the second scan line 10b and the third scan line 10c are SW1, SW4 and SW7, indicating that the key switches SW1, SW4 and SW7 are all pressed, and the position information corresponding to the key switches SW1, SW4 and SW7 can be obtained to determine the pressed key. The key situation of the other output lines 11 can be deduced in the same way.

[0075] It can be understood that the above-mentioned key detection method can simultaneously input the driving voltage signal to multiple scan lines 10 and continuously sample and detect the output lines 11, without sequentially inputting the driving voltage signal to the scan lines 10, so compared with the detection method of sequentially inputting the high level to the scan lines 10, the time of inputting the driving voltage signal to each scan line 10 can be increased, so as to effectively ensure the detection time and improve the detection accuracy. In addition, the frequency of the voltage is less affected by the external environment (such as static electricity) than the size of the voltage, which further improves the detection accuracy.

[0076] It can be understood that the input of the driving voltage to the first voltage end 100 of the scan line 10 in the preset manner can include various ways. In some embodiments, the preset manner is to continuously input the driving voltage signal to all the first voltage ends 100 of the scan lines 10. In this embodiment, since the driving voltage signal can be continuously inputted and the output lines 11 are continuously detected, the accuracy of key detection can be greatly improved, the timeliness can be ensured, the delay can be reduced, and the situation that no key operation is detected due to the time interval of inputting the driving voltage signal can be avoided, which is more reliable. In other embodiments, the preset manner is to input the driving voltage to the scan line 10 according to the preset power-on period of each scan line. The power-on periods of the scan lines 10 can be the same or different. The power-on period includes the power-on time and the non-power-on time. It can be understood that the voltage inputted in the power-on period is the driving voltage signal with a certain frequency component. The power-on time included in the power-on period corresponding to each scan line 10 can be the same or different. For example, the power-on period of the first scan line 10a is 1 second, the power-on period of the second scan line 10b is 2 seconds, and the power-on period of the third scan line 10c is 3 seconds. The power-on time of the first scan line 10a is 1 second, the power-on time of the second scan line 10b is 2 seconds, and the power-on time of the third scan line 10c is 3 seconds. The non-power-on time of the first scan line 10a is 1 second, the non-power-on time of the second scan line 10b is 1 second, and the non-power-on time of the third scan line 10c is 1 second. Figure 5 and Figure 6The energizing periods of the first scan line 10a, the second scan line 10b, and the third scan line 10c are T3, T4, and T5, respectively. Figure 5 In the illustrated embodiment, the durations of the power-on cycles T3, T4, and T5 are different, and the power-on time t within the power-on cycle of each scan line 10 is also different. 通 and the time without power t 断 They each account for half. Figure 6 In the illustrated embodiment, the durations of the power-on cycles T3, T4, and T5 are the same, and the power-on time t within the power-on cycle of each scan line 10 is also the same. 通 It is much greater than the time t is not powered on. 断 This allows for a longer energizing time for the scan line 10, which is more conducive to improving the accuracy of button detection and reducing the delay in button detection. Further, optionally, when a driving voltage is applied to the scan line 10 according to a preset energizing cycle for each scan line, all scan lines 10 or at least two scan lines 10 are simultaneously energized with driving voltage signals within a certain time period.

[0077] Optionally, in step S21, the difference in the center frequency of the driving voltage signal supplied to the first voltage terminal 100 of each scan line 10 is not less than one percent of the highest sampling rate of the detection line, so that the frequency components of the voltage signal have a large difference, which facilitates accurate identification of the frequency component information of the voltage output terminal 110 and prevents confusion caused by the frequency of the driving voltage being too close.

[0078] Optionally, in step S21, the voltage output terminal 110 of the output line 11 is detected only after a preset time period following the application of the driving voltage signal to the scan line 10, so that the voltage at the output terminal 110 is more stable and the detection result is more accurate. Optionally, the length of the preset time period is greater than or equal to 30 microseconds, and further preferably greater than or equal to 50 microseconds, to ensure the accuracy of the detection result and avoid false detections caused by level jitter.

[0079] Optionally, in step S22, the frequency component information of the voltage signal at different voltage output terminals 110 is obtained by performing Fourier expansion on the sampled voltage signal.

[0080] To further improve the reliability of key detection, it can be combined with... Figure 2 , Figure 3 , Figure 7 and Figure 8 As shown, a diode that conducts unidirectionally to the voltage output terminal 110 of output line 11 is inserted in series in the circuit. The diode prevents current from flowing back to the first voltage terminal 100 of scan line 10. Figure 7 and Figure 8For example, the branch line 103 of the scan line 10 is also provided with a diode. The diode and the first resistor are connected in series and are sequentially arranged between the connection position of the branch line 103 and the main line 102 and the second voltage terminal 101. Figure 7 and Figure 8 The diodes marked D1 to D9 are diodes. A diode allows current to flow unidirectionally to the second voltage terminal 101. That is, the current entering through the first voltage terminal 100 flows into the positive terminal of the diode, then flows out from the negative terminal of the diode and through the first resistor. It can be understood that due to the unidirectional conduction characteristic of the diode, the current cannot flow from its negative terminal to its positive terminal.

[0081] Because a diode is connected in series in scan line 10, the unidirectional conduction characteristic of the diode can be used to achieve the effect of preventing ghosting. For example, when button switches SW1, SW2, and SW4 are pressed simultaneously, the voltage output terminal of the first output line 11a can detect the voltage frequency of the first scan line 10a and the second scan line 10b, and the second output line 11b can detect the voltage frequency of the first scan line 10a. Due to the unidirectional conduction of the light-emitting diode D1, the current in the second scan line 10b cannot flow from the diode. Figure 9 The dashed line shown flows into the second output line 11b. Figure 9 The dashed line in the diagram shows the path of the current flowing through the second scan line 10b, ensuring that the voltage output terminal 110 of the second output line 11b detects a voltage with the same frequency component as the voltage of the second scan line 10b, thus preventing a false reading that the push-button switch SW5 has been pressed. It is understood that when the LED is not set, the current may flow along... Figure 9 The dashed lines shown indicate that the first output line 11a and the second output line 11b both detect the voltage frequency components of the first scan line 10a and the second scan line 10b. At this time, the button switch SW5, which has not been pressed, will be mistakenly judged as pressed. Therefore, the button detection circuit with diodes can prevent false detection.

[0082] A diode can be a regular diode or a light-emitting diode (LED). A regular diode refers to a diode that does not emit light. Figure 7 The diode shown is a standard diode. Figure 8The diode shown is a light-emitting diode (LED). In some embodiments, the LED can illuminate the keys, thus serving as keyboard backlighting. Optionally, the LED is positioned corresponding to a key switch, for example, located below the key. In some embodiments, the key is at least partially transparent; for example, the portion displaying the letters can be made transparent, allowing the LED to illuminate the corresponding letters. In some embodiments, the key can be completely transparent to present a crystal-clear appearance and enhance aesthetics. In some embodiments, the key is opaque, with a reflective surface (e.g., coated with a reflective coating) on ​​its inner wall to reflect the light from the LED, illuminating the area below the key and creating a luminous effect around it.

[0083] Understandably, by inserting an LED in series into the key detection circuit, both ghost key prevention and key illumination can be achieved, thus simplifying the circuit structure and reducing costs. Simultaneously, the simplified circuit structure helps reduce the number of layers on the circuit board of the key output device, thereby reducing the thickness of the key input device and achieving a thinner and lighter electronic device.

[0084] When the diode is a light-emitting diode. Figure 2 and Figure 3 In the illustrated embodiment, when the button switch is pressed and the corresponding scan line 10 is at a high level, the corresponding light-emitting diode will receive current and become conductive. That is, the light-emitting diode corresponding to the button will only light up when the button is pressed. Figure 8 In the illustrated embodiment, regardless of whether the button switch is pressed, as long as the corresponding scan line 10 is supplied with a driving voltage signal, the light-emitting diode can emit light under the control of the driving voltage signal, which is beneficial for achieving a constantly lit backlight effect or producing a lighting effect.

[0085] It is understandable that, over a period of time, the shorter the actual light-emitting time of the LED, the lower the brightness of the light actually observed by the human eye, thus affecting the backlight effect. Optionally, within one power-on cycle, the power-on time is greater than 1 / M of the power-on cycle, where M is the total number of scan lines 10 in the button detection circuit. This can, on the one hand, increase the power-on time of the scan lines 10 to ensure detection accuracy; on the other hand, for embodiments where the LED will light up as long as the scan line 10 is supplied with a high level regardless of whether the button switch is pressed (e.g., ... Figure 8 and Figure 10(In a corresponding embodiment), the light-emitting time of the light-emitting diode can be increased, thereby increasing the brightness perceived by the naked eye. Further optionally, the power-on time within one power-on cycle is greater than half of the power-on cycle to further improve the effect. Even more optionally, a driving voltage signal is continuously applied to the first voltage terminal 100 of all scan lines 10 to maximize the power-on time of the scan lines 10, improve the accuracy of the detection results, reduce delay, and enable, for example... Figure 8 and Figure 10 In the corresponding embodiment, the light-emitting diode emits light continuously.

[0086] The button detection circuit includes a chip. The first voltage terminal 100 and the voltage output terminal 110 are both connected to the chip's IO interface. The chip can input drive voltage signals to multiple scan lines according to the control signal and detect the voltage signal of the voltage output terminal 110 of the output line 11.

[0087] In some embodiments, the resistance of the first resistor is 100–1000 ohms, and the voltage at the first input voltage terminal 100 is approximately 5V. Setting the resistance of the first resistor to 100–1000 ohms allows the current flowing through the LED to be 1–10mA, which meets the current requirements for most LEDs used in keyboards. In other embodiments, the voltage at the first input voltage terminal 100 is approximately 3.3V. In this case, the resistance of the first resistor can be selected as 30–500 ohms to ensure reliable LED illumination.

[0088] The resistance value of the first resistor can be adjusted according to the actual current and voltage parameters required for the LED to operate normally, so that the LED can emit light reliably.

[0089] In some embodiments, such as Figure 10 As shown, the switching circuit 12 also includes a second resistor connected in series with the push-button switch. Figure 10 R10 to R18, as indicated, are the second resistors. The resistance of the second resistor is greater than 0.2 times that of the first resistor; that is, the ratio of the resistance of the second resistor to the resistance of the first resistor is greater than 0.2. This ensures the reliability of the LED's illumination during button presses. It is understandable that... Figure 8 In the illustrated embodiment, when two or more push-button switches on the same output line 11 are pressed simultaneously, the first resistor corresponding to the pressed push-button switch will be connected in parallel. The resistance after parallel connection is smaller than the resistance of the individual first resistor, thus reducing the resistance used for voltage division with the LED and increasing the current and voltage acting on the LED. For example, refer to... Figure 8When a high level is input to the first voltage terminal 100 of the first scan line 10a, and SW1 and SW4 are pressed simultaneously, the resistance of the two first resistors connected in parallel will be only half of the original value, even if the resistance values ​​of the first resistors R1 and R4 are the same. Therefore, the current flowing through the light-emitting diode will increase, and the voltage acting on the light-emitting diode will also increase. The more buttons are pressed at the same time, the smaller the resistance value of the resistor that divides the voltage with the light-emitting diode will be. In this way, the light-emitting diode may be burned out due to excessive current flowing through it, or the brightness may be too high, shortening its service life.

[0090] This problem can be solved by adding a second resistor in series with the push-button switch in the switching circuit 12. Figure 10 In the illustrated embodiment, when multiple buttons on the same output line 11 are pressed simultaneously, the presence of the second resistor results in a smaller decrease in the resistance of the resistor that ultimately divides the voltage with the LED. This ensures the stability of the current flowing through the LED when the button is pressed, reduces the current increase, and promotes reliable LED illumination, resulting in a more consistent and stable illumination effect. It also helps extend the LED's lifespan. For example, when the first voltage terminal 100 of the first scan line 10a is at a high level, and button switches SW1 and SW4 are pressed simultaneously, the first resistor R1 is connected in parallel with resistors R10, R13, and R4. Since the resistance values ​​of R10 and R13 are greater than 0.2 times the resistance values ​​of R1 and R4, the parallel resistance will be greater than the resistance value of R1 and R4 alone, reducing the current increase flowing through the LED.

[0091] To further ensure the stability of LED light emission, the resistance of the second resistor can be greater than or equal to 1, 2, 3, 4, 5, or more times the resistance of the first resistor. Optionally, the resistance of the second resistor is greater than or equal to twice the resistance of the first resistor, so that when the switch is pressed, the total current impact is less than 33%, the change in current flowing through the LED is smaller, and it will not cause significant optical and electrical effects on the LED, thereby effectively ensuring the stability of LED light emission and the reliability of its use.

[0092] Optionally, the resistance value of the second resistor should not exceed 10 times the resistance value of the first resistor. This is because the detection input of the output line is generally in a high-impedance state. When the resistance at the detection end is too large, it will affect the accuracy of the detection value. Setting the resistance value of the second resistor to be less than 10 times the resistance value of the first resistor is beneficial to improving the accuracy of the detection value.

[0093] Optionally, the first and second resistors can be ordinary resistors, carbon ink resistors, silver paste printed resistors, or other resistors that can be used in thin film circuits.

[0094] The color of the light emitted by the LEDs is not limited; for example, it can be white, red, blue, or green. When a high level is continuously applied to scan line 10, the LEDs will continuously emit light, achieving a constant-on backlight effect. Optionally, all LEDs can emit light of the same color, or at least two LEDs can emit light of different colors. The colors of LEDs at different positions can be set as needed.

[0095] It is understood that in this embodiment, key detection can be performed according to steps S21 to S23 throughout the entire working process of the key detection circuit, without the need to set the first time period t10 in embodiment 2.

[0096] Example 2

[0097] This embodiment proposes a key detection method, which uses the key detection circuit with light-emitting diodes described in Embodiment 1. Figure 8 and Figure 10 The circuit shown is used for execution. The relevant structure and parameters of the key detection circuit can be referred to in the description of Embodiment 1, and will not be repeated here. For ease of description, the key detection method in Embodiment 1 is referred to as the first key detection method, and the key detection method in Embodiment 2 is referred to as the second key detection method.

[0098] refer to Figure 11 In this embodiment, the key detection method includes the following steps:

[0099] S1. Drive the LED to emit light as needed during the first time period t10.

[0100] S2. During the second time period t11, key press detection is performed.

[0101] S3. Repeat steps S1 and S2 in sequence.

[0102] The method for performing key detection in step S2 can refer to the key detection method in embodiment 1, that is, key detection includes the following steps:

[0103] S21. Drive voltage signals are applied to the first voltage terminals 100 of all scan lines 10 in a preset manner, and the frequency components of the drive voltage signals applied to different scan lines 10 are different, and the voltage signals of the voltage output terminals 110 of all output lines 11 are continuously received.

[0104] S22. Sample the voltage signal received from the voltage output terminal 110 to obtain the frequency component information of the voltage signal from different voltage output terminals 110;

[0105] S23. Determine the triggered push-button switch based on the frequency component information of the voltage signal.

[0106] Similarly, in step S21, the difference in the center frequency of the driving voltage signal supplied to the first voltage terminal 100 of each scan line 10 can be selected to be no less than one percent of the highest sampling rate of the detection line, so that the frequency components of the voltage signal have a large difference, which facilitates accurate identification of the frequency component information of the voltage output terminal 110 and prevents confusion caused by the frequency components of the driving voltage signal being too close.

[0107] Similarly, step S23 may include the following steps:

[0108] S231. Identify the scan line 10 of the driving voltage signal with the corresponding frequency component based on the frequency component information of the voltage signal at the voltage output terminal 110 of the output line 11;

[0109] S232. Identify the push-button switch connected between the output line 11 and the scan line 10, which have the same voltage frequency components; this push-button switch is the one that has been triggered.

[0110] In the second button detection method, all LEDs first emit light as needed during the first time period t10, such as remaining constantly lit, or creating breathing or flashing effects. Then, button detection is performed during the second time period t11. This increases the number of lighting modes and improves aesthetics. Simultaneously, during the second time period t11, drive voltage signals can be applied to all scan lines 10, and all output lines 11 can be detected. Therefore, the detection time for the voltage of the output lines 11 during button detection can be guaranteed, improving the reliability of the detection results during the second time period t11.

[0111] During the first time period t10, a high level can be input to the first voltage terminal 100 of all scan lines 10 according to the control signal, so as to drive all light-emitting diodes to emit light according to the control signal, such as continuously emitting light or producing a lamp effect.

[0112] In some embodiments, during a first time period t10, a high level is continuously input to the first voltage terminal 100 of all scan lines 10 to drive all light-emitting diodes to emit light. It is understood that in this embodiment, the light-emitting diodes emit light continuously during the first time period t10 in order to maximize the brightness of the light emitted by the naked eye.

[0113] In other embodiments, during the first time period t10, the LEDs are controlled to create varying lighting effects by controlling the energizing method of the scan lines 10. For example, a high level is input to the first voltage terminal 100 of all scan lines 10 according to a control signal. The duration and sequence of the high level input can be set as needed. For example, a high level is input to each scan line 10 for a preset time according to a preset sequence, causing each LED to emit light as needed. For example, it can emit light sequentially or at intervals to produce diverse lighting effects. The LEDs can be controlled to emit light as needed, for example, by using PWM to control the LEDs to produce flashing or flowing light effects. Optionally, the first time period t10 is greater than or equal to the second time period t11, so that the second time period t11 is not too long. It is understood that when button detection is performed in the second time period t11, the LEDs will be continuously energized and illuminated. Setting the first time period t10 to be greater than or equal to the second time period t11 can prevent the second time period t11 from being too long, thereby improving the continuity of the lighting effect changes. Optionally, the time ratio of the first time period t10 to the emission period T2 is not less than 80%, to further reduce the length of the second time period t11, reduce the human eye's recognition of the emission during the second time period t11, and better ensure the continuity of the lighting effect changes. Even more optionably, the time ratio of the first time period t10 to the emission period T2 is not less than 90%. Even more optionably, the time ratio of the first time period t10 to the emission period T2 is not greater than 99.9%, to ensure that the second time period t11 has sufficient time for detection.

[0114] Optionally, the duration of the light emission period T2 is no more than 41.6ms, to ensure that under normal operation, the button press can be detected regardless of when the hand presses the button.

[0115] Understandably, keyboards use backlighting units to illuminate the keys. These units are located below the keys and emit light towards the side where the key is located. Typically, each key has its own backlighting unit. The backlight color can be monochrome or multi-colored. When the backlight color is monochrome, it can be white, red, green, blue, or other colors. In this case, the backlighting unit may consist of only one LED, which is connected in series... Figure 8 and Figure 10 The circuit shown enables light emission. When the backlight color is colored, richer color effects can be achieved. For example, the color can gradually change, making the backlight effect more dazzling. In this case, the light-emitting unit can include at least two light-emitting diodes that emit light of different colors. The light-emitting diodes of different colors can emit a single color or mix to emit a new color, thus making the colors richer.

[0116] Example 3

[0117] This embodiment introduces a key detection circuit with multi-color light emission effect.

[0118] The key detection circuit with multi-color light emission effect has a basically the same structure as the key detection circuit described above. The difference is that the light-emitting unit of the key detection circuit with multi-color light emission effect includes at least two light-emitting diodes (LEDs) of different colors. One of the LEDs is connected in series with the first resistor, allowing current to flow unidirectionally through the first resistor. It emits light under the drive of the signal applied to scan line 10. The other LEDs are controlled to emit light by other control circuits and can cooperate with the LED connected in series with the first resistor to produce various light emission effects. For ease of description, the LEDs in the light-emitting unit other than the LED connected in series with the first resistor are referred to as other LEDs.

[0119] In this way, by using the light-emitting diodes connected in series with the first resistor and other light-emitting diodes of different colors, a variety of colors can be produced, creating a more diverse light-emitting effect. Optionally, the light-emitting unit includes three light-emitting diodes, which emit red, green, and blue light (the three primary colors of light) respectively, thus allowing for the creation of virtually any color that the human eye can perceive.

[0120] In some embodiments, the light emitted by the LED connected in series with the first resistor is red. It is understood that, due to the need for key detection, the LED connected in series with the first resistor must be at a high level for a certain period, which means that the LED will inevitably light up during key detection, even if it is not required to light up during that time under a preset lighting control mode. Since the human eye is less sensitive to red light than other colors (blue and green), setting the color of the light emitted by the LED connected in series with the first resistor to red can reduce the visual attention drawn to the LED during key detection, thus not affecting the keyboard's lighting according to the predetermined lighting mode.

[0121] The key input device also includes a control circuit 3 for controlling the illumination of other LEDs. Each of the other LEDs is located in a separate control circuit, so that each LED can be independently controlled to emit light. In some embodiments, such as Figure 12 As shown, the control circuit 3 includes a third resistor (R19 in the figure), a third voltage terminal 30 for inputting a driving voltage signal, and a fourth voltage terminal 31 for grounding. The light-emitting diode (D10 in the figure) and the third resistor are connected in series between the third voltage terminal 30 and the fourth voltage terminal 31. Obviously, the positive terminal of the light-emitting diode is close to the third voltage terminal 30 so that the light-emitting diode can emit light under the voltage drive of the third voltage terminal 30.

[0122] The first voltage terminal 100, the third voltage terminal 30, and the voltage output terminal 110 are all connected to the chip's I / O interface. The chip inputs drive voltage signals to multiple scan lines 10 and detects the voltage signal at the voltage output terminal 110 of the output line 11. Simultaneously, the chip inputs a drive voltage signal to the third voltage terminal 30 according to control instructions to control the LEDs in the control circuit to emit light according to the control signals. It is understood that the number of chips is not limited to one; for example, more chips can be used when the number of I / O interfaces is insufficient. Furthermore, the button detection circuit and the control circuit 3 can share a chip or be set up with separate chips.

[0123] The specific structure of the key detection circuit can be found in the description above, and will not be repeated here.

[0124] Since the light-emitting unit includes at least two light-emitting diodes, in step S1 above, during the first time period t10, a driving voltage signal is input to the first voltage terminal 100 of the scan line 10 and the third voltage terminal 30 of the control circuit 3 according to the control signal, so as to control all the light-emitting diodes to emit light according to the control signal. The control signal can be issued by the processor of the electronic device, which can be the light-emitting control program built into the system, or it can be a corresponding control signal generated according to the control command issued by the user. After the chip receives the corresponding control signal, it inputs a high level to the scan line 10 and the third voltage terminal 30 according to the control signal, so that each light-emitting diode emits light at the required time.

[0125] During the second time period t11, in some embodiments, other light-emitting diodes are controlled to emit light (by applying a driving voltage signal) according to a control signal, thereby improving the continuity and brightness of the light-emitting display effect and covering the light emitted by the light-emitting diode connected in series with the first resistor. In other embodiments, other light-emitting diodes can also be controlled not to emit light (by not applying a driving voltage signal). Since the second time period t11 is relatively short, it has less impact on the light-emitting display effect and is more energy-efficient.

[0126] Example 4

[0127] This embodiment proposes a key input device, which performs key detection using the key detection method described above, or includes the key detection circuit described above. The key input device may be, for example, a keyboard.

[0128] Keypad input devices include keypad circuit boards, such as Figure 13As shown, the button circuit board includes a first circuit board 40 and a second circuit board 41 arranged at an interval between the upper and lower parts, and a spacer layer 42 connecting the first circuit board 40 and the second circuit board 41. The first circuit board 40 is located above the second circuit board 41 and is provided with an output line 11 and a second resistor (if present). The second circuit board 41 is provided with a scan line 10, a light-emitting diode 46 and a first resistor (not shown in the figure). Conductive lines (e.g., silver paste lines) can be provided on the first circuit board 40 and the second circuit board 41 to form the scan line 10 and the output line 11.

[0129] The push-button switch is connected between the first circuit board 40 and the second circuit board 41, such as... Figure 13 As shown, the push-button switch includes a first contact 430 located on the first circuit board 40 and electrically connected to the output line 11, and a second contact 431 located on the second circuit board 41 and electrically connected to the scan line 10. The two contacts are arranged at intervals relative to each other, and the spacer layer 42 is provided with a cavity 420 for exposing the first contact 430 and the second contact 431. A reset member 44 and a button 45 are correspondingly arranged above the push-button switch. The reset member 44 can be made of elastic materials such as rubber or silicone. When the button 45 is pressed, the button 45 presses down the reset member 44 and the push-button switch, so that the first contact 430 and the second contact 431 are in contact, and the scan line 10 and the output line 11 are connected. When the button 45 is released, the button 45 is reset by the elastic force of the reset member 44, and the scan line 10 and the output line 11 are disconnected.

[0130] An LED 46 is disposed on a second circuit board 41. A clearance hole 400 is formed on the spacer layer 42 and the first circuit board 40 to expose the LED 46. The LED 46 is disposed within the clearance hole 400, and its light can be emitted towards the button 45. In some embodiments, the button 45 is provided with a light-transmitting area 450 made of transparent material. The light-transmitting area 450 can, for example, be consistent with the letters / graphics marked on the button 45, so that the light from the LED 46 can illuminate the letters / graphics, making it more aesthetically pleasing. The button 45 can also be made completely transparent, in which case the portion of the button 45 other than the portion marked with letters / graphics forms the light-transmitting area 450 (i.e., the light-transmitting area 450 includes cases where the button 45 is partially transparent or completely transparent). In other embodiments, refer to... Figure 14 A reflective layer 451 is provided on the inner surface of the button 45. The reflective layer 451 has a reflective surface that reflects the light of the light-emitting diode 46. The reflected light illuminates the area around the button 45, improving its aesthetics. In other embodiments, if the inner surface of the button 45 itself has a good reflective effect, the reflective layer 451 may not be provided, and the inner surface of the button 45 may be used directly as the reflective surface.

[0131] It is understandable that when the light-emitting unit includes multiple light-emitting diodes, the other diodes and the corresponding control circuits and the third resistor can be set on the second circuit board 41, or they can be set on the first circuit board 40.

[0132] Optionally, both the first circuit board 40 and the second circuit board 41 are thin-film circuits.

[0133] In this invention, only two circuit boards are needed to achieve the functions of anti-ghosting key detection and backlight display, which simplifies the structure of the circuit board, makes the circuit design of the key input device simpler, and the overall thickness of the circuit board can be reduced. In this way, the key input device can also be made smaller, which can effectively reduce the thickness of laptops and other products with high requirements for thinness and lightness, and improve product competitiveness.

[0134] Example 5

[0135] This embodiment proposes an electronic device that includes the key detection circuit described above or the key input device described above. The electronic device may be, for example, a mobile phone, laptop, desktop computer, game console, or other device with keys.

[0136] Example 6

[0137] This embodiment proposes a processor-readable storage medium for storing processor-executable instructions. When these instructions are loaded and executed by the processor, the key detection method described above can be implemented. It is understood that this processor-readable storage medium may be included within a key input device and / or electronic device. The processor may be, for example, a computer, an embedded system, or a single chip.

[0138] It should be noted that, in the absence of conflict, the various embodiments described herein can be combined with each other to obtain more implementation schemes.

[0139] The above are merely specific embodiments of the present invention, and any improvements made based on the concept of the present invention shall be considered within the scope of protection of the present invention.

Claims

1. A key detection method, characterized in that, The key detection method is executed by a key detection circuit, which includes multiple scan lines (10) arranged at intervals and multiple output lines (11) arranged at intervals. The multiple output lines (11) and multiple scan lines (10) are arranged in an alternating matrix circuit. The scan lines (10) have a first voltage terminal (100) and a second voltage terminal (101). The output lines (11) have a voltage output terminal (110) and multiple switch circuits (12) respectively connected to the multiple scan lines (10). The switch circuits (12) include key switches. The second voltage terminal (101) is a ground voltage terminal. The scan line (10) has a main line (102) and multiple parallel branch lines (103) connected to the main line (102). The main line (102) has the first voltage terminal (100), and the branch lines (103) have the second voltage terminal (101). Each branch line (103) is provided with a corresponding switch circuit (12). The multiple output lines (11) correspond one-to-one with the multiple branch lines (103) of the scan line (10). A diode and a first resistor are connected in series between the connection point of the branch line (103) and the main line (102) and the second voltage terminal (101). The diode allows current to flow unidirectionally to the first resistor. The diode is a light-emitting diode used to realize keyboard backlight. The switching circuit (12) is connected to the part of the branch line (103) located between the diode and the first resistor. The button detection method includes the following steps: S21. Drive voltage signals are applied to the first voltage terminals (100) of all the scan lines (10) in a preset manner, and the frequency components of the drive voltage signals applied to different scan lines (10) are different, and the voltage signals of the voltage output terminals (110) of all the output lines (11) are continuously received. S22. Sample the voltage signal received from the voltage output terminal (110) to obtain the frequency component information of the voltage signal from different voltage output terminals (110); S23. Determine the triggered push-button switch based on the frequency component information of the voltage signal.

2. The button detection method as described in claim 1, characterized in that, In step S21, the difference in the center frequency of the driving voltage signal supplied to the first voltage terminal (100) of each scan line (10) is not less than one percent of the highest sampling rate of the detection line.

3. The button detection method as described in claim 1, characterized in that, In step S21, applying a driving voltage signal to the first voltage terminal (100) of all the scan lines (10) in a preset manner includes the following steps: A driving voltage signal is continuously applied to the first voltage terminal (100) of all scan lines (10); or, a driving voltage signal is applied to the scan line (10) according to a preset power-on cycle for each scan line (10), wherein the power-on cycle includes power-on time and non-power-on time, and within a certain period of time, all scan lines (10) or at least two scan lines (10) are simultaneously applied with a driving voltage signal.

4. The button detection method as described in claim 1, characterized in that, Step S23 includes the following steps: S231. Identify the scan line (10) of the driving voltage signal with the corresponding frequency component based on the frequency component information of the voltage signal at the voltage output terminal (110) of the output line (11). S232. Identify the push-button switch connected between the output line (11) and the scan line (10) having the same voltage frequency components, which is the push-button switch that has been triggered.

5. A key detection method, characterized in that, The key detection method is executed by a key detection circuit, which includes multiple scan lines (10) arranged at intervals and multiple output lines (11) arranged at intervals. The multiple output lines (11) and multiple scan lines (10) are arranged in an alternating matrix circuit. The scan lines (10) have a first voltage terminal (100) and a second voltage terminal (101). The key detection circuit includes light-emitting diodes for keyboard backlighting. The output lines (11) have a voltage output terminal (110) and multiple switch circuits (12) respectively connected to the multiple scan lines (10). The switch circuits (12) include key switches. The second voltage terminal (101) is a ground voltage terminal. The scan line (10) has a main line (102) and multiple parallel branch lines (103) connected to the main line (102). The main line (102) has the first voltage terminal (100), and the branch lines (103) have the second voltage terminal (101). Each branch line (103) is provided with a corresponding switch circuit (12). The multiple output lines (11) correspond one-to-one with the multiple branch lines (103) of the scan line (10). The branch line (103) is also provided with a first resistor connected in series with the light-emitting diode. The light-emitting diode and the first resistor are sequentially arranged between the connection position of the branch line (103) and the main line (102) and the second voltage terminal (101). The light-emitting diode enables the current to conduct unidirectionally to the first resistor. The switching circuit (12) is connected to the portion of the scanning line (10) located between the light-emitting diode and the first resistor. The button detection method includes the following steps: S1. Drive the LEDs to light up as needed during the first time period t10, so that all LEDs are constantly lit or form a lighting effect; S2. During the second time period t11, perform button detection; S3. Repeat steps S1 and S2 in sequence; In step S2, the key detection includes the following steps: S21. Drive voltage signals are applied to the first voltage terminals (100) of all the scan lines (10) in a preset manner, and the frequency components of the drive voltage signals applied to different scan lines (10) are different, and the voltage signals of the voltage output terminals (110) of all the output lines (11) are continuously received. S22. Sample the voltage signal received from the voltage output terminal (110) to obtain the frequency component information of the voltage signal from different voltage output terminals (110); S23. Determine the triggered push-button switch based on the frequency component information of the voltage signal.

6. The button detection method as described in claim 5, characterized in that, In step S21, the difference in the center frequency of the driving voltage signal supplied to the first voltage terminal (100) of each scan line (10) is not less than one percent of the highest sampling rate of the detection line.

7. The button detection method as described in claim 5, characterized in that, In step S21, applying a driving voltage signal to the first voltage terminal (100) of all the scan lines (10) in a preset manner includes the following steps: A driving voltage signal is continuously applied to the first voltage terminal (100) of all scan lines (10); or, a driving voltage signal is applied to the scan line (10) according to a preset power-on cycle for each scan line (10), the power-on cycle including power-on time and non-power-on time, and within a certain period of time, all scan lines (10) or at least two scan lines (10) are simultaneously applied with driving voltage signals.

8. The button detection method as described in claim 5, characterized in that, Step S23 includes the following steps: S231. Identify the scan line (10) of the driving voltage signal with the corresponding frequency component based on the frequency component information of the voltage signal at the voltage output terminal (110) of the output line (11). S232. Identify the push-button switch connected between the output line (11) and the scan line (10) having the same voltage frequency components, which is the push-button switch that has been triggered.

9. The key detection method according to any one of claims 5 to 8, characterized in that, The first time period t10 and the second time period t11 form a light emission cycle T2. In step S1, the light-emitting diodes are controlled to produce a light effect during the first time period t10, or a high level is continuously input to the first voltage terminal (100) of all the scan lines (10) to drive all the light-emitting diodes to continuously emit light. The first time period t10 is greater than or equal to the second time period t11.

10. The button detection method as described in claim 9, characterized in that, The first time period t10 and the second time period t11 together form a light emission period T2, and the duration of the light emission period T2 is less than or equal to 41.6 ms.

Citation Information

Patent Citations

  • Keyboard scanning device as well as key matrix circuit and scanning method thereof

    CN102142846A

  • Operation recognition device and method and intelligent terminal with device

    CN108132728A

  • Methods and apparatus for efficient illumination of individual keys in a keyboard

    US20120162085A1