JP2000259296A - Digital input circuit with coupled photocoupler - Google Patents

Digital input circuit with coupled photocoupler

Info

Publication number
JP2000259296A
JP2000259296A JP11061803A JP6180399A JP2000259296A JP 2000259296 A JP2000259296 A JP 2000259296A JP 11061803 A JP11061803 A JP 11061803A JP 6180399 A JP6180399 A JP 6180399A JP 2000259296 A JP2000259296 A JP 2000259296A
Authority
JP
Japan
Prior art keywords
photocoupler
circuit
microcomputer
digital
digital input
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
JP11061803A
Other languages
Japanese (ja)
Inventor
Tatsuyuki Matsui
達之 松井
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.)
Chuo Electronics Co Ltd
Original Assignee
Chuo Electronics Co 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 Chuo Electronics Co Ltd filed Critical Chuo Electronics Co Ltd
Priority to JP11061803A priority Critical patent/JP2000259296A/en
Publication of JP2000259296A publication Critical patent/JP2000259296A/en
Pending legal-status Critical Current

Links

Landscapes

  • Electronic Switches (AREA)

Abstract

PROBLEM TO BE SOLVED: To reduce power consumption of a photocoupler when a digital contact signal, etc., are inputted in a microcomputer by using the photocoupler. SOLUTION: In a digital input circuit formed by connecting a light emitting element LED 1 of a photocoupler PC1 with a digital contact signal circuit 3 and connecting a light receiving eleusent Tr1 of the photocoupler PC1 with a digital input circuit 4 of the microcomputer, a light emitting element LED2 of a photocoupler PC2 is provided on a digital output circuit 5 of the microcomputer, a light receiving element Tr2 of the photocoupler PC2 is provided in serial with the light emitting element LED1 of the digital contact signal circuit 3, the light emitting element LED2 of the photocoupler PC2 is turned on just before a state of a contact signal circuit is read by a digital input port DI of the microcomputer and the light emitting element LED2 of the photocoupler 2 is turned off just after the state of the contact signal circuit is read by the input circuit 4 of the microcomputer.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明はセンサー,リミット
スイッチなどのディジタルの接点信号等をマイクロコン
ピュータに入力するための、フォトカプラを用いた絶縁
型の回路結合素子によりディジタルの接点信号を読み出
すフォトカプラ結合ディジタル入力回路に関するもので
ある。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a photocoupler for reading digital contact signals by an insulated circuit coupling element using a photocoupler for inputting digital contact signals, such as sensors and limit switches, to a microcomputer. The present invention relates to a combined digital input circuit.

【0002】[0002]

【従来の技術】従来のフォトカプラを用いてディジタル
の接点信号等をマイクロコンピュータに入力する回路の
一例を図5に示す。図5において、1はディジタルの接
点信号回路でSWはセンサー,リミットスイッチなどの
スイッチ、BTは直流電源、LEDはフォトカプラPC
の発光素子である。2はマイクロコンピュータのディジ
タル入力回路でTrはフォトカプラPCの出力トランジ
スタなどの受光素子で、マイクロコンピュータのディジ
タル入力ポートDIに接続され、スイッチSWのオン・
オフの状態を読み出す。即ち、この回路はスイッチSW
が閉じると直流電源BTより電流が流れフォトカプラP
Cがオンとなる。これによりディジタル入力ポートDI
はH(High)レベルとなり、スイッチSWが開いて
いるときは、フォトカプラPCは不動作状態であるた
め、ディジタル入力ポートDIはL(Low)レベルと
なる。従って、マイクロコンピュータはスイッチSWの
オン・オフ状態を所要のタイミングで読み出すことがで
きる。
2. Description of the Related Art FIG. 5 shows an example of a circuit for inputting a digital contact signal or the like to a microcomputer using a conventional photocoupler. In FIG. 5, 1 is a digital contact signal circuit, SW is a switch such as a sensor or a limit switch, BT is a DC power supply, and LED is a photocoupler PC.
Is a light emitting element. Reference numeral 2 denotes a digital input circuit of the microcomputer, and Tr denotes a light receiving element such as an output transistor of the photocoupler PC, which is connected to the digital input port DI of the microcomputer and turns on / off the switch SW.
Read off state. That is, this circuit is a switch SW
Is closed, a current flows from the DC power supply BT and the photocoupler P
C turns on. This allows the digital input port DI
Is at H (High) level, and when the switch SW is open, the photocoupler PC is in an inactive state, so that the digital input port DI is at L (Low) level. Therefore, the microcomputer can read the ON / OFF state of the switch SW at a required timing.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、この従
来の回路は、スイッチSWが閉じている間は常にフォト
カプラPCの発光素子LEDを点灯するため、数mAか
ら数十mAの電流が流れ電力を消費しており、装置の低
消費電力化にも拘らずこの部分の電力消費が低減できて
いないという問題がある。本発明は、フォトカプラPC
の一次側の発光素子LEDへの電源供給を、スイッチS
Wのオン・オフの状態をマイクロコンピュータが読み込
む間だけ行うようにすることによって、フォトカプラP
Cに供給する消費電力を大幅に削減するようにしたもの
である。
However, in this conventional circuit, since the light emitting element LED of the photocoupler PC is always turned on while the switch SW is closed, a current of several mA to several tens mA flows to reduce the power. However, there is a problem that the power consumption of this portion cannot be reduced despite the low power consumption of the device. The present invention relates to a photocoupler PC
The power supply to the light emitting element LED on the primary side is
The ON / OFF state of W is performed only while the microcomputer is reading the signal.
The power consumption supplied to C is greatly reduced.

【0004】[0004]

【課題を解決するための手段】本発明のフォトカプラ結
合ディジタル入力回路は、ディジタルの接点信号回路に
第1のフォトカプラの発光素子が接続されると共に、マ
イクロコンピュータのディジタル入力回路に前記第1の
フォトカプラの受光素子が接続され、前記接点信号回路
のオン・オフ状態を前記マイクロコンピュータのディジ
タル入力回路で読み出すフォトカプラ結合ディジタル入
力回路において、前記マイクロコンピュータのディジタ
ル出力回路に第2のフォトカプラの発光素子を設けると
共に、前記ディジタルの接点信号回路の前記第1のフォ
トカプラの発光素子と直列に前記第2のフォトカプラの
受光素子を設け、前記マイクロコンピュータのディジタ
ル入力回路が前記接点信号回路のオン・オフ状態を読み
出す直前に前記第2のフォトカプラの発光素子をオン状
態にし、前記マイクロコンピュータのディジタル入力回
路が前記接点信号回路のオン・オフ状態を読み出した直
後に前記第2のフォトカプラの発光素子をオフ状態とす
るようにしたことを特徴とするものである。
A photocoupler-coupled digital input circuit according to the present invention has a light-emitting element of a first photocoupler connected to a digital contact signal circuit, and the first input circuit connected to a digital input circuit of a microcomputer. A photocoupler-coupled digital input circuit to which a light receiving element of a photocoupler is connected and reads the on / off state of the contact signal circuit by a digital input circuit of the microcomputer, wherein a second photocoupler is connected to a digital output circuit of the microcomputer. And a light receiving element of the second photocoupler is provided in series with a light emitting element of the first photocoupler of the digital contact signal circuit, and a digital input circuit of the microcomputer is provided with the contact signal circuit. Immediately before reading the on / off state of The light emitting element of the photocoupler is turned on, and the light emitting element of the second photocoupler is turned off immediately after the digital input circuit of the microcomputer reads the on / off state of the contact signal circuit. It is characterized by the following.

【0005】[0005]

【発明の実施の形態】図1は本発明のフォトカプラ結合
ディジタル入力回の一実施例を示す回路図であり、3は
ディジタルの接点信号回路でSWはセンサー,リミット
スイッチなどのスイッチ、BTは直流電源、LED1は
フォトカプラPC1の発光素子、Tr2はフォトカプラ
PC2の出力トランジスタなどの受光素子である。4は
マイクロコンピュータのディジタル入力回路でTr1は
フォトカプラPC1の出力トランジスタなどの受光素子
で、マイクロコンピュータのディジタル入力ポートDI
に接続され、スイッチSWのオン・オフ状態を読み出す
ものである。5はマイクロコンピュータのディジタル出
力回路でLED2はフォトカプラPC2の発光素子で、
マイクロコンピュータのディジタル出力ポートDOに接
続され、マイクロコンピュータがスイッチSWのオン・
オフ状態を読み出すときの短時間だけ駆動されるもので
ある。
DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 is a circuit diagram showing one embodiment of a photocoupler-coupled digital input circuit according to the present invention, wherein 3 is a digital contact signal circuit, SW is a switch such as a sensor or limit switch, and BT is a switch. A DC power supply, LED1 is a light emitting element of the photocoupler PC1, and Tr2 is a light receiving element such as an output transistor of the photocoupler PC2. Numeral 4 denotes a digital input circuit of the microcomputer, Tr1 denotes a light receiving element such as an output transistor of the photocoupler PC1, and a digital input port DI of the microcomputer.
To read the ON / OFF state of the switch SW. 5 is a digital output circuit of the microcomputer, LED2 is a light emitting element of the photocoupler PC2,
The microcomputer is connected to the digital output port DO of the microcomputer, and the microcomputer turns on / off the switch SW.
It is driven only for a short time when the off state is read.

【0006】次に図1の回路図の動作を説明する。通常
状態においては、マイクロコンピュータに接続されてい
るディジタル出力ポートDOをLレベルにしておきフォ
トカプラPC2をオフ状態にしておく。従って、接点信
号回路3のスイッチSWが閉じていても直流電源BT
は、フォトカプラPC1の発光素子LED1に電力は供
給されない。
Next, the operation of the circuit diagram of FIG. 1 will be described. In the normal state, the digital output port DO connected to the microcomputer is set at the L level, and the photocoupler PC2 is turned off. Therefore, even if the switch SW of the contact signal circuit 3 is closed, the DC power supply BT
Does not supply power to the light emitting element LED1 of the photocoupler PC1.

【0007】マイクロコンピュータが接点信号回路3の
スイッチSWのオン・オフの動作状態を読み出す際、即
ち図2に示したフローチャートのように、読み出し開始
直前のタイミングに合わせて先ずディジタル出力ポート
DOをHレベルにする。これによりフォトカプラPC2
がオンになり、スイッチSWのオン・オフ状態をディジ
タル入力ポートDIが読み出すことができる。即ち、フ
ォトカプラPC2がオンこのとき、スイッチSWが閉じ
ていればフォトカプラPC1に電流が流れ、マイクロコ
ンピュータのディジタル入力ポートDIはHレベルにな
る。また、スイッチSWが開いていればフォトカプラP
C1に電流が流れず、ディジタル入力ポートDIはLレ
ベルとなる。そして、マイクロコンピュータはその状態
を読み出すことができる。
When the microcomputer reads the on / off operation state of the switch SW of the contact signal circuit 3, that is, as shown in the flowchart of FIG. To level. Thereby, the photocoupler PC2
Is turned on, and the digital input port DI can read the on / off state of the switch SW. That is, at this time, when the switch SW is closed, a current flows through the photocoupler PC1, and the digital input port DI of the microcomputer goes to the H level. If the switch SW is open, the photocoupler P
No current flows through C1, and the digital input port DI goes to L level. Then, the microcomputer can read the state.

【0008】この読み出しが終わると、マイクロコンピ
ュータはディジタル出力ポートDOをLレベルに戻すも
ので、所要のサンプリング周期によりスイッチSWのオ
ン・オフの動作状態を読み出すことができる。このディ
ジタル出力ポートDOのLレベルへの移行によりフォト
カプラPC2はオフとなり、スイッチSWが閉じていて
も接点信号回路3には直流電源BTの電流は流れなくな
る。このように、マイクロコンピュータがスイッチSW
のオン・オフの状態を読み出す瞬間をカバーする短時間
だけ接点信号回路3に電流を流すようにしているため、
消費電力を著しく削減することができるものである。
When the reading is completed, the microcomputer returns the digital output port DO to the L level, and can read the ON / OFF operating state of the switch SW at a required sampling period. The transition of the digital output port DO to the L level turns off the photocoupler PC2, and the current of the DC power supply BT does not flow through the contact signal circuit 3 even when the switch SW is closed. As described above, the microcomputer operates the switch SW.
Current flows through the contact signal circuit 3 only for a short time to cover the moment of reading the ON / OFF state of
Power consumption can be significantly reduced.

【0009】この接点信号回路の発光素子LED1に供
給される消費電力について、従来のディジタル入力回路
と本発明の同回路とを比較すると例えば図3に示すよう
になる。図3(a)は従来の接点信号回路1の電流供給
状態であり、ディジタル入力ポートDIの読み出しのサ
ンプリング周期を50msとした場合、スイッチSWの
オン状態中のフォトカプラPCの発光素子LEDへの電
力供給は、1周期当りの平均は50msとなる。
The power consumption supplied to the light emitting element LED1 of the contact signal circuit is, for example, as shown in FIG. 3 when a conventional digital input circuit is compared with the same circuit of the present invention. FIG. 3A shows a current supply state of the conventional contact signal circuit 1. When the sampling cycle for reading the digital input port DI is 50 ms, the current supplied to the light emitting element LED of the photocoupler PC while the switch SW is on is shown. The power supply averages 50 ms per cycle.

【0010】これに対して、本発明の場合は、図3
(b)に示すように、ディジタル入力ポートDIの読み
出しをカバーする期間だけディジタル出力ポートDOを
Hレベルにしておけばよい。従って、フォトカプラPC
1の発光素子LED1に電力を供給する期間は、ディジ
タル出力ポートDOのHレベルに対応する期間だけよ
く、ディジタル出力ポートDOのHレベルの期間を例え
ば200μsとすれば、1周期当りの平均は200μs
となり、フォトカプラPC1への電力供給期間は従来の
回路に比較し500分の1となり、消費電力が大幅に削
減されることになる。
On the other hand, in the case of the present invention, FIG.
As shown in (b), the digital output port DO may be set to the H level only during the period covering the reading of the digital input port DI. Therefore, the photocoupler PC
The period during which power is supplied to one light emitting element LED1 is sufficient only for the period corresponding to the H level of the digital output port DO. If the H level period of the digital output port DO is, for example, 200 μs, the average per cycle is 200 μs.
The power supply period to the photocoupler PC1 is 1/500 of that of the conventional circuit, and the power consumption is greatly reduced.

【0011】次に本発明の他の実施例を図4に基づいて
説明する。図4は接点信号回路3の直流電源BTの極性
のプラス・マイナスが逆に接続された場合でも対応でき
るようにしたもので、フォトカプラPC1の発光素子L
ED1とフォトカプラPC2の受光素子Tr2との直列
回路に対して、並列に極性変換用のダイオードD1〜D
4をブリッジ回路として接続したものである。これによ
り直流電源BTの極性がフォトカプラPC1,PC2に
対してプラス・マイナスいずれの場合も、フォトカプラ
PC1の発光素子LED1及びフォトカプラPC2のト
ランジスタTr2に動作方向の電流を流すことができ
る。
Next, another embodiment of the present invention will be described with reference to FIG. FIG. 4 shows a configuration in which the case where the polarity of the DC power supply BT of the contact signal circuit 3 is connected in the opposite direction is reversed, and the light emitting element L of the photocoupler PC1 is provided.
A diode D1-D for polarity conversion is connected in parallel to a series circuit of the ED1 and the light receiving element Tr2 of the photocoupler PC2.
4 is connected as a bridge circuit. Thus, regardless of whether the polarity of the DC power supply BT is positive or negative with respect to the photocouplers PC1 and PC2, a current in the operation direction can flow through the light emitting element LED1 of the photocoupler PC1 and the transistor Tr2 of the photocoupler PC2.

【0012】[0012]

【発明の効果】以上詳細に説明したように、従来はディ
ジタルの接点信号の動作状態を読み出すために、接点が
オン状態の場合は常にフォトカプラの発光素子に電流を
流していたものを、本発明はディジタルの接点信号の動
作状態を読み出すときだけの、極めて短い時間だけフォ
トカプラの発光素子に電流を流すことにより、装置の低
消費電力化を実現することができたもので、装置の経済
化,小形化に大きく寄与するものである。
As described in detail above, in order to read out the operation state of the digital contact signal, the current is always applied to the light-emitting element of the photocoupler when the contact is on. According to the invention, the power consumption of the device can be reduced by applying a current to the light emitting element of the photocoupler for an extremely short time only when reading out the operation state of the digital contact signal. It greatly contributes to downsizing and downsizing.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明のフォトカプラ結合ディジタル入力回路
の一実施例を示す回路図である。
FIG. 1 is a circuit diagram showing an embodiment of a photocoupler-coupled digital input circuit according to the present invention.

【図2】本発明のフォトカプラ結合ディジタル入力回路
の動作を説明するためのフローチャートである。
FIG. 2 is a flowchart for explaining the operation of the photocoupler-coupled digital input circuit of the present invention.

【図3】従来回路と本発明回路とのフォトカプラの消費
電力を比較するための動作波形図である。
FIG. 3 is an operation waveform diagram for comparing the power consumption of the photocoupler between the conventional circuit and the circuit of the present invention.

【図4】本発明のフォトカプラ結合ディジタル入力回路
の他の実施例を示す回路図である。
FIG. 4 is a circuit diagram showing another embodiment of the photocoupler-coupled digital input circuit of the present invention.

【図5】従来のフォトカプラ結合ディジタル入力回路の
一例を示す回路図である。
FIG. 5 is a circuit diagram showing an example of a conventional photocoupler-coupled digital input circuit.

【符号の説明】[Explanation of symbols]

1,3 ディジタルの接点信号回路 2,4 接点信号のマイクロコンピュータへの入力回路 5 マイクロコンピュータへの出力回路 SW スイッチ BT 直流電源 PC,PC1,PC2 フォトカプラ LED,LED1,LED2 発光素子 Tr,Tr1,Tr2 受光素子 DI ディジタル入力ポート DO ディジタル出力ポート D1〜D4 ダイオード 1,3 Digital contact signal circuit 2,4 Input circuit to microcomputer of contact signal 5 Output circuit to microcomputer SW switch BT DC power supply PC, PC1, PC2 Photocoupler LED, LED1, LED2 Light emitting element Tr, Tr1, Tr2 Light receiving element DI Digital input port DO Digital output port D1 to D4 Diode

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 ディジタルの接点信号回路に第1のフォ
トカプラの発光素子が接続されると共に、マイクロコン
ピュータのディジタル入力回路に前記第1のフォトカプ
ラの受光素子が接続され、前記接点信号回路のオン・オ
フ状態を前記マイクロコンピュータのディジタル入力回
路で読み出すフォトカプラ結合ディジタル入力回路にお
いて、 前記マイクロコンピュータのディジタル出力回路に第2
のフォトカプラの発光素子を設けると共に、 前記ディジタルの接点信号回路の前記第1のフォトカプ
ラの発光素子と直列に前記第2のフォトカプラの受光素
子を設け、 前記マイクロコンピュータのディジタル入力回路が前記
接点信号回路のオン・オフ状態を読み出す直前に前記第
2のフォトカプラの発光素子をオン状態にし、前記マイ
クロコンピュータのディジタル入力回路が前記接点信号
回路のオン・オフ状態を読み出した直後に前記第2のフ
ォトカプラの発光素子をオフ状態とするようにしたこと
を特徴とするフォトカプラ結合ディジタル入力回路。
A light emitting element of a first photocoupler is connected to a digital contact signal circuit, and a light receiving element of the first photocoupler is connected to a digital input circuit of a microcomputer. A photocoupler-coupled digital input circuit for reading on / off states by a digital input circuit of the microcomputer, wherein a second digital output circuit is provided to the microcomputer.
And a light receiving element of the second photocoupler is provided in series with the light emitting element of the first photocoupler of the digital contact signal circuit, and the digital input circuit of the microcomputer is Immediately before reading the on / off state of the contact signal circuit, the light emitting element of the second photocoupler is turned on, and immediately after the digital input circuit of the microcomputer reads the on / off state of the contact signal circuit, the second A photocoupler-coupled digital input circuit, wherein the light-emitting element of the second photocoupler is turned off.
【請求項2】 前記ディジタルの接点信号回路の前記第
1のフォトカプラの発光素子と、前記第2のフォトカプ
ラの受光素子との直列回路に対して並列に極性変換用の
ダイオードブリッジ回路を接続し、前記接点信号回路の
直流電源の極性に拘らず前記第1及び第2のフォトカプ
ラが動作するようにした請求項1に記載のフォトカプラ
結合ディジタル入力回路。
2. A diode bridge circuit for polarity conversion is connected in parallel to a series circuit of the light emitting element of the first photocoupler and the light receiving element of the second photocoupler of the digital contact signal circuit. 2. The photocoupler-coupled digital input circuit according to claim 1, wherein said first and second photocouplers operate regardless of the polarity of the DC power supply of said contact signal circuit.
JP11061803A 1999-03-09 1999-03-09 Digital input circuit with coupled photocoupler Pending JP2000259296A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11061803A JP2000259296A (en) 1999-03-09 1999-03-09 Digital input circuit with coupled photocoupler

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11061803A JP2000259296A (en) 1999-03-09 1999-03-09 Digital input circuit with coupled photocoupler

Publications (1)

Publication Number Publication Date
JP2000259296A true JP2000259296A (en) 2000-09-22

Family

ID=13181627

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11061803A Pending JP2000259296A (en) 1999-03-09 1999-03-09 Digital input circuit with coupled photocoupler

Country Status (1)

Country Link
JP (1) JP2000259296A (en)

Similar Documents

Publication Publication Date Title
EP1246362A3 (en) Output circuit of semiconductor circuit with power consumption reduced
KR920020351A (en) IC for Image Sensor
JP2000259296A (en) Digital input circuit with coupled photocoupler
US6717788B2 (en) Temperature-protected semiconductor circuit configuration
WO2002027904A3 (en) Controller for switch-mode circuitry
US5140622A (en) Data transmission system with double lines
JP2804339B2 (en) Transmission unit
JP2760344B2 (en) Illuminated switch
JPH05158429A (en) Information transmission circuit
ATE529934T1 (en) CONTROL DEVICE FOR AN ENGINE STARTER
JP2000283754A (en) Sensor system
ITMI20070023A1 (en) LED PILOT DEVICE WITH SWITCHABLE MODE OF SELF-TUNING E-O
US6327057B1 (en) Contact type linear image sensor
EP0942592A2 (en) Solid state image pickup device
JPH0533093Y2 (en)
JP2534910Y2 (en) Digital device protection circuit
SU1401599A1 (en) On-off flip-flop
KR920004059Y1 (en) Circuit to switch input/output mode and alarm
DE60319696D1 (en) SEMICONDUCTOR MEMORY CIRCUIT WITH TEST MODE FOR MONITORING INTERNAL TIME CONTROL SIGNALS TO INPUT / OUTPUT TERMINALS
JPH0625060Y2 (en) Electronic switch
JPS61263175A (en) Driving circuit for light-emitting diode
JPH10308987A (en) Power saving wireless remote controller
JPH11202015A (en) Malfunction detecting circuit for switching power source
JPH0846504A (en) Relay
JP2005064929A (en) Contact input circuit