Stroke detection chip and key detection system

文档序号:515556 发布日期:2021-05-28 浏览:14次 中文

阅读说明:本技术 一种行程检测芯片和按键检测系统 (Stroke detection chip and key detection system ) 是由 不公告发明人 于 2021-03-23 设计创作,主要内容包括:本发明提供了一种行程检测芯片和应用该行程检测芯片的按键系统,其中该行程检测芯片驱动发光二极管发射光线,该光线被遮光片部分遮挡后照射到光电二极管或者光电三极管上,芯片驱动光电二极管或光电三级管并将照射在其上的光线强度转换成数字值,从而表征遮光片的行程,本行程检测芯片通过串行接口与主控芯片通信,支持菊花链的形式扩展使用,以上特征使该行程检测芯片可以高效的应用到按键检测系统中,开发出高效高可靠的按键检测系统,并使按键的触发点任意调节。(The invention provides a stroke detection chip and a key system applying the stroke detection chip, wherein the stroke detection chip drives a light emitting diode to emit light, the light is partially shielded by a light shielding sheet and then irradiates on a photodiode or a photoelectric triode, the chip drives the photodiode or the photoelectric triode and converts the intensity of the light irradiating on the photodiode or the photoelectric triode into a digital value, thereby representing the stroke of the light shielding sheet, the stroke detection chip is communicated with a main control chip through a serial interface to support the extended use of a daisy chain form, the stroke detection chip can be efficiently applied to the key detection system by the characteristics, a high-efficiency and high-reliability key detection system is developed, and the trigger point of a key can be adjusted at will.)

1. A stroke detection chip is characterized in that: contain light transmitting terminal drive circuit, light receiving terminal drive circuit, analog-to-digital conversion circuit, digital filter, communication interface circuit and control module, wherein:

the light emitting end driving circuit is used for driving a light emitting device outside the chip to emit light;

the light receiving end driving circuit is used for driving a light receiving device outside the chip and converting the light intensity into a corresponding electric signal;

the analog-to-digital conversion circuit is used for converting the electric signal output by the light receiving end driving circuit into a digital signal;

the digital filter is used for filtering the digital signal output by the analog-to-digital converter;

the communication interface circuit is used for receiving and sending information by the chip;

and the control module is used for controlling the working state of each module of the chip.

2. The stroke detecting chip according to claim 1, wherein: the light emitting end driving circuit can drive the light emitting diode to emit light.

3. The stroke detecting chip according to claim 1, wherein: the light receiving end driving circuit can drive a photodiode or a photoelectric triode, and converts the intensity of received light into corresponding electric signals, voltage signals and current signals.

4. The stroke detecting chip according to claim 1, wherein: the analog-to-digital conversion circuit converts the electric signal output by the light receiving end driving circuit into a 1-bit or multi-bit digital signal.

5. The stroke detecting chip according to claim 1, wherein: the digital filter filters the digital signal output by the analog-to-digital converter, and can also bypass the module to directly output the output result of the analog-to-digital converter.

6. The stroke detecting chip according to claim 1, wherein: the communication interface comprises a clock signal, a data input signal and a data output signal, and is used for receiving and sending control information and working state information of the chip and an output result of the digital filter or the analog-to-digital converter.

7. The stroke detecting chip according to claim 1, wherein: the control module is used for controlling the working state of each module of the chip.

8. The stroke detecting chip according to claim 1, wherein: the use can be expanded in a daisy chain manner, and the strokes of a plurality of points can be detected.

9. The stroke detecting chip according to claim 1, wherein: the communication clock signal can be supplied by the main controller in a unified way, and can also be from the buffer output of the stroke detection chip at the upper stage in the daisy chain.

10. The stroke detecting chip according to claim 1, wherein: the stroke of the light shielding plate between the light ray generating device and the light ray receiving device can be converted into a 1bit or multi-bit digital signal to be output.

11. The stroke detecting chip according to claim 1, wherein: one or more of the LED lamps may or may not be driven.

12. A key detection system, comprising: the stroke detection chip according to any one of claims 1 to 11 is applied.

13. The key press detection system of claim 12 wherein the entire key press system is daisy chained together or divided into multiple daisy chains.

14. The key detection system of claim 12 wherein: all keys of the key detection system can be detected simultaneously, and keys in the key detection system can also be detected in a time-sharing manner.

15. The key detection system of claim 12 wherein: each stroke detection chip can drive one or more LED lamps, or can not drive the LED lamps.

16. The key detection system of claim 12 wherein: the trigger point of the key can be set arbitrarily.

Technical Field

The invention relates to a chip, in particular to a stroke detection chip.

Background

In some applications, it is desirable to detect the travel of a plurality of points of keys, such as keys and pedals of an electric piano or electronic organ, keys of a computer keyboard, and keys of a joystick of a game machine. Most of the current stroke detection means in these applications are based on setting one or more trigger points on the key stroke to detect the stroke of the key, and this detection means is only suitable for setting a small number of trigger points, and with the increase of the trigger points, the complexity and cost of the system will increase dramatically, and most of the current detection means are based on a matrix scanning or partition scanning manner to detect a plurality of points in the whole system at different times, and the speed is slow.

The stroke detection chip disclosed by the invention can detect the specific stroke of the key in an optical detection mode, can arbitrarily set the trigger points of the key in the main control chip, can conveniently detect the strokes of a plurality of keys in a system in a daisy chain mode, can simultaneously detect the strokes of all points in the key detection system, and has a speed higher than matrix scanning and partition scanning.

In some key detection systems, LED lamp effect display is needed, most of the current LED lamp effect schemes need a special LED lamp effect control chip to realize, the control mode is high in cost, and LED control wiring is difficult.

Disclosure of Invention

The invention provides a stroke detection chip and a key system applying the stroke detection chip, wherein the stroke detection chip drives a light emitting diode to emit light, the light is partially shielded by a light shielding sheet and then irradiates on a photodiode or a photoelectric triode, the chip drives the photodiode or the photoelectric triode and converts the intensity of the light irradiating on the photodiode or the photoelectric triode into a digital value, thereby representing the stroke of the light shielding sheet, and the stroke detection chip is communicated with a main control chip through a serial interface to support the extended use of a daisy chain form.

Preferably, the whole key detection system can be realized by connecting a daisy chain in series or dividing the daisy chain into a plurality of daisy chains.

Preferably, all keys of the key detection system can be detected simultaneously, and keys in the key system can also be detected in a time-sharing manner.

Preferably, each stroke detection chip can drive one or more LED lamps, or can not drive the LED lamps.

Preferably, the key detection system can set the trigger point of the key at will.

In summary, the stroke detection chip of the present invention can be used to develop a highly efficient and reliable key detection system, and can set the key trigger point arbitrarily.

Drawings

The above and other features, nature, and advantages of the present invention will become more apparent from the following description of the embodiments when taken in conjunction with the accompanying drawings in which like reference characters identify correspondingly throughout and wherein:

FIG. 1 is a diagram showing the relationship between the output digital signal of the chip of the present invention and the illumination intensity on a photodiode or a phototransistor;

FIG. 2 is a diagram showing the relationship between the output signal of the chip and the height of the light shielding plate;

FIG. 3 shows a block diagram of the main functional blocks of the chip of the present invention;

FIG. 4 is a schematic diagram showing an application of the stroke detecting chip of the present invention;

FIG. 5 illustrates a first embodiment of the present invention;

reference numerals

100, 100-1, 100-2, 100-3-stroke detection chip;

101, 101-1, 101-2, 101-3 — stroke detection chip DIN pin;

102, 102-1, 102-2, 102-3 — stroke detection chip SCK pin;

103, 103-1, 103-2, 103-3-the DOUT pin of the stroke detection chip;

104, 104-1, 104-2, 104-3 — stroke detection chip IR pin;

105, 105-1, 105-2, 105-3 — stroke detection chip PD pin;

106-stroke detection chip communication interface module;

107-stroke detection chip control logic module;

108-Stroke detection chip analog-to-digital converter Module;

109-Stroke detection chip digital filter module;

110-stroke detection chip photodiode/triode drive module;

111-stroke detection chip LED drive module;

112, 112-1, 112-2, 112-3 — power port of stroke detection chip;

113, 113-1, 113-2, 113-3 — stroke detection chip ground port;

114, 114-1, 114-2, 114-3 — stroke detection chip LED0 port;

115, 115-1, 115-2, 115-3 — stroke detection chip LED1 port;

116, 116-1, 116-2, 116-3 — stroke detection chip LED2 port;

117-stroke detection chip LED lamp driving module;

120, 120-1, 120-2, 120-3 — light emitting diode;

121, 121-1, 121-2, 121-3-phototriode;

122, 122-1, 122-2, 122-3 — a visor;

130 — master control chip;

131-Master chip DIN signal;

132 — master control chip SCK signal;

133-Master chip DOUT signal.

Detailed Description

In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below.

Embodiments of the present invention will now be described with reference to the accompanying drawings in detail. Reference will now be made in detail to the preferred embodiments of the present invention, examples of which are illustrated in the accompanying drawings. Wherever possible, the same reference numbers will be used throughout the drawings to refer to the same or like parts. Further, although the terms used in the present invention are selected from publicly known and used terms, some of the terms mentioned in the description of the present invention may be selected by the applicant at his or her discretion, the detailed meanings of which are described in relevant parts of the description herein. Furthermore, it is required that the present invention is understood, not simply by the actual terms used but by the meaning of each term lying within.

As shown in fig. 1, it is a schematic diagram of the illumination intensity and the output of the stroke detection chip of the present invention, and the output thereof adopts a binary coding manner, and may also adopt other coding manners. The abscissa of fig. 1 is the illumination intensity, the ordinate is the output value of the detection chip, when all light rays are shielded by the light shielding plate, the output value is 0, the stronger the illumination intensity is, the larger the output value is, and the illumination intensity and the output value are in one-to-one correspondence.

Fig. 2 is a schematic diagram showing a corresponding 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 the phototransistor, the light shielding plate shields a part of the light emitted by the light emitting diode, the light intensity irradiated on the photodiode or the phototransistor also changes along with the height change of the light shielding plate, when the height of the light shielding plate is 0 in fig. 2, the light is completely shielded, the output of the detection chip is 0, when the light shielding plate shields the light part, the output of the detection chip corresponds to the digital value of the light intensity, and the digital value reflects the height of the light.

Fig. 3 is a block diagram of main functional modules of the stroke detection chip, where 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 driving module 110, a light emitting diode driving module 111, a DIN pin 101 is a communication data input interface of the chip, an SCK pin 102 is an input communication clock interface of the chip, a DOUT pin 103 is a communication data output interface of the chip, an IR pin 104 is a light emitting diode driving pin of the chip, and a PD pin 105 is a light emitting diode/phototransistor driving pin of the chip. The DIN pin 101 and the SCK pin 102 are connected to the communication interface module 106, and respectively transmit input communication data and a communication clock to the communication interface 101, and the communication interface 101 transmits 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, and transmits control data to the control logic module 107 and reads 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 driving module 110, and the light emitting diode driving module 111, and controls the operation states of these modules. The led driving module 111 drives the led outside the chip through the IR pin, the photodiode/phototransistor driving module 110 drives the photodiode or phototransistor outside the chip through the PD pin 105 to generate a current or voltage signal, and sends the generated current or voltage signal to the analog-to-digital converter module 108, the analog-to-digital converter module 108 converts the current or voltage signal from a digital signal to the digital filter module 109, the digital filter module 109 filters the digital signal and sends the digital signal to the communication interface module 106, the communication interface module 106 sends the filtered digital signal to the outside of the chip through the DOUT pin 103, the VDD pin 112 is a power supply port of the stroke detection chip 100, and the VSS pin 113 is a ground supply port of the stroke detection chip 100. The communication interface module 106 is connected with the LED lamp driving module 117, and the LED lamp driving module 117 is connected with the LED0 pin 114, the LED1 pin 115 and the LED2 pin 116 to control the LED lamp effect outside the chip.

Fig. 4 is an application diagram of the stroke detection chip. In practical use, the SCK pin 102, the DIN pin 101, and the DOUT pin 103 of the stroke detection chip 100 are responsible for communication of the stroke detection chip 100, wherein the SCK pin 102 is connected to a clock output pin of a main control terminal, the DIN pin 101 is connected to a data output pin of the main control chip or a data output pin of a previous stroke detection chip in a daisy chain, and the DOUT pin 103 is connected to a data input pin of the main control chip or a data input pin of a next stroke detection chip in the daisy chain. The IR pin 104 drives the photodiode 120 to emit light, the shielding plate 122 partially shields the light, and the PT pin 105 drives the phototransistor 121 to convert the shielded light into an electrical signal. The VDD pin 112 and the VSS pin 113 are connected to a power supply and ground of the system to supply the power supply and ground to the stroke detecting chip 100. The LED0 pin 114, the LED1 pin 115, and the LED2 pin 116 are each connected to the negative terminal of one LED, and the positive terminals of the three LEDs are connected to the system power supply.

The first embodiment is as follows:

fig. 5 is a schematic diagram of a key system using 3 stroke detection chips.

As shown in FIG. 5, the application includes 3 stroke detecting 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 pin 102-1 of the stroke detection chip 100-1, the SCK pin 102-2 of the stroke detection chip 100-2, 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, the light emitted by the light emitting diode is blocked by the light blocking plate 122-1 and then irradiates 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, the light emitted by the light emitting diode is blocked by the light blocking plate 122-2 and then irradiates 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, and the negative terminal of the light emitting diode 120-3 is connected to the ground, after being shielded by the light shield plate 122-3, light emitted by the light emitting diode irradiates on the phototriode 121-3, the collector of the phototriode 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 a power supply of a system, the VSS pin 113-1 of the stroke detection chip 100-1 is connected to a 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, the, The pin 115-1 of the LED1 and the pin 116-1 of the LED2 are respectively connected to the cathode of a luminous LED, the anodes of the three luminous LEDs are connected to a system power supply, the pin 114-2 of the LED0, the pin 115-2 of the LED1 and the pin 116-2 of the LED2 of the stroke detection chip 100-2 are respectively connected to the cathode of a luminous LED, the anodes of the three luminous LEDs are connected to the system power supply, the pin 114-3 of the LED0, the pin 115-3 of the LED1 and the pin 116-3 of the LED2 of the stroke detection chip 100-3 are respectively connected to the cathode of a luminous LED, and the anodes of the three luminous LEDs are connected to the system power supply.

In another embodiment, the phototriode may be replaced with a photodiode.

In another embodiment, the system can be extended to any number of keys in a daisy chain manner.

In another embodiment, the trip detection chips may be distributed in multiple daisy chains, with the master control chip controlling the multiple daisy chains.

In another embodiment, the photodiode or the phototriode can be replaced by a switch key, and the stroke detection chip of the invention can detect the pressing and lifting states of the switch key.

In another embodiment, the stroke detection chip may drive one LED lamp or not drive the LED lamp.

In summary, the stroke detection chip of the present invention can represent the stroke of the light shielding plate by detecting the intensity of the remaining light irradiated onto the photodiode/phototransistor, and digitally transmit the stroke of the light shielding plate back to the main controller, and the main controller sets the trigger point of the key. And the system can be conveniently expanded and applied through the daisy chain, has the characteristics of high reliability and convenient expansion, and can be efficiently applied to a system needing multipoint stroke detection.

While specific embodiments of the invention have been described above, it will be appreciated by those skilled in the art that these are by way of example only, and that the scope of the invention is defined by the appended claims. Various changes and modifications to these embodiments may be made by those skilled in the art without departing from the spirit and scope of the invention, and these changes and modifications are within the scope of the invention.

10页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:用于集成电路的低电压电平移位器

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类