This application claims priority from German Patent Application No. 10 2007 010 591.8, filed 5 Mar. 2007.
The invention relates to a switch state detector, to an encoder, and to a method for communicating information on a particular state of a plurality of switches.
In various automotive system applications, many switches are used which are located at different places in the vehicle. Usually there are groups of switches depending on the application. In modem automotive systems, a microcontroller is provided which assumes various control tasks and needs an input about the current state of all or part of the switches used in a system.
The switches are often so-called analog switches, i.e., CMOS transmission gates which are switched by applying a voltage to their gates via a control input. Depending on the gate voltage, the transmission gate is open or closed (ON or OFF). The state of each analog switch, e.g., whether the switch is open or closed, is communicated as an electric signal transmitted via a cable or line to the microcontroller for further processing. In a system with n analog switches, n lines are needed for communicating the switch state information. When the switches are remote from the microcontroller, this leads to high cost for the considerable number of lines which must be extended in the vehicle.
The invention provides a solution to the problem described above, by using only a single line or cable to communicate the state of n switches, preferably analog switches.
In one aspect of the invention, an encoder is provided which comprises a plurality of n switches and encoding circuitry interconnecting the n switches to produce a number of discrete voltage levels on a single line, each voltage level representing one particular state of the open and closed switches. For example, in the case of two parallel switches S1 and S2, the voltage is dependent on S1 and S2 both being closed, both open, S1 being open and S2 being closed, or vice-versa. To be able to communicate all possible combinations of switch settings for n switches, m discrete voltage levels are needed with m=2n.
In a second aspect of the invention, a switch state detector is provided for use with the set of switches, i.e., in a system wherein a plurality of n switches produces a number of discrete voltage levels on a single line, each voltage level representative of one particular state of open and closed switches. The switch state detector comprises a plurality of reference voltage sources, each of which corresponds to one of the discrete voltage levels. The switch state detector further comprises a set of comparators, each having a first input connected to the single line and a second input connected to one of the reference voltage sources, and a decoder with inputs receiving the outputs from the comparators and outputs providing a digital representation of the particular state of each of the switches.
As the particular state of open and closed switches is coded into discrete voltage levels, only these discrete voltage levels must be detected by the switch state detector. Thus, the reference voltage sources are designed to correspond to the discrete voltage levels output by the set of switches. The decoder may be of a very simple design, as it must only output a preset particular state of open and closed switches according to the comparator outputs. There is no need to have a complete analog-to-digital conversion effectuated by an analog-to-digital converter. In a preferred embodiment, one comparator less than the number of discrete voltage levels is used, with the decoder being designed to output a particular switch state when none of the comparators detects a correspondence between its specific reference voltage and the voltage level transmitted on the single line.
Preferably, the decoder in the switch state detector has a further input which receives a strobe signal and provides the digital representation of the particular state of each of the switches upon reception of the strobe signal. In a preferred embodiment, the switch state detector has n outputs, each output corresponding to one of the switches. Thus, the outputs of the switch state detector can be connected to a microcontroller or an electronic control unit in exactly the same way as in prior arrangements, with the n lines communicating the particular state of each switch individually. Therefore, no changes need to be made for the electronic control unit when using the inventive switch state detector that uses only one line for a set of n switches.
In a third aspect, the invention provides a method for communicating an information on a particular state of a plurality of n open and closed switches, in which the following steps are performed: encoding the state of the n switches into a discrete voltage value representative of the particular state of the n open and closed switches; transmitting the discrete voltage value on a single line; comparing the transmitted discrete voltage value representative of one particular state of the n open and closed switches to discrete reference voltage values, each corresponding to one possible state of open and closed switches; and using the results of the comparing step to provide n digital output signals, each representative of the state of one out of the n switches. Preferably, the switches whose states are detected are analog switches.
These and other aspects and features of the invention will be apparent to those skilled in the art to which the invention relates from the following detailed description of example embodiments of the invention, taken together with the accompanying drawings, wherein:
The switches S1, . . . , Sn are not connected to any load. The purpose of the arrangement is to generate any of the discrete voltage conditions on line 22 for possibly remote detection and decoding of the switch conditions. The purpose of the diode in each switch branch is for the purpose of decoupling, which may be necessary in an automotive application but not in other applications. As to the resistors in the switch branches, one such resistor in each branch may be sufficient, and one of the branches, e.g., that of switch S1, may even be provided without any resistor. The particular arrangement in
The analog voltage is transmitted via the single line 22 to a switch state detector, an embodiment according to the principles of the invention of which is shown in
The switch state detector shown in
The function of a comparator is well known to persons skilled in the art. The comparators are chosen and connected such that the comparator for which the discrete voltage value on single line 22 corresponds to the input reference voltage Vref1, Vref2, Vref3, Vref4, . . . , will have a high digital output, while all other comparators will have a low digital output, or vice versa. Thus, if one of the reference voltages fed to one of the comparators corresponds to the discrete voltage on the single line 22, the decoder 24 receives one high level signal and m-2 low level signals (or vice-versa) on its inputs. For the illustrated example, only m-1 comparators are used to cover all m possible discrete voltage values, with the m-th value representation handled by a low (or high) level signal on all of the m-1 inputs of the decoder. The decoder 24 may be of very simple construction as there are only m different states at the input 26 to be translated into n predefined high or low signals at the n outputs 28 (SWa 1, . . . , SWa n), each output corresponding to the state of one switch. The n outputs 28 of the decoder can be connected to provide information about the state of the n switches directly to a microprocessor or electronic control unit.
The illustrated decoder 24 embodiment also has a strobe input 30. The strobe input functions to momentarily connect the encoder arrangement to the voltage source Vbat through a switch SW and resistor 21 when the strobe signal is active, decoding the inputs from the m-1 comparators by the decoder 24 into n digital signals output at the decoder outputs 28. By strobing the encoder arrangement, current consumption is reduced.
It will be appreciated that the described embodiments are merely examples of the many ways to implement the invention and that various additions, deletions, substitutions and other modifications may be made therein, without departing from the spirit and scope of the claimed invention.
Number | Date | Country | Kind |
---|---|---|---|
10 2007 010 591.8 | Mar 2007 | DE | national |