The present invention relates to a switch matrix, and more particularly to an efficient, low cost switch matrix.
In various interface devices, such as keypads, joysticks, wheels, gamepads, etc., detection of user selections of differing buttons and switches is needed. A standard switch matrix operates like a grid of horizontal and vertical conductors. At all points where the horizontal and vertical conductors cross, a switch is located. Pressing/closing the switch connects the two conductors.
In certain situations, a problem with a switch falsely being interpreted as closed can arise.
The diodes in the standard switch matrix also act to overcome the ghosting problem. In the example of
While the conventional switch matrix can provide switch selection indication and avoid ghosting, the conventional approach is input/output (I/O) intensive, requiring significant processor resources in providing scan line processing. The conventional switch matrix further requires one diode per switch to prevent ghosting, which adds considerable accumulative cost as the number of switches within a matrix grows. Accordingly, what is needed is a switch matrix that is more efficient and has a lower cost than the conventional switch matrix.
Aspects of a switch matrix circuit are provided. In accordance with a circuit aspect, a plurality of switches are organized in a row and column configuration. Coupled to the plurality of switches is a current sensing circuit. The current sensing circuit includes a transistor and at least one resistor per column of the plurality of switches. Current amplified by the transistor and converted by the at least one resistor in a column is sensed as a logic level indicative of a switch status within the column for a selected row.
Through the present invention, a more efficient and lower cost switch matrix circuit is provided. In one embodiment, the present invention senses current instead of voltage to detect open or closed switches, where resistors and a transistor are used for each column of the matrix to provide selection signals to a processor to determine which button(s) of the matrix have been pressed. In addition, the number of I/O lines going to the processor can be reduced by utilizing bi-directional scan lines and scanning only one switch at a time instead of an entire row of switches at a time. A further embodiment that is a variation on the current sensing matrix can use an analog-to-digital converter to sense the switch states, but, likewise, uses the bi-directional scan lines to reduce the number of I/O linens going to the processor. These and other advantages will become readily apparent from the following detailed description and accompanying drawings.
The present invention relates to a switch matrix circuit. The following description is presented to enable one of ordinary skill in the art to make and use the invention and is provided in the context of a patent application and its requirements. Various modifications to the preferred embodiment and the generic principles and features described herein will be readily apparent to those skilled in the art. Thus, the present invention is not intended to be limited to the embodiment shown but is to be accorded the widest scope consistent with the principles and features described herein.
To illustrate operation within the switch matrix of
With the current flowing through the transistor Q2, the small base current is amplified into a large emitter to collector current. The emitter current is converted into a voltage by R22. Since the resistor R22 converts the current into a voltage, the current is sensed on Column_1 as logic 1 by the processor 120. The logic 1 on Column_1 indicates to the processor, 120 that the switch S6′, at the intersection of Row_1 and Column_1, is closed.
From a voltage divider perspective, if S10′ were closed in addition to S6′, then R10′, R18, and R6′ will form a voltage divider network as shown in
It should be noted that the term “processor” as used herein can refer to a variety of different types of controller circuits, such as microprocessors, microcontrollers, digital signal processors (DSP's), programmable logic arrays (PGA's), digital logic or state machines, etc.
In this alternate embodiment, the use of bi-directional scan lines limits the scanning to only one switch at a time, instead of the conventional one row at a time. However, for a typical processor with a loop rate of 1 kHz (kiloHertz), the scanning of twenty switches is accomplished in about 20 ms (milliseconds), or one fiftieth of a second, i.e., the complete matrix can be scanned 50 times per second, which is sufficient for software debounce. Further, the utilization of the bi-directional scan lines realizes significant potential in saving cost.
In general, the number of switches that can be supported by a given number of I/O lines for a standard matrix is R×C, where R refers to the number of rows and C refers to the number of columns in the matrix. The number of switches in the matrix of the present invention grows in correspondence with S(S-1), where S refers to the number of scan lines. Notice that the number of switches supported by the conventional matrix grows roughly as ¼S2, whereas with the matrix of the present invention, the number grows as S2-S. As shown by the following table, for a same number of I/O lines/pins, over three times the number of switches can be supported with the matrix in accordance with the present invention, as compared with the conventional matrix.
Thus, a processor with fewer I/O lines can be used to support the same size or larger matrix than conventionally done, which allows for potential cost savings in the use of a smaller, cheaper processor. When used with the same size processor as in the conventional circuit, the current sensing matrix can make available additional I/O lines that are no longer needed to support matrix scanning, thus allowing other features and value to be added to the product, as compared with an I/O intensive standard scan matrix. Of course, additional cost savings are achieved by eliminating the anti-ghosting diodes and replacing them with much lower cost resistors.
The voltage sensing matrix offers a lower cost implementation, since it replaces N transistors with N diodes (where N represents the number of scan lines), diodes being lower in cost than transistors. The constraints in determining the unique switch state include utilizing one of the scan lines as an analog input, driving one of the scan lines to a logic high level, and driving the remaining scan lines to logic low levels, where a processor, as described previously, performs the scan line driving.
In sensing switch state in this embodiment, the switch that is being sensed is the one determined by the unique intersection of the row that is driven high and the column that is being sensed. For example, in the matrix shown in
By way of example, if S151, S152, and S153 or any combination thereof are closed in addition to S154, then the voltage on SCAN5 will be in the range of 1.24V to 5V, depending on the number of switches S151 through S153 that are additionally closed. If switches S115, S125, S135, S141, S142, and S143 are also closed, then the voltage on SCAN5 would be at least 1.09 volts, which is still higher than a silicon diode nominal forward voltage drop of 0.7V, and thus, would still sufficiently indicate a high logic level for a closed switch. Thus, in this example, the threshold used for high and low logic states is about 1.0 to 1.1 volts.
The resistors R101 through R105 are a practical addition to the matrix for applications where the controlling device has leakage currents that could adversely affect the voltage level on the input scan line. The diodes D101 through D105 ensure that the unique switch determined by the intersection of the logic one scan line row and the sense line column can bring the input scan line to a voltage level that exceeds one diode drop above logic 0. If the diodes were not present and the line shorted, then a second switch determined by the intersection of the column driven high and the input sense line row could also pull the sense line to a voltage that is higher than one diode drop from logic 0. Thus, none of the switches except for the unique switch described above can apply a voltage to the input scan line, and no combination of switches is likewise able to apply a voltage to the sense line that exceeds one diode drop from the logic 0 voltage level of the scan lines that are configured as logic 0. This provides anti-ghosting for the matrix.
Alternatively, the matrix could be arranged more as a half-matrix, such that only the upper (i.e., switches S121, 131, 141, 151, 132, 142, 152, 143, 153, 154) or lower (i.e., switches S112, 113, 123, 114, 124, 134, 115, 125, 135, 145) off-diagonal set of switches is populated. In this arrangement, the diodes would no longer be required, since the closed switch that is pulling the input scan line above one diode drop from logic 0 would be unique. A half-matrix arrangement could also be utilized with the above-described current sensing embodiment to eliminate the need to use transistors. While the half-matrix arrangement does reduce the number of switches being sensed, the total number still exceeds what could be supported in the prior art arrangement. For example, when N=5, as is
Another alternate can be achieved by inverting the logic sense of all driven and sensed lines and reversing the diode direction, if included. In this variation, the valid voltage level that indicates “closed” is any voltage level above 0 volts plus allocation for noise margin. There is similarly a symmetrical inverse design for the current sensing matrix.
From the foregoing, it will be observed that numerous variations and modifications may be effected without departing from the spirit and scope of the novel concept of the invention. It is to be understood that no limitation with respect to the specific methods and apparatus illustrated herein is intended or should be inferred. For example, the switch matrix of the present invention can be used in a wide variety of interface or electronic devices, including keyboards, joysticks, gamepads, steering wheels, cellular phones, PDA'S, electronic appliances, or any device having multiple electrical switches or buttons. The processor controlling the scanning can be integral to the device having the switches, or be located across a physical or wireless bus. It is, of course, intended to cover by the appended claims all such modifications as fall within the scope of the claims.
Number | Name | Date | Kind |
---|---|---|---|
2972140 | Hirsch | Feb 1961 | A |
3157853 | Hirsch | Nov 1964 | A |
3220121 | Culter | Nov 1965 | A |
3497668 | Hirsch | Feb 1970 | A |
3517446 | Corlyon | Jun 1970 | A |
3623064 | Kagan | Nov 1971 | A |
3689889 | Feucht et al. | Sep 1972 | A |
3877008 | Payne | Apr 1975 | A |
3902687 | Hightower | Sep 1975 | A |
3903614 | Diamond et al. | Sep 1975 | A |
3911416 | Feder | Oct 1975 | A |
4127752 | Lowthorp | Nov 1978 | A |
4151374 | Fukuhara et al. | Apr 1979 | A |
4160508 | Salisbury, Jr. | Jul 1979 | A |
4236325 | Hall et al. | Dec 1980 | A |
4262549 | Schwellenbach | Apr 1981 | A |
4268827 | Hughen et al. | May 1981 | A |
4281579 | Bennett, Sr. | Aug 1981 | A |
4303907 | Wilson | Dec 1981 | A |
4333070 | Barnes | Jun 1982 | A |
4374384 | Moates | Feb 1983 | A |
4464117 | Forest | Aug 1984 | A |
4484191 | Vavra | Nov 1984 | A |
4513235 | Acklam et al. | Apr 1985 | A |
4581491 | Boothroyd | Apr 1986 | A |
4599070 | Hladky et al. | Jul 1986 | A |
4667181 | Hastreiter | May 1987 | A |
4673933 | Bauer | Jun 1987 | A |
4708656 | de Vries et al. | Nov 1987 | A |
4713007 | Alban | Dec 1987 | A |
4725816 | Petterson | Feb 1988 | A |
4794392 | Selinko | Dec 1988 | A |
4885565 | Embach | Dec 1989 | A |
4891764 | McIntosh | Jan 1990 | A |
4930770 | Baker | Jun 1990 | A |
4934694 | McIntosh | Jun 1990 | A |
5019761 | Kraft | May 1991 | A |
5022384 | Freels | Jun 1991 | A |
5022407 | Horch et al. | Jun 1991 | A |
5035242 | Franklin et al. | Jul 1991 | A |
5038089 | Szakaly | Aug 1991 | A |
5078152 | Bond et al. | Jan 1992 | A |
5138246 | Kobayashi | Aug 1992 | A |
5151554 | Matsuda | Sep 1992 | A |
5165897 | Johnson | Nov 1992 | A |
5175459 | Danial et al. | Dec 1992 | A |
5186695 | Mangseth et al. | Feb 1993 | A |
5212473 | Louis | May 1993 | A |
5240417 | Smithson et al. | Aug 1993 | A |
5271290 | Fischer | Dec 1993 | A |
5275174 | Cook | Jan 1994 | A |
5283970 | Aigner | Feb 1994 | A |
5299810 | Pierce et al. | Apr 1994 | A |
5309140 | Everett, Jr. et al. | May 1994 | A |
5334027 | Wherlock | Aug 1994 | A |
5424731 | Kronberg | Jun 1995 | A |
5436622 | Gutman et al. | Jul 1995 | A |
5437607 | Taylor | Aug 1995 | A |
5466213 | Hogan et al. | Nov 1995 | A |
5486824 | Kinerk et al. | Jan 1996 | A |
5547382 | Yamasaki et al. | Aug 1996 | A |
5575761 | Hajianpour | Nov 1996 | A |
5677687 | Valdenaire | Oct 1997 | A |
5690582 | Ulrich et al. | Nov 1997 | A |
5760714 | Zimmerman | Jun 1998 | A |
5766016 | Sinclair et al. | Jun 1998 | A |
5785630 | Bobick et al. | Jul 1998 | A |
6111577 | Zilles et al. | Aug 2000 | A |
6160489 | Perry et al. | Dec 2000 | A |
6422941 | Thorner et al. | Jul 2002 | B1 |
Number | Date | Country |
---|---|---|
0 349 086 | Jan 1990 | EP |
1014754 | Jun 2000 | EP |
1086690 | May 2001 | EP |
H2-185278 | Jul 1990 | JP |
H4-8381 | Jan 1992 | JP |
H5-192449 | Aug 1993 | JP |
H7-24147 | Jan 1995 | JP |
2001014975 | Jan 2001 | JP |
WO 03026130 | Mar 2003 | WO |
Number | Date | Country | |
---|---|---|---|
20030058845 A1 | Mar 2003 | US |