A stroke detection chip and a key detection system
Through the optical detection method, combined with the daisy chain structure and LED lighting effect control, the problem of complexity and cost of multi-point button detection in the existing technology is solved, and efficient and fast detection and LED lighting effect display are achieved.
Patent Information
- Application Number
- CN202110305014.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-23
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2041-03-23
AI Technical Summary
The existing travel detection technology has high complexity and cost in multi-point button detection, and the matrix scanning and partition scanning speeds are slow, making it difficult to meet the needs of efficient detection.
The trip detection chip adopts optical detection method, realizes multi-point button detection through a daisy chain structure, integrates LED lighting control function, and supports communication between the serial interface and the main control chip.
It realizes rapid detection of multiple key strokes, reduces system complexity and cost, improves detection speed, and supports LED lighting effect display.
Smart Images

Figure CN112865777B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a chip, and more particularly to a travel detection chip. Background Art
[0002] In some applications, it is necessary to detect the key travel of multiple points, such as the keys and pedals of an electric piano or electronic organ, the keys of a computer keyboard, and the keys of some game console controllers. At present, most of the travel detection means in these applications are based on setting one or more trigger points on the key travel to detect the key travel. This detection means is only suitable for setting a small number of trigger points. As the number of trigger points increases, the system complexity and cost will increase sharply. Moreover, most of the current detection methods are based on matrix scanning or partition scanning to detect multiple points in the entire system in a time-sharing manner, and the speed is slow.
[0003] The travel detection chip disclosed in the present invention can detect the specific travel of a key by optical detection, arbitrarily set the trigger points of the key in the main control chip, and conveniently detect the travel of multiple keys in the system by means of a daisy chain, and can simultaneously detect the travel of all points in the key detection system, and the speed is faster than matrix scanning and partition scanning.
[0004] In some key detection systems, LED light effect display is required. At present, most of the LED light effect solutions require a dedicated LED light effect control chip to implement. Such a control method has a high cost, and the LED control wiring is difficult. The travel detection chip of the present invention integrates the LED light effect control function, and can conveniently develop a key detection system with a light effect. Summary of the Invention
[0005] The present invention provides a travel detection chip and a key system applying the travel detection chip. The travel detection chip drives a light-emitting diode to emit light, and the light is partially blocked by a light-shielding sheet and then irradiates on a photodiode or a phototransistor. The chip drives the photodiode or the phototransistor and converts the intensity of the light irradiated thereon into a digital value, thereby characterizing the travel of the light-shielding sheet. The travel detection chip communicates with the main control chip through a serial interface and supports daisy-chain expansion.
[0006] Preferably, the entire key detection system can be connected in series with a single daisy chain or divided into multiple daisy chains.
[0007] Preferably, all the keys in the key detection system can be detected simultaneously, or the keys in the key system can be detected in a time-sharing manner.
[0008] Preferably, each travel detection chip can drive one or more LEDs, or can not drive an LED.
[0009] Preferably, the key detection system can arbitrarily set the trigger point of the key.
[0010] In summary, an efficient and reliable key detection system can be developed by using the travel detection chip of the present invention, and the key trigger point can be arbitrarily set. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The above and other features, properties, and advantages of the present invention will become more apparent from the following description of the embodiments in conjunction with the drawings, in which the same reference numerals always represent the same features, where:
[0012] Figure 1 shows a schematic diagram of the relationship between the output digital signal of the chip of the present invention and the light intensity on the photodiode or phototransistor;
[0013] Figure 2 shows a schematic diagram of the relationship between the output signal of the chip of the present invention and the height of the light-shielding plate;
[0014] Figure 3 shows a block diagram of the main functional modules of the chip of the present invention;
[0015] Figure 4 shows an application schematic diagram of the travel detection chip of the present invention;
[0016] Figure 5 shows Embodiment 1 of the present invention;
[0017] REFERENCE NUMERALS
[0018] 100, 100-1, 100-2, 100-3 - travel detection chip;
[0019] 101, 101-1, 101-2, 101-3 - DIN pin of the travel detection chip;
[0020] 102, 102-1, 102-2, 102-3 - SCK pin of the travel detection chip;
[0021] 103, 103-1, 103-2, 103-3 - DOUT pin of the travel detection chip;
[0022] 104, 104-1, 104-2, 104-3 - IR pin of the travel detection chip;
[0023] 105, 105-1, 105-2, 105-3 - PD pin of the travel detection chip;
[0024] 106 - communication interface module of the travel detection chip;
[0025] 107 - control logic module of the travel detection chip;
[0026] 108 - Travel detection chip analog - to - digital converter module;
[0027] 109 - Travel detection chip digital filter module;
[0028] 110 - Travel detection chip photodiode / triode driver module;
[0029] 111 - Travel detection chip light - emitting diode driver module;
[0030] 112, 112 - 1, 112 - 2, 112 - 3 - Travel detection chip power supply ports;
[0031] 113, 113 - 1, 113 - 2,,113 - 3 - Travel detection chip ground ports;
[0032] 114, 114 - 1, 114 - 2, 114 - 3 - Travel detection chip LED0 ports;
[0033] 115, 115 - 1, 115 - 2, 115 - 3 - Travel detection chip LED1 ports;
[0034] 116, 116 - 1, 116 - 2, 116 - 3 - Travel detection chip LED2 ports;
[0035] 117 - Travel detection chip LED lamp driver module;
[0036] 120, 120 - 1, 120 - 2, 120 - 3 - Light - emitting diodes;
[0037] 121, 121 - 1, 121 - 2, 121 - 3 - Photo - transistors;
[0038] 122, 122 - 1, 122 - 2, 122 - 3 - Light - shielding plates;
[0039] 130 - Main control chip;
[0040] 131 - Main control chip DIN signal;
[0041] 132 - Main control chip SCK signal;
[0042] 133 - Main control chip DOUT signal. Detailed implementation manners
[0043] In order to make the above - mentioned objects, features and advantages of the present invention more obvious and understandable, the following detailed description of the specific implementation manners of the present invention will be given with reference to the accompanying drawings.
[0044] Embodiments of the present invention will now be described with reference to the detailed reference drawings. Preferred embodiments of the present invention will now be described in detail, examples of which are shown in the drawings. Whenever possible, the same reference numerals will be used throughout the drawings to represent the same or similar parts. In addition, although the terms used in the present invention are selected from well-known and commonly used terms, some of the terms mentioned in the description of the present invention may be selected by the applicant according to his or her judgment, and their detailed meanings are described in the relevant parts of the description herein. In addition, it is required to understand the present invention not only by the actual terms used, but also by the meaning implied by each term.
[0045] As Figure 1 shown, it is a schematic diagram of the light intensity and the output of the travel detection chip of the present invention. Its output adopts a binary coding method, and other coding methods can also be adopted. Figure 1 The abscissa is the light intensity, and the ordinate is the output value of the detection chip. When all the light is blocked by the light-shielding plate, the output value is 0. The stronger the light intensity, the larger the output value. The light intensity and the output value are in one-to-one correspondence.
[0046] Figure 2 It is a schematic diagram of the relationship between the height of the light-shielding plate and the output value of the detection chip. The light-shielding plate is located between the light-emitting diode and the photodiode or phototransistor. The light-shielding plate blocks part of the light emitted by the light-emitting diode. As the height of the light-shielding plate changes, the light intensity irradiating on the photodiode or phototransistor also changes. Figure 2 In it, when the height of the light-shielding plate is 0, the light is completely blocked, and the detection chip outputs 0. When the light-shielding plate partially blocks the light, the detection chip outputs a digital value corresponding to the light intensity, and this digital value reflects the height of the light-shielding plate.
[0047] Figure 3It is the main functional module block diagram of the stroke detection chip. The stroke detection chip 100 mainly includes a communication interface module 106, a control logic module 107, an analog-to-digital converter module 108, a digital filter module 109, a photodiode / phototransistor drive module 110, a light-emitting diode drive module 111. The DIN pin 101 is the communication data input interface of the chip, the SCK pin 102 is the input communication clock interface of the chip, the DOUT pin 103 is the communication data output interface of the chip, the IR pin 104 is the light-emitting diode drive pin of the chip, and the PD pin 105 is the photodiode / phototransistor drive pin of the chip. The DIN pin 101 and the SCK pin 102 are connected to the communication interface module 106, and send the input communication data and communication clock to the communication interface 101 respectively. The communication interface 101 sends the output data to the outside of the chip through the DOUT pin 103. The communication interface module 106 is connected to the control logic module 107, sends control data to the control logic module 107, and reads the status information from the control logic module 107. The control logic module is connected to the mode converter module 108, the digital filter module 109, the photodiode / phototransistor drive module 110 and the light-emitting diode drive module 111, and controls the working states of these modules. The light-emitting diode drive module 111 drives the light-emitting diode outside the chip through the IR pin. The photodiode / phototransistor drive module 110 drives the photodiode or phototransistor outside the chip through the PD pin 105 to generate current or voltage signals, and sends the generated current or voltage signals to the analog-to-digital converter module 108. The analog-to-digital converter module 108 converts the current or voltage signals into digital signals and sends them to the digital filter module 109. The digital filter module 109 filters the digital signals and sends them to the communication interface module 106. The communication interface module 106 sends the filtered digital signals to the outside of the chip through the DOUT pin 103. The VDD pin 112 is the power supply port of the stroke detection chip 100, and the VSS pin 113 is the ground supply port of the stroke detection chip 100. The communication interface module 106 is connected to the LED lamp drive module 117. The LED lamp drive module 117 is connected to the LED0 pin 114, the LED1 pin 115 and the LED2 pin 116 to control the LED lamp effect outside the chip.
[0048] Figure 4It is a schematic diagram of the application of a stroke detection chip. In actual use, the SCK pin 102, DIN pin 101, and DOUT pin 103 of the stroke detection chip 100 are responsible for the communication of the stroke detection chip 100. Among them, the SCK pin 102 is connected to the clock output pin of the master control end, the DIN pin 101 is connected to the data output pin of the master control chip or the data output pin of the previous-stage stroke detection chip in the daisy chain, and the DOUT pin 103 is connected to the data input pin of the master control chip or the data input pin of the next-stage stroke detection chip in the daisy chain. The IR pin 104 drives the light-emitting diode 120 to emit light, and the light-shielding plate 122 partially blocks the light. The PT pin 105 drives the phototransistor 121 to convert the blocked light into an electrical signal. The VDD pin 112 and VSS pin 113 are connected to the power supply and ground of the system to provide power supply and ground for the stroke detection chip 100. The LED0 pin 114, LED1 pin 115, and LED2 pin 116 are respectively connected to the negative ends of a light-emitting diode, and the positive ends of the three light-emitting diodes are connected to the system power supply.
[0049] Embodiment 1:
[0050] Figure 5 It is a schematic diagram of a key system using 3 stroke detection chips.
[0051] Such as Figure 5As shown, the application includes three stroke detection chips 100-1, 100-2, and 100-3, and a main control chip 130. The SCK pin 132 of the main control chip 130 is connected to the SCK pins 102-1 of the stroke detection chip 100-1, the SCK pin 102-2 of the stroke detection chip 100-2, and the SCK pin 102-3 of the stroke detection chip 100-3. The DOUT pin 133 of the main control chip 130 is connected to the DIN pin 101-1 of the stroke detection chip 100-1. The DOUT pin 103-1 of the stroke detection chip 100-1 is connected to the DIN pin 101-2 of the stroke detection chip 100-2. The DOUT pin 103-2 of the stroke detection chip 100-2 is connected to the DIN pin 101-3 of the stroke detection chip 100-3. The DOUT pin 103-3 of the stroke detection chip 100-3 is connected to the DIN pin 131 of the main control chip 130. The IR pin 104-1 of the stroke detection chip 100-1 is connected to the positive terminal of the light-emitting diode 120-1. The negative terminal of the light-emitting diode 120-1 is connected to the ground. After the light emitted by the light-emitting diode is blocked by the light-shielding plate 122-1, it irradiates onto the phototransistor 121-1. The collector of the phototransistor is connected to the PT pin 105-1 of the stroke detection chip. The IR pin 104-2 of the stroke detection chip 100-2 is connected to the positive terminal of the light-emitting diode 120-2. The negative terminal of the light-emitting diode 120-2 is connected to the ground. After the light emitted by the light-emitting diode is blocked by the light-shielding plate 122-2, it irradiates onto the phototransistor 121-2. The collector of the phototransistor is connected to the PT pin 105-2 of the stroke detection chip. The IR pin 104-3 of the stroke detection chip 100-3 is connected to the positive terminal of the light-emitting diode 120-3. The negative terminal of the light-emitting diode 120-3 is connected to the ground. After the light emitted by the light-emitting diode is blocked by the light-shielding plate 122-3, it irradiates onto the phototransistor 121-3. The collector of the phototransistor is connected to the PT pin 105-3 of the stroke detection chip. The VDD pin 112-1 of the stroke detection chip 100-1 is connected to the power supply of the system. The VSS pin 113-1 of the stroke detection chip 100-1 is connected to the ground of the system. The VDD pin 112-2 of the stroke detection chip 100-2 is connected to the power supply of the system. The VSS pin 113-2 of the stroke detection chip 100-2 is connected to the ground of the system. The VDD pin 112-3 of the stroke detection chip 100-3 is connected to the power supply of the system. The VSS pin 113-3 of the stroke detection chip 100-3 is connected to the ground of the system. The LED0 pin 114-1, LED1 pin 115-1, and LED2 pin 116-1 of the stroke detection chip 100-1 are respectively connected to the negative electrodes of a light-emitting LED. The positive electrodes of these three light-emitting LEDs are connected to the system power supply.The LED0 pin 114-2, LED1 pin 115-2, and LED2 pin 116-2 of the travel detection chip 100-2 are respectively connected to the negative electrodes of a light-emitting LED, and the positive electrodes of these three light-emitting LEDs are connected to the system power supply. The LED0 pin 114-3, LED1 pin 115-3, and LED2 pin 116-3 of the travel detection chip 100-3 are respectively connected to the negative electrodes of a light-emitting LED, and the positive electrodes of these three light-emitting LEDs are connected to the system power supply.
[0052] In another embodiment, the phototransistor can be replaced with a photodiode.
[0053] In another embodiment, the system can be expanded into a system with any number of buttons in a daisy chain manner.
[0054] In another embodiment, the travel detection chips can be distributed in multiple daisy chains, and the main control chip controls the multiple daisy chains.
[0055] In another embodiment, the photodiode or phototransistor can be replaced with a switch button, and the travel detection chip of the present invention can detect the pressed and lifted states of the switch button.
[0056] In another embodiment, the travel detection chip can drive an LED lamp or not drive the LED lamp.
[0057] In summary, the travel detection chip of the present invention can characterize the travel of the light-shielding plate by detecting the remaining light intensity irradiated on the photodiode / phototransistor, and transmit the travel of the light-shielding plate back to the main controller in a digital manner, and the main controller sets the trigger point of the button. Moreover, it can be conveniently expanded and applied through a daisy chain, has the characteristics of high reliability and convenient expansion, and can be efficiently applied to systems that require multi-point travel detection.
[0058] Although the specific embodiments of the present invention have been described above, those skilled in the art should understand that these are only examples, and the protection scope of the present invention is defined by the appended claims. Without departing from the principles and essence of the present invention, those skilled in the art can make various changes or modifications to these embodiments, but these changes and modifications all fall within the protection scope of the present invention.
Claims
1. A travel detection chip, characterized in that: it includes a photodiode / phototransistor drive module, a light-emitting diode drive module, an analog-to-digital converter module, a digital filter module, a communication interface module, and a control logic module, where: the light-emitting diode drive module is used to drive an external light-emitting device of the chip to emit light; the photodiode / phototransistor drive module is used to drive an external light-receiving device of the chip and convert the light intensity into a corresponding electrical signal; the analog-to-digital converter module is used to convert the electrical signal output by the light-receiving end drive circuit into a digital signal; the digital filter module is used to filter the digital signal output by the analog-to-digital converter; the communication interface module is used for the chip to receive and send information; the control logic module is used to control the working states of each module of the chip; it is extended and used in the form of a daisy chain to detect the travel of multiple points; The travel detection chip includes a communication interface module, a control logic module, an analog-to-digital converter module, a digital filter module, a photodiode / phototransistor drive module, and a light-emitting diode drive module. The DIN pin is the communication data input interface of the chip, the SCK pin is the input communication clock interface of the chip, the DOUT pin is the communication data output interface of the chip, the IR pin is the light-emitting diode drive pin of the chip, and the PD pin is the photodiode / phototransistor drive pin of the chip; the DIN pin and the SCK pin are connected to the communication interface module, and the input communication data and communication clock are sent to the communication interface respectively. The communication interface sends the output data to the outside of the chip through the DOUT pin; the communication interface module is connected to the control logic module, sends the control data to the control logic module, and reads the status information from the control logic module; the control logic module is connected to the analog-to-digital converter module, the digital filter module, the photodiode / phototransistor drive module, and the light-emitting diode drive module, and controls the working states of the analog-to-digital converter module, the digital filter module, the photodiode / phototransistor drive module, and the light-emitting diode drive module; the light-emitting diode drive module drives the external light-emitting diode of the chip through the IR pin, and the photodiode / phototransistor drive module drives the external photodiode or phototransistor of the chip through the PD pin to generate a current or voltage signal, and sends the generated current or voltage signal to the analog-to-digital converter module. The analog-to-digital converter module converts the current or voltage signal into a digital signal and sends it to the digital filter module. The digital filter module filters the digital signal and sends it to the communication interface module. The communication interface module sends the filtered digital signal to the outside of the chip through the DOUT pin. The VDD pin is the power supply port of the travel detection chip, and the VSS pin is the ground supply port of the travel detection chip; the communication interface module is connected to the LED lamp drive module, and the LED lamp drive module is connected to the LED0 pin, the LED1 pin, and the LED2 pin to control the LED lamp effect outside the chip.
2. The travel detection chip according to claim 1, characterized in that: the light-emitting diode drive module drives the light-emitting diode to emit light.
3. The stroke detection chip according to claim 1, Features: The photodiode / phototransistor driving module drives the photodiode or phototransistor to convert the received light intensity into a corresponding electrical signal, such as a voltage signal or a current signal.
4. The stroke detection chip according to claim 1, Features: The analog-to-digital converter module converts the electrical signal output by the light receiving end driving circuit into a 1-bit or multi-bit digital signal.
5. The stroke detection chip as claimed in claim 1, Features: The digital filter module filters the digital signal output by the analog-to-digital converter module, or bypasses the analog-to-digital converter module and directly outputs the output result of the analog-to-digital converter module.
6. The stroke detection chip according to claim 1, Features: The communication interface module includes a clock signal, a data input signal and a data output signal, and is used to receive and send chip control information, working status information and output results of a digital filter module or an analog-to-digital converter module.
7. The stroke detection chip according to claim 1, Features: The control logic module is used to control the working status of each module of the chip.
8. The stroke detection chip as claimed in claim 1, Features: The communication clock signal is uniformly supplied by the main controller, or comes from the buffered output of the upper-level stroke detection chip in the daisy chain.
9. The stroke detection chip according to claim 1, Features: The travel of the light shield between the light generating device and the light receiving device is converted into a 1-bit or multi-bit digital signal output.
10. The stroke detection chip according to claim 1, Features: One or more LED lamps are driven, or no LED lamp is driven.
11. A key detection system, Features: A stroke detection chip according to any one of claims 1 to 10 is used.
12. The key detection system according to claim 11, It is characterized in that The entire key system is connected in series with a daisy chain, or divided into multiple daisy chains.
13. The key detection system according to claim 11, Features: All keys of the key detection system are detected simultaneously, or keys in the key detection system are detected in a time-sharing manner.
14. The key detection system according to claim 11, Features: Each travel detection chip drives one or more LED lights, or does not drive the LED light.
15. The key detection system according to claim 11, Features: Set the trigger point of the button arbitrarily.
Citation Information
Patent Citations
Hall sensor and Hall keyboard
CN210835202U
Stroke detection chip and key detection system
CN216162697U
Analog input device, computing system and method for receiving and processing analog input
TW202036233A