JP2010068369A - Switch input circuit - Google Patents

Switch input circuit Download PDF

Info

Publication number
JP2010068369A
JP2010068369A JP2008234282A JP2008234282A JP2010068369A JP 2010068369 A JP2010068369 A JP 2010068369A JP 2008234282 A JP2008234282 A JP 2008234282A JP 2008234282 A JP2008234282 A JP 2008234282A JP 2010068369 A JP2010068369 A JP 2010068369A
Authority
JP
Japan
Prior art keywords
switch
voltage dividing
dividing resistor
circuit
input 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.)
Pending
Application number
JP2008234282A
Other languages
Japanese (ja)
Inventor
Nagayoshi Takada
修宜 高田
Yoshizo Fukushima
義三 福島
Shinyuki Hattori
峻之 服部
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Daikin Industries Ltd
Original Assignee
Daikin Industries Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Daikin Industries Ltd filed Critical Daikin Industries Ltd
Priority to JP2008234282A priority Critical patent/JP2010068369A/en
Publication of JP2010068369A publication Critical patent/JP2010068369A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Electronic Switches (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To detect ON/OFF state of a plurality of switches using an inexpensive microcomputer. <P>SOLUTION: The switch input circuit 1 connected to an analog input port and provided in the microcomputer 2, includes switches SW1 and SW2 whose ON/OFF states are switched according to a state of an actuator, and includes: a switch circuit 10 whose resistance value changes according to combination of ON/OFF states of the switches SW1 and SW2; and a resistor R20 one end of which is connected to reference voltage Vcc and the other end is connected to the switch circuit 10. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、複数のスイッチのON/OFFの状態を検出するスイッチ入力回路に関する。   The present invention relates to a switch input circuit that detects ON / OFF states of a plurality of switches.

従来、複数のスイッチの各々をマイコンのデジタル入力ポートに接続することによって、当該複数のスイッチのON/OFFの状態を検出していた(例えば、特許文献1参照)。
特開2005−114315号公報
Conventionally, the ON / OFF state of the plurality of switches has been detected by connecting each of the plurality of switches to a digital input port of the microcomputer (see, for example, Patent Document 1).
JP 2005-114315 A

しかしながら、特許文献1に開示されるスイッチ入力回路のように、各スイッチにデジタル入力ポートを用いる場合、スイッチの数が増大すれば、マイコンのデジタル入力ポートの使用量も増大してしまう。従って、このスイッチ入力回路だけで多数のデジタル入力ポートを用いると、他の周辺回路で用いるデジタル入力ポートの使用可能数に制限が加わったり、デジタル入力ポートの多い高価なマイコンを使用しなければならないという問題がある。   However, when a digital input port is used for each switch as in the switch input circuit disclosed in Patent Document 1, if the number of switches increases, the usage amount of the digital input port of the microcomputer also increases. Therefore, if a large number of digital input ports are used only with this switch input circuit, the number of usable digital input ports used in other peripheral circuits is limited, or an expensive microcomputer with many digital input ports must be used. There is a problem.

そこで、この発明は、上記のような課題を解決するためになされたものであり、デジタル入力ポートの搭載数が少ない安価な制御部を用いて複数のスイッチのON/OFFの状態を検出することが可能なスイッチ入力回路を提供することを目的とする。   Therefore, the present invention has been made to solve the above-described problems, and detects the ON / OFF states of a plurality of switches using an inexpensive control unit with a small number of digital input ports. An object of the present invention is to provide a switch input circuit capable of performing

第1の発明にかかるスイッチ入力回路は、制御部に設けられるアナログ入力ポートに接続されるスイッチ入力回路であって、アクチュエータの状態に応じてON/OFFが切り替わるスイッチを複数含み、当該複数のスイッチのON/OFFの組み合わせに応じて、抵抗値が変化するスイッチ回路と、一端が基準電圧又はグランドに接続され、且つ、他端がスイッチ回路に接続される抵抗とを備える。   A switch input circuit according to a first aspect of the present invention is a switch input circuit connected to an analog input port provided in a control unit, and includes a plurality of switches that are switched ON / OFF in accordance with the state of the actuator. The switch circuit includes a switch circuit whose resistance value changes according to the combination of ON / OFF, and a resistor having one end connected to the reference voltage or the ground and the other end connected to the switch circuit.

このスイッチ入力回路では、複数のスイッチのON/OFFの組み合わせに応じて、アナログ入力ポートに入力される電圧値が変化するので、1つのアナログ入力ポートで複数のスイッチのON/OFFの状態を検出することができる。つまり、制御部には、アナログ入力ポートが1つあればよいので、デジタル入力ポートの搭載数が少ない安価な制御部を用いて複数のスイッチのON/OFFの状態を検出することができる。
また、各スイッチにデジタル入力ポートを用いる場合と比べて、デジタル入力ポートに空きが生じるので、そのデジタル入力ポートを他の周辺回路に用いることができる。
また、このスイッチ入力回路では、仕向け地ごとにスイッチ回路と抵抗値を変えておくことによって、基板の外観が同じであっても、アナログ入力ポートの読み値によって、当該基板の仕向け地を容易に判断することができる。
In this switch input circuit, the voltage value input to the analog input port changes according to the ON / OFF combination of multiple switches, so the ON / OFF status of multiple switches can be detected with one analog input port. can do. That is, since the control unit need only have one analog input port, it is possible to detect the ON / OFF states of a plurality of switches using an inexpensive control unit with a small number of digital input ports.
Further, since the digital input port is vacant as compared with the case where the digital input port is used for each switch, the digital input port can be used for other peripheral circuits.
Also, with this switch input circuit, by changing the resistance value of the switch circuit for each destination, even if the appearance of the board is the same, the destination of the board can be easily determined by reading the analog input port. Judgment can be made.

第2の発明にかかるスイッチ入力回路は、第1の発明にかかるスイッチ入力回路において、スイッチ回路は、第1分圧抵抗と、第1分圧抵抗に対応する第1スイッチと、第1分圧抵抗に直列又は並列に接続されると共に、第1分圧抵抗とは異なる抵抗値を有する第2分圧抵抗と、第2分圧抵抗に対応する第2スイッチとを含む。   A switch input circuit according to a second invention is the switch input circuit according to the first invention, wherein the switch circuit includes a first voltage dividing resistor, a first switch corresponding to the first voltage dividing resistor, and a first voltage dividing voltage. A second voltage dividing resistor connected in series or in parallel to the resistor and having a resistance value different from that of the first voltage dividing resistor, and a second switch corresponding to the second voltage dividing resistor are included.

このスイッチ入力回路では、第1スイッチ及び第2スイッチのON/OFFに応じて、第1分圧抵抗及び第2分圧抵抗による合成抵抗値が変化し、アナログ入力ポートに入力される電圧値が変化するので、複数のスイッチのON/OFFの状態を検出することができる。
また、互いに抵抗値が異なる第1分圧抵抗及び第2分圧抵抗を用いることにより、第1スイッチ及び第2スイッチのON/OFFの状態を容易に検出することができる。
In this switch input circuit, the combined resistance value of the first voltage dividing resistor and the second voltage dividing resistor changes according to ON / OFF of the first switch and the second switch, and the voltage value input to the analog input port is Since it changes, the ON / OFF state of a plurality of switches can be detected.
Further, by using the first voltage dividing resistor and the second voltage dividing resistor having different resistance values, it is possible to easily detect the ON / OFF state of the first switch and the second switch.

第3の発明にかかるスイッチ入力回路は、第2の発明にかかるスイッチ入力回路において、第1分圧抵抗と第2分圧抵抗とは直列に接続されており、第1スイッチと第1分圧抵抗とは、並列に接続され、且つ、第2スイッチと第2分圧抵抗とは、並列に接続される。   A switch input circuit according to a third invention is the switch input circuit according to the second invention, wherein the first voltage dividing resistor and the second voltage dividing resistor are connected in series, and the first switch and the first voltage dividing resistor are connected. The resistor is connected in parallel, and the second switch and the second voltage dividing resistor are connected in parallel.

このスイッチ入力回路では、第1分圧抵抗と第2分圧抵抗とを直列に接続したスイッチ回路を用いて、複数のスイッチのON/OFFの状態をデジタル入力ポートの搭載数が少ない安価な制御部で検出することができる。   This switch input circuit uses a switch circuit in which a first voltage dividing resistor and a second voltage dividing resistor are connected in series, and the ON / OFF state of a plurality of switches is inexpensively controlled with a small number of digital input ports. It can be detected by the part.

第4の発明にかかるスイッチ入力回路は、第2の発明にかかるスイッチ入力回路において、第1分圧抵抗と第2分圧抵抗とは並列に接続されており、第1スイッチと第1分圧抵抗とは、直列に接続され、且つ、第2スイッチと第2分圧抵抗とは、直列に接続される。   A switch input circuit according to a fourth invention is the switch input circuit according to the second invention, wherein the first voltage dividing resistor and the second voltage dividing resistor are connected in parallel, and the first switch and the first voltage dividing resistor are connected. The resistor is connected in series, and the second switch and the second voltage dividing resistor are connected in series.

このスイッチ入力回路では、第1分圧抵抗と第2分圧抵抗とを並列に接続したスイッチ回路を用いて、複数のスイッチのON/OFFの状態をデジタル入力ポートの搭載数が少ない安価な制御部で検出することができる。   This switch input circuit uses a switch circuit in which a first voltage dividing resistor and a second voltage dividing resistor are connected in parallel, and the ON / OFF state of a plurality of switches is inexpensively controlled with a small number of digital input ports. It can be detected by the part.

第5の発明にかかるスイッチ入力回路は、第1〜第4のいずれかの発明にかかるスイッチ入力回路において、抵抗とスイッチ回路との接続点にアナログ入力ポートが接続されている。   A switch input circuit according to a fifth aspect is the switch input circuit according to any one of the first to fourth aspects, wherein an analog input port is connected to a connection point between the resistor and the switch circuit.

このスイッチ入力回路では、抵抗値が変化するスイッチ回路と抵抗とによって分圧された電圧値をアナログ入力ポートに入力することができるので、複数のスイッチのON/OFFの状態を容易に検出することができる。   In this switch input circuit, since the voltage value divided by the switch circuit and the resistance whose resistance value changes can be input to the analog input port, it is possible to easily detect the ON / OFF state of a plurality of switches. Can do.

以上の説明に述べたように、本発明によれば、以下の効果が得られる。   As described above, according to the present invention, the following effects can be obtained.

第1の発明では、複数のスイッチのON/OFFの組み合わせに応じて、アナログ入力ポートに入力される電圧値が変化するので、1つのアナログ入力ポートで複数のスイッチのON/OFFの状態を検出することができる。つまり、制御部には、アナログ入力ポートが1つあればよいので、デジタル入力ポートの搭載数が少ない安価な制御部を用いて複数のスイッチのON/OFFの状態を検出することができる。
また、各スイッチにデジタル入力ポートを用いる場合と比べて、デジタル入力ポートに空きが生じるので、そのデジタル入力ポートを他の周辺回路に用いることができる。
また、このスイッチ入力回路では、仕向け地ごとにスイッチ回路と抵抗値を変えておくことによって、基板の外観が同じであっても、アナログ入力ポートの読み値によって、当該基板の仕向け地を容易に判断することができる。
In the first aspect of the invention, the voltage value input to the analog input port changes according to the ON / OFF combination of the plurality of switches, so the ON / OFF state of the plurality of switches is detected by one analog input port. can do. That is, since the control unit need only have one analog input port, it is possible to detect the ON / OFF states of a plurality of switches using an inexpensive control unit with a small number of digital input ports.
Further, since the digital input port is vacant as compared with the case where the digital input port is used for each switch, the digital input port can be used for other peripheral circuits.
Also, with this switch input circuit, by changing the resistance value of the switch circuit for each destination, even if the appearance of the board is the same, the destination of the board can be easily determined by reading the analog input port. Judgment can be made.

また、第2の発明では、第1スイッチ及び第2スイッチのON/OFFに応じて、第1分圧抵抗及び第2分圧抵抗による合成抵抗値が変化し、アナログ入力ポートに入力される電圧値が変化するので、複数のスイッチのON/OFFの状態を検出することができる。
また、互いに抵抗値が異なる第1分圧抵抗及び第2分圧抵抗を用いることにより、第1スイッチ及び第2スイッチのON/OFFの状態を容易に検出することができる。
In the second invention, the combined resistance value of the first voltage dividing resistor and the second voltage dividing resistor changes according to ON / OFF of the first switch and the second switch, and the voltage input to the analog input port Since the value changes, it is possible to detect the ON / OFF state of a plurality of switches.
Further, by using the first voltage dividing resistor and the second voltage dividing resistor having different resistance values, it is possible to easily detect the ON / OFF state of the first switch and the second switch.

また、第3の発明では、第1分圧抵抗と第2分圧抵抗とを直列に接続したスイッチ回路を用いて、1つのアナログ入力ポートを有する安価な制御部を用いて複数のスイッチのON/OFFの状態を検出することができる。   In the third invention, a switch circuit in which a first voltage dividing resistor and a second voltage dividing resistor are connected in series is used to turn on a plurality of switches using an inexpensive control unit having one analog input port. / OFF state can be detected.

また、第4の発明では、第1分圧抵抗と第2分圧抵抗とを並列に接続したスイッチ回路を用いて、1つのアナログ入力ポートを有する安価な制御部を用いて複数のスイッチのON/OFFの状態を検出することができる。   In the fourth invention, a switch circuit in which a first voltage dividing resistor and a second voltage dividing resistor are connected in parallel is used, and a plurality of switches are turned on using an inexpensive control unit having one analog input port. / OFF state can be detected.

また、第5の発明では、抵抗値が変化するスイッチ回路と抵抗とによって分圧された電圧値をアナログ入力ポートに入力することができるので、複数のスイッチのON/OFFの状態を容易に検出することができる。   In the fifth aspect of the invention, the voltage value divided by the switch circuit and the resistance whose resistance value changes can be input to the analog input port, so that the ON / OFF states of a plurality of switches can be easily detected. can do.

以下、図面に基づいて、本発明に係るスイッチ入力回路の実施形態について説明する。   Hereinafter, embodiments of a switch input circuit according to the present invention will be described with reference to the drawings.

(第1実施形態)
図1は、本発明の第1実施形態に係るスイッチ入力回路の回路図である。図2は、スイッチ入力回路の抵抗値とアナログ入力ポートに入力される電圧値とをスイッチのON/OFFの組み合わせに応じて示した図である。以下、図1及び図2を参照して、第1実施形態に係るスイッチ入力回路1について詳細に説明する。
(First embodiment)
FIG. 1 is a circuit diagram of a switch input circuit according to the first embodiment of the present invention. FIG. 2 is a diagram showing the resistance value of the switch input circuit and the voltage value inputted to the analog input port according to the combination of ON / OFF of the switch. Hereinafter, the switch input circuit 1 according to the first embodiment will be described in detail with reference to FIGS. 1 and 2.

本実施形態のスイッチ入力回路1は、空気清浄機に搭載され、空気清浄機の水タンクなどが正常にセットされているか否かなどを検出する回路である。このスイッチ入力回路1は、CPUやメモリ等からなるマイコン2に設けられるアナログ入力ポートに接続される。このマイコン2は、アナログ入力ポートに入力された電圧値を、10bit(1024)の分解能で識別する機能を有している。スイッチ入力回路1は、図1に示すように、スイッチ回路10と、5Vの基準電圧Vccと、一端が基準電圧Vcc(5V)に接続され、且つ、他端がスイッチ回路10に接続される抵抗R20(抵抗値:2400Ω)とを備えている。   The switch input circuit 1 of the present embodiment is a circuit that is mounted on an air purifier and detects whether or not a water tank of the air purifier is normally set. The switch input circuit 1 is connected to an analog input port provided in a microcomputer 2 including a CPU, a memory, and the like. The microcomputer 2 has a function of identifying the voltage value input to the analog input port with a resolution of 10 bits (1024). As shown in FIG. 1, the switch input circuit 1 includes a switch circuit 10, a 5 V reference voltage Vcc, a resistor having one end connected to the reference voltage Vcc (5 V) and the other end connected to the switch circuit 10. R20 (resistance value: 2400Ω).

スイッチ回路10は、分圧抵抗R21(抵抗値:1000Ω)と、その分圧抵抗R21に対応するスイッチSW1と、分圧抵抗R21とは異なる抵抗値を有する分圧抵抗R22(抵抗値:1500Ω)と、その分圧抵抗R22に対応するスイッチR22とを含んでいる。そして、スイッチSW1及びスイッチSW2は、上記した水タンクなどが正常にセットされているか否かでON/OFFが切り替るようになっている。また、分圧抵抗R21と分圧抵抗R22とは直列に接続されると共に、スイッチSW1及びスイッチSW2は、それぞれ分圧抵抗R21及び分圧抵抗R22に並列に接続されている。そして、抵抗R20とスイッチ回路10(分圧抵抗R21)との接続点にアナログ入力ポートが接続されている。   The switch circuit 10 includes a voltage dividing resistor R21 (resistance value: 1000Ω), a switch SW1 corresponding to the voltage dividing resistor R21, and a voltage dividing resistor R22 (resistance value: 1500Ω) having a resistance value different from that of the voltage dividing resistor R21. And a switch R22 corresponding to the voltage dividing resistor R22. The switches SW1 and SW2 are switched ON / OFF depending on whether or not the above-described water tank is normally set. The voltage dividing resistor R21 and the voltage dividing resistor R22 are connected in series, and the switch SW1 and the switch SW2 are connected in parallel to the voltage dividing resistor R21 and the voltage dividing resistor R22, respectively. An analog input port is connected to a connection point between the resistor R20 and the switch circuit 10 (voltage dividing resistor R21).

このように構成されたスイッチ回路10は、スイッチSW1及びスイッチSW2のON/OFFの組み合わせに応じて、その抵抗値が変化する。具体的には、図2に示すように、スイッチSW1及びスイッチSW2が共にON状態の場合には、スイッチ回路10の抵抗値は実質的に0になり、スイッチSW1がOFF状態で且つスイッチSW2がON状態の場合には、スイッチ回路10の抵抗値は1000Ωになり、スイッチSW1がON状態で且つスイッチSW2がOFF状態の場合には、スイッチ回路10の抵抗値は1500Ωになり、スイッチSW1及びスイッチSW2が共にOFF状態の場合には、スイッチ回路10の抵抗値は、2500Ωになる。これにより、基準電圧Vccの5Vが、抵抗R20とスイッチ回路10の分圧抵抗R21,R22とに分圧されて、アナログ入力ポートに入力される。   The resistance value of the switch circuit 10 configured in this manner changes according to the combination of ON / OFF of the switch SW1 and the switch SW2. Specifically, as shown in FIG. 2, when both the switch SW1 and the switch SW2 are in the ON state, the resistance value of the switch circuit 10 is substantially 0, the switch SW1 is in the OFF state, and the switch SW2 is in the OFF state. When the switch circuit 10 is in the ON state, the resistance value of the switch circuit 10 is 1000Ω, and when the switch SW1 is in the ON state and the switch SW2 is in the OFF state, the switch circuit 10 has a resistance value of 1500Ω. When both SW2 are in the OFF state, the resistance value of the switch circuit 10 is 2500Ω. As a result, 5 V of the reference voltage Vcc is divided by the resistor R20 and the voltage dividing resistors R21 and R22 of the switch circuit 10 and input to the analog input port.

従って、スイッチSW1及びスイッチSW2が共にON状態の場合には、アナログ入力ポートに0Vが入力され、スイッチSW1がOFF状態で且つスイッチSW2がON状態の場合には、アナログ入力ポートに1.470588Vが入力され、スイッチSW1がON状態で且つスイッチSW2がOFF状態の場合には、アナログ入力ポートに1.923077Vが入力され、スイッチSW1及びスイッチSW2が共にOFF状態の場合には、アナログ入力ポートに2.55102Vが入力される。   Therefore, when both the switch SW1 and the switch SW2 are in the ON state, 0V is input to the analog input port, and when the switch SW1 is in the OFF state and the switch SW2 is in the ON state, 1.470588V is input to the analog input port. When the switch SW1 is ON and the switch SW2 is OFF, 1.923077V is input to the analog input port. When both the switch SW1 and the switch SW2 are OFF, 2 is input to the analog input port. .55102V is input.

上記したように、スイッチSW1及びスイッチSW2のON/OFFの組み合わせに応じて、アナログ入力ポートに入力される電圧値が変化して、アナログ入力ポートの読み値が変化するので、マイコン2において、スイッチSW1及びスイッチSW2のON/OFFの状態を検出することが可能となる。   As described above, the voltage value input to the analog input port changes according to the ON / OFF combination of the switch SW1 and the switch SW2, and the reading value of the analog input port changes. It becomes possible to detect the ON / OFF state of SW1 and switch SW2.

[第1実施形態のスイッチ入力回路1の特徴]
第1実施形態のスイッチ入力回路1には、以下のような特徴がある。
[Features of Switch Input Circuit 1 of First Embodiment]
The switch input circuit 1 of the first embodiment has the following characteristics.

本実施形態のスイッチ入力回路1では、スイッチSW1及びスイッチSW2のON/OFFの組み合わせに応じて、分圧抵抗R21及び分圧抵抗R22による合成抵抗値が変化して、アナログ入力ポートに入力される電圧値が変化するので、1つのアナログ入力ポートでスイッチSW1及びスイッチSW2のON/OFFの状態を検出することができる。つまり、マイコン2には、アナログ入力ポートが1つあればよいので、デジタル入力ポートの搭載数が少ない安価なマイコン2を用いてスイッチSW1及びスイッチSW2のON/OFFの状態を検出することができる。   In the switch input circuit 1 of the present embodiment, the combined resistance value of the voltage dividing resistor R21 and the voltage dividing resistor R22 changes according to the ON / OFF combination of the switch SW1 and the switch SW2, and is input to the analog input port. Since the voltage value changes, it is possible to detect the ON / OFF state of the switch SW1 and the switch SW2 with one analog input port. That is, since the microcomputer 2 only needs to have one analog input port, it is possible to detect the ON / OFF state of the switch SW1 and the switch SW2 using an inexpensive microcomputer 2 with a small number of digital input ports. .

また、本実施形態のスイッチ入力回路1では、各スイッチにデジタル入力ポートを用いる場合と比べて、デジタル入力ポートに空きが生じるので、そのデジタル入力ポートを他の周辺回路に用いることができる。   Further, in the switch input circuit 1 of the present embodiment, the digital input port is vacant as compared with the case where the digital input port is used for each switch, so that the digital input port can be used for other peripheral circuits.

また、本実施形態のスイッチ入力回路1では、互いに抵抗値が異なる分圧抵抗R21及び分圧抵抗R22を用いることにより、スイッチSW1及びスイッチSW2のON/OFFの状態を容易に検出することができる。   In the switch input circuit 1 of the present embodiment, the ON / OFF state of the switch SW1 and the switch SW2 can be easily detected by using the voltage dividing resistor R21 and the voltage dividing resistor R22 having different resistance values. .

また、本実施形態のスイッチ入力回路1では、抵抗値が変化するスイッチ回路10と抵抗R20とによって分圧された電圧値をアナログ入力ポートに入力することができるので、スイッチSW1及びSW2のON/OFFの状態を容易に検出することができる。   Further, in the switch input circuit 1 of the present embodiment, the voltage value divided by the switch circuit 10 and the resistor R20 whose resistance values change can be input to the analog input port, so that the switches SW1 and SW2 are turned on / off. The OFF state can be easily detected.

(第2実施形態)
図3は、本発明の第2実施形態に係るスイッチ入力回路の回路図である。以下、図3を参照して、第2実施形態に係るスイッチ入力回路100の構成について詳細に説明する。
(Second Embodiment)
FIG. 3 is a circuit diagram of a switch input circuit according to the second embodiment of the present invention. Hereinafter, the configuration of the switch input circuit 100 according to the second embodiment will be described in detail with reference to FIG.

本実施形態のスイッチ入力回路100は、図3に示すように、スイッチ回路110と、5Vの基準電圧Vccと、一端がグランドGNDに接続され、且つ、他端がスイッチ回路110に接続される抵抗R120とを備えている。   As shown in FIG. 3, the switch input circuit 100 according to the present embodiment includes a switch circuit 110, a 5V reference voltage Vcc, one end connected to the ground GND, and the other end connected to the switch circuit 110. R120.

スイッチ回路110は、分圧抵抗R121と、その分圧抵抗R121に対応するスイッチSW101と、分圧抵抗R121とは異なる抵抗値を有する分圧抵抗R122と、その分圧抵抗R122に対応するスイッチR122とを含んでいる。そして、スイッチSW101及びスイッチSW102は、アクチュエータの状態に応じてON/OFFが切り替るようになっている。また、分圧抵抗R121と分圧抵抗R122とは直列に接続されると共に、スイッチSW101及びスイッチSW102は、それぞれ分圧抵抗R121及び分圧抵抗R122に並列に接続されている。そして、分圧抵抗R121と分圧抵抗R122との接続点にアナログ入力ポートが接続されている。   The switch circuit 110 includes a voltage dividing resistor R121, a switch SW101 corresponding to the voltage dividing resistor R121, a voltage dividing resistor R122 having a resistance value different from that of the voltage dividing resistor R121, and a switch R122 corresponding to the voltage dividing resistor R122. Including. The switches SW101 and SW102 are turned on / off according to the state of the actuator. The voltage dividing resistor R121 and the voltage dividing resistor R122 are connected in series, and the switch SW101 and the switch SW102 are connected in parallel to the voltage dividing resistor R121 and the voltage dividing resistor R122, respectively. An analog input port is connected to a connection point between the voltage dividing resistor R121 and the voltage dividing resistor R122.

このように構成されたスイッチ回路110では、スイッチSW101及びスイッチSW102のON/OFFの組み合わせに応じて、その抵抗値が変化する。その結果、アナログ入力ポートに入力される電圧値が変化して、アナログ入力ポートの読み値が変化するので、マイコン2において、スイッチSW101及びスイッチSW102のON/OFFの状態を検出することが可能となる。   In the switch circuit 110 configured as described above, the resistance value changes in accordance with the ON / OFF combination of the switch SW101 and the switch SW102. As a result, since the voltage value input to the analog input port changes and the reading value of the analog input port changes, the microcomputer 2 can detect the ON / OFF state of the switch SW101 and the switch SW102. Become.

[第2実施形態のリモコンの特徴]
第2実施形態のスイッチ入力回路100も、第1実施形態のスイッチ入力回路1と同様の特徴がある。
[Features of remote control according to the second embodiment]
The switch input circuit 100 of the second embodiment has the same characteristics as the switch input circuit 1 of the first embodiment.

(第3実施形態)
図4は、本発明の第3実施形態に係るスイッチ入力回路の回路図である。以下、図4を参照して、第3実施形態に係るスイッチ入力回路200の構成について詳細に説明する。
(Third embodiment)
FIG. 4 is a circuit diagram of a switch input circuit according to the third embodiment of the present invention. Hereinafter, the configuration of the switch input circuit 200 according to the third embodiment will be described in detail with reference to FIG.

本実施形態のスイッチ入力回路200は、図4に示すように、スイッチ回路210と、5Vの基準電圧Vccと、一端が基準電圧Vccに接続され、且つ、他端がスイッチ回路210に接続される抵抗R220とを備えている。   As shown in FIG. 4, the switch input circuit 200 according to the present embodiment has a switch circuit 210, a 5 V reference voltage Vcc, one end connected to the reference voltage Vcc, and the other end connected to the switch circuit 210. And a resistor R220.

スイッチ回路210は、分圧抵抗R221と、その分圧抵抗R221に対応するスイッチSW201と、分圧抵抗R221とは異なる抵抗値を有する分圧抵抗R222と、その分圧抵抗R222に対応するスイッチSW202とを含んでいる。そして、スイッチSW201及びスイッチSW202は、アクチュエータの状態に応じてON/OFFが切り替るようになっている。また、分圧抵抗R221と分圧抵抗R222とは並列に接続されると共に、スイッチSW201及びスイッチSW202は、それぞれ分圧抵抗R221及び分圧抵抗R222に直列に接続されている。そして、分圧抵抗R220とスイッチ回路210との接続点にアナログ入力ポートが接続されている。   The switch circuit 210 includes a voltage dividing resistor R221, a switch SW201 corresponding to the voltage dividing resistor R221, a voltage dividing resistor R222 having a resistance value different from that of the voltage dividing resistor R221, and a switch SW202 corresponding to the voltage dividing resistor R222. Including. The switches SW201 and SW202 are turned ON / OFF according to the state of the actuator. The voltage dividing resistor R221 and the voltage dividing resistor R222 are connected in parallel, and the switch SW201 and the switch SW202 are connected in series to the voltage dividing resistor R221 and the voltage dividing resistor R222, respectively. An analog input port is connected to a connection point between the voltage dividing resistor R220 and the switch circuit 210.

このように構成されたスイッチ回路210では、スイッチSW201及びスイッチSW202のON/OFFの組み合わせに応じて、その抵抗値が変化する。その結果、アナログ入力ポートに入力される電圧値が変化して、アナログ入力ポートの読み値が変化するので、マイコン2において、スイッチSW201及びスイッチSW202のON/OFFの状態を検出することが可能となる。   In the switch circuit 210 configured as described above, the resistance value thereof changes according to the combination of ON / OFF of the switch SW201 and the switch SW202. As a result, since the voltage value input to the analog input port changes and the reading value of the analog input port changes, the microcomputer 2 can detect the ON / OFF state of the switch SW201 and the switch SW202. Become.

[第3実施形態のリモコンの特徴]
第3実施形態のスイッチ入力回路200も、第1実施形態のスイッチ入力回路1と同様の特徴がある。
[Features of the remote control according to the third embodiment]
The switch input circuit 200 of the third embodiment has the same characteristics as the switch input circuit 1 of the first embodiment.

以上、本発明の実施形態について図面に基づいて説明したが、具体的な構成は、これらの実施形態に限定されるものでないと考えられるべきである。本発明の範囲は、上記した実施形態の説明だけではなく特許請求の範囲によって示され、さらに特許請求の範囲と均等の意味および範囲内でのすべての変更が含まれる。   As mentioned above, although embodiment of this invention was described based on drawing, it should be thought that a specific structure is not limited to these embodiment. The scope of the present invention is shown not only by the above description of the embodiments but also by the scope of claims for patent, and further includes all modifications within the meaning and scope equivalent to the scope of claims for patent.

例えば、第1実施形態では、仕向け地A向けのスイッチ入力回路として、抵抗R20,分圧抵抗R21及び分圧抵抗R22の抵抗値を、それぞれ2400Ω、1000Ω及び1500Ωに設定したが、本発明はこれに限らず、図5に示すように、仕向け地ごとに抵抗値の異なる抵抗を用いてスイッチ入力回路を構成しても良い。ここでは、仕向け地Bについては、抵抗R20,分圧抵抗R21及び分圧抵抗R22の抵抗値を、それぞれ2400Ω、1500Ω及び1000Ωに設定して、仕向け地Cについては、抵抗R20,分圧抵抗R21及び分圧抵抗R22の抵抗値を、それぞれ1000Ω、2400Ω及び1500Ωに設定する。この場合、アナログ入力ポートに入力される電圧値は、図6に示す値になる。これにより、スイッチ入力回路を搭載した基板の外観が、仕向け地に関わらず同じであっても、アナログ入力ポートの読み値が仕向け地ごとに異なるので、製品の組付け間違いを防止することができる。   For example, in the first embodiment, as the switch input circuit for the destination A, the resistance values of the resistor R20, the voltage dividing resistor R21, and the voltage dividing resistor R22 are set to 2400Ω, 1000Ω, and 1500Ω, respectively. However, the switch input circuit may be configured using resistors having different resistance values for each destination as shown in FIG. Here, for destination B, the resistance values of resistor R20, voltage dividing resistor R21 and voltage dividing resistor R22 are set to 2400Ω, 1500Ω and 1000Ω, respectively, and for destination C, resistor R20 and voltage dividing resistor R21 are set. The resistance values of the voltage dividing resistor R22 are set to 1000Ω, 2400Ω, and 1500Ω, respectively. In this case, the voltage value input to the analog input port is the value shown in FIG. As a result, even if the appearance of the board on which the switch input circuit is mounted is the same regardless of the destination, the reading value of the analog input port differs depending on the destination, so that it is possible to prevent product assembly errors. .

また、上記実施形態では、スイッチ入力回路を空気清浄機に搭載する例について説明したが、本発明は空気清浄機以外の機器にも適用可能である。   Moreover, although the said embodiment demonstrated the example which mounts a switch input circuit in an air cleaner, this invention is applicable also to apparatuses other than an air cleaner.

本発明を利用すれば、安価な制御部を用いて複数のスイッチのON/OFFの状態を検出することが可能なスイッチ入力回路を得ることができる。   By utilizing the present invention, it is possible to obtain a switch input circuit capable of detecting the ON / OFF states of a plurality of switches using an inexpensive control unit.

本発明の第1実施形態に係るスイッチ入力回路の回路図である。1 is a circuit diagram of a switch input circuit according to a first embodiment of the present invention. スイッチのON/OFFの組み合わせと、スイッチ入力回路の抵抗値及びアナログ入力ポートに入力される電圧値との関係を示した図である。It is the figure which showed the relationship between the combination of ON / OFF of a switch, the resistance value of a switch input circuit, and the voltage value input into an analog input port. 本発明の第2実施形態に係るスイッチ入力回路の回路図である。It is a circuit diagram of a switch input circuit concerning a 2nd embodiment of the present invention. 本発明の第3実施形態に係るスイッチ入力回路の回路図である。FIG. 6 is a circuit diagram of a switch input circuit according to a third embodiment of the present invention. 第1実施形態の変形例に係るスイッチ入力回路の抵抗の抵抗値を仕向け地ごとに示した図である。It is the figure which showed the resistance value of the resistance of the switch input circuit which concerns on the modification of 1st Embodiment for every destination. スイッチのON/OFFの組み合わせとアナログ入力ポートに入力される電圧値との関係を仕向け地ごとに示した図である。It is the figure which showed the relationship between the combination of ON / OFF of a switch, and the voltage value input into an analog input port for every destination.

符号の説明Explanation of symbols

1,100,200 スイッチ入力回路
10,110,210 スイッチ回路
R20,R120,R220 抵抗
R21,R22,R121,R122,R221,R222 分圧抵抗
SW1,SW2,SW101,SW102,SW201,SW202 スイッチ
Vcc 基準電圧
GND グランド
1,100,200 Switch input circuit 10,110,210 Switch circuit R20, R120, R220 Resistor R21, R22, R121, R122, R221, R222 Voltage dividing resistor SW1, SW2, SW101, SW102, SW201, SW202 Switch Vcc Reference voltage GND ground

Claims (5)

制御部に設けられるアナログ入力ポートに接続されるスイッチ入力回路であって、
アクチュエータの状態に応じてON/OFFが切り替わるスイッチを複数含み、当該複数のスイッチのON/OFFの組み合わせに応じて、抵抗値が変化するスイッチ回路と、
一端が基準電圧又はグランドに接続され、且つ、他端が前記スイッチ回路に接続される抵抗とを備えることを特徴とする、スイッチ入力回路。
A switch input circuit connected to an analog input port provided in the control unit,
A switch circuit including a plurality of switches that are switched ON / OFF according to the state of the actuator, and a resistance value that varies according to a combination of ON / OFF of the plurality of switches;
A switch input circuit comprising: a resistor having one end connected to a reference voltage or ground and the other end connected to the switch circuit.
前記スイッチ回路は、
第1分圧抵抗と、
前記第1分圧抵抗に対応する第1スイッチと、
前記第1分圧抵抗に直列又は並列に接続されると共に、前記第1分圧抵抗とは異なる抵抗値を有する第2分圧抵抗と、
前記第2分圧抵抗に対応する第2スイッチとを含むこと特徴とする、請求項1に記載のスイッチ入力回路。
The switch circuit is
A first voltage dividing resistor;
A first switch corresponding to the first voltage dividing resistor;
A second voltage dividing resistor connected in series or in parallel to the first voltage dividing resistor and having a resistance value different from that of the first voltage dividing resistor;
The switch input circuit according to claim 1, further comprising a second switch corresponding to the second voltage dividing resistor.
前記第1分圧抵抗と前記第2分圧抵抗とは直列に接続されており、
前記第1スイッチと前記第1分圧抵抗とは、並列に接続され、且つ、前記第2スイッチと前記第2分圧抵抗とは、並列に接続されることを特徴とする、請求項2に記載のスイッチ入力回路。
The first voltage dividing resistor and the second voltage dividing resistor are connected in series,
The first switch and the first voltage dividing resistor are connected in parallel, and the second switch and the second voltage dividing resistor are connected in parallel. The switch input circuit described.
前記第1分圧抵抗と前記第2分圧抵抗とは並列に接続されており、
前記第1スイッチと前記第1分圧抵抗とは、直列に接続され、且つ、前記第2スイッチと前記第2分圧抵抗とは、直列に接続されることを特徴とする、請求項2に記載のスイッチ入力回路。
The first voltage dividing resistor and the second voltage dividing resistor are connected in parallel,
The first switch and the first voltage dividing resistor are connected in series, and the second switch and the second voltage dividing resistor are connected in series. The switch input circuit described.
前記抵抗と前記スイッチ回路との接続点に前記アナログ入力ポートが接続されていることを特徴とする、請求項1〜4のいずれか1項に記載のスイッチ入力回路。   The switch input circuit according to claim 1, wherein the analog input port is connected to a connection point between the resistor and the switch circuit.
JP2008234282A 2008-09-12 2008-09-12 Switch input circuit Pending JP2010068369A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008234282A JP2010068369A (en) 2008-09-12 2008-09-12 Switch input circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008234282A JP2010068369A (en) 2008-09-12 2008-09-12 Switch input circuit

Publications (1)

Publication Number Publication Date
JP2010068369A true JP2010068369A (en) 2010-03-25

Family

ID=42193532

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008234282A Pending JP2010068369A (en) 2008-09-12 2008-09-12 Switch input circuit

Country Status (1)

Country Link
JP (1) JP2010068369A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018023244A (en) * 2016-08-05 2018-02-08 株式会社デンソー Abnormality determination circuit
JP2020136871A (en) * 2019-02-18 2020-08-31 トヨタ自動車株式会社 Abnormality determination device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018023244A (en) * 2016-08-05 2018-02-08 株式会社デンソー Abnormality determination circuit
JP2020136871A (en) * 2019-02-18 2020-08-31 トヨタ自動車株式会社 Abnormality determination device
JP7302194B2 (en) 2019-02-18 2023-07-04 株式会社デンソー Abnormality determination device

Similar Documents

Publication Publication Date Title
CN106908744B (en) Magnetic sensor
JP6654367B2 (en) Power supply device and light irradiation system including the same
US7543162B2 (en) CPU frequency regulating circuit
JP2010068369A (en) Switch input circuit
US8754790B2 (en) Input device with ghost key suppression
JP2009122798A (en) Switch input recognition device
JP6099839B2 (en) Input / output equipment
JP2013077912A (en) Switch circuit
JP2007214905A (en) Voltage input circuit for a/d conversion and voltage inputting method for a/d conversion
JP7153856B2 (en) FAILURE DETECTION CIRCUIT AND FAILURE DETECTION METHOD
JP2007250392A (en) Switch signal inputting device, and controller
JP4486653B2 (en) Electronic control unit
JP3182794U (en) Switch input detection circuit
JP3748514B2 (en) Sensor state detection device
JP2006284301A (en) Temperature detector
JP4440214B2 (en) Semiconductor device
JP4710386B2 (en) Power supply
JP2004166201A5 (en)
JP6160534B2 (en) Key matrix circuit
US10038440B2 (en) Electronic apparatus
JP5948261B2 (en) controller
US20090185323A1 (en) Overheat protection circuit
TWI760915B (en) Motor controller
JP4497166B2 (en) Analog input switching circuit
KR101694381B1 (en) External interface circuit