JP3182794U - Switch input detection circuit - Google Patents
Switch input detection circuit Download PDFInfo
- Publication number
- JP3182794U JP3182794U JP2013000440U JP2013000440U JP3182794U JP 3182794 U JP3182794 U JP 3182794U JP 2013000440 U JP2013000440 U JP 2013000440U JP 2013000440 U JP2013000440 U JP 2013000440U JP 3182794 U JP3182794 U JP 3182794U
- Authority
- JP
- Japan
- Prior art keywords
- switch
- resistance element
- voltage
- resistance
- detection circuit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Lifetime
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 51
- 238000010586 diagram Methods 0.000 description 8
Landscapes
- Measurement Of Current Or Voltage (AREA)
Abstract
【課題】2個のスイッチ素子を用いて4通りの出力電圧を得ることができ、電圧レベルの誤検出を防止することができるスイッチ入力検出回路を提供する。
【解決手段】一端が接地された第1抵抗素子R1と、一端が第1抵抗素子R1の他端に接続された第1スイッチ素子SW1と、一端が接地された第2スイッチ素子SW2と、一端が第2スイッチ素子の他端に接続された第2抵抗素子R2と、第1抵抗素子R1と第1スイッチ素子SW1との接続点にアノードが接続され、第2抵抗素子R2と第2スイッチ素子SW2との接続点にカソードが接続されたダイオードDI1と、電源端子52に一端が接続された第3抵抗素子R3と、を備え、第1スイッチ素子SW1の他端と第2抵抗素子R2の他端と第3抵抗素子R3の他端とが接続されていると共に、その接続点が、マイクロコンピュータ51のA/Dポート53に接続されている。
【選択図】図1Provided is a switch input detection circuit capable of obtaining four output voltages using two switch elements and preventing erroneous detection of a voltage level.
A first resistance element R1 having one end grounded, a first switch element SW1 having one end connected to the other end of the first resistance element R1, a second switch element SW2 having one end grounded, and one end Is connected to the other end of the second switch element, the anode is connected to the connection point of the first resistor element R1 and the first switch element SW1, the second resistor element R2 and the second switch element A diode DI1 having a cathode connected to a connection point with SW2, and a third resistance element R3 having one end connected to the power supply terminal 52, and the other end of the first switch element SW1 and the second resistance element R2. One end is connected to the other end of the third resistance element R 3, and the connection point is connected to the A / D port 53 of the microcomputer 51.
[Selection] Figure 1
Description
本考案は、マイクロコンピュータに供給される電源電圧を分圧し、分圧された電圧をマイクロコンピュータのA/Dポートに印加するスイッチ入力検出回路に関する。 The present invention relates to a switch input detection circuit that divides a power supply voltage supplied to a microcomputer and applies the divided voltage to an A / D port of the microcomputer.
従来、複数のスイッチの状態(オンまたはオフ)によって電源電圧を抵抗で分圧し、分圧された電圧をマイクロコンピュータ(制御部)のA/Dポートに印加するための回路として、図3に示すようなスイッチ入力検出回路が知られている。 Conventionally, FIG. 3 shows a circuit for dividing a power supply voltage by a resistor according to a plurality of switch states (ON or OFF) and applying the divided voltage to an A / D port of a microcomputer (control unit). Such a switch input detection circuit is known.
図3に示す第1従来例としてのスイッチ入力検出回路800は、マイクロコンピュータ801の電源電圧+Vを分圧し、その分圧電圧をマイクロコンピュータ801のA/Dポートに印加する抵抗分圧回路を有している。この抵抗分圧回路は、電源電圧+Vを分圧する互いに直列接続された複数の抵抗R801、R802、R803、R804、及びR805を含んで構成されている。また、複数のキースイッチSW801、SW802、SW803、及びSW804それぞれの電源側の一端が、R802とR803との接続点、R803とR804との接続点、R803とR804との接続点、及びR805のグランド側の一端に接続されている。また、複数のキースイッチSW801、SW802、SW803、及びSW804のそれぞれの他端が、互いに接続されていると共に、グランドに接続されている。そして、電源+Vに接続された抵抗R801と抵抗R802との接続点の電圧をマイクロコンピュータ801のA/Dポートに印加するように構成されている。 A switch input detection circuit 800 as a first conventional example shown in FIG. 3 has a resistance voltage dividing circuit that divides the power supply voltage + V of the microcomputer 801 and applies the divided voltage to the A / D port of the microcomputer 801. doing. This resistance voltage dividing circuit includes a plurality of resistors R801, R802, R803, R804, and R805 connected in series to divide the power supply voltage + V. One end of each of the key switches SW801, SW802, SW803, and SW804 on the power supply side is a connection point between R802 and R803, a connection point between R803 and R804, a connection point between R803 and R804, and a ground of R805. Is connected to one end of the side. The other ends of the plurality of key switches SW801, SW802, SW803, and SW804 are connected to each other and to the ground. The voltage at the connection point between the resistor R801 and the resistor R802 connected to the power source + V is applied to the A / D port of the microcomputer 801.
スイッチ入力検出回路800の動作を簡略的に説明するため、第2従来例としてのスイッチ入力検出回路900を図4に示す。スイッチ入力検出回路900は、マイクロコンピュータ951の電源電圧+Vを分圧し、その分圧電圧をマイクロコンピュータ951のA/Dポート953に印加する回路である。スイッチ入力検出回路900は、スイッチ入力検出回路800の抵抗分圧回路の部分を構成する構成要素の数を減らした回路であり、抵抗分圧回路としての基本的な動作は同一である。 In order to briefly explain the operation of the switch input detection circuit 800, a switch input detection circuit 900 as a second conventional example is shown in FIG. The switch input detection circuit 900 is a circuit that divides the power supply voltage + V of the microcomputer 951 and applies the divided voltage to the A / D port 953 of the microcomputer 951. The switch input detection circuit 900 is a circuit in which the number of components constituting the resistance voltage dividing circuit portion of the switch input detection circuit 800 is reduced, and the basic operation as the resistance voltage dividing circuit is the same.
スイッチ入力検出回路900は、電源端子952の電圧+Vを分圧する互いに直列接続された複数の抵抗R901、R902、及びR903、そして、複数のスイッチSW901及びSW902から構成されている。スイッチSW901は、その一端が抵抗R901に接続されていて、その他端がグランドに接続されている。また、スイッチSW902は、その一端が抵抗R901と抵抗R902との接続点に接続されていて、その他端がグランドに接続されている。そして、電源端子952に一端が接続された抵抗R903と抵抗R902との接続点の電圧をマイクロコンピュータ951のA/Dポート953に印加するように構成されている。尚、スイッチ入力検出回路900では、3通りの出力が得られるが、その3通りの出力間の、2つの電圧レベル差がほぼ等しくなるように、抵抗R901、抵抗R902、及び抵抗R903の各抵抗値を設定している。 The switch input detection circuit 900 includes a plurality of resistors R901, R902, and R903 connected in series to divide the voltage + V of the power supply terminal 952, and a plurality of switches SW901 and SW902. One end of the switch SW901 is connected to the resistor R901, and the other end is connected to the ground. The switch SW902 has one end connected to a connection point between the resistor R901 and the resistor R902, and the other end connected to the ground. Then, a voltage at a connection point between the resistor R 903 having one end connected to the power supply terminal 952 and the resistor R 902 is applied to the A / D port 953 of the microcomputer 951. In the switch input detection circuit 900, three types of outputs can be obtained. The resistors R901, R902, and R903 are provided so that the two voltage level differences between the three types of outputs are substantially equal. A value is set.
スイッチ入力検出回路900の動作を説明するため、図5(a)、(b)に、スイッチSW901及びSW902それぞれのオン又はオフの動作に対するスイッチ入力検出回路900の出力電圧Voutを、表及びグラフで表す。尚、電源端子952の電圧+V、即ち電源電圧は5Vとしている。 In order to describe the operation of the switch input detection circuit 900, FIGS. 5A and 5B show the output voltage Vout of the switch input detection circuit 900 with respect to the ON or OFF operation of the switches SW901 and SW902 in a table and a graph. Represent. The voltage + V of the power supply terminal 952, that is, the power supply voltage is 5V.
図5(a)において、モード1は、SW901及びSW902が共にオンの時の状態を示しており、分圧電圧はR902の抵抗値とR903の抵抗値との比で決定され、その時のVoutが1.67Vとなるように、R902とR903との抵抗値を決めている。モード2は、SW901がオフで、SW902がオンの時の状態を示しており、この時も分圧電圧はR902とR903とで決定され、Voutは、1.67Vとなっている。モード3は、SW901がオンで、SW902がオフの時の状態を示しており、分圧電圧はR901とR902との和の抵抗値と、R903の抵抗値との比で決定され、その時のVoutが3.30Vとなるように、R901の抵抗値を決めている。モード4は、SW901及びSW902が共にオフの時の状態を示しており、その時のVoutは、電源電圧がそのまま現れるため、5.0Vとなっている。図5(b)には、これらのモードでの出力電圧Voutの値をグラフに示している。 In FIG. 5A, mode 1 shows a state when both SW901 and SW902 are on, and the divided voltage is determined by the ratio between the resistance value of R902 and the resistance value of R903, and Vout at that time is The resistance values of R902 and R903 are determined so as to be 1.67V. Mode 2 shows a state when SW901 is off and SW902 is on. At this time, the divided voltage is determined by R902 and R903, and Vout is 1.67V. Mode 3 shows a state when SW901 is on and SW902 is off, and the divided voltage is determined by the ratio of the resistance value of the sum of R901 and R902 and the resistance value of R903, and Vout at that time The resistance value of R901 is determined so as to be 3.30V. Mode 4 shows a state when both SW901 and SW902 are off, and Vout at that time is 5.0 V because the power supply voltage appears as it is. FIG. 5B is a graph showing the value of the output voltage Vout in these modes.
図5(a)、(b)に示すように、スイッチ入力検出回路900のSW901とSW902との組み合わせは、モード1からモード4の4通りが存在し、モード1からモード4において、出力電圧Voutは、3通りの電圧を出力することができる。また、それぞれのモード間の電圧レベル差は、約1.7Vずつあり、この電圧レベル差の値は、出力電圧Voutに外部からノイズが重畳されたとしても、誤検出されることのないレベル差である。尚、それぞれのモード間の電圧レベル差としては、約1V以上あれば問題ないレベル差であると考えられる。 As shown in FIGS. 5A and 5B, there are four combinations of SW901 and SW902 of the switch input detection circuit 900 from mode 1 to mode 4, and in mode 1 to mode 4, the output voltage Vout Can output three different voltages. Further, the voltage level difference between the modes is about 1.7 V, and the value of the voltage level difference is a level difference that is not erroneously detected even if noise is superimposed on the output voltage Vout from the outside. It is. The voltage level difference between the modes is considered to be a satisfactory level difference if it is about 1 V or more.
しかしながら、図4に示すスイッチ入力検出回路900では、SW901とSW902とのオン・オフの組み合わせは4通りあるが、出力電圧Voutとしては3通りしかない。従って、2個のスイッチの組み合わせをうまく利用しているとは言いがたい。 However, in the switch input detection circuit 900 shown in FIG. 4, there are four combinations of ON / OFF of the SW901 and SW902, but there are only three as the output voltage Vout. Therefore, it is difficult to say that the combination of two switches is used well.
2個のスイッチを使用したスイッチ入力検出回路として、図6に示す第3従来例としてのスイッチ入力検出回路930も考えられる。回路をこのような構成にし、各抵抗R931、R932,R933の抵抗値を適宜に設定することにより、SW931とSW932との4通りのモードの組み合わせに対し、4通りの出力電圧を得ることができる。 As a switch input detection circuit using two switches, a switch input detection circuit 930 as a third conventional example shown in FIG. 6 is also conceivable. By configuring the circuit in this way and appropriately setting the resistance values of the resistors R931, R932, and R933, four output voltages can be obtained with respect to combinations of the four modes of SW931 and SW932. .
図7(a)、(b)に、スイッチSW931及びSW932それぞれのオン又はオフの動作に対するスイッチ入力検出回路930の出力電圧Voutを、表及びグラフで表す。 7A and 7B show the output voltage Vout of the switch input detection circuit 930 with respect to the on / off operation of the switches SW931 and SW932 in a table and a graph.
図7(a)、(b)に示す通り、スイッチ入力検出回路930で4通りの出力電圧を得ようとした場合、それぞれのモード間の電圧レベル差を均等な値にすることは困難であった。また、その結果、それぞれのモード間の電圧レベル差が非常に小さい場合が生じてしまっていた。従って、出力電圧に外部からノイズが重畳された場合に、A/Dポートへの電圧レベルを誤検出してしまう可能性があった。 As shown in FIGS. 7A and 7B, when the switch input detection circuit 930 tries to obtain four output voltages, it is difficult to make the voltage level difference between the modes equal. It was. As a result, the voltage level difference between the respective modes may be very small. Therefore, when external noise is superimposed on the output voltage, the voltage level to the A / D port may be erroneously detected.
本考案は、このような従来技術の実情に鑑みてなされたもので、その目的は、2個のスイッチ素子を用いて4通りの出力電圧を得ることができ、出力電圧に外部からノイズが重畳されたとしても、電圧レベルの誤検出を防止することができるスイッチ入力検出回路を提供することにある。 The present invention has been made in view of the actual situation of the prior art, and its purpose is to obtain four output voltages using two switch elements, and noise is superimposed on the output voltage from the outside. An object of the present invention is to provide a switch input detection circuit capable of preventing erroneous detection of a voltage level even if it is done.
この課題を解決するために、本考案のスイッチ入力検出回路は、マイクロコンピュータに供給される電源電圧を分圧し、前記分圧された電圧を前記マイクロコンピュータのA/Dポートに印加するスイッチ入力検出回路であって、一端が接地された第1抵抗素子と、一端が前記第1抵抗素子の他端に接続された第1スイッチ素子と、一端が接地された第2スイッチ素子と、一端が前記第2スイッチ素子の他端に接続された第2抵抗素子と、前記第1抵抗素子と前記第1スイッチ素子との接続点にアノードが接続され、前記第2抵抗素子と前記第2スイッチ素子との接続点にカソードが接続されたダイオードと、電源端子に一端が接続された第3抵抗素子と、を備え、前記第1スイッチ素子の他端と前記第2抵抗素子の他端と前記第3抵抗素子の他端とが接続されていると共に、前記第1スイッチ素子と前記第2抵抗素子と前記第3抵抗素子との接続点が、前記A/Dポートに接続されているという特徴を有する。 In order to solve this problem, a switch input detection circuit according to the present invention divides a power supply voltage supplied to a microcomputer and applies the divided voltage to an A / D port of the microcomputer. A first resistance element having one end grounded; a first switch element having one end connected to the other end of the first resistance element; a second switch element having one end grounded; A second resistance element connected to the other end of the second switch element; an anode connected to a connection point between the first resistance element and the first switch element; and the second resistance element, the second switch element, And a third resistance element having one end connected to the power supply terminal, the other end of the first switch element, the other end of the second resistance element, and the third resistance element. Resistance element With the other end is connected, the connection point between the first switching element and the second resistive element and said third resistive element has a characteristic that is connected to the A / D port.
このように構成された本考案のスイッチ入力検出回路は、ダイオードを用い、第1スイッチ素子と第2スイッチ素子とによる4通りのモードの動作に伴ってダイオードをオン又はオフさせることにより、4通りの出力電圧を得ることができる。また、ダイオードをオフした時には、各抵抗素子の抵抗値を設定する際に、第1抵抗素子、第2抵抗素子の内の、1つの抵抗素子を除外して考えられるため、それぞれの抵抗素子の抵抗値を容易に設定することができる。また、第1スイッチ素子と第2スイッチ素子を共にオンとした時の出力電圧をダイオードの順方向降下電圧に設定できるため、ダイオードの順方向降下電圧から電源電圧までの広い電圧範囲で出力電圧を決定できる。そのため、それぞれの出力電圧間の電圧レベル差を均等な値にすることができると共に、それぞれのモード間の電圧レベル差を大きく取ることができる。その結果、出力電圧に外部からノイズが重畳された場合においても電圧レベルの誤検出を防止することができる。 The switch input detection circuit of the present invention configured as described above uses a diode, and turns the diode on or off in accordance with the operation of the four modes by the first switch element and the second switch element. Output voltage can be obtained. In addition, when the diode is turned off, when setting the resistance value of each resistance element, one of the first resistance element and the second resistance element can be excluded, so that each resistance element The resistance value can be set easily. In addition, since the output voltage when both the first switch element and the second switch element are turned on can be set to the forward drop voltage of the diode, the output voltage can be set in a wide voltage range from the forward drop voltage of the diode to the power supply voltage. Can be determined. Therefore, the voltage level difference between the output voltages can be made equal, and the voltage level difference between the modes can be made large. As a result, erroneous detection of the voltage level can be prevented even when external noise is superimposed on the output voltage.
以下、本考案の実施形態について、図面を参照しながら説明する。図1は、本考案の実施形態に係るスイッチ入力検出回路100の回路図である。 Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a circuit diagram of a switch input detection circuit 100 according to an embodiment of the present invention.
本考案の実施形態に係るスイッチ入力検出回路100は、マイクロコンピュータ51に供給される電源電圧+Vを分圧し、分圧された電圧をマイクロコンピュータ51のA/Dポート53に印加するスイッチ入力検出回路である。 The switch input detection circuit 100 according to the embodiment of the present invention divides the power supply voltage + V supplied to the microcomputer 51 and applies the divided voltage to the A / D port 53 of the microcomputer 51. It is.
図1に示す通り、スイッチ入力検出回路100は、第1抵抗素子R1と、第2抵抗素子R2と、第3抵抗素子R3と、第1スイッチ素子SW1と、第2スイッチ素子SW2と、ダイオードDI1とによって構成されている。第1抵抗素子R1は、その一端が接地され、第1抵抗素子R1の他端に第1スイッチ素子SW1の一端が接続されている。第2スイッチ素子SW2は、その一端が接地され、第2スイッチ素子SW2の他端に第2抵抗素子R2の一端が接続されている。 As shown in FIG. 1, the switch input detection circuit 100 includes a first resistance element R1, a second resistance element R2, a third resistance element R3, a first switch element SW1, a second switch element SW2, and a diode DI1. And is composed of. One end of the first resistance element R1 is grounded, and one end of the first switch element SW1 is connected to the other end of the first resistance element R1. One end of the second switch element SW2 is grounded, and one end of the second resistor element R2 is connected to the other end of the second switch element SW2.
ダイオードDI1のアノードは、第1抵抗素子R1と第1スイッチ素子SW1との接続点に接続されており、ダイオードDI1のカソードは、第2抵抗素子R2と第2スイッチ素子SW2との接続点に接続されている。また、第3抵抗素子R3は、電源電圧+Vを供給する電源端子52に一端が接続されている。そして、第1スイッチ素子SW1の他端と第2抵抗素子R2の他端と第3抵抗素子R3の他端とが接続されていると共に、第1スイッチ素子SW1と第2抵抗素子R2と第3抵抗素子R3との接続点がマイクロコンピュータ51のA/Dポート53に接続されている。 The anode of the diode DI1 is connected to the connection point between the first resistance element R1 and the first switch element SW1, and the cathode of the diode DI1 is connected to the connection point between the second resistance element R2 and the second switch element SW2. Has been. The third resistance element R3 has one end connected to a power supply terminal 52 that supplies a power supply voltage + V. The other end of the first switch element SW1, the other end of the second resistor element R2, and the other end of the third resistor element R3 are connected, and the first switch element SW1, the second resistor element R2, and the third resistor element are connected. A connection point with the resistance element R 3 is connected to the A / D port 53 of the microcomputer 51.
スイッチ入力検出回路100は、マイクロコンピュータ51の電源電圧+Vを、A/Dポート53とグランド間に接続される各抵抗素子の抵抗値と第3抵抗素子R3の抵抗値とで分圧した電圧を出力電圧VoutとしてA/Dポート53に出力する。A/Dポート53とグランド間に接続されている各抵抗素子の抵抗値は、第1スイッチ素子SW1と第2スイッチ素子SW2のオン又はオフ、ダイオードDI1のオン又はオフ、及び第1抵抗素子R1の抵抗値又は第2抵抗素子R2の抵抗値とで決定される抵抗値である。 The switch input detection circuit 100 divides a voltage obtained by dividing the power supply voltage + V of the microcomputer 51 by the resistance value of each resistance element connected between the A / D port 53 and the ground and the resistance value of the third resistance element R3. The output voltage Vout is output to the A / D port 53. The resistance value of each resistance element connected between the A / D port 53 and the ground is ON or OFF of the first switch element SW1 and the second switch element SW2, ON or OFF of the diode DI1, and the first resistance element R1. Or a resistance value determined by the resistance value of the second resistance element R2.
スイッチ入力検出回路100の動作を説明するため、図2(a)、(b)に、第1スイッチ素子SW1及び第2スイッチ素子SW2それぞれのオン又はオフの動作に対するスイッチ入力検出回路100の出力電圧Voutを、表及びグラフで表す。尚、スイッチ入力検出回路100では、4通りの出力電圧Voutが得られるように設計されている。出力電圧Voutの電圧値は、4通りの出力電圧間のそれぞれの電圧レベル差がほぼ等しくなるように第1抵抗素子R901、第2抵抗素子R902、及び第3素子抵抗R903の各抵抗値を適宜に設定している。尚、電源端子52における電圧+V即ち電源電圧は5Vとしている。 In order to explain the operation of the switch input detection circuit 100, FIGS. 2A and 2B show the output voltage of the switch input detection circuit 100 with respect to the ON or OFF operation of the first switch element SW1 and the second switch element SW2. Vout is represented by a table and a graph. The switch input detection circuit 100 is designed so as to obtain four output voltages Vout. As for the voltage value of the output voltage Vout, the resistance values of the first resistance element R901, the second resistance element R902, and the third element resistance R903 are appropriately set so that the respective voltage level differences between the four output voltages are substantially equal. Is set. The voltage + V at the power supply terminal 52, that is, the power supply voltage is 5V.
図2(a)において、モード1は、第1スイッチ素子SW1及び第2スイッチ素子SW2が共にオンの時の状態を示しており、モード2は、第1スイッチ素子SW1がオフで、第2スイッチ素子SW2がオンの時の状態を示している。また、モード3は、第1スイッチ素子SW1がオンで、第2スイッチ素子SW2がオフの時の状態を示しており、モード4は、第1スイッチ素子SW1及び第2スイッチ素子SW2が共にオフの時の状態を示している。図2(b)には、これらのモードでの出力電圧Voutの値をグラフに示している。 In FIG. 2A, mode 1 shows a state when both the first switch element SW1 and the second switch element SW2 are on. In mode 2, the first switch element SW1 is off and the second switch element SW1 is off. The state when the element SW2 is on is shown. Mode 3 shows a state when the first switch element SW1 is on and the second switch element SW2 is off. In mode 4, both the first switch element SW1 and the second switch element SW2 are off. It shows the state of the hour. FIG. 2B is a graph showing the value of the output voltage Vout in these modes.
図2(a)において、モード1では、第1スイッチ素子SW1がオンであるため、ダイオードDI1のアノードに電源電圧+V(5V)が印加される。また、第2スイッチ素子SW2がオンであるため、ダイオードDI1のカソードは第2スイッチ素子SW2を介して接地される。そのため、ダイオードDI1に電流が流れ、ダイオードDI1がオンする。ダイオードDI1がオンするため、出力電圧Voutは、第1抵抗素子R1、第2抵抗素子R2、及び第3抵抗素子R3それぞれの抵抗値に関わらず、ダイオードDI1の順方向降下電圧で決定される。従って、出力電圧VoutはダイオードDI1の順方向降下電圧である0.65Vとなる。 In FIG. 2A, in mode 1, since the first switch element SW1 is on, the power supply voltage + V (5 V) is applied to the anode of the diode DI1. Further, since the second switch element SW2 is on, the cathode of the diode DI1 is grounded via the second switch element SW2. Therefore, a current flows through the diode DI1, and the diode DI1 is turned on. Since the diode DI1 is turned on, the output voltage Vout is determined by the forward drop voltage of the diode DI1 regardless of the resistance values of the first resistance element R1, the second resistance element R2, and the third resistance element R3. Therefore, the output voltage Vout is 0.65 V, which is the forward drop voltage of the diode DI1.
図2(a)において、モード2では、第1スイッチ素子SW1がオフであるため、ダイオードDI1のアノードには電源電圧+Vが印加されない。また、第2スイッチ素子SW2がオンであるため、A/Dポート53とグランド間には、第2抵抗素子R2のみが接続される。従って、出力電圧Voutとしては、第2抵抗素子R2と第3抵抗素子R3とで分圧される電圧が現れる。 In FIG. 2A, in mode 2, since the first switch element SW1 is off, the power supply voltage + V is not applied to the anode of the diode DI1. Further, since the second switch element SW2 is on, only the second resistance element R2 is connected between the A / D port 53 and the ground. Therefore, a voltage divided by the second resistance element R2 and the third resistance element R3 appears as the output voltage Vout.
図2(a)において、モード3では、第1スイッチ素子SW1がオンであり、第2スイッチ素子SW2がオフであるため、A/Dポート53とグランド間には、第1抵抗素子R1のみが接続される。従って、出力電圧Voutとしては、第1抵抗素子R1と第3抵抗素子R3とで分圧される電圧が現れる。 2A, in mode 3, since the first switch element SW1 is on and the second switch element SW2 is off, only the first resistance element R1 is between the A / D port 53 and the ground. Connected. Therefore, a voltage divided by the first resistance element R1 and the third resistance element R3 appears as the output voltage Vout.
図2(a)において、モード4では、第1スイッチ素子SW1及び第2スイッチ素子SW2が共にオフであるため、A/Dポート53とグランド間には、第1抵抗素子R1、ダイオードDI1、及び第2抵抗素子R2との直列接続回路が接続される。この場合、ダイオードDI1のカソードに第3抵抗素子R3及び第2抵抗素子R2を介して電圧が加わり、アノードが第1抵抗素子R1を介して接地される。そのためダイオードDI1には逆方向バイアスが印加されるため、ダイオードDI1はオフされる。その結果、A/Dポート53とグランド間には電流が流れないので、A/Dポート53には、第3抵抗素子R3を介して電源電圧+Vが印加される。従って、出力電圧Voutは、電源電圧+Vと同じ電圧(5V)が現れる。図5(b)に、これらのモードでの出力電圧Voutの値をグラフに示している。 In FIG. 2A, in mode 4, since both the first switch element SW1 and the second switch element SW2 are off, between the A / D port 53 and the ground, the first resistor element R1, the diode DI1, and A series connection circuit with the second resistance element R2 is connected. In this case, a voltage is applied to the cathode of the diode DI1 via the third resistance element R3 and the second resistance element R2, and the anode is grounded via the first resistance element R1. Therefore, since a reverse bias is applied to the diode DI1, the diode DI1 is turned off. As a result, since no current flows between the A / D port 53 and the ground, the power supply voltage + V is applied to the A / D port 53 via the third resistance element R3. Therefore, the same voltage (5 V) as the power supply voltage + V appears as the output voltage Vout. FIG. 5B is a graph showing the value of the output voltage Vout in these modes.
上記の通り、モード1では、出力電圧VoutはダイオードDI1の順方向降下電圧(0.65V)が現れ、モード4では、電源電圧+Vと同じ電圧(5V)が現れる。従って、ダイオードDI1の順方向降下電圧(0.65V)から電源電圧+V(5V)までの広い電圧差を4通りの出力電圧を得るために使用することができる。ダイオードDI1の順方向降下電圧(0.65V)から電源電圧+V(5V)までの広い電圧差を有効に使用するため、この電圧差をほぼ均等に3分割するように、モード2での出力電圧Vout及びモード3での出力電圧Voutを決定すれば良い。 As described above, in mode 1, the forward voltage drop (0.65V) of diode DI1 appears in output voltage Vout, and in mode 4, the same voltage (5V) as power supply voltage + V appears. Therefore, a wide voltage difference from the forward voltage drop (0.65 V) of the diode DI1 to the power supply voltage + V (5 V) can be used to obtain four output voltages. In order to effectively use a wide voltage difference from the forward voltage drop (0.65V) of the diode DI1 to the power supply voltage + V (5V), the output voltage in mode 2 is divided into three almost equally. Vout and the output voltage Vout in mode 3 may be determined.
スイッチ入力検出回路100では、ダイオードDI1の順方向降下電圧(0.65V)から電源電圧+V(5V)までの電圧差(4.35V)を均等に3分割するため、それぞれのモード間の電圧レベル差が1.45Vになるように設定した。 In the switch input detection circuit 100, the voltage difference (4.35V) from the forward voltage drop (0.65V) of the diode DI1 to the power supply voltage + V (5V) is equally divided into three. The difference was set to 1.45V.
上記の通り、モード2では第2抵抗素子R2と第3抵抗素子R3とで分圧される電圧が現れ、モード3では第1抵抗素子R1と第3抵抗素子R3とで分圧される電圧が現れる。本実施形態のスイッチ入力検出回路100では、モード2の時に、他のモードとの間の電圧レベル差が上記のような値(1.45V)となるように考慮して、第2抵抗素子R2と第3抵抗素子R3との抵抗値比を設定した。また、モード3の時に、他のモードとの間の電圧レベル差が上記のような値(1.45V)となるように考慮して、第1抵抗素子R1と第3抵抗素子R3との抵抗値比を設定した。 As described above, in mode 2, the voltage divided by the second resistance element R2 and the third resistance element R3 appears, and in mode 3, the voltage divided by the first resistance element R1 and the third resistance element R3 appear. In the switch input detection circuit 100 according to the present embodiment, in the mode 2, the second resistance element R2 is considered in consideration that the voltage level difference from the other modes becomes the above value (1.45V). And a resistance value ratio between the third resistance element R3 and the third resistance element R3. Further, in mode 3, the resistance between the first resistance element R1 and the third resistance element R3 is considered so that the voltage level difference from the other modes becomes the above value (1.45V). The value ratio was set.
具体的には、モード2の時の出力電圧Vout=0.65V+1.45V=2.10V、モード3の時の出力電圧Vout=0.65V+2*1.45V=3.55Vと設定することができる。従って、第1抵抗素子R1の抵抗値をr1、第2抵抗素子R2の抵抗値をr2、第3抵抗素子R3の抵抗値をr3とした時、r2/r3=2.10V/(5.0V−2.1V)とし、r1/r3=3.55V/(5.0V−3.55V)とすることができる。この結果から、r2とr3との比率を、r2/r3=0.72、r1とr3との比率を、r1/r3=2.45と設定することができる。 Specifically, the output voltage Vout = 0.65V + 1.45V = 2.10V in mode 2 and the output voltage Vout = 0.65V + 2 * 1.45V = 3.55V in mode 3 can be set. . Therefore, when the resistance value of the first resistance element R1 is r1, the resistance value of the second resistance element R2 is r2, and the resistance value of the third resistance element R3 is r3, r2 / r3 = 2.10V / (5.0V −2.1V) and r1 / r3 = 3.55V / (5.0V−3.55V). From this result, the ratio between r2 and r3 can be set as r2 / r3 = 0.72, and the ratio between r1 and r3 can be set as r1 / r3 = 2.45.
また、スイッチ入力検出回路100に流すことのできる最大の電流値及び最小の電流値から第3抵抗素子R3の抵抗値が決定される。この第3抵抗素子R3の抵抗値、上記の第2抵抗素子R2と第3抵抗素子R3との抵抗値比、及び第1抵抗素子R1と第3抵抗素子R3との抵抗値比から、第1抵抗素子R1の抵抗値と第2抵抗素子R2の抵抗値とを、容易に求めることができる。 The resistance value of the third resistance element R3 is determined from the maximum current value and the minimum current value that can be passed through the switch input detection circuit 100. From the resistance value of the third resistance element R3, the resistance value ratio between the second resistance element R2 and the third resistance element R3, and the resistance value ratio between the first resistance element R1 and the third resistance element R3, The resistance value of the resistance element R1 and the resistance value of the second resistance element R2 can be easily obtained.
スイッチ入力検出回路100の具体的な回路に、上記求めた第1抵抗素子R1、第2抵抗素子R2、及び第3抵抗素子R3それぞれの抵抗値を適用して、求めたモード2及びモード3での出力電圧Voutは、図2(a)、図2(b)のような結果となる。図2(a)、図2(b)から分かるとおり、各モードにおける出力電圧Voutは、それぞれほぼ均等な電圧レベル差を保っている。即ち、それぞれのモード間の電圧レベル差を大きく取ることができ、出力電圧Voutに外部からノイズが重畳された場合においても電圧レベルの誤検出を防止できる。 By applying the obtained resistance values of the first resistance element R1, the second resistance element R2, and the third resistance element R3 to a specific circuit of the switch input detection circuit 100, in the obtained mode 2 and mode 3, The output voltage Vout of FIG. 2 results as shown in FIGS. 2 (a) and 2 (b). As can be seen from FIGS. 2A and 2B, the output voltage Vout in each mode maintains a substantially equal voltage level difference. That is, a large voltage level difference between the modes can be obtained, and erroneous detection of the voltage level can be prevented even when noise is superimposed on the output voltage Vout from the outside.
以上のように、本考案のスイッチ入力検出回路100は、ダイオードDI1を用い、第1スイッチ素子SW1と第2スイッチ素子SW2とによる4通りのモードの動作に伴ってダイオードDI1をオン又はオフさせることによって、4通りの出力電圧Voutを得ることができる。また、ダイオードDI1をオフした時には、各抵抗素子の抵抗値を設定する際に、第1抵抗素子R1と第2抵抗素子R2との内の、1つの抵抗素子を除外して考えられるため、それぞれの抵抗素子の抵抗値を容易に設定することができる。また、第1スイッチ素子SW1と第2スイッチ素子SW2とを共にオンとした時の出力電圧VoutをダイオードDI1の順方向降下電圧に設定できるため、ダイオードDI1の順方向降下電圧から電源電圧までの広い電圧範囲で出力電圧を決定できる。そのため、それぞれの出力電圧間の電圧レベル差を均等な値にすることができると共に、それぞれのモード間の電圧レベル差を大きく取ることができる。その結果、出力電圧Voutに外部からノイズが重畳された場合においても、電圧レベルの誤検出を防止することができるスイッチ入力検出回路を提供することが可能となる。 As described above, the switch input detection circuit 100 of the present invention uses the diode DI1, and turns on or off the diode DI1 in accordance with the four modes of operation by the first switch element SW1 and the second switch element SW2. Thus, four output voltages Vout can be obtained. In addition, when the diode DI1 is turned off, when setting the resistance value of each resistance element, one of the first resistance element R1 and the second resistance element R2 can be considered to be excluded. The resistance value of the resistance element can be easily set. Further, since the output voltage Vout when both the first switch element SW1 and the second switch element SW2 are turned on can be set to the forward drop voltage of the diode DI1, a wide range from the forward drop voltage of the diode DI1 to the power supply voltage can be set. The output voltage can be determined in the voltage range. Therefore, the voltage level difference between the output voltages can be made equal, and the voltage level difference between the modes can be made large. As a result, it is possible to provide a switch input detection circuit that can prevent erroneous detection of the voltage level even when external noise is superimposed on the output voltage Vout.
R1 第1抵抗素子
R2 第2抵抗素子
R3 第3抵抗素子
SW1 第1スイッチ素子
SW2 第2スイッチ素子
DI1 ダイオード
51 マイクロコンピュータ
52 電源端子
53 A/Dポート
100 スイッチ入力検出回路
R1 1st resistance element R2 2nd resistance element R3 3rd resistance element SW1 1st switch element SW2 2nd switch element DI1 Diode 51 Microcomputer 52 Power supply terminal 53 A / D port 100 Switch input detection circuit
Claims (1)
一端が接地された第1抵抗素子と、一端が前記第1抵抗素子の他端に接続された第1スイッチ素子と、一端が接地された第2スイッチ素子と、一端が前記第2スイッチ素子の他端に接続された第2抵抗素子と、前記第1抵抗素子と前記第1スイッチ素子との接続点にアノードが接続され、前記第2抵抗素子と前記第2スイッチ素子との接続点にカソードが接続されたダイオードと、電源端子に一端が接続された第3抵抗素子と、を備え、
前記第1スイッチ素子の他端と前記第2抵抗素子の他端と前記第3抵抗素子の他端とが接続されていると共に、前記第1スイッチ素子と前記第2抵抗素子と前記第3抵抗素子との接続点が、前記A/Dポートに接続されていることを特徴とするスイッチ入力検出回路。 A switch input detection circuit for dividing a power supply voltage supplied to a microcomputer and applying the divided voltage to an A / D port of the microcomputer;
A first resistance element having one end grounded, a first switch element having one end connected to the other end of the first resistance element, a second switch element having one end grounded, and one end being the second switch element An anode is connected to a connection point between the second resistance element connected to the other end, the first resistance element and the first switch element, and a cathode connected to the connection point between the second resistance element and the second switch element. And a third resistance element having one end connected to the power supply terminal,
The other end of the first switch element, the other end of the second resistor element, and the other end of the third resistor element are connected, and the first switch element, the second resistor element, and the third resistor are connected. A switch input detection circuit characterized in that a connection point with an element is connected to the A / D port.
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2013000440U JP3182794U (en) | 2013-01-30 | 2013-01-30 | Switch input detection circuit |
| CN201420056688.0U CN203745607U (en) | 2013-01-30 | 2014-01-29 | Switch input detection circuit |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2013000440U JP3182794U (en) | 2013-01-30 | 2013-01-30 | Switch input detection circuit |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP3182794U true JP3182794U (en) | 2013-04-11 |
Family
ID=50426836
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2013000440U Expired - Lifetime JP3182794U (en) | 2013-01-30 | 2013-01-30 | Switch input detection circuit |
Country Status (2)
| Country | Link |
|---|---|
| JP (1) | JP3182794U (en) |
| CN (1) | CN203745607U (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2018101516A (en) * | 2016-12-19 | 2018-06-28 | アルプス電気株式会社 | Switch operating device and power window control device |
| JP2018101515A (en) * | 2016-12-19 | 2018-06-28 | アルプス電気株式会社 | Switch operating device and power window control device |
-
2013
- 2013-01-30 JP JP2013000440U patent/JP3182794U/en not_active Expired - Lifetime
-
2014
- 2014-01-29 CN CN201420056688.0U patent/CN203745607U/en not_active Expired - Fee Related
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2018101516A (en) * | 2016-12-19 | 2018-06-28 | アルプス電気株式会社 | Switch operating device and power window control device |
| JP2018101515A (en) * | 2016-12-19 | 2018-06-28 | アルプス電気株式会社 | Switch operating device and power window control device |
Also Published As
| Publication number | Publication date |
|---|---|
| CN203745607U (en) | 2014-07-30 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP6468368B2 (en) | Voltage generation circuit and overcurrent detection circuit | |
| JP5814892B2 (en) | Current detection circuit and current control device using the same | |
| EP3266105B1 (en) | Three input comparator | |
| EP3048712A3 (en) | Power supply with self-diagnosis and protection switch | |
| CN104917375A (en) | Dc/dc converter | |
| JP2016509469A5 (en) | ||
| JP3182794U (en) | Switch input detection circuit | |
| US10837843B2 (en) | Voltage measuring system | |
| JP2012209762A (en) | Level generation circuit | |
| JP5532625B2 (en) | Voltage limiting circuit | |
| JP6378230B2 (en) | Semiconductor device | |
| JP6269057B2 (en) | ID information setting circuit | |
| KR101854754B1 (en) | Signal transfer circuit | |
| JP5193806B2 (en) | Comparator circuit and electronic equipment | |
| JP2010068369A (en) | Switch input circuit | |
| JP4844345B2 (en) | Comparator circuit with hysteresis | |
| KR101069713B1 (en) | Circuit for Trimming Voltage of a Semiconductor Memory Apparatus and Method | |
| JP4596847B2 (en) | Filter circuit and D / A converter | |
| US10038440B2 (en) | Electronic apparatus | |
| CN116455207A (en) | Positive and negative voltage selection circuit and method | |
| KR20130072925A (en) | Input circuit of door signal of a car | |
| JP6617911B2 (en) | Electric tool | |
| JP2019114974A (en) | Detector | |
| PL222370B1 (en) | System for switching the supply voltage | |
| JPH01103168A (en) | Pulse width modulated wave generation circuit |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| R151 | Written notification of patent or utility model registration |
Ref document number: 3182794 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20160321 Year of fee payment: 3 |
|
| S533 | Written request for registration of change of name |
Free format text: JAPANESE INTERMEDIATE CODE: R323533 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
| EXPY | Cancellation because of completion of term |