JP2002341067A - Electronic control device and off-period measurement method of power switch - Google Patents

Electronic control device and off-period measurement method of power switch

Info

Publication number
JP2002341067A
JP2002341067A JP2001149408A JP2001149408A JP2002341067A JP 2002341067 A JP2002341067 A JP 2002341067A JP 2001149408 A JP2001149408 A JP 2001149408A JP 2001149408 A JP2001149408 A JP 2001149408A JP 2002341067 A JP2002341067 A JP 2002341067A
Authority
JP
Japan
Prior art keywords
control unit
capacitor
power
turned
power switch
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
JP2001149408A
Other languages
Japanese (ja)
Inventor
Mikio Teramura
幹夫 寺村
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.)
Denso Corp
Original Assignee
Denso Corp
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 Denso Corp filed Critical Denso Corp
Priority to JP2001149408A priority Critical patent/JP2002341067A/en
Publication of JP2002341067A publication Critical patent/JP2002341067A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To measure a period wherein a power switch is kept off by a control part with a simple structure and without consuming much power, in an electronic control device. SOLUTION: In an ECU 1 having a control part such as a microcomputer 9 operated by feeding power from a battery 3 when an IGSW 7 is on, the microcomputer 9 clears an involatile counter and charges a capacitor 17 to a specified value by a charging circuit 21 when the IGSW 7 is on. While the IGSW 7 is off, an operation is repeated such that a voltage monitoring circuit 23 turns on a power feeding relay 5 every time the voltage Vc of the capacitor 17 drops to Vth (< the specified value), thereby the microcomputer 23 is operated to add one to the counter and turns off the relay 5 after charging the capacitor 17 to the specified value. When the IGSW 7 is turned on, the microcomputer 9 obtains the off period of the IGSW 7 from the counter value before the counter is cleared.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、電源スイッチがオ
ンされている時にバッテリから電力が供給されて動作す
る制御部を有した電子制御装置において、その制御部に
て、電源スイッチがオフされていた時間を計測するため
の技術に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an electronic control device having a control unit which operates by being supplied with power from a battery when a power switch is turned on, wherein the control unit turns off the power switch. The present invention relates to a technique for measuring time spent.

【0002】[0002]

【従来の技術】従来より、例えば自動車のエンジンを制
御する電子制御装置においては、エンジン制御用の様々
な処理や動作を行う制御部として、マイクロコンピュー
タ(以下、マイコンという)を中心とする各種電子回路
(A/D変換器や信号の波形整形回路など)が設けられ
ており、その制御部は、電源スイッチとしてのイグニッ
ションスイッチがオンされている時に、バッテリから電
力が供給されて動作するようになっている。
2. Description of the Related Art Conventionally, for example, in an electronic control device for controlling an engine of an automobile, various electronic devices including a microcomputer (hereinafter referred to as a microcomputer) are mainly used as a control unit for performing various processes and operations for controlling the engine. A circuit (such as an A / D converter or a signal waveform shaping circuit) is provided, and its control unit operates such that power is supplied from a battery when an ignition switch as a power switch is turned on. Has become.

【0003】そして、近年、この種の電子制御装置にお
いては、イグニッションスイッチがオフされていた時間
(即ち、当該電子制御装置に実質的な動作電力が供給さ
れていなかった時間であり、以下、電源オフ時間ともい
う)を制御部にて把握したい、という要望がある。
In recent years, in this type of electronic control device, the time during which the ignition switch is turned off (that is, the time during which substantial operating power is not supplied to the electronic control device, There is a demand that the control unit knows the off time.

【0004】例えば、エンジンの冷却水によって何等か
の対象物を温める蓄熱システムを考えた場合、イグニッ
ションスイッチがオフであれば、エンジンが停止してい
るということであるため、そのイグニッションスイッチ
のオフ時間を計測することで、エンジンの冷却水温、延
いては上記対象物の温度が、どの程度まで低下している
かを予測することができる。
For example, in the case of a heat storage system in which an object is heated by the cooling water of the engine, if the ignition switch is turned off, it means that the engine is stopped. By measuring the temperature of the engine, it is possible to predict how much the temperature of the cooling water of the engine, and consequently, the temperature of the object has dropped.

【0005】そこで、制御部にて電源オフ時間を計測す
るための方法としては、例えば、電子制御装置の内部又
は外部に、イグニッションスイッチがオフされている時
間を計測する時計を備えた計時装置を設けると共に、そ
の計時装置にバッテリから電力を常時供給しておき、イ
グニッションスイッチがオンされて当該電子制御装置の
制御部が動作を開始した時に、該制御部が上記計時装置
から計時結果を通信によって受け取る、といったものが
考えられる。
Therefore, as a method for measuring the power-off time by the control unit, for example, a time-measuring device provided with a clock for measuring the time when the ignition switch is off is provided inside or outside the electronic control device. Along with the provision, the power is always supplied from the battery to the timing device, and when the ignition switch is turned on and the control unit of the electronic control device starts operating, the control unit communicates the timing result from the timing device by communication. It is possible to receive it.

【0006】[0006]

【発明が解決しようとする課題】しかしながら、上記の
方法では、計時装置だけでなく、その計時装置と制御部
との間でデータ通信を行うための付属回路も必要となる
ため、電子制御装置の内外におけるハードウェアが大幅
に肥大化してしまう。そして、制御部が実行するソフト
ウェアの面においても、計時装置からデータを入手する
ための通信ソフトが増えることとなり、その結果、ソフ
トウェアの複雑化を招いてしまう。
However, in the above-described method, not only the clock device but also an auxiliary circuit for performing data communication between the clock device and the control unit is required. The hardware inside and outside will be greatly enlarged. Also, in the software executed by the control unit, communication software for acquiring data from the timing device increases, and as a result, the software becomes complicated.

【0007】そして更に、時計を構成するには、クロッ
ク生成する発振回路が必要となるため、消費電力が比較
的大きくなり、バッテリ上がりを招いてしまう可能性が
ある。また、時計を用いて時間を計測する方法は、精度
的には確実であり、1分1秒単位で計測するには適して
いるが、計測精度がそれほど必要でない場合(例えば1
時間単位や1日単位での計測で十分な場合)には、過剰
なシステムとなってしまう。
[0007] Further, in order to construct a timepiece, an oscillation circuit for generating a clock is required, so that the power consumption becomes relatively large and the battery may run out. A method of measuring time using a clock is reliable in terms of accuracy and is suitable for measurement in units of one minute and one second, but when measurement accuracy is not so necessary (for example, 1
If measurement in units of hours or days is sufficient), an excessive system will result.

【0008】尚、制御部に動作電力を常時供給しておけ
ば、イグニッションスイッチのオフ時間を簡単に計測で
きるが、そのようにしたのでは、イグニッションスイッ
チがオフされている時のバッテリの電力消費が非常に大
きくなってしまう上に、電子制御装置に実質的な動作電
力が供給されていない時間である電源オフ時間の計測、
という本来の目的からも外れてしまう。
If the operating power is constantly supplied to the control unit, the off time of the ignition switch can be easily measured. However, in such a case, the power consumption of the battery when the ignition switch is turned off is reduced. In addition to the fact that becomes very large, the measurement of the power-off time, which is the time when the substantial operating power is not supplied to the electronic control device,
It deviates from the original purpose.

【0009】本発明は、こうした問題に鑑みなされたも
のであり、電源スイッチがオンされている時にバッテリ
から電力が供給されて動作する制御部を有した電子制御
装置において、簡単な構成で、且つ、バッテリの電力を
大きく消費することなく、電源スイッチがオフされてい
た時間を制御部にて計測できるようにすることを目的と
している。
SUMMARY OF THE INVENTION The present invention has been made in view of such a problem, and an electronic control device having a control unit that operates by being supplied with power from a battery when a power switch is turned on has a simple configuration and It is another object of the present invention to enable the control unit to measure the time during which the power switch is off without consuming a large amount of battery power.

【0010】[0010]

【課題を解決するための手段及び発明の効果】上記目的
を達成するためになされた請求項1記載の電源スイッチ
のオフ時間計測方法は、電源スイッチがオンされている
時にバッテリから電力が供給されて動作する制御部を有
した電子制御装置において、その電源スイッチがオフさ
れていた時間を制御部で計測するためのものである。
According to a first aspect of the present invention, there is provided a method of measuring an off time of a power switch, wherein power is supplied from a battery when the power switch is turned on. In an electronic control device having a control unit that operates in a controlled manner, the control unit measures the time during which the power switch is turned off.

【0011】そして、このオフ時間計測方法では、 (1):まず、電源スイッチがオンされている間に、制
御部に、不揮発性のカウンタの値をクリアさせておくと
共に、コンデンサを該コンデンサの充電電圧が所定の規
定値となるように充電させておく。尚、以下の説明にお
いて、このような充電のことを「コンデンサを規定値ま
で充電する」ともいう。
In this off-time measuring method, (1): First, while the power switch is turned on, the control unit clears the value of the non-volatile counter and sets the capacitor to the value of the capacitor. The battery is charged so that the charging voltage becomes a predetermined specified value. In the following description, such charging is also referred to as “charging a capacitor to a specified value”.

【0012】(2):次に、電源スイッチがオフされて
から該電源スイッチが次にオンされるまでの間(つま
り、電源スイッチがオフされている間)は、前記コンデ
ンサの充電電圧が前記規定値よりも小さい所定のしきい
値まで低下する毎に、以下の手順を行う。
(2) Next, from the time when the power switch is turned off to the time when the power switch is turned on next (that is, while the power switch is turned off), the charging voltage of the capacitor is maintained at the voltage. The following procedure is performed each time the voltage drops to a predetermined threshold value smaller than the specified value.

【0013】即ち、コンデンサの充電電圧がしきい値ま
で低下すると、まず、制御部へバッテリからの電力を供
給して、該制御部に、前記カウンタをカウントアップさ
せると共に、前記コンデンサを充電させる。そして、コ
ンデンサの充電電圧が前記規定値に達したら、制御部へ
の電力供給を停止する。
That is, when the charging voltage of the capacitor falls to the threshold value, first, power from the battery is supplied to the control unit, and the control unit causes the counter to count up and charge the capacitor. When the charging voltage of the capacitor reaches the specified value, the power supply to the control unit is stopped.

【0014】(3):そして、電源スイッチが再びオン
された時に、制御部が前記カウンタの値をクリアする前
に、該制御部に、前記カウンタの値に基づき電源スイッ
チがオフされていた時間を算出させる。つまり、電源ス
イッチがオンされた時のカウンタの値は、電源スイッチ
がオフされている間にコンデンサが充放電された回数を
表しており、また、放電によりコンデンサの充電電圧が
規定値からしきい値まで低下するのに要する時間(放電
時間)Thと、充電によりコンデンサの充電電圧がしき
い値から規定値まで上昇するのに要する時間(充電時
間)Tjとは、コンデンサの充放電特性によって決まる
ため、電源スイッチがオンされた時のカウンタの値か
ら、電源スイッチがオフされていた大体の時間を求める
ことができる。例えば、電源スイッチがオンされた時の
カウンタの値が、N(但し、Nは1以上の整数)であっ
たとすると、電源スイッチがオフされていた時間Tof
fは、「Th+(N−1)×(Tj+Th)」から「T
h+N×(Tj+Th)」までの範囲内の時間であると
算出することができる。
(3): When the power switch is turned on again, before the control unit clears the value of the counter, the control unit informs the control unit of the time during which the power switch was turned off based on the value of the counter. Is calculated. In other words, the value of the counter when the power switch is turned on represents the number of times the capacitor has been charged and discharged while the power switch is turned off, and the discharge voltage causes the charging voltage of the capacitor to exceed a specified value. The time required to decrease to a value (discharge time) Th and the time required for the charge voltage of the capacitor to rise from a threshold value to a specified value by charging (charge time) Tj are determined by the charge / discharge characteristics of the capacitor. Therefore, the approximate time during which the power switch has been turned off can be obtained from the value of the counter when the power switch is turned on. For example, assuming that the value of the counter when the power switch is turned on is N (where N is an integer of 1 or more), the time Tof when the power switch is turned off
f is changed from “Th + (N−1) × (Tj + Th)” to “T
h + N × (Tj + Th) ”.

【0015】このような請求項1のオフ時間計測方法に
よれば、電源スイッチがオフされている期間中に、制御
部へ常時電力を供給する必要がなく、コンデンサの充電
電圧が規定値からしきい値まで低下する毎に、そのコン
デンサを規定値まで充電する間だけ、制御部へ電力を供
給すれば良い。また、電力を常時供給しなければならな
いのは、コンデンサの充電電圧がしきい値まで低下した
ことを検知して制御部にバッテリからの電力を供給させ
るための手段だけであり、そのような手段の消費電力
は、時計を構成する回路(例えばクロック生成する発振
回路など)よりも小さく抑えることができる。
According to the off-time measuring method of the first aspect, it is not necessary to constantly supply power to the control unit while the power switch is off, and the charging voltage of the capacitor is reduced to a specified value. Each time the voltage drops to the threshold value, power may be supplied to the control unit only while the capacitor is charged to the specified value. In addition, power must always be supplied only by means for detecting that the charging voltage of the capacitor has dropped to the threshold value and causing the control unit to supply power from the battery. Can be suppressed to be smaller than that of a circuit constituting a timepiece (for example, an oscillation circuit for generating a clock).

【0016】そして更に、請求項1のオフ時間計測方法
によれば、制御部が他の装置とデータ通信を行うための
回路や複雑な通信ソフトも必要が無い。よって、このオ
フ時間計測方法によれば、簡単な構成で、且つ、バッテ
リの電力を大きく消費することなく、電源スイッチがオ
フされていた時間を制御部にて計測することができるよ
うになる。
Further, according to the off-time measuring method of the first aspect, there is no need for a circuit for the controller to perform data communication with another device or complicated communication software. Therefore, according to this off-time measuring method, the control unit can measure the time during which the power switch is off with a simple configuration and without consuming a large amount of battery power.

【0017】ところで、請求項1のオフ時間計測方法
は、請求項3記載の電子制御装置によって実施すること
ができる。即ち、まず、請求項3記載の電子制御装置
は、電源スイッチがオンされている時にバッテリから電
力が供給されて動作する制御部に加えて、電源スイッチ
のオフ時にも制御部にバッテリからの電力を適宜供給さ
せるための駆動手段と、制御部によってバッテリからの
電力を元に充電されるコンデンサと、そのコンデンサの
充電電圧を監視するコンデンサ電圧監視手段とを備えて
いる。
The off-time measuring method according to claim 1 can be implemented by the electronic control device according to claim 3. That is, first, in addition to the control unit that is operated by supplying power from the battery when the power switch is turned on, the electronic control device according to claim 3 supplies the control unit with the power from the battery even when the power switch is turned off. , A capacitor that is charged by the control unit based on the power from the battery, and a capacitor voltage monitoring unit that monitors the charging voltage of the capacitor.

【0018】そして、駆動手段は、制御部にバッテリか
らの電力を供給するための当該電子制御装置の端子とバ
ッテリとを結ぶ給電ラインに設けられたスイッチング手
段であって、オンすることにより該給電ラインを接続さ
せて(即ち、制御部にバッテリからの電力を供給させ
て)制御部を動作させる給電用スイッチング手段を、外
部からの駆動指令に応じてオンさせる。
The driving means is switching means provided on a power supply line connecting a terminal of the electronic control unit and the battery for supplying electric power from the battery to the control unit. The power supply switching means for operating the control unit by connecting the line (that is, causing the control unit to supply power from the battery) is turned on in response to a drive command from the outside.

【0019】また、コンデンサ電圧監視手段は、上記コ
ンデンサの充電電圧が所定のしきい値まで低下したこと
を検知すると、駆動手段に上記駆動指令を出力して、該
駆動手段に給電用スイッチング手段をオンさせる。尚、
給電用スイッチング手段がオンすれば、上記給電ライン
が接続されるため、制御部がバッテリからの電力を受け
て動作することとなる。
When the capacitor voltage monitoring means detects that the charging voltage of the capacitor has dropped to a predetermined threshold value, the capacitor voltage monitoring means outputs the drive command to the driving means, and the power supply switching means is connected to the driving means. Turn on. still,
When the power supply switching means is turned on, the power supply line is connected, so that the control unit operates by receiving power from the battery.

【0020】更に、請求項3の電子制御装置において、
制御部は、電源スイッチがオンされたことにより当該制
御部が動作したか否かを判定して、肯定判定したなら
ば、上記コンデンサを、該コンデンサの充電電圧が前記
しきい値よりも大きい所定の規定値となるように充電す
る第1の充電制御手段と、前記電源スイッチのオンでは
なくコンデンサ電圧監視手段の作用により当該制御部が
動作したか否かを判定して、肯定判定したならば、駆動
手段に上記駆動指令を出力して給電用スイッチング手段
のオン状態を維持すると共に、不揮発性のカウンタをカ
ウントアップし、更に、上記コンデンサを充電して、該
コンデンサの充電電圧が前記規定値に達すると、駆動手
段への駆動指令の出力を停止して給電用スイッチング手
段をオフさせる第2の充電制御手段とを備えている。そ
して、制御部は、第1の充電制御手段により肯定判定さ
れた場合に、前記カウンタの値に基づき電源スイッチが
オフされていた時間を算出して、その後、該カウンタの
値をクリアするように構成されている。
Further, in the electronic control device according to claim 3,
The control unit determines whether or not the control unit has been operated by turning on the power switch. If the determination is affirmative, the control unit determines that the capacitor has a predetermined charge voltage that is higher than the threshold value. The first charge control means for charging so as to have the prescribed value, and the operation of the capacitor voltage monitoring means instead of turning on the power switch to determine whether or not the control section has been operated. Outputting the drive command to the drive means, maintaining the ON state of the power supply switching means, counting up a non-volatile counter, and further charging the capacitor, and the charging voltage of the capacitor becomes the specified value. And a second charge control means for stopping the output of the drive command to the drive means and turning off the power supply switching means. Then, when the first charging control unit makes an affirmative determination, the control unit calculates the time during which the power switch is off based on the value of the counter, and then clears the value of the counter. It is configured.

【0021】このような請求項3の電子制御装置におい
て、電源スイッチがオンされて制御部が動作すると、そ
の制御部の第1の充電制御手段が、電源スイッチのオン
により当該制御部が動作したと肯定判定して、コンデン
サを規定値まで充電することとなる。また、制御部は、
第1の充電制御手段で肯定判定した場合、不揮発性のカ
ウンタの値をクリアすることとなる。
In the electronic control device of the third aspect, when the power switch is turned on and the control unit operates, the first charging control means of the control unit operates the control unit by turning on the power switch. And the capacitor is charged to the specified value. Also, the control unit
If the first charge control means makes a positive determination, the value of the nonvolatile counter is cleared.

【0022】このため、制御部は、電源スイッチがオン
されている間に、カウンタの値をクリアすると共に、コ
ンデンサを規定値まで充電しておくこととなり、こうし
た動作により、上記(1)の手順が実現される。その
後、電源スイッチがオフされると、制御部への電力供給
が停止されて、コンデンサが放電する。
For this reason, the control unit clears the counter value and charges the capacitor to the specified value while the power switch is turned on. Is realized. Thereafter, when the power switch is turned off, the power supply to the control unit is stopped, and the capacitor is discharged.

【0023】そして、コンデンサの充電電圧がしきい値
まで低下すると、コンデンサ電圧監視手段が、そのこと
を検知して、駆動手段に駆動指令を出力し、該駆動手段
に給電用スイッチング手段をオンさせる。すると、上記
給電ラインが接続され、制御部がバッテリからの電力を
受けて動作することとなる。
When the charging voltage of the capacitor drops to the threshold value, the capacitor voltage monitoring means detects this, outputs a drive command to the drive means, and turns on the power supply switching means. . Then, the power supply line is connected, and the control unit operates by receiving power from the battery.

【0024】そして、このようにコンデンサの充電電圧
がしきい値まで低下して制御部が動作すると、その制御
部の第2の充電制御手段が、電源スイッチのオンではな
くコンデンサ電圧監視手段の作用により当該制御部が動
作したと肯定判定して、駆動手段に駆動指令を出力する
ことにより給電用スイッチング手段のオン状態(つま
り、当該制御部にバッテリからの電力が供給されている
状態)を維持すると共に、カウンタをカウントアップ
し、更に、コンデンサを充電して、そのコンデンサの充
電電圧が規定値に達すると、駆動手段への駆動指令の出
力を停止して給電用スイッチング手段をオフさせる。
尚、この第2の充電制御手段による駆動指令の出力が停
止されると給電用スイッチング手段がオフするのは、そ
の時点で、コンデンサの充電電圧はしきい値よりも大き
い規定値となっており、コンデンサ電圧監視手段から駆
動手段への駆動指令の出力は既に終了しているからであ
る。
When the charging voltage of the capacitor drops to the threshold value and the control unit operates, the second charging control means of the control unit operates not by turning on the power switch but by the function of the capacitor voltage monitoring means. Makes a positive determination that the control unit has operated, and outputs a drive command to the drive unit to maintain the ON state of the power supply switching unit (that is, a state in which power is supplied from the battery to the control unit). At the same time, the counter is counted up, and the capacitor is charged. When the charged voltage of the capacitor reaches a specified value, the output of the drive command to the drive unit is stopped and the power supply switching unit is turned off.
Note that the power supply switching means is turned off when the output of the drive command by the second charge control means is stopped. At that time, the charging voltage of the capacitor has a specified value larger than the threshold value. This is because the output of the drive command from the capacitor voltage monitoring means to the driving means has already been completed.

【0025】すると、制御部への電力供給が停止され
て、再びコンデンサが放電することとなり、そのコンデ
ンサの充電電圧がしきい値まで低下したことがコンデン
サ電圧監視手段によって検知されると、再度、制御部の
第2の充電制御手段による上記動作が行われることとな
る。
Then, the power supply to the control unit is stopped, and the capacitor is discharged again. When it is detected by the capacitor voltage monitoring means that the charged voltage of the capacitor has dropped to the threshold value, the capacitor is again discharged. The above operation by the second charging control means of the control unit is performed.

【0026】このため、電源スイッチがオフされている
間は、コンデンサの充電電圧が規定値よりも小さいしき
い値まで低下する毎に、「制御部へバッテリからの電力
が供給されて、制御部が、カウンタをカウントアップさ
せると共に、コンデンサを充電し、コンデンサの充電電
圧が規定値に達したら、制御部への電力供給が停止され
る」といった動作が繰り返されることとなり、こうした
動作により、上記(2)の手順が実現される。
For this reason, while the power switch is turned off, every time the charging voltage of the capacitor decreases to a threshold value smaller than the specified value, the power supply from the battery to the control unit is performed. However, the counter is counted up, the capacitor is charged, and when the charged voltage of the capacitor reaches the specified value, the power supply to the control unit is stopped. " The procedure of 2) is realized.

【0027】そして、電源スイッチがオフから再びオン
されると、再度、制御部の第1の充電制御手段が、電源
スイッチのオンにより当該制御部が動作したと肯定判定
して、コンデンサを規定値まで充電することとなる。そ
して更に、制御部は、第1の充電制御手段で肯定判定し
た場合、前述したように、カウンタの値をクリアする
が、そのクリアの前に、現在のカウンタの値に基づい
て、電源スイッチがオフされていた時間Toffを算出
することとなり、こうした動作により、上記(3)の手
順が実現される。
Then, when the power switch is turned on again from off, the first charge control means of the control section again determines that the control section has been operated by turning on the power switch, and sets the capacitor to the specified value. Charge. Further, when the first charging control unit makes an affirmative determination, the control unit clears the value of the counter as described above, but before the clearing, the power switch is reset based on the current value of the counter. The off-time Toff is calculated, and the operation (3) is realized by such an operation.

【0028】このような請求項3の電子制御装置によれ
ば、電源スイッチがオフされている期間中に、制御部へ
常時電力を供給する必要がなく、コンデンサの充電電圧
が規定値からしきい値まで低下する毎に、そのコンデン
サを規定値まで充電する間だけ、制御部へ電力を供給す
れば良い。また、電力を常時供給しなければならないの
は、コンデンサの充電電圧がしきい値まで低下したこと
を検知して制御部にバッテリからの電力を供給させるた
めのコンデンサ電圧監視手段だけであり、そのコンデン
サ電圧監視手段は、コンパレータを用いた簡単且つ省電
力な回路で構成することができるため、時計を構成する
発振回路などよりも消費電力を小さく抑えることができ
る。そして更に、この電子制御装置によれば、制御部が
他の装置とデータ通信を行うための回路や複雑な通信ソ
フトを追加する必要が無い。よって、請求項3の電子制
御装置によれば、簡単な構成で、且つ、バッテリの電力
を大きく消費することなく、電源スイッチのオフ時間T
offを制御部にて計測することができる。
According to the electronic control device of the third aspect, it is not necessary to constantly supply power to the control unit while the power switch is turned off, and the charging voltage of the capacitor becomes a threshold value from a specified value. Each time the value is reduced to a value, power may be supplied to the control unit only while the capacitor is charged to the specified value. The only thing that must be constantly supplied is the capacitor voltage monitoring means for detecting that the charging voltage of the capacitor has dropped to the threshold value and causing the control unit to supply power from the battery. Since the capacitor voltage monitoring means can be constituted by a simple and power-saving circuit using a comparator, power consumption can be suppressed smaller than that of an oscillation circuit or the like constituting a timepiece. Further, according to this electronic control device, there is no need to add a circuit or complicated communication software for the control unit to perform data communication with another device. Therefore, according to the electronic control device of the third aspect, the off time T of the power switch can be reduced with a simple configuration and without consuming a large amount of battery power.
off can be measured by the control unit.

【0029】また更に、請求項3の電子制御装置によれ
ば、電源スイッチがオフされている期間中に、制御部が
定期的に動作することとなるため、その制御部にて、電
源スイッチのオフ時間の計測精度を上げるための補足的
な処理を行うこともできる。例えば、制御部が、動作し
た際に、バッテリの電圧や、コンデンサの充電電圧の変
化度合などを検出すると共に、その検出値に基づいて、
コンデンサの充電目標値である上記規定値を補正するこ
とにより、前述の放電時間Th及び充電時間Tjが常に
一定となるようにして、オフ時間の測定精度を向上させ
ることができる。
Further, according to the electronic control device of the third aspect, the control unit operates periodically during the period in which the power switch is turned off. Supplementary processing for improving the measurement accuracy of the off-time can also be performed. For example, when the control unit operates, the battery voltage and the degree of change in the charging voltage of the capacitor are detected, and based on the detected value,
By correcting the specified value, which is the charge target value of the capacitor, the above-described discharge time Th and charge time Tj are always constant, and the measurement accuracy of the off time can be improved.

【0030】また例えば、制御部が、バッテリの電圧
や、コンデンサの充電電圧の変化度合などを検出して、
その検出値に基づきバッテリの蓄電量が所定量よりも低
下していると判断した場合には、以後のオフ時間の計測
動作を中止して、バッテリ上がりが起こるのを未然に防
止するようにしても良い。
Further, for example, the control section detects the degree of change of the battery voltage, the charging voltage of the capacitor, and the like, and
If it is determined based on the detected value that the charged amount of the battery is lower than the predetermined amount, the operation of measuring the off time thereafter is stopped to prevent the battery from running out. Is also good.

【0031】この場合、例えば、コンデンサ電圧監視手
段から出力される駆動指令を駆動手段に伝達させる信号
経路に、電源スイッチがオンになると、該電源スイッチ
がオフされた後も上記信号経路を継続して連通させるセ
ット状態となり、電源スイッチのオフ時に制御部からの
リセット信号を受けると、上記信号経路を遮断するリセ
ット状態となる回路を設けておき、制御部は、バッテリ
の蓄電量が所定量よりも低下していると判断すると、上
記回路にリセット信号を出力して、以後、電源スイッチ
がオンされるまで、当該制御部に電力が供給されないよ
うにすれば良い。
In this case, for example, when a power switch is turned on in a signal path for transmitting a drive command output from the capacitor voltage monitoring means to the drive means, the signal path continues even after the power switch is turned off. When a reset signal is received from the control unit when the power switch is turned off, a circuit that is in a reset state that cuts off the signal path is provided, and the control unit determines that the charged amount of the battery exceeds a predetermined amount. If it is determined that the power is also reduced, a reset signal may be output to the circuit so that power is not supplied to the control unit until the power switch is turned on.

【0032】また特に、請求項1のオフ時間計測方法あ
るいは請求項3の電子制御装置において、請求項2,4
に記載の如く、電源スイッチが、自動車のイグニッショ
ンスイッチであり、制御部が、自動車のエンジンを制御
するものである場合には、イグニッションスイッチのオ
フ時における消費電力を低く抑えることが一層重要とな
るが、その場合にも、バッテリの電力を大きく消費する
ことなく、電源スイッチのオフ時間を制御部にて計測す
ることができ、非常に効果的である。
In particular, in the off-time measuring method according to the first aspect or the electronic control apparatus according to the third aspect,
As described in above, when the power switch is an ignition switch of an automobile and the control unit controls an engine of the automobile, it is more important to suppress the power consumption when the ignition switch is turned off. However, also in this case, the control unit can measure the off time of the power switch without consuming a large amount of battery power, which is very effective.

【0033】[0033]

【発明の実施の形態】以下、本発明が適用された実施形
態の電子制御装置について、図面を用いて説明する。ま
ず図1は、第1実施形態の電子制御装置1とそれの電源
系の配線とを表す回路図である。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, an electronic control unit according to an embodiment to which the present invention is applied will be described with reference to the drawings. First, FIG. 1 is a circuit diagram showing the electronic control device 1 of the first embodiment and wiring of a power supply system thereof.

【0034】本実施形態の電子制御装置(以下、ECU
という)1は、自動車に搭載されたエンジンを制御する
ものであり、図1に示す如く、自動車のバッテリ3のプ
ラス端子に給電用スイッチング手段としてのメインリレ
ー5を介して接続される主電源端子J1と、バッテリ3
のプラス端子に常時接続される副電源端子J2と、バッ
テリ3のプラス端子に電源スイッチとしてのイグニッシ
ョンスイッチ(以下、IGSWと記す)7を介して接続
されるIGSW端子J3と、バッテリ3のプラス端子に
一端が接続されたメインリレー5のコイルLの他端に接
続されたメインリレー駆動端子J4とを備えている。
尚、本実施形態では、主電源端子J1とバッテリ3との
間のメインリレー5が設けられた配線H1が、給電ライ
ンに相当している。
An electronic control unit (hereinafter referred to as an ECU)
A main power supply terminal 1 controls an engine mounted on the vehicle, and is connected to a positive terminal of a battery 3 of the vehicle via a main relay 5 as a power supply switching means, as shown in FIG. J1 and battery 3
IGSW terminal J3 connected to a positive terminal of the battery 3 via an ignition switch (hereinafter referred to as IGSW) 7 as a power switch, and a positive terminal of the battery 3. And a main relay drive terminal J4 connected to the other end of the coil L of the main relay 5 having one end connected to the main relay 5.
In the present embodiment, the wiring H1 provided with the main relay 5 between the main power supply terminal J1 and the battery 3 corresponds to a power supply line.

【0035】そして、ECU1は、エンジンを制御する
ための様々な処理を実行するマイコン9と、エンジン制
御に用いられる各種センサ信号(図示省略)やバッテリ
電圧(即ちバッテリ3の電圧)などのアナログ値をデジ
タル値に変換してマイコン9に入力させるA/D変換器
11と、IGSW7を介してIGSW端子J3より入力
されるバッテリ電圧(以下、VIGと記す)を、マイコ
ン9が入力可能な電圧レベルのIGSW信号にレベル変
換して、マイコン9へ出力する入力回路13と、メイン
リレー5を介して主電源端子J1より入力されるバッテ
リ電圧(以下、V+Bと記す)から、マイコン9及びA
/D変換器11を動作させるための主電源電圧Vmを生
成して出力すると共に、副電源端子J2より常時入力さ
れるバッテリ電圧(以下、VBATと記す)から、マイ
コン9に内蔵されたスタンバイRAMが常時データを保
持するための副電源電圧Vsを生成して出力する電源回
路15とを備えている。
The ECU 1 includes a microcomputer 9 for executing various processes for controlling the engine, and analog values such as various sensor signals (not shown) and a battery voltage (ie, a voltage of the battery 3) used for engine control. A / D converter 11 which converts a digital value into a digital value and inputs the digital value to the microcomputer 9 and a battery voltage (hereinafter referred to as VIG) input from the IGSW terminal J3 via the IGSW 7 From the input circuit 13 which converts the level into an IGSW signal and outputs the signal to the microcomputer 9, and the battery voltage (hereinafter referred to as V + B) input from the main power supply terminal J 1 via the main relay 5.
A main power supply voltage Vm for operating the / D converter 11 is generated and output, and a standby RAM incorporated in the microcomputer 9 is obtained from a battery voltage (hereinafter referred to as VBAT) constantly input from the sub power supply terminal J2. Includes a power supply circuit 15 that generates and outputs a sub power supply voltage Vs for constantly retaining data.

【0036】尚、電源回路15は、V+Bの供給を受け
て主電源電圧Vmの出力を開始してから、その主電源電
圧Vmが安定すると見なされる所定時間だけマイコン9
へリセット信号を出力する、所謂パワーオンリセット機
能も有している。また、入力回路13は、電源不要の電
子部品のみからなるものである。
The power supply circuit 15 starts outputting the main power supply voltage Vm in response to the supply of V + B, and thereafter, the microcomputer 9 operates for a predetermined period of time when the main power supply voltage Vm is considered to be stable.
A so-called power-on reset function for outputting a reset signal to the power supply is also provided. Further, the input circuit 13 is composed of only electronic components that do not require a power supply.

【0037】そして更に、ECU1は、IGSW7がオ
フされていた時間を計測するために充放電されるコンデ
ンサ17と、そのコンデンサ17と並列に接続されて、
該コンデンサ17の放電経路を形成する抵抗(放電用抵
抗)19と、マイコン9からハイアクティブで出力され
る充電指示信号に従い、V+Bを元にしてコンデンサ1
7を充電する充電回路21と、電源回路15から常時出
力される上記副電源電圧Vsを受けて動作し、コンデン
サ17の充電電圧Vcが所定のしきい値電圧Vthまで
低下したか否かを監視して、充電電圧Vcがしきい値電
圧Vth以下になると、ハイアクティブの放電完了信号
を出力するコンデンサ電圧監視回路23と、IGSW端
子J3からVIGが供給されるか、コンデンサ電圧監視
回路23から上記充放電完了信号が出力されるか、マイ
コン9からハイアクティブのメインリレー駆動信号が出
力されると、メインリレー5のコイルLに電流を流して
該メインリレー5をオンさせる(詳しくは、メインリレ
ー5の接点を短絡させる)メインリレー制御回路25と
を備えている。
Further, the ECU 1 is connected in parallel with the capacitor 17 that is charged and discharged to measure the time during which the IGSW 7 is turned off,
In accordance with a resistor (discharging resistor) 19 forming a discharge path of the capacitor 17 and a charge instruction signal output from the microcomputer 9 in a high active state, the capacitor 1 is determined based on V + B.
7 operates in response to the sub power supply voltage Vs constantly output from the power supply circuit 15 and monitors whether the charging voltage Vc of the capacitor 17 has dropped to a predetermined threshold voltage Vth. Then, when the charging voltage Vc becomes equal to or lower than the threshold voltage Vth, the capacitor voltage monitoring circuit 23 that outputs a high active discharge completion signal and VIG is supplied from the IGSW terminal J3 or the capacitor voltage monitoring circuit 23 When a charge / discharge completion signal is output or a high-active main relay drive signal is output from the microcomputer 9, a current flows through the coil L of the main relay 5 to turn on the main relay 5 (for details, And a main relay control circuit 25).

【0038】また、本実施形態のECU1において、主
電源端子J1からのV+Bと、コンデンサ17の充電電
圧Vcとが、A/D変換器11に入力され、マイコン9
は、それら各電圧の値を、A/D変換器11を介して検
出するようになっている。また更に、マイコン9には、
コンデンサ電圧監視回路23からの放電完了信号も入力
されるようになっている。
In the ECU 1 of this embodiment, V + B from the main power supply terminal J1 and the charging voltage Vc of the capacitor 17 are input to the A / D converter 11, and the microcomputer 9
Detects the values of these voltages via the A / D converter 11. Furthermore, the microcomputer 9 includes:
A discharge completion signal from the capacitor voltage monitoring circuit 23 is also input.

【0039】ここで、充電回路21は、V+Bを受けて
動作すると共に、マイコン9からの充電指示信号が非反
転入力端子(+端子)に入力されたオペアンプOP1
と、V+Bを分圧して、上記充電指示信号の電圧レベル
(=主電源電圧Vm)よりも低い基準電圧Vrefを生
成し、その基準電圧VrefをオペアンプOP1の反転
入力端子(−端子)に入力させる2つ直列の分圧用抵抗
31,33と、オペアンプOP1の出力端子にアノード
が接続されたダイオード35と、そのダイオード35の
カソードに一端が接続され、他端がコンデンサ17の接
地電位側とは反対側の端子に接続された充電用抵抗37
とから構成されている。
Here, the charging circuit 21 operates in response to V + B, and the operational amplifier OP1 in which the charging instruction signal from the microcomputer 9 is input to the non-inverting input terminal (+ terminal).
, And V + B to generate a reference voltage Vref lower than the voltage level (= main power supply voltage Vm) of the charging instruction signal, and input the reference voltage Vref to the inverting input terminal (−terminal) of the operational amplifier OP1. Two series voltage dividing resistors 31 and 33, a diode 35 having an anode connected to the output terminal of the operational amplifier OP1, one end connected to the cathode of the diode 35, and the other end opposite to the ground potential side of the capacitor 17. Resistor 37 connected to the side terminal
It is composed of

【0040】そして、このように構成された充電回路2
1では、主電源端子J1からのV+Bを受けている場合
に、マイコン9から充電指示信号が出力されると、オペ
アンプOP1の出力端子からV+Bを元にした電圧が出
力され、その出力電圧により、コンデンサ17が、ダイ
オード35及び抵抗37を介して充電されることとな
る。
The charging circuit 2 configured as described above
In 1, when a charging instruction signal is output from the microcomputer 9 while receiving V + B from the main power supply terminal J1, a voltage based on V + B is output from the output terminal of the operational amplifier OP1. The capacitor 17 is charged via the diode 35 and the resistor 37.

【0041】尚、コンデンサ17の放電経路を形成する
上記抵抗19の抵抗値は、コンデンサ17を緩やかに放
電させるために、非常に大きな値(例えば数百KΩ)に
設定されているが、充電用抵抗37の抵抗値は、コンデ
ンサ17を速やかに充電できるように、上記抵抗19よ
りも十分小さい値に設定されている。また、ダイオード
35は、コンデンサ17からオペアンプOP1の出力端
子側へ電流が逆流するのを防止するために設けられてい
る。
The resistance value of the resistor 19 forming the discharge path of the capacitor 17 is set to a very large value (for example, several hundred KΩ) in order to discharge the capacitor 17 slowly. The resistance value of the resistor 37 is set to a value sufficiently smaller than that of the resistor 19 so that the capacitor 17 can be charged quickly. The diode 35 is provided to prevent a current from flowing backward from the capacitor 17 to the output terminal side of the operational amplifier OP1.

【0042】一方、コンデンサ電圧監視回路23は、V
BATを元にした電源回路15からの副電源電圧Vsを
受けて動作すると共に、コンデンサ17の充電電圧Vc
が非反転入力端子に入力されたコンパレータCMP1
と、副電源電圧Vsを分圧して、前述のしきい値電圧V
thを生成し、そのしきい値電圧Vthをコンパレータ
CMP1の反転入力端子に入力させる2つ直列の分圧用
抵抗41,43と、コンパレータCMP1の出力端子と
副電源電圧Vsとの間に接続された抵抗45と、コンパ
レータCMP1の出力端子がベースに接続されたPNP
トランジスタ47と、そのトランジスタ47のエミッタ
と副電源電圧Vsとの間に接続された抵抗49とから構
成されている。尚、抵抗45は、コンパレータCMP1
の出力端子が電流の引込のみ可能なオープンコレクタタ
イプであるため、その出力端子を副電源電圧Vsにプル
アップして、該コンパレータCMP1からハイレベルの
信号が出力できるようにするものである。
On the other hand, the capacitor voltage monitoring circuit 23
It operates by receiving the sub power supply voltage Vs from the power supply circuit 15 based on the BAT, and operates while charging the capacitor 17 with the charging voltage Vc.
Is input to the non-inverting input terminal.
And the sub power supply voltage Vs is divided to obtain the threshold voltage V
th, and the two series voltage dividing resistors 41 and 43 for inputting the threshold voltage Vth to the inverting input terminal of the comparator CMP1 and the output terminal of the comparator CMP1 and the auxiliary power supply voltage Vs. PNP in which the resistor 45 and the output terminal of the comparator CMP1 are connected to the base
It comprises a transistor 47 and a resistor 49 connected between the emitter of the transistor 47 and the auxiliary power supply voltage Vs. The resistor 45 is connected to the comparator CMP1
Since the output terminal is an open collector type capable of only drawing current, its output terminal is pulled up to the sub power supply voltage Vs so that a high level signal can be output from the comparator CMP1.

【0043】そして、このように構成されたコンデンサ
電圧監視回路23では、コンデンサ17の充電電圧Vc
がしきい値電圧Vthよりも高ければ、コンパレータC
MP1の出力がハイレベルになってPNPトランジスタ
47がオフ状態になる。これに対して、コンデンサ17
の充電電圧Vcがしきい値電圧Vth以下になると、コ
ンパレータCMP1の出力がローレベルになってPNP
トランジスタ47がオンする。そして、そのPNPトラ
ンジスタ47のコレクタ電圧がハイレベル(=副電源電
圧Vs)となり、そのコレクタ電圧が、ハイレベルの放
電完了信号として、メインリレー制御回路25とマイコ
ン9へ出力される。
In the capacitor voltage monitoring circuit 23 thus configured, the charging voltage Vc of the capacitor 17 is
Is higher than the threshold voltage Vth, the comparator C
The output of MP1 goes high, turning off the PNP transistor 47. On the other hand, the capacitor 17
Is lower than the threshold voltage Vth, the output of the comparator CMP1 goes low and the PNP
The transistor 47 turns on. Then, the collector voltage of the PNP transistor 47 becomes high level (= sub power supply voltage Vs), and the collector voltage is output to the main relay control circuit 25 and the microcomputer 9 as a high level discharge completion signal.

【0044】また、メインリレー制御回路25は、IG
SW端子J3からのVIGと、コンデンサ電圧監視回路
23からの充放電完了信号と、マイコン9からのメイン
リレー駆動信号とが、ダイオード等によりワイヤードオ
アされてベースに供給されるNPNトランジスタ51を
主要部として構成されており、そのNPNトランジスタ
51のコレクタがメインリレー駆動端子J4に接続され
ている。
The main relay control circuit 25 has an IG
The VIG from the SW terminal J3, the charge / discharge completion signal from the capacitor voltage monitoring circuit 23, and the main relay drive signal from the microcomputer 9 are wired-ORed by a diode or the like to the NPN transistor 51 supplied to the base. The collector of the NPN transistor 51 is connected to the main relay drive terminal J4.

【0045】このようなメインリレー制御回路25で
は、IGSW7がオンされてIGSW端子J3からVI
Gが供給されるか、コンデンサ電圧監視回路23から充
放電完了信号が出力されるか、マイコン9からメインリ
レー駆動信号が出力されると、NPNトランジスタ51
がオンして、そのトランジスタ51がメインリレー5の
コイルLから電流を引き込むこととなり、それに伴いメ
インリレー5がオンすることとなる。
In such a main relay control circuit 25, the IGSW 7 is turned on and the IGSW terminal J3 is connected to the VI
When G is supplied, a charge / discharge completion signal is output from the capacitor voltage monitoring circuit 23, or a main relay drive signal is output from the microcomputer 9, the NPN transistor 51
Is turned on, the transistor 51 draws current from the coil L of the main relay 5, and the main relay 5 is turned on accordingly.

【0046】そして、メインリレー5がオンすると、E
CU1では、マイコン9,A/D変換器11,及び充電
回路21にバッテリ3から電力が供給されて、それら各
部9,11,21が動作することとなる。つまり、マイ
コン9とA/D変換器11との各々には、V+Bを元に
した電源回路15からの主電源電圧Vmが供給され、充
電回路21には、V+Bが直接供給されるからである。
When the main relay 5 is turned on, E
In the CU 1, electric power is supplied from the battery 3 to the microcomputer 9, the A / D converter 11, and the charging circuit 21, and these units 9, 11, and 21 operate. That is, the main power supply voltage Vm from the power supply circuit 15 based on V + B is supplied to each of the microcomputer 9 and the A / D converter 11, and V + B is directly supplied to the charging circuit 21. .

【0047】尚、本実施形態では、主電源端子J1から
のV+Bを元にして動作するマイコン9,A/D変換器
11,及び充電回路21が、制御部に相当し、副電源端
子J2からのVBATを元にして常時動作するコンデン
サ電圧監視回路23が、コンデンサ電圧監視手段に相当
している。そして、メインリレー制御回路25が、駆動
手段に相当し、コンデンサ電圧監視回路23からの充放
電完了信号とマイコン9からのメインリレー駆動信号と
が、駆動指令に相当している。
In the present embodiment, the microcomputer 9, the A / D converter 11, and the charging circuit 21 that operate based on V + B from the main power supply terminal J1 correspond to a control unit. The capacitor voltage monitoring circuit 23, which always operates based on the VBAT, corresponds to the capacitor voltage monitoring means. The main relay control circuit 25 corresponds to a driving unit, and the charge / discharge completion signal from the capacitor voltage monitoring circuit 23 and the main relay driving signal from the microcomputer 9 correspond to a driving command.

【0048】以上のようなハードウエア構成のECU1
では、IGSW7がオンされて、メインリレー制御回路
25の作用によりメインリレー5がオンすると、バッテ
リ3から主電源端子J1を介して実質的な動作電力が供
給され、マイコン9やA/D変換器11等からなる制御
部が動作して、エンジンを制御することとなる。
The ECU 1 having the hardware configuration as described above
Then, when the IGSW 7 is turned on and the main relay 5 is turned on by the action of the main relay control circuit 25, substantial operating power is supplied from the battery 3 via the main power supply terminal J1, and the microcomputer 9 and the A / D converter The control unit 11 and the like operate to control the engine.

【0049】そして特に、本実施形態のECU1では、
マイコン9が、動作中に図2のオフ時間計測用処理を実
行して、IGSW7がオフされていた時間(以下単に、
オフ時間ともいう)を計測するようにしている。そこで
次に、マイコン9が実行するオフ時間計測用処理の内容
について説明する。尚、このオフ時間計測用処理は、マ
イコン9が動作している間、数ms〜数十ms程度の一
定時間毎に実行される。
Particularly, in the ECU 1 of the present embodiment,
The microcomputer 9 executes the off-time measuring process shown in FIG. 2 during operation, and the time during which the IGSW 7 is off (hereinafter simply referred to as “
Off time). Therefore, next, the contents of the off-time measurement processing executed by the microcomputer 9 will be described. The off-time measuring process is executed at regular intervals of several ms to several tens ms while the microcomputer 9 is operating.

【0050】図2に示すように、マイコン9がオフ時間
計測用処理の実行を開始すると、まずステップ(以下単
に「S」と記す)110にて、IGSW7がオン状態で
あるか否かを、入力回路13からのIGSW信号に基づ
き判定する。そして、IGSW7がオン状態であると判
定した場合には(S110:YES)、IGSW7がオ
ンされたことにより当該マイコン9が動作していると判
断できるため、この場合には、S120に進み、上記S
110でIGSW7がオン状態であると判定してから既
にIGSW7のオフ時間を計測済みか否かを判定する。
As shown in FIG. 2, when the microcomputer 9 starts executing the off-time measuring process, first, in step (hereinafter simply referred to as "S") 110, it is determined whether or not the IGSW 7 is on. The determination is made based on the IGSW signal from the input circuit 13. If it is determined that the IGSW 7 is on (S110: YES), it is determined that the microcomputer 9 is operating because the IGSW 7 is turned on. S
After it is determined in step 110 that the IGSW 7 is in the on state, it is determined whether or not the off time of the IGSW 7 has already been measured.

【0051】ここで、オフ時間を計測済みではないと判
定したならば(S120:NO)、S130に進み、後
述するS190でインクリメントされるトリップカウン
タの値に基づいて、IGSW7のオフ時間を算出する。
尚、オフ時間の算出方法については、後で図3を参照し
ながら説明する。
If it is determined that the off time has not been measured (S120: NO), the process proceeds to S130, and the off time of the IGSW 7 is calculated based on the value of the trip counter incremented in S190 described later. .
The method of calculating the off-time will be described later with reference to FIG.

【0052】そして、このS130でオフ時間を算出す
ると、次のS140にて、トリップカウンタの値を0に
クリアし、その後、当該オフ時間計測用処理を一旦終了
する。尚、トリップカウンタは、マイコン9内のスタン
バイRAM(即ち、電源回路15からの副電源電圧Vs
を受けて常時データを保持可能な不揮発性のRAM)に
設定された不揮発性のカウンタである。また、上記S1
30でオフ時間が算出されると、S110にてIGSW
7がオン状態であると継続して判定されている限り、次
回からのS120では、オフ時間を計測済みと肯定判定
される。
When the off time is calculated in S130, the value of the trip counter is cleared to 0 in the next S140, and thereafter, the off time measuring process is temporarily terminated. It should be noted that the trip counter is provided by the standby RAM in the microcomputer 9 (that is, the sub power supply voltage Vs from the power supply circuit 15).
This is a non-volatile counter set in a non-volatile RAM (Non-volatile RAM) that can always hold data in response to the request. The above S1
When the off-time is calculated at 30, the IGSW is performed at S110.
As long as it is continuously determined that 7 is in the on state, in S120 from the next time, the affirmative determination is made that the off time has been measured.

【0053】また、上記S120にて、オフ時間を計測
済みと肯定判定した場合には、S150に移行して、コ
ンデンサ17を、コンデンサ電圧監視回路23で比較さ
れるしきい値電圧Vthよりも大きい所定の規定値Vk
まで充電する。つまり、マイコン9は、A/D変換器1
1を介して検出されるコンデンサ17の充電電圧Vcが
規定値Vkとなるように、充電回路21へ充電指示信号
を出力して、その充電回路21にコンデンサ17を充電
させる。そして、このS150の処理を行った後、当該
オフ時間計測用処理を一旦終了する。尚、上記S150
の処理により、IGSW7がオンされている間、コンデ
ンサ17の充電電圧Vcが上記規定値Vkに維持され
る。
If it is determined in S120 that the off-time has been measured, the process proceeds to S150 to set the capacitor 17 to a voltage higher than the threshold voltage Vth compared by the capacitor voltage monitoring circuit 23. Predetermined prescribed value Vk
Charge until. That is, the microcomputer 9 controls the A / D converter 1
The charging instruction signal is output to the charging circuit 21 so that the charging voltage Vc of the capacitor 17 detected via the signal 1 becomes the specified value Vk, and the charging circuit 21 charges the capacitor 17. Then, after performing the process of S150, the process for measuring off time is temporarily terminated. Note that the above S150
By the above process, the charging voltage Vc of the capacitor 17 is maintained at the specified value Vk while the IGSW 7 is turned on.

【0054】一方、上記S110にて、IGSW7がオ
ン状態ではない(即ちオフ状態である)と判定した場合
には、S160に移行して、コンデンサ電圧監視回路2
3から放電完了信号が出力されているか否かを判定す
る。ここで、放電完了信号が出力されていたならば(S
160:YES)、IGSW7のオンではなくコンデン
サ電圧監視回路23の作用により当該マイコン9が動作
した(即ち、コンデンサ17の充電電圧Vcがしきい値
電圧Vthまで放電により低下して、コンデンサ電圧監
視回路23からメインリレー制御回路25へ放電完了信
号が出力されたことにより、メインリレー5がオンし
て、当該マイコン9が動作した)と判断して、S170
に進む。
On the other hand, if it is determined in step S110 that the IGSW 7 is not in the on state (ie, in the off state), the flow shifts to step S160, where the capacitor voltage monitoring circuit 2
Then, it is determined whether a discharge completion signal has been output from 3. Here, if the discharge completion signal has been output (S
160: YES), the microcomputer 9 is operated by the action of the capacitor voltage monitoring circuit 23 instead of turning on the IGSW 7 (that is, the charging voltage Vc of the capacitor 17 is reduced to the threshold voltage Vth by discharging, and the capacitor voltage monitoring circuit 23, the main relay 5 is turned on and the microcomputer 9 is operated by the output of the discharge completion signal to the main relay control circuit 25.
Proceed to.

【0055】そして、S170にて、メインリレー制御
回路25へメインリレー駆動信号を出力することによ
り、メインリレー5のオン状態であって、バッテリ3か
ら主電源端子J1を介して実質的な動作電力が供給され
ている状態を維持する。そして更に、続くS180に
て、トリップカウンタをインクリメント済みであるか否
かを判定し、インクリメント済みでなければ(S18
0:NO)、S190に進んで、トリップカウンタをイ
ンクリメント(1カウントアップ)する。
In step S170, the main relay drive signal is output to the main relay control circuit 25, so that the main relay 5 is in the ON state and the substantial operating power is supplied from the battery 3 via the main power supply terminal J1. Is maintained. Then, in subsequent S180, it is determined whether or not the trip counter has been incremented. If not, the trip counter is not incremented (S18).
(0: NO), the process proceeds to S190, and the trip counter is incremented (one count up).

【0056】尚、このS190でトリップカウンタがイ
ンクリメントされると、S110にてIGSW7がオン
状態でないと継続して判定されている限り、次回からの
S180では、トリップカウンタをインクリメント済み
と肯定判定される。そして、上記S190にて、トリッ
プカウンタをインクリメントするか、或いは、上記S1
80にて、トリップカウンタをインクリメント済みであ
ると肯定判定すると、S200に進んで、コンデンサ1
7の充電電圧Vcが上記規定値Vkにまで戻るように、
充電回路21へ充電指示信号を出力して、その充電回路
21にコンデンサ17を充電させる。
When the trip counter is incremented in S190, as long as it is continuously determined in S110 that the IGSW 7 is not on, in S180 from the next time, it is determined that the trip counter has been incremented. . Then, in step S190, the trip counter is incremented, or in step S1.
At 80, when it is determined that the trip counter has been incremented, the process proceeds to S200, where the capacitor 1
7, so that the charging voltage Vc returns to the specified value Vk.
A charging instruction signal is output to the charging circuit 21 to charge the capacitor 17.

【0057】そして更に、続くS210にて、A/D変
換器11を介して検出されるコンデンサ17の充電電圧
Vcが上記規定値Vkに達したか否かを判定し、充電電
圧Vcが規定値Vkに達していなければ(S210:N
O)、充電回路21への充電指示信号を出力したまま
で、当該オフ時間計測用処理を一旦終了する。
Then, in S210, it is determined whether or not the charging voltage Vc of the capacitor 17 detected via the A / D converter 11 has reached the specified value Vk. If Vk has not been reached (S210: N
O) While the charging instruction signal to the charging circuit 21 is output, the off-time measurement process is temporarily ended.

【0058】また、上記S210にて、コンデンサ17
の充電電圧Vcが規定値Vkに達したと判定した場合に
は、コンデンサ17の充電が完了したと判断して、S2
20に進み、上記S170で開始したメインリレー駆動
信号の出力を止める。すると、この時点では、コンデン
サ17の充電電圧Vcがしきい値電圧Vthよりも高
く、コンデンサ電圧監視回路23からメインリレー制御
回路25へ駆動指令としての放電完了信号がもはや出力
されていないため、当該マイコン9がメインリレー駆動
信号の出力を止めることにより、メインリレー5がオフ
して、ECU1におけるコンデンサ電圧監視回路23以
外の各部の動作が停止することとなる。
In step S210, the capacitor 17
Is determined to have reached the specified value Vk, it is determined that the charging of the capacitor 17 has been completed, and S2
Proceeding to 20, the output of the main relay drive signal started in S170 is stopped. Then, at this time, the charge voltage Vc of the capacitor 17 is higher than the threshold voltage Vth, and the discharge completion signal as a drive command is no longer output from the capacitor voltage monitoring circuit 23 to the main relay control circuit 25. When the microcomputer 9 stops outputting the main relay drive signal, the main relay 5 is turned off, and the operation of each unit other than the capacitor voltage monitoring circuit 23 in the ECU 1 is stopped.

【0059】一方、上記S160にて、コンデンサ電圧
監視回路23から放電完了信号が出力されていないと判
定した場合には、S230に移行して、コンデンサ17
を充電している最中であるか否か(即ち、前回にS20
0の処理を実行し、且つ、S210で否定判定したか否
か)を判定する。
On the other hand, if it is determined in S160 that the discharge completion signal has not been output from the capacitor voltage monitoring circuit 23, the flow shifts to S230, where the capacitor 17
Is being charged (that is, the last time S20 is being charged).
0 is performed and a negative determination is made in S210).

【0060】そして、このS230にて、コンデンサ1
7を充電している最中であると判定した場合には、S2
00に移行して、再びS200及びS210の処理を行
う。また、上記S230にて、コンデンサ17を充電し
ている最中でないと判定した場合には、当該マイコン9
がIGSW7のオフ時間を計測するため以外の目的でメ
インリレー駆動信号を出力している状態であり、この場
合には、当該オフ時間計測用処理を速やかに終えて、他
の処理を行う。
Then, in S230, the capacitor 1
If it is determined that charging is being performed on S7, S2
The process proceeds to S00, and the processes of S200 and S210 are performed again. If it is determined in step S230 that the capacitor 17 is not being charged, the microcomputer 9
Is a state in which the main relay drive signal is being output for a purpose other than the purpose of measuring the off time of the IGSW 7, and in this case, the processing for measuring the off time is immediately finished, and another processing is performed.

【0061】つまり、このオフ時間計測用処理では、S
110により、IGSW7がオンされて制御部の中心を
成す当該マイコン9が動作したか否かを判定して、肯定
判定したならば(S110:YES)、充電回路21に
充電指示信号を出力して、コンデンサ17を、その充電
電圧Vcが規定値Vkとなるように充電している(S1
50)。
That is, in the off-time measuring process, S
At 110, it is determined whether or not the IGSW 7 is turned on and the microcomputer 9, which forms the center of the control unit, has been operated. If the determination is affirmative (S110: YES), the charging instruction signal is output to the charging circuit 21 , The capacitor 17 is charged so that its charging voltage Vc becomes the specified value Vk (S1).
50).

【0062】また、S110及びS160により、IG
SW7のオンではなくコンデンサ電圧監視回路23の作
用により当該マイコン9が動作したか否かを判定して、
肯定判定したならば(S160:YES)、まず、メイ
ンリレー制御回路25にメインリレー駆動信号を出力し
てメインリレー5のオン状態を維持すると共に(S17
0)、トリップカウンタをインクリメントし(S19
0)、その後、コンデンサ17を充電して(S20
0)、その充電電圧Vcが規定値Vkに達したならば
(S210:YES)、メインリレー駆動信号の出力を
停止してメインリレー5をオフさせ、動作電力を遮断さ
せるようにしいている(S220)。
Further, IG is performed by S110 and S160.
It is determined whether or not the microcomputer 9 has operated by the action of the capacitor voltage monitoring circuit 23 instead of turning on the SW7,
If an affirmative determination is made (S160: YES), first, a main relay drive signal is output to the main relay control circuit 25 to maintain the ON state of the main relay 5 (S17).
0), and increment the trip counter (S19).
0), and thereafter, the capacitor 17 is charged (S20).
0), when the charging voltage Vc reaches the specified value Vk (S210: YES), the output of the main relay drive signal is stopped, the main relay 5 is turned off, and the operating power is cut off (S220). ).

【0063】そして更に、このオフ時間計測用処理で
は、S110にて、IGSW7のオンにより当該マイコ
ン9が動作したと最初に肯定判定した際に、トリップカ
ウンタの値に基づいてIGSW7のオフ時間を算出し
(S130)、その後、トリップカウンタの値をクリア
するようにしている(S140)。
Further, in this off-time measuring process, when it is first determined that the microcomputer 9 has been operated by turning on the IGSW 7 in S110, the off-time of the IGSW 7 is calculated based on the value of the trip counter. Then, the value of the trip counter is cleared (S140).

【0064】尚、本実施形態では、マイコン9でのS1
10及びS150の処理と充電回路21とが、制御部に
おける第1の充電制御手段に相当し、また、マイコン9
でのS110及びS160〜S220の処理と充電回路
21とが、制御部における第2の充電制御手段に相当し
ている。
In this embodiment, S1 in the microcomputer 9
The processes of S10 and S150 and the charging circuit 21 correspond to first charging control means in the control unit.
The processing of S110 and S160 to S220 in the above and the charging circuit 21 correspond to a second charging control unit in the control unit.

【0065】以上のような本実施形態のECU1では、
IGSW7がオンされると、メインリレー5がオンし
て、マイコン9,A/D変換器11,及び充電回路21
からなる制御部が、バッテリ3からの電力を受けて動作
することとなるが、IGSW7のオンにより制御部が動
作している場合には、図3に示すように、コンデンサ1
7が、マイコン9のS150の処理と充電回路21とに
より、規定値Vkまで充電され、また、不揮発性のトリ
ップカウンタの値が、マイコン9のS140の処理によ
り、0にクリアされる。このため、IGSW7がオンさ
れている間に、コンデンサ17の充電電圧Vcは規定値
Vkに維持され、トリップカウンタの値は0に初期化さ
れる。
In the ECU 1 of the present embodiment as described above,
When the IGSW 7 is turned on, the main relay 5 is turned on, and the microcomputer 9, the A / D converter 11, and the charging circuit 21
Is operated by receiving the electric power from the battery 3. When the control unit is operated by turning on the IGSW 7, as shown in FIG.
7 is charged to the specified value Vk by the processing of S150 of the microcomputer 9 and the charging circuit 21, and the value of the nonvolatile trip counter is cleared to 0 by the processing of S140 of the microcomputer 9. Therefore, while the IGSW 7 is turned on, the charging voltage Vc of the capacitor 17 is maintained at the specified value Vk, and the value of the trip counter is initialized to zero.

【0066】その後、図3に示すように、IGSW7が
オン状態からオフされると、メインリレー5がオフして
制御部への電力供給が停止されるため、コンデンサ17
が抵抗19を介して放電し出す。そして、コンデンサ1
7の充電電圧Vcがしきい値電圧Vthまで低下する
と、コンデンサ電圧監視回路23が、そのことを検知し
て、メインリレー制御回路25へ駆動指令としての放電
完了信号を出力し、そのメインリレー制御回路25にメ
インリレー5をオンさせる。すると、図3にて「ECU
起動」と記した上向き矢印で示すように、制御部がバッ
テリ3からの電力を受けて再び動作することとなる。
Thereafter, as shown in FIG. 3, when the IGSW 7 is turned off from the on state, the main relay 5 is turned off and the power supply to the control unit is stopped.
Discharges through the resistor 19. And capacitor 1
7, the capacitor voltage monitoring circuit 23 detects that the charging voltage Vc has dropped to the threshold voltage Vth, and outputs a discharge completion signal as a drive command to the main relay control circuit 25 to control the main relay control. The circuit 25 turns on the main relay 5. Then, in FIG.
The control unit receives the power from the battery 3 and operates again, as indicated by the upward arrow indicating “start”.

【0067】そして、このようにコンデンサ17の充電
電圧Vcがしきい値電圧Vthまで低下して制御部が動
作すると、マイコン9のS160で肯定判定されて、S
170の処理により、マイコン9からメインリレー制御
回路25へ駆動指令としてのメインリレー駆動信号が出
力され、これにより、メインリレー5のオン状態(即
ち、制御部にバッテリ3からの電力が供給されている状
態)が維持される。そして更に、マイコン9のS190
の処理により、トリップカウンタがインクリメント(+
1)されると共に、マイコン9のS200の処理と充電
回路21とにより、コンデンサ17が充電され、コンデ
ンサ17の充電電圧Vcが規定値Vkに達すると、マイ
コン9のS220の処理により、メインリレー制御回路
25へのメインリレー駆動信号の出力が停止され、その
結果、図3にて「ECU電源オフ」と記した下向き矢印
で示すように、メインリレー5がオフして当該ECU1
への動作電力の供給が遮断されることとなる。尚、図3
においては、IGSW7のオフ中にメインリレー5がオ
ンしてECU1へ動作電力が供給される期間を、斜線で
示している。
When the control unit operates with the charging voltage Vc of the capacitor 17 lowered to the threshold voltage Vth in this way, the microcomputer 9 makes an affirmative determination in S160 and returns to S160.
By the process of 170, the microcomputer 9 outputs a main relay drive signal as a drive command to the main relay control circuit 25, whereby the main relay 5 is turned on (that is, power from the battery 3 is supplied to the control unit). State) is maintained. And further, S190 of the microcomputer 9
By the processing of, the trip counter is incremented (+
1) At the same time, the capacitor 17 is charged by the processing of S200 of the microcomputer 9 and the charging circuit 21, and when the charging voltage Vc of the capacitor 17 reaches the specified value Vk, the main relay control is performed by the processing of S220 of the microcomputer 9. The output of the main relay drive signal to the circuit 25 is stopped, and as a result, the main relay 5 is turned off and the ECU 1 is turned off, as shown by the downward arrow marked “ECU power off” in FIG.
Supply of operating power to the power supply is cut off. FIG.
In FIG. 5, the period during which the main relay 5 is turned on while the IGSW 7 is off and the operating power is supplied to the ECU 1 is indicated by oblique lines.

【0068】すると、再びコンデンサ17が放電するこ
ととなり、そのコンデンサ17の充電電圧Vcがしきい
値電圧Vthまで低下したことがコンデンサ電圧監視回
路23によって検知されると、再度、メインリレー5が
オンして上記動作が行われることとなる。
Then, the capacitor 17 is discharged again. When the capacitor voltage monitoring circuit 23 detects that the charged voltage Vc of the capacitor 17 has dropped to the threshold voltage Vth, the main relay 5 is turned on again. Then, the above operation is performed.

【0069】このため、IGSW7がオフされている間
は、コンデンサ17の充電電圧Vcが規定値Vkよりも
小さいしきい値電圧Vthまで低下する毎に、制御部へ
バッテリ3からの電力が供給されて、制御部がトリップ
カウンタの値を1増加させると共にコンデンサ17を充
電し、コンデンサ17の充電電圧Vcが規定値Vkに達
したら、制御部への電力供給(つまり、当該ECU1へ
の動作電力の供給)が停止されてコンデンサ17が放電
し出す、といった動作が繰り返されることとなる。
For this reason, while the IGSW 7 is turned off, the power from the battery 3 is supplied to the control unit every time the charging voltage Vc of the capacitor 17 decreases to the threshold voltage Vth smaller than the specified value Vk. Then, the control unit increases the value of the trip counter by 1 and charges the capacitor 17. When the charging voltage Vc of the capacitor 17 reaches the specified value Vk, power is supplied to the control unit (that is, the operating power of the ECU 1 is reduced). The operation of stopping the supply) and discharging the capacitor 17 is repeated.

【0070】そして、IGSW7がオフ状態からオンさ
れると、マイコン9のS150の処理と充電回路21と
により、再びコンデンサ17が規定値Vkまで充電され
る。そして更に、IGSW7がオンされると、マイコン
9は、図2のS140の処理により、トリップカウンタ
の値を0にクリアするが、マイコン9は、そのクリア直
前のS130の処理にて、現在のトリップカウンタの値
に基づき、IGSW7のオフ時間Toffを以下のよう
に算出する。
When the IGSW 7 is turned on from the off state, the capacitor 17 is charged again to the specified value Vk by the processing of S150 of the microcomputer 9 and the charging circuit 21. Further, when the IGSW 7 is turned on, the microcomputer 9 clears the value of the trip counter to 0 by the processing of S140 in FIG. 2, but the microcomputer 9 executes the current trip in the processing of S130 immediately before the clearing. Based on the value of the counter, the off time Toff of the IGSW 7 is calculated as follows.

【0071】まず、IGSW7がオンされた時のトリッ
プカウンタの値は、IGSW7がオフされている間にコ
ンデンサ17が図3の如く充放電された回数を表してお
り、また、放電によりコンデンサ17の充電電圧Vcが
規定値Vkからしきい値電圧Vthまで低下するのに要
する時間(放電時間)Thと、充電によりコンデンサ1
7の充電電圧Vcがしきい値電圧Vthから規定値Vk
まで上昇するのに要する時間(充電時間)Tjとは、コ
ンデンサ17の充放電特性(具体的には、コンデンサ1
7,放電用抵抗19,及び充電回路21の各素子定数)
によって決まる既知の値であるため、IGSW7がオン
された時点のトリップカウンタの値から、IGSW7が
オフされていた大体の時間を求めることができる。
First, the value of the trip counter when the IGSW 7 is turned on represents the number of times the capacitor 17 has been charged and discharged as shown in FIG. 3 while the IGSW 7 has been turned off. The time (discharge time) Th required for the charging voltage Vc to decrease from the specified value Vk to the threshold voltage Vth,
7 from the threshold voltage Vth to the specified value Vk
The time (charge time) Tj required to increase the charge / discharge characteristics of the capacitor 17 (specifically, the capacitor 1
7, each element constant of the discharging resistor 19 and the charging circuit 21)
Since it is a known value determined by the IGSW 7, the approximate time during which the IGSW 7 has been turned off can be obtained from the value of the trip counter when the IGSW 7 is turned on.

【0072】そこで、マイコン9は、図2のS130に
て、トリップカウンタの値が、N(但し、Nは1以上の
整数)であったとすると、IGSW7のオフ時間Tof
fを、「Th+(N−1)×(Tj+Th)」から「T
h+N×(Tj+Th)」までの範囲内の時間であると
算出するのである。
Then, if the value of the trip counter is N (where N is an integer of 1 or more) in S130 of FIG. 2, the microcomputer 9 sets the off time Tof of the IGSW 7 to OFF.
f from “Th + (N−1) × (Tj + Th)” to “T
h + N × (Tj + Th) ”.

【0073】以上のような本実施形態のECU1によれ
ば、IGSW7がオフされている期間中に、制御部へ常
時電力を供給する必要がなく、コンデンサ17の充電電
圧Vcが規定値Vkからしきい値電圧Vthまで低下す
る毎に、そのコンデンサ17を規定値Vkまで充電する
間だけ、制御部へ電力を供給すれば良い。また、電力を
常時供給しなければならないのは、コンデンサ17の充
電電圧Vcがしきい値電圧Vthまで低下したことを検
知してメインリレー5をオンさせるためのコンデンサ電
圧監視回路23だけであり、そのコンデンサ電圧監視回
路23は、コンパレータCMP1を用いた簡単且つ省電
力な回路であるため、時計を構成する発振回路などより
も消費電力を小さく抑えることができる。そして更に、
このECU1によれば、制御部が他の装置とデータ通信
を行うための回路や複雑な通信ソフトを追加する必要が
無い。
According to the ECU 1 of the present embodiment as described above, it is not necessary to constantly supply power to the control unit during the period in which the IGSW 7 is turned off, and the charging voltage Vc of the capacitor 17 is reduced from the specified value Vk. Every time the voltage drops to the threshold voltage Vth, power may be supplied to the control unit only while the capacitor 17 is charged to the specified value Vk. Further, only the capacitor voltage monitoring circuit 23 for detecting that the charging voltage Vc of the capacitor 17 has dropped to the threshold voltage Vth and turning on the main relay 5 only needs to constantly supply power, Since the capacitor voltage monitoring circuit 23 is a simple and power-saving circuit using the comparator CMP1, the power consumption can be suppressed smaller than that of an oscillation circuit or the like forming a timepiece. And further
According to the ECU 1, there is no need to add a circuit or complicated communication software for the control unit to perform data communication with another device.

【0074】よって、本実施形態のECU1によれば、
簡単な構成で、且つ、バッテリ3の電力を大きく消費す
ることなく、IGSW7のオフ時間を制御部にて計測す
ることができる。特に、IGSW7のオフ時には、エン
ジンが停止してバッテリ3が充電されないため、バッテ
リ3の消費電力を低く抑えることが重要であり、本EC
U1の構成及び方法が有効である。
Therefore, according to the ECU 1 of the present embodiment,
The off-time of the IGSW 7 can be measured by the control unit with a simple configuration and without greatly consuming the power of the battery 3. In particular, when the IGSW 7 is turned off, the engine stops and the battery 3 is not charged, so it is important to keep the power consumption of the battery 3 low.
The configuration and method of U1 are effective.

【0075】一方、本実施形態のECU1の構成及び方
法は、当該ECU1とは別の時計を備えた計時装置によ
りIGSW7のオフ時間を高精度に計測するシステムに
追加して、その計時装置が正常に動作しているか否かを
判断するためのダイアグノシス用としても使用すること
ができる。
On the other hand, the configuration and method of the ECU 1 of the present embodiment are added to a system for measuring the off-time of the IGSW 7 with a high accuracy by a timer provided with a clock different from the ECU 1, and the timer is operated normally. It can also be used for diagnosis for determining whether or not it is operating.

【0076】また更に、本実施形態のECU1によれ
ば、IGSW7がオフされている期間中に、制御部の中
心を成すマイコン9が定期的に動作することとなるた
め、そのマイコン9にて、IGSW7のオフ時間の計測
精度を上げるための補足的な処理を行うこともできる。
Further, according to the ECU 1 of the present embodiment, while the IGSW 7 is turned off, the microcomputer 9 forming the center of the control unit operates periodically. Supplementary processing for improving the measurement accuracy of the off time of the IGSW 7 can also be performed.

【0077】例えば、マイコン9が、IGSW7のオフ
期間中において動作する毎に、A/D変換器11を介し
てコンデンサ17の充電電圧Vcの変化度合(つまり、
充電時のVcの変化度合)及びバッテリ電圧のうちの少
なくとも一方を検出すると共に、その検出結果に基づい
て、コンデンサ17の充電目標値である規定値Vkを補
正することにより、上記放電時間Th及び充電時間Tj
が常に一定となるようにすれば、オフ時間の測定精度を
向上させることができる。
For example, each time the microcomputer 9 operates during the off period of the IGSW 7, the degree of change of the charging voltage Vc of the capacitor 17 via the A / D converter 11 (that is,
By detecting at least one of the change degree of Vc during charging) and the battery voltage, and correcting the specified value Vk as the charging target value of the capacitor 17 based on the detection result, the discharge time Th and the discharge time Charging time Tj
Is always constant, the measurement accuracy of the off-time can be improved.

【0078】また例えば、マイコン9が、IGSW7の
オフ期間中において動作する毎に、上記検出結果(バッ
テリ電圧やコンデンサ17の充電電圧Vcの変化度合)
に基づいて、バッテリ3の蓄電量が所定量よりも低下し
ているか否かを判定し、バッテリ3の蓄電量が所定量よ
りも低下していると判定した場合には、以後のオフ時間
の計測動作を中止して、バッテリ上がりが起こるのを確
実に防止するようにしても良い。
Further, for example, every time the microcomputer 9 operates during the off period of the IGSW 7, the above detection result (the change degree of the battery voltage or the charging voltage Vc of the capacitor 17) is obtained.
It is determined whether the charged amount of the battery 3 is lower than the predetermined amount based on the following formula, and if it is determined that the charged amount of the battery 3 is lower than the predetermined amount, The measurement operation may be stopped to surely prevent the battery from running out.

【0079】この場合、例えば図4に示すように、コン
デンサ電圧監視回路23から出力される放電完了信号を
メインリレー制御回路25に伝達させる信号経路Kに、
IGSW7がオンになると、該IGSW7がオフされた
後も上記信号経路Kを継続して連通させるセット状態と
なり、IGSW7のオフ時にマイコン9からのリセット
信号を受けると、上記信号経路Kを遮断するリセット状
態となるスイッチング回路61を設けておき、マイコン
9は、バッテリ3の蓄電量が所定量よりも低下している
と判定すると、上記スイッチング回路61にリセット信
号を出力して、以後、IGSW7がオンされるまで、メ
インリレー5がオンされないように(即ち、当該マイコ
ン9を含む制御部に電力が供給されないように)すれば
良い。
In this case, for example, as shown in FIG. 4, a signal path K for transmitting the discharge completion signal output from the capacitor voltage monitoring circuit 23 to the main relay control circuit 25 is
When the IGSW 7 is turned on, a set state is established in which the signal path K is continuously communicated even after the IGSW 7 is turned off. When a reset signal from the microcomputer 9 is received when the IGSW 7 is turned off, a reset that cuts off the signal path K is performed. When the microcomputer 9 determines that the charged amount of the battery 3 is lower than the predetermined amount, the microcomputer 9 outputs a reset signal to the switching circuit 61, and thereafter the IGSW 7 is turned on. Until the main relay 5 is turned on (that is, power is not supplied to the control unit including the microcomputer 9).

【0080】尚、上記スイッチング回路61は、例え
ば、電源回路15からの副電源電圧Vsを受けて動作す
ると共に、入力回路13からのIGSW信号がセット端
子(S)に入力され、マイコン9からの上記リセット信
号がリセット端子(R)に入力されるラッチ回路63
と、上記信号経路Kに設けられて、ラッチ回路63の出
力がハイレベルの時(ラッチ回路63がセット状態の
時)に信号経路Kを連通させ、ラッチ回路63の出力が
ローレベルの時(ラッチ回路63がリセット状態の時)
に信号経路Kを遮断するバッファ回路65とから構成す
ることができる。
The switching circuit 61 operates upon receiving, for example, the sub power supply voltage Vs from the power supply circuit 15, and receives the IGSW signal from the input circuit 13 to the set terminal (S). Latch circuit 63 in which the reset signal is input to reset terminal (R)
The signal path K is connected to the signal path K when the output of the latch circuit 63 is at a high level (when the latch circuit 63 is in a set state) and when the output of the latch circuit 63 is at a low level ( (When the latch circuit 63 is in the reset state)
And a buffer circuit 65 that cuts off the signal path K.

【0081】次に、第2実施形態のECUについて、図
5を用いて説明する。尚、図5において、図1と同じも
のについては、同一の符号を付しているため、説明を省
略する。図5に示すように、第2実施形態のECU2
は、第1実施形態のECU1と比較すると、下記の
(A)及び(B)の点だけが異なっている。
Next, an ECU according to a second embodiment will be described with reference to FIG. Note that, in FIG. 5, the same components as those in FIG. 1 are denoted by the same reference numerals, and description thereof will be omitted. As shown in FIG. 5, the ECU 2 of the second embodiment
Is different from the ECU 1 of the first embodiment only in the following points (A) and (B).

【0082】(A):メインリレー制御回路25にはI
GSW端子J3からのVIGが入力されない。このた
め、メインリレー制御回路25は、コンデンサ電圧監視
回路23から充放電完了信号が出力されるか、マイコン
9からメインリレー駆動信号が出力されると、メインリ
レー5のコイルLに電流を流して該メインリレー5をオ
ンさせる。
(A): The main relay control circuit 25
VIG is not input from the GSW terminal J3. Therefore, when the charge / discharge completion signal is output from the capacitor voltage monitoring circuit 23 or the main relay drive signal is output from the microcomputer 9, the main relay control circuit 25 applies a current to the coil L of the main relay 5. The main relay 5 is turned on.

【0083】(B):その代わりに、IGSW端子J3
からのVIGと主電源端子J1からのV+Bとが、ダイ
オードD1,D2によりワイヤードオアされて、電源回
路15と充電回路21とに供給される。そして、電源回
路15は、そのワイヤードオアの電圧(即ち、VIG又
はV+B)から主電源電圧Vmを生成し、充電回路21
は、上記ワイヤードオアの電圧で動作する。
(B): Instead, IGSW terminal J3
And V + B from the main power supply terminal J1 are wired-ORed by the diodes D1 and D2 and supplied to the power supply circuit 15 and the charging circuit 21. Then, the power supply circuit 15 generates the main power supply voltage Vm from the wired-OR voltage (ie, VIG or V + B), and
Operate at the wired-OR voltage.

【0084】つまり、第2実施形態のECU2では、I
GSW7のオン時に、IGSW端子J3から動作電力が
供給されるようになっている。そして、このような第2
実施形態のECU2によっても、第1実施形態のECU
1と全く同様に動作することとなり、上記ECU1と全
く同じ効果が得られる。
That is, in the ECU 2 of the second embodiment, I
When the GSW 7 is turned on, operating power is supplied from the IGSW terminal J3. And such a second
The ECU 2 of the first embodiment is also used by the ECU 2 of the first embodiment.
1 operates in exactly the same way as the ECU 1, and the same effects as those of the ECU 1 are obtained.

【0085】尚、この第2実施形態の構成は、図4に示
した第1実施形態の変形例に対しても、同様に適用する
ことができる。以上、本発明の一実施形態について説明
したが、本発明は、種々の形態を採り得ることは言うま
でもない。
The structure of the second embodiment can be similarly applied to the modification of the first embodiment shown in FIG. As mentioned above, although one Embodiment of this invention was described, it cannot be overemphasized that this invention can take various forms.

【0086】例えば、 上記各実施形態において、トリ
ップカウンタ用のメモリとしては、スタンバイRAMに
代えて、フラッシュROMやEEPROMなどのデータ
書換可能な不揮発性ROMを用いても良い。また、上記
各実施形態のECUは、自動車のIGSWを電源スイッ
チとしたものであったが、本発明は、IGSW以外のス
イッチを電源スイッチとする電子制御装置についても、
全く同様に適用することができる。
For example, in each of the above embodiments, a data rewritable nonvolatile ROM such as a flash ROM or an EEPROM may be used as the memory for the trip counter instead of the standby RAM. Although the ECU of each of the above embodiments uses the IGSW of the vehicle as a power switch, the present invention also relates to an electronic control device that uses a switch other than the IGSW as a power switch.
Exactly the same can be applied.

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

【図1】 第1実施形態の電子制御装置とそれの電源系
の配線とを表す回路図である。
FIG. 1 is a circuit diagram illustrating an electronic control device according to a first embodiment and wiring of a power supply system thereof.

【図2】 電子制御装置のマイコンで実行されるオフ時
間計測用処理を表すフローチャートである。
FIG. 2 is a flowchart showing off-time measurement processing executed by a microcomputer of the electronic control unit.

【図3】 第1実施形態の電子制御装置の作用を説明す
るタイムチャートである。
FIG. 3 is a time chart illustrating an operation of the electronic control device according to the first embodiment.

【図4】 変形例の電子制御装置とそれの電源系の配線
とを表す回路図である。
FIG. 4 is a circuit diagram illustrating an electronic control device of a modified example and wiring of a power supply system thereof.

【図5】 第2実施形態の電子制御装置とそれの電源系
の配線とを表す回路図である。
FIG. 5 is a circuit diagram illustrating an electronic control device according to a second embodiment and wiring of a power supply system thereof.

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

1,2…電子制御装置(ECU)、3…バッテリ、5…
メインリレー、7…イグニッションスイッチ(IGS
W)、9…マイコン、11…A/D変換器、13…入力
回路、15…電源回路、17…コンデンサ、21…充電
回路、23…コンデンサ電圧監視回路、25…メインリ
レー制御回路、19,31,33,37,41,43,
45,49…抵抗、35,D1,D2…ダイオード、O
P1…オペアンプ、CMP1…コンパレータ、47…P
NPトランジスタ、51…NPNトランジスタ、61…
スイッチング回路、63…ラッチ回路、65…バッファ
回路、H1…給電ラインとしての配線、J1…主電源端
子、J2…副電源端子、J3…IGSW端子、J4…メ
インリレー駆動端子
1, 2,... Electronic control unit (ECU), 3,.
Main relay, 7 ... Ignition switch (IGS
W), 9: microcomputer, 11: A / D converter, 13: input circuit, 15: power supply circuit, 17: capacitor, 21: charging circuit, 23: capacitor voltage monitoring circuit, 25: main relay control circuit, 19, 31, 33, 37, 41, 43,
45, 49: resistor, 35, D1, D2: diode, O
P1: operational amplifier, CMP1: comparator, 47: P
NP transistor, 51 ... NPN transistor, 61 ...
Switching circuit, 63 latch circuit, 65 buffer circuit, H1 wiring as power supply line, J1 main power terminal, J2 auxiliary power terminal, J3 IGSW terminal, J4 main relay drive terminal

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 電源スイッチがオンされている時にバッ
テリから電力が供給されて動作する制御部を有した電子
制御装置において、前記電源スイッチがオフされていた
時間を前記制御部で計測するための電源スイッチのオフ
時間計測方法であって、 前記電源スイッチがオンされている間に、 前記制御部に、不揮発性のカウンタの値をクリアさせて
おくと共に、コンデンサを該コンデンサの充電電圧が所
定の規定値となるように充電させておき、 前記電源スイッチがオフされて該電源スイッチが次にオ
ンされるまでの間は、 前記コンデンサの充電電圧が前記規定値よりも小さい所
定のしきい値まで低下する毎に、前記制御部へ前記バッ
テリからの電力を供給して、該制御部に、前記カウンタ
をカウントアップさせると共に、前記コンデンサを充電
させ、該コンデンサの充電電圧が前記規定値に達したら
前記制御部への電力供給を停止する、という手順を繰り
返し、 前記電源スイッチが再びオンされた時に、 前記制御部が前記カウンタの値をクリアする前に、該制
御部に、前記カウンタの値に基づき前記電源スイッチが
オフされていた時間を算出させること、 を特徴とする電源スイッチのオフ時間計測方法。
An electronic control device having a control unit that operates by being supplied with power from a battery when a power switch is turned on, wherein the control unit measures the time that the power switch is turned off. A method for measuring an off time of a power switch, wherein the control unit clears a value of a non-volatile counter while the power switch is turned on, and sets a capacitor to a predetermined charging voltage. In the period from when the power switch is turned off to when the power switch is next turned on, the charging voltage of the capacitor is reduced to a predetermined threshold value smaller than the specified value. Each time the voltage drops, the controller supplies power from the battery to the controller, causing the controller to count up the counter, When the charging voltage of the capacitor reaches the specified value, the power supply to the control unit is stopped.When the power switch is turned on again, the control unit changes the value of the counter. Before the clearing, the control unit calculates the time during which the power switch has been turned off based on the value of the counter.
【請求項2】 請求項1に記載の電源スイッチのオフ時
間計測方法において、 前記電源スイッチは、自動車のイグニッションスイッチ
であり、 前記制御部は、前記自動車のエンジンを制御するもので
あること、 を特徴とする電源スイッチのオフ時間計測方法。
2. The method of measuring the off time of a power switch according to claim 1, wherein the power switch is an ignition switch of a vehicle, and the control unit controls an engine of the vehicle. Characteristic power switch off time measurement method.
【請求項3】 電源スイッチがオンされている時にバッ
テリから電力が供給されて動作する制御部を有した電子
制御装置であって、 前記制御部に前記バッテリからの電力を供給するための
当該電子制御装置の端子と前記バッテリとを結ぶ給電ラ
インに設けられ、オンすることにより該給電ラインを接
続させて前記制御部を動作させる給電用スイッチング手
段を、駆動指令に応じてオンさせる駆動手段と、 前記制御部によって前記バッテリからの電力を元に充電
されるコンデンサと、 該コンデンサの充電電圧が所定のしきい値まで低下した
ことを検知すると、前記駆動手段に前記駆動指令を出力
して、該駆動手段に前記給電用スイッチング手段をオン
させるコンデンサ電圧監視手段とを備え、 更に、前記制御部は、 前記電源スイッチがオンされたことにより当該制御部が
動作したか否かを判定して、肯定判定したならば、前記
コンデンサを、該コンデンサの充電電圧が前記しきい値
よりも大きい所定の規定値となるように充電する第1の
充電制御手段と、 前記電源スイッチのオンではなく前記コンデンサ電圧監
視手段の作用により当該制御部が動作したか否かを判定
して、肯定判定したならば、前記駆動手段に前記駆動指
令を出力して前記給電用スイッチング手段のオン状態を
維持すると共に、不揮発性のカウンタをカウントアップ
し、更に、前記コンデンサを充電して、該コンデンサの
充電電圧が前記規定値に達すると、前記駆動手段への前
記駆動指令の出力を停止して前記給電用スイッチング手
段をオフさせる第2の充電制御手段と、 を備えると共に、前記第1の充電制御手段により肯定判
定された場合に、前記カウンタの値に基づき前記電源ス
イッチがオフされていた時間を算出し、その後、該カウ
ンタの値をクリアするように構成されていること、を特
徴とする電子制御装置。
3. An electronic control device having a control unit that operates by being supplied with electric power from a battery when a power switch is turned on, wherein the electronic control unit supplies electric power from the battery to the control unit. A drive unit that is provided on a power supply line that connects a terminal of a control device and the battery and that turns on the power supply switching unit that operates the control unit by connecting the power supply line by turning on the power supply unit; When the control unit detects that the capacitor is charged based on the power from the battery and that the charged voltage of the capacitor has decreased to a predetermined threshold, the control unit outputs the drive command to the drive unit, The driving means further includes a capacitor voltage monitoring means for turning on the power supply switching means, and the control unit further comprises: As a result, it is determined whether or not the control unit has been operated. If the determination is affirmative, the capacitor is charged so that the charging voltage of the capacitor becomes a predetermined specified value larger than the threshold value. A first charge control unit, and determining whether or not the control unit has been operated by the action of the capacitor voltage monitoring unit instead of turning on the power switch, and if the determination is affirmative, the drive command is transmitted to the drive unit. To maintain the ON state of the power supply switching means, count up a non-volatile counter, further charge the capacitor, and when the charged voltage of the capacitor reaches the specified value, drive the drive. Second charging control means for stopping the output of the drive command to the power supply means and turning off the power supply switching means, and the first charging control means. When the determination is affirmative, the electronic control unit is configured to calculate the time during which the power switch is turned off based on the value of the counter, and then clear the value of the counter. apparatus.
【請求項4】 請求項3に記載の電子制御装置におい
て、 前記電源スイッチは、自動車のイグニッションスイッチ
であり、 前記制御部は、前記自動車のエンジンを制御するもので
あること、 を特徴とする電子制御装置。
4. The electronic control device according to claim 3, wherein the power switch is an ignition switch of an automobile, and the control unit controls an engine of the automobile. Control device.
JP2001149408A 2001-05-18 2001-05-18 Electronic control device and off-period measurement method of power switch Pending JP2002341067A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001149408A JP2002341067A (en) 2001-05-18 2001-05-18 Electronic control device and off-period measurement method of power switch

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001149408A JP2002341067A (en) 2001-05-18 2001-05-18 Electronic control device and off-period measurement method of power switch

Publications (1)

Publication Number Publication Date
JP2002341067A true JP2002341067A (en) 2002-11-27

Family

ID=18994584

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001149408A Pending JP2002341067A (en) 2001-05-18 2001-05-18 Electronic control device and off-period measurement method of power switch

Country Status (1)

Country Link
JP (1) JP2002341067A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7146265B2 (en) 2003-10-08 2006-12-05 Hitachi, Ltd. Control device with time measuring function
CN101995820A (en) * 2009-08-25 2011-03-30 日立汽车系统株式会社 Power supply control device
KR20170131438A (en) * 2015-03-31 2017-11-29 크라운 이큅먼트 코포레이션 How to control the functional system of a material handling vehicle
CN109656122A (en) * 2019-03-01 2019-04-19 山东交通学院 High-precision pulse time interval measurement method and circuit based on phase detection discriminator and RMS conversion device

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7146265B2 (en) 2003-10-08 2006-12-05 Hitachi, Ltd. Control device with time measuring function
CN101995820A (en) * 2009-08-25 2011-03-30 日立汽车系统株式会社 Power supply control device
EP2290215A3 (en) * 2009-08-25 2011-06-08 Hitachi Automotive Systems, Ltd. Power supply control device
KR20170131438A (en) * 2015-03-31 2017-11-29 크라운 이큅먼트 코포레이션 How to control the functional system of a material handling vehicle
KR102412209B1 (en) 2015-03-31 2022-06-23 크라운 이큅먼트 코포레이션 How to Control Functional Systems in Material Handling Vehicles
CN109656122A (en) * 2019-03-01 2019-04-19 山东交通学院 High-precision pulse time interval measurement method and circuit based on phase detection discriminator and RMS conversion device

Similar Documents

Publication Publication Date Title
EP2187028B1 (en) Electronic control apparatus
US7990111B2 (en) Method and apparatus for detecting internal electric state of in-vehicle secondary battery
JP2008145349A (en) Battery charging rate estimation method and device, and battery power supply system
JP2002010503A (en) Charge and discharge device and charging and discharging method
JP4956476B2 (en) Battery discharge duration prediction method, battery state detection method, battery state detection device, and battery power supply system
JP5690698B2 (en) Battery pack for electric tools
JP2007218230A (en) Economical running control device
JP2006211800A (en) Device for estimating charged state of battery for vehicle
JP5823292B2 (en) Method and apparatus for detecting state of power storage device
JPH11162526A (en) Battery condition detecting device
JP5817566B2 (en) Power detection system
US4994728A (en) Apparatus for diagnosing vehicle-mounted battery
EP1843139B1 (en) Ultra-low power programmable timer and low voltage detection circuits
JP2002341067A (en) Electronic control device and off-period measurement method of power switch
JP2001078365A (en) Battery capacity measuring apparatus
WO2004027525A1 (en) Electronic clock
CN110782547A (en) Wake-up processing method and device for vehicle-mounted module, electronic equipment and storage medium
JP2006010501A (en) Battery status administration system
JP4472963B2 (en) Control device with time measurement function
US6986070B2 (en) Microcomputer that cooperates with an external apparatus to be driven by a drive signal
JP3186048B2 (en) Battery capacity detection device
JP6583718B2 (en) Battery deterioration judgment device
JP2002310044A (en) Residual capacity inspection method of storage battery and residual capacity inspection device of storage battery
JP3220803B2 (en) Rechargeable battery charging method
JPH05113166A (en) Glow plug control device for diesel engine