JP5674500B2 - Pulse signal detection method, pulse signal detection circuit, ignition device for internal combustion engine, and program - Google Patents

Pulse signal detection method, pulse signal detection circuit, ignition device for internal combustion engine, and program Download PDF

Info

Publication number
JP5674500B2
JP5674500B2 JP2011024049A JP2011024049A JP5674500B2 JP 5674500 B2 JP5674500 B2 JP 5674500B2 JP 2011024049 A JP2011024049 A JP 2011024049A JP 2011024049 A JP2011024049 A JP 2011024049A JP 5674500 B2 JP5674500 B2 JP 5674500B2
Authority
JP
Japan
Prior art keywords
timer value
detected
timer
pulse
pulse signal
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.)
Active
Application number
JP2011024049A
Other languages
Japanese (ja)
Other versions
JP2012163044A (en
Inventor
真嗣 白石
真嗣 白石
東城 徳三
徳三 東城
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.)
Shindengen Electric Manufacturing Co Ltd
Original Assignee
Shindengen Electric Manufacturing 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 Shindengen Electric Manufacturing Co Ltd filed Critical Shindengen Electric Manufacturing Co Ltd
Priority to JP2011024049A priority Critical patent/JP5674500B2/en
Publication of JP2012163044A publication Critical patent/JP2012163044A/en
Application granted granted Critical
Publication of JP5674500B2 publication Critical patent/JP5674500B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Ignition Installations For Internal Combustion Engines (AREA)
  • Combined Controls Of Internal Combustion Engines (AREA)

Description

本発明は、パルス信号検出方法、パルス信号検出回路、内燃機関の点火装置およびプログラムに関する。   The present invention relates to a pulse signal detection method, a pulse signal detection circuit, an ignition device for an internal combustion engine, and a program.

内燃機関(エンジン)用の点火装置(例えばCDI)は、内燃機関のクランクシャフトに取り付けられたロータと、ロータの外周に設けられた2つのリラクタと、ピックアップコイルと、パルス信号検出回路と、パルス信号検出回路からの点火タイミングに従って内燃機関に点火する点火部と、を備えている。   An ignition device (for example, CDI) for an internal combustion engine (engine) includes a rotor attached to a crankshaft of the internal combustion engine, two reluctors provided on the outer periphery of the rotor, a pickup coil, a pulse signal detection circuit, a pulse And an ignition unit that ignites the internal combustion engine in accordance with the ignition timing from the signal detection circuit.

ピックアップコイルは、各リラクタの前端部および後端部を検出して、クランクシャフトの回転に応じた正および負極性の被検出パルスを繰り返し有するエンジン回転パルス信号(クランク角信号)を出力する。パルス信号検出回路は、マイコンを用いてエンジン回転パルス信号の被検出パルスを検出する。このマイコンは、検出された被検出パルスに基づいて、固定点火タイミング、演算点火タイミングおよびエンジン回転数を演算する。具体的には、パルス信号検出回路は、エンジン回転パルス信号の正極性の被検出パルスのみに対応したパルスを有する正パルス信号と、エンジン回転パルス信号の負極性の被検出パルスのみに対応したパルスを有する負パルス信号と、を生成する。   The pickup coil detects the front end portion and the rear end portion of each reluctator, and outputs an engine rotation pulse signal (crank angle signal) repeatedly having positive and negative detected pulses corresponding to the rotation of the crankshaft. The pulse signal detection circuit detects a detected pulse of the engine rotation pulse signal using a microcomputer. The microcomputer calculates a fixed ignition timing, a calculated ignition timing, and an engine speed based on the detected pulse to be detected. Specifically, the pulse signal detection circuit includes a positive pulse signal having a pulse corresponding only to a positive detected pulse of the engine rotation pulse signal, and a pulse corresponding only to a negative detected pulse of the engine rotation pulse signal. A negative pulse signal having

正パルス信号はマイコンの割り込み端子に入力され、マイコンは正パルス信号のパルスに基づいて時間計測を行う。負パルス信号はマイコンのインプットキャプチャ端子に入力され、マイコンは負パルス信号のパルスに基づいて時間計測を行う。   The positive pulse signal is inputted to the interrupt terminal of the microcomputer, and the microcomputer performs time measurement based on the pulse of the positive pulse signal. The negative pulse signal is input to the input capture terminal of the microcomputer, and the microcomputer performs time measurement based on the negative pulse signal pulse.

マイコンは、正パルス信号の所定のパルスが検出されたタイミングで、フリーランタイマからタイマ値を取得して、取得されたタイマ値に基づいてエンジン回転数および演算点火タイミングを演算する。また、マイコンは、負パルス信号の所定のパルスが検出されたタイミングで、フリーランタイマからタイマ値を取得して、取得されたタイマ値に基づいて固定点火タイミングを演算する。   The microcomputer acquires a timer value from the free-run timer at a timing when a predetermined pulse of the positive pulse signal is detected, and calculates the engine speed and the calculated ignition timing based on the acquired timer value. Further, the microcomputer acquires a timer value from the free-run timer at a timing when a predetermined pulse of the negative pulse signal is detected, and calculates a fixed ignition timing based on the acquired timer value.

時間計測専用のインプットキャプチャ端子で負パルス信号のパルスが検出されると、マイコンは瞬時にタイマ値を取得できる。一方、汎用の割り込み端子で正パルス信号のパルスが検出されると、マイコンは、実行中の処理を中断して割り込み処理を開始して、この割り込み処理を用いてタイマ値を取得する。   When a negative pulse signal pulse is detected at the input capture terminal dedicated to time measurement, the microcomputer can acquire the timer value instantly. On the other hand, when a pulse of a positive pulse signal is detected at the general-purpose interrupt terminal, the microcomputer interrupts the process being executed and starts the interrupt process, and acquires a timer value using this interrupt process.

このようなインプットキャプチャ端子を1つだけ有するマイコンは、複数のインプットキャプチャ端子を有するマイコンより安価である。従って、このマイコンを備える点火装置も安価にできる。   A microcomputer having only one input capture terminal is less expensive than a microcomputer having a plurality of input capture terminals. Therefore, an ignition device provided with this microcomputer can also be made inexpensive.

上記点火装置に関連して、例えば、特許文献1に記載されている点火装置も知られている。   In connection with the above ignition device, for example, an ignition device described in Patent Document 1 is also known.

特開2004−176625号公報JP 2004-176625 A

しかしながら、上述した従来のパルス信号検出回路が有するマイコンは、割り込み端子にパルスが入力されると、割り込み処理を用いてタイマ値を取得するので、図8に示すように、パルスが検出されたタイミング(時刻t10)と、タイマ値が取得されたタイミング(時刻t11)との間に、割り込み処理に起因した誤差時間が発生してしまう。即ち、タイマ値が取得されるまでの割り込み処理の実行時間や、これに加えて他の割り込み処理が実行中の場合には他の割り込み処理が終了するまでの待ち時間によって、マイコンがタイマ値を取得できるタイミングは、パルスが検出されたタイミング(時刻t10)から遅れることになる。よって、取得されたタイマ値に基づいて計算される点火タイミングに、目標点火タイミングに対する誤差が発生してしまうという問題がある。   However, since the microcomputer included in the conventional pulse signal detection circuit described above acquires a timer value using interrupt processing when a pulse is input to the interrupt terminal, the timing at which the pulse is detected as shown in FIG. An error time due to the interrupt processing occurs between (time t10) and the timing (time t11) when the timer value is acquired. In other words, the microcomputer sets the timer value according to the execution time of the interrupt processing until the timer value is acquired, and in addition to this, the waiting time until the other interrupt processing ends when other interrupt processing is being executed. The acquisition timing is delayed from the timing (time t10) when the pulse is detected. Therefore, there is a problem that an error with respect to the target ignition timing occurs in the ignition timing calculated based on the acquired timer value.

そこで、本発明に係る実施例では、安価なマイコンを用いた場合であっても、正確なタイミングを得ることができるパルス信号検出方法、パルス信号検出回路、点火装置およびプログラムを提供する。   Therefore, the embodiment according to the present invention provides a pulse signal detection method, a pulse signal detection circuit, an ignition device, and a program that can obtain accurate timing even when an inexpensive microcomputer is used.

本発明の一態様に係る実施例に従ったパルス信号検出方法は、
被検出パルス信号が入力される、検出部と、処理部と、タイマと、目標タイマ値計算部と、判定部と、信号出力部とを備えるパルス信号検出回路におけるパルス信号検出方法であって、
前記検出部により、前記被検出パルス信号の第1被検出パルスを検出する第1のステップと、
前記処理部により、前記第1被検出パルスが検出された後に、実行中の処理を中断して割り込み処理を開始する第2のステップと、
前記処理部により、前記割り込み処理を用いて、前記タイマからタイマ値を第1検出タイマ値として取得する第3のステップと、
前記目標タイマ値計算部により、取得された前記第1検出タイマ値に所定の第1出力時間を加算して、その加算結果から、前記第1被検出パルスが検出されたタイミングと前記第1検出タイマ値が取得されたタイミングとの差である、予め求められた誤差時間を減算した第1目標タイマ値を計算する第4のステップと、
前記判定部により、前記タイマの前記タイマ値が前記第1目標タイマ値に達したか否か判定する第5のステップと、
前記信号出力部により、前記タイマの前記タイマ値が前記第1目標タイマ値に達した時に、第1出力信号を出力する第6のステップと、を含む。
A pulse signal detection method according to an embodiment of one aspect of the present invention includes:
A pulse signal detection method in a pulse signal detection circuit comprising a detection unit, a processing unit, a timer, a target timer value calculation unit, a determination unit, and a signal output unit, to which a detected pulse signal is input,
A first step of detecting a first detected pulse of the detected pulse signal by the detection unit;
A second step of interrupting a process being executed and starting an interrupt process after the first detected pulse is detected by the processing unit;
A third step of acquiring a timer value from the timer as a first detection timer value by the processing unit using the interrupt processing;
The target timer value calculation unit adds a predetermined first output time to the acquired first detection timer value, and from the addition result, the timing at which the first detected pulse is detected and the first detection A fourth step of calculating a first target timer value obtained by subtracting a previously determined error time, which is a difference from the timing at which the timer value is acquired;
A fifth step of determining whether or not the timer value of the timer has reached the first target timer value by the determination unit;
And a sixth step of outputting a first output signal by the signal output unit when the timer value of the timer reaches the first target timer value.

前記パルス信号検出方法において、
前記被検出パルス信号は、内燃機関の回転に応じて生成され、
前記第1出力信号は、前記内燃機関を点火するための信号であっても良い。
In the pulse signal detection method,
The detected pulse signal is generated according to the rotation of the internal combustion engine,
The first output signal may be a signal for igniting the internal combustion engine.

前記パルス信号検出方法において、
前記タイマは、前記タイマ値として、初期タイマ値から最終タイマ値までを繰り返しカウントし、
前記第1出力時間は、前記誤差時間より長くても良い。
In the pulse signal detection method,
The timer repeatedly counts from the initial timer value to the final timer value as the timer value,
The first output time may be longer than the error time.

前記パルス信号検出方法において、
前記第1のステップの前に、回転数計算部により、前記被検出パルス信号に基づいて前記内燃機関の回転数を計算する第7のステップをさらに含み、
前記第3のステップと前記第4のステップとの間に、出力時間設定部により、前記回転数に応じて、前記第1出力時間を設定する第8のステップをさらに含んでも良い。
In the pulse signal detection method,
Before the first step, the engine speed calculation unit further includes a seventh step of calculating the rotation speed of the internal combustion engine based on the detected pulse signal,
Between the third step and the fourth step, an output time setting unit may further include an eighth step of setting the first output time according to the rotation speed.

前記パルス信号検出方法において、
前記第3のステップと前記第8のステップとの間に、前記処理部により、前記回転数が所定の回転数以上か否か判定する第9のステップをさらに含み、
前記第9のステップにおいて前記回転数が前記所定の回転数以上の場合に、前記第8のステップに進んでも良い。
In the pulse signal detection method,
Between the third step and the eighth step, the processing unit further includes a ninth step of determining whether the rotational speed is equal to or higher than a predetermined rotational speed,
In the ninth step, when the rotational speed is equal to or higher than the predetermined rotational speed, the process may proceed to the eighth step.

前記パルス信号検出方法において、
前記第9のステップにおいて前記回転数が前記所定の回転数より低い場合に、前記検出部により、前記第1のステップで検出された前記第1被検出パルスとは異なる第2被検出パルスを検出する第10のステップと、
前記処理部により、前記第10のステップで前記第2被検出パルスが検出された後に、実行中の処理を中断して割り込み処理を開始する第11のステップと、
前記処理部により、前記第11のステップの前記割り込み処理を用いて、前記タイマから前記タイマ値を第2検出タイマ値として取得する第12のステップと、
前記目標タイマ値計算部により、前記第12のステップにおいて取得された前記第2検出タイマ値に第2出力時間を加算して、その加算結果から前記誤差時間を減算した第2目標タイマ値を計算する第13のステップと、
前記判定部により、前記タイマの前記タイマ値が前記第2目標タイマ値に達したか否か判定する第14のステップと、
前記信号出力部により、前記タイマの前記タイマ値が前記第2目標タイマ値に達した時に、前記内燃機関を点火する第2出力信号を出力する第15のステップと、をさらに含んでも良い。
In the pulse signal detection method,
When the rotation speed is lower than the predetermined rotation speed in the ninth step, the detection unit detects a second detected pulse different from the first detected pulse detected in the first step. A tenth step,
An eleventh step of interrupting a process being executed and starting an interrupt process after the second detected pulse is detected in the tenth step by the processing unit;
A twelfth step of acquiring the timer value as a second detection timer value from the timer by the processing unit using the interrupt process of the eleventh step;
The target timer value calculation unit calculates a second target timer value obtained by adding a second output time to the second detection timer value acquired in the twelfth step and subtracting the error time from the addition result. A thirteenth step,
A fourteenth step of determining whether or not the timer value of the timer has reached the second target timer value by the determination unit;
The signal output unit may further include a fifteenth step of outputting a second output signal for igniting the internal combustion engine when the timer value of the timer reaches the second target timer value.

前記パルス信号検出方法において、前記第2出力時間は、前記回転数によらず一定であっても良い。   In the pulse signal detection method, the second output time may be constant regardless of the rotational speed.

本発明の一態様に係る実施例に従ったパルス信号検出回路は、
タイマ値により時間を計測するタイマと、
被検出パルス信号の第1被検出パルスを検出する検出部と、
前記第1被検出パルスが検出された後に、実行中の処理を中断して割り込み処理を開始して、前記割り込み処理を用いて、前記タイマから前記タイマ値を第1検出タイマ値として取得する処理部と、
取得された前記第1検出タイマ値に所定の第1出力時間を加算して、その加算結果から、前記第1被検出パルスが検出されたタイミングと前記第1検出タイマ値が取得されたタイミングとの差である、予め求められた誤差時間を減算した第1目標タイマ値を計算する目標タイマ値計算部と、
前記タイマの前記タイマ値が前記第1目標タイマ値に達したか否か判定する判定部と、
前記タイマの前記タイマ値が前記第1目標タイマ値に達した時に、第1出力信号を出力する信号出力部と、を備える。
A pulse signal detection circuit according to an embodiment of one aspect of the present invention includes:
A timer that measures time according to the timer value;
A detector for detecting a first detected pulse of the detected pulse signal;
After the first detected pulse is detected, a process being executed is interrupted to start an interrupt process, and the interrupt value is used to acquire the timer value from the timer as a first detection timer value And
A predetermined first output time is added to the acquired first detection timer value, and from the addition result, a timing at which the first detected pulse value is detected, a timing at which the first detection timer value is acquired, and A target timer value calculator that calculates a first target timer value obtained by subtracting a previously determined error time,
A determination unit for determining whether or not the timer value of the timer has reached the first target timer value;
And a signal output unit that outputs a first output signal when the timer value of the timer reaches the first target timer value.

前記パルス信号検出回路において、
前記被検出パルス信号は、内燃機関の回転に応じて生成され、
前記第1出力信号は、前記内燃機関を点火するための信号であっても良い。
In the pulse signal detection circuit,
The detected pulse signal is generated according to the rotation of the internal combustion engine,
The first output signal may be a signal for igniting the internal combustion engine.

前記パルス信号検出回路において、
前記タイマは、前記タイマ値として、初期タイマ値から最終タイマ値までを繰り返しカウントし、
前記第1出力時間は、前記誤差時間より長くても良い。
In the pulse signal detection circuit,
The timer repeatedly counts from the initial timer value to the final timer value as the timer value,
The first output time may be longer than the error time.

前記パルス信号検出回路において、
前記被検出パルス信号に基づいて前記内燃機関の回転数を計算する回転数計算部と、
前記回転数に応じて、前記第1出力時間を設定する出力時間設定部と、をさらに備えても良い。
In the pulse signal detection circuit,
A rotation speed calculation unit for calculating the rotation speed of the internal combustion engine based on the detected pulse signal;
An output time setting unit that sets the first output time according to the number of rotations may be further included.

前記パルス信号検出回路において、
前記処理部は、前記回転数が所定の回転数以上か否か判定し、
前記回転数が前記所定の回転数以上の場合に、
前記出力時間設定部は、前記回転数に応じて、前記第1出力時間を設定し、
前記目標タイマ値計算部は、前記第1目標タイマ値を計算しても良い。
In the pulse signal detection circuit,
The processing unit determines whether the rotational speed is equal to or higher than a predetermined rotational speed,
When the rotational speed is equal to or higher than the predetermined rotational speed,
The output time setting unit sets the first output time according to the rotation speed,
The target timer value calculation unit may calculate the first target timer value.

前記パルス信号検出回路において、
前記回転数が前記所定の回転数より低い場合に、
前記検出部は、前記第1被検出パルスとは異なる第2被検出パルスを検出し、
前記処理部は、前記第2被検出パルスが検出された後、前記割り込み処理を用いて、前記タイマから前記タイマ値を第2検出タイマ値として取得し、
前記目標タイマ値計算部は、前記第2検出タイマ値に第2出力時間を加算して、その加算結果から、前記誤差時間を減算した第2目標タイマ値を計算し、
前記判定部は、前記タイマの前記タイマ値が前記第2目標タイマ値に達したか否か判定し、
前記信号出力部は、前記タイマの前記タイマ値が前記第2目標タイマ値に達した時に、前記内燃機関を点火する第2出力信号を出力しても良い。
In the pulse signal detection circuit,
When the rotational speed is lower than the predetermined rotational speed,
The detecting unit detects a second detected pulse different from the first detected pulse;
The processing unit acquires the timer value as the second detection timer value from the timer using the interrupt process after the second detected pulse is detected,
The target timer value calculation unit adds a second output time to the second detection timer value, calculates a second target timer value obtained by subtracting the error time from the addition result,
The determination unit determines whether the timer value of the timer has reached the second target timer value;
The signal output unit may output a second output signal for igniting the internal combustion engine when the timer value of the timer reaches the second target timer value.

前記パルス信号検出回路において、前記第2出力時間は、前記回転数によらず一定であっても良い。   In the pulse signal detection circuit, the second output time may be constant regardless of the rotation speed.

本発明の一態様に係る実施例に従った内燃機関の点火装置は、
内燃機関により駆動されるロータと、
前記ロータの外周に設けられた被検出素子と、
前記被検出素子の前端部および後端部を検出して、前記前端部に対応した正極性の被検出パルスと前記後端部に対応した負極性の被検出パルスとを有する被検出パルス信号を生成する被検出パルス生成部と、
前記被検出パルス信号が入力される前記パルス信号検出回路と、
前記パルス信号検出回路から出力される前記第1出力信号または前記第2出力信号に基づいて前記内燃機関に点火する点火部と、を備える。
An ignition device for an internal combustion engine according to an embodiment of one aspect of the present invention includes:
A rotor driven by an internal combustion engine;
Detected elements provided on the outer periphery of the rotor;
A detected pulse signal having a positive detected pulse corresponding to the front end and a negative detected pulse corresponding to the rear end is detected by detecting a front end and a rear end of the detected element. A detected pulse generator to be generated; and
The pulse signal detection circuit to which the detected pulse signal is input;
An igniter that ignites the internal combustion engine based on the first output signal or the second output signal output from the pulse signal detection circuit.

本発明の一態様に係る実施例に従ったプログラムは、
コンピュータを、
タイマ値により時間を計測するタイマ手段と、
被検出パルス信号の第1被検出パルスを検出する検出手段と、
前記第1被検出パルスが検出された後に、実行中の処理を中断して割り込み処理を開始して、前記割り込み処理を用いて、前記タイマ手段から前記タイマ値を第1検出タイマ値として取得する処理手段と、
取得された前記第1検出タイマ値に所定の第1出力時間を加算して、その加算結果から、前記第1被検出パルスが検出されたタイミングと前記第1検出タイマ値が取得されたタイミングとの差である、予め求められた誤差時間を減算した第1目標タイマ値を計算する目標タイマ値計算手段と、
前記タイマ手段の前記タイマ値が前記第1目標タイマ値に達したか否か判定する判定手段と、
前記タイマ手段の前記タイマ値が前記第1目標タイマ値に達した時に、第1出力信号を出力する信号出力手段と、として機能させる。
A program according to an embodiment of one aspect of the present invention is:
Computer
Timer means for measuring time by a timer value;
Detecting means for detecting a first detected pulse of the detected pulse signal;
After the first detected pulse is detected, the process being executed is interrupted to start the interrupt process, and the timer value is obtained as the first detection timer value from the timer means using the interrupt process. Processing means;
A predetermined first output time is added to the acquired first detection timer value, and from the addition result, a timing at which the first detected pulse value is detected, a timing at which the first detection timer value is acquired, and A target timer value calculating means for calculating a first target timer value obtained by subtracting a previously determined error time,
Determining means for determining whether the timer value of the timer means has reached the first target timer value;
When the timer value of the timer means reaches the first target timer value, the timer means functions as signal output means for outputting a first output signal.

また、前記プログラムにおいて、
前記被検出パルス信号は、内燃機関の回転に応じて生成され、
前記第1出力信号は、前記内燃機関を点火するための信号であっても良い。
In the program,
The detected pulse signal is generated according to the rotation of the internal combustion engine,
The first output signal may be a signal for igniting the internal combustion engine.

本発明の一態様に係るパルス信号検出方法、パルス信号検出回路、内燃機関の点火装置およびプログラムによれば、被検出パルスが検出されたタイミングとタイマ値が取得されたタイミングとの差である誤差時間を予め求めておいて、取得されたタイマ値に出力時間を加算した結果から、その誤差時間を減算した目標タイマ値を算出するようにしている。従って、タイマ値がこの目標タイマ値に達したタイミングを検出することで、被検出パルスが検出されたタイミングから出力時間だけ遅れた正確なタイミングを得ることができる。これにより、安価なマイコンを用いた場合であっても、正確なタイミングを得ることができる。   According to the pulse signal detection method, the pulse signal detection circuit, the internal combustion engine ignition device, and the program according to one aspect of the present invention, an error that is a difference between the timing at which the detected pulse is detected and the timing at which the timer value is acquired. A target timer value is calculated by subtracting the error time from the result of adding the output time to the obtained timer value in advance. Therefore, by detecting the timing at which the timer value reaches the target timer value, it is possible to obtain an accurate timing delayed by the output time from the timing at which the detected pulse is detected. Thereby, even when an inexpensive microcomputer is used, accurate timing can be obtained.

図1は、本発明の実施例1に係る点火装置の概略図である。FIG. 1 is a schematic view of an ignition device according to Embodiment 1 of the present invention. 図2は、本発明の実施例1に係るパルス信号検出回路のブロック図である。FIG. 2 is a block diagram of the pulse signal detection circuit according to the first embodiment of the present invention. 図3は、本発明の実施例1に係るパルス信号検出回路の動作を表すフローチャートである。FIG. 3 is a flowchart showing the operation of the pulse signal detection circuit according to the first embodiment of the present invention. 図4は、本発明の実施例1に係るパルス信号検出回路の動作を表すタイミング図である。FIG. 4 is a timing diagram illustrating the operation of the pulse signal detection circuit according to the first embodiment of the invention. 図5は、本発明の実施例2に係るパルス信号検出回路のブロック図である。FIG. 5 is a block diagram of a pulse signal detection circuit according to the second embodiment of the present invention. 図6は、本発明の実施例2に係るパルス信号検出回路の動作を表すフローチャートである。FIG. 6 is a flowchart showing the operation of the pulse signal detection circuit according to the second embodiment of the present invention. 図7は、本発明の実施例2に係るパルス信号検出回路の動作を表すタイミング図である。FIG. 7 is a timing chart showing the operation of the pulse signal detection circuit according to the second embodiment of the present invention. 図8は、従来のパルス信号検出回路の動作を表すタイミング図である。FIG. 8 is a timing chart showing the operation of the conventional pulse signal detection circuit.

以下、本発明に係る各実施例について図面に基づいて説明する。   Embodiments according to the present invention will be described below with reference to the drawings.

図1は、本発明の実施例1に係る点火装置の概略図である。図1に示すように、点火装置は、ロータ10と、2つのリラクタ(被検出素子)11,12と、ピックアップコイル(被検出パルス生成部)13と、パルス信号検出回路14と、点火部15と、を備える。この点火装置は、例えば、自動2輪車用の内燃機関に用いられる。   FIG. 1 is a schematic view of an ignition device according to Embodiment 1 of the present invention. As shown in FIG. 1, the ignition device includes a rotor 10, two reluctators (detected elements) 11, 12, a pickup coil (detected pulse generation unit) 13, a pulse signal detection circuit 14, and an ignition unit 15. And comprising. This ignition device is used, for example, in an internal combustion engine for a motorcycle.

ロータ10は、内燃機関(図示せず)のクランクシャフト(図示せず)に取り付けられており、内燃機関により駆動される。
2つのリラクタ11,12は、ロータ10の外周に所定の間隔を空けて設けられており、リラクタ12は、ロータ10の外周上に沿ってリラクタ11より長い形状を有している。
The rotor 10 is attached to a crankshaft (not shown) of an internal combustion engine (not shown) and is driven by the internal combustion engine.
The two relaxers 11, 12 are provided on the outer periphery of the rotor 10 at a predetermined interval, and the relaxer 12 has a longer shape along the outer periphery of the rotor 10 than the retractor 11.

ピックアップコイル13は、リラクタ11の前端部E1および後端部E2と、リラクタ12の前端部E3および後端部E4とを検出して、各前端部E1,E3に対応した正極性の被検出パルスP1,P3と各後端部E2,E4に対応した負極性の被検出パルスP2,P4とを有するエンジン回転パルス信号(被検出パルス信号)を生成する。これにより、ピックアップコイル13は、クランクシャフトの回転に応じた正および負極性の被検出パルスを繰り返し有するエンジン回転パルス信号を出力する。つまり、エンジン回転パルス信号は、1周期に、正極性の被検出パルスP1、負極性の被検出パルスP2、正極性の被検出パルス(第1被検出パルス)P3および負極性の被検出パルス(第2被検出パルス)P4を、この順番に有するように生成される。   The pickup coil 13 detects the front end portion E1 and the rear end portion E2 of the relaxer 11, and the front end portion E3 and the rear end portion E4 of the relaxer 12, and detects positive polarity detected pulses corresponding to the front end portions E1 and E3. An engine rotation pulse signal (detected pulse signal) having P1, P3 and negative detected pulses P2, P4 corresponding to the rear end portions E2, E4 is generated. As a result, the pickup coil 13 outputs an engine rotation pulse signal that repeatedly includes positive and negative detected pulses corresponding to the rotation of the crankshaft. That is, the engine rotation pulse signal includes a positive polarity detected pulse P1, a negative polarity detected pulse P2, a positive polarity detected pulse (first detected pulse) P3, and a negative polarity detected pulse (in one cycle). (Second detected pulse) P4 is generated in this order.

パルス信号検出回路14は、入力されたエンジン回転パルス信号における所定の被検出パルスを検出すると共に、検出された被検出パルスに基づいて決定した演算点火タイミングに演算点火信号(第1出力信号)を出力し、固定点火タイミングに固定点火信号(第2出力信号)を出力する。
点火部15は、固定点火信号または演算点火信号に基づいて内燃機関に点火する。
The pulse signal detection circuit 14 detects a predetermined detected pulse in the input engine rotation pulse signal and outputs a calculated ignition signal (first output signal) at a calculated ignition timing determined based on the detected detected pulse. The fixed ignition signal (second output signal) is output at the fixed ignition timing.
The ignition unit 15 ignites the internal combustion engine based on the fixed ignition signal or the calculated ignition signal.

図2は、本発明の実施例1に係るパルス信号検出回路14のブロック図である。図2に示すように、パルス信号検出回路14は、パルス信号生成部20と、マイコン50とを備える。マイコン50は、タイマ21と、検出部22と、処理部23と、目標タイマ値計算部24と、判定部25と、点火信号出力部(信号出力部)26と、回転数計算部27と、点火出力時間設定部(出力時間設定部)28と、キャプチャ検出部29と、キャプチャ処理部30とを有する。マイコン50は、時間計測専用のインプットキャプチャ端子(負パルス入力端子)IN1と、汎用の割り込み端子(正パルス入力端子)IN2と、を有する。   FIG. 2 is a block diagram of the pulse signal detection circuit 14 according to the first embodiment of the present invention. As shown in FIG. 2, the pulse signal detection circuit 14 includes a pulse signal generation unit 20 and a microcomputer 50. The microcomputer 50 includes a timer 21, a detection unit 22, a processing unit 23, a target timer value calculation unit 24, a determination unit 25, an ignition signal output unit (signal output unit) 26, a rotation speed calculation unit 27, An ignition output time setting unit (output time setting unit) 28, a capture detection unit 29, and a capture processing unit 30 are included. The microcomputer 50 has an input capture terminal (negative pulse input terminal) IN1 dedicated to time measurement and a general-purpose interrupt terminal (positive pulse input terminal) IN2.

パルス信号生成部20は、内燃機関の回転に応じて生成されたエンジン回転パルス信号の正極性の被検出パルスP1,P3にそれぞれ対応した第1パルスP1xと第3パルスP3xを有する正パルス信号と、エンジン回転パルス信号の負極性の被検出パルスP2,P4にそれぞれ対応した第2パルスP2xと第4パルスP4xとを有する負パルス信号と、を生成する。   The pulse signal generator 20 includes a positive pulse signal having a first pulse P1x and a third pulse P3x respectively corresponding to detected positive pulses P1, P3 of the engine rotation pulse signal generated according to the rotation of the internal combustion engine. Then, a negative pulse signal having a second pulse P2x and a fourth pulse P4x corresponding to the detected pulses P2 and P4 of the negative polarity of the engine rotation pulse signal is generated.

正パルス信号はマイコン50の割り込み端子IN2に入力され、マイコン50は正パルス信号の第1パルスP1xと第3パルスP3xに基づいて時間計測を行う。   The positive pulse signal is input to the interrupt terminal IN2 of the microcomputer 50, and the microcomputer 50 performs time measurement based on the first pulse P1x and the third pulse P3x of the positive pulse signal.

負パルス信号はマイコン50のインプットキャプチャ端子IN1に入力され、マイコン50は負パルス信号の第2パルスP2xと第4パルスP4xに基づいて時間計測を行う。   The negative pulse signal is input to the input capture terminal IN1 of the microcomputer 50, and the microcomputer 50 performs time measurement based on the second pulse P2x and the fourth pulse P4x of the negative pulse signal.

タイマ21は、フリーランタイマとして構成されていて、タイマ値により時間を計測する。つまり、タイマ21は、タイマ値として、初期タイマ値から最終タイマ値までを繰り返しカウントする。   The timer 21 is configured as a free-run timer, and measures time based on a timer value. That is, the timer 21 repeatedly counts from the initial timer value to the final timer value as the timer value.

検出部22は、エンジン回転パルス信号の被検出パルスP1,P3に対応した、正パルス信号の第1パルスP1xと第3パルスP3xを検出する。つまり、検出部22は、エンジン回転パルス信号の被検出パルスP1,P3を検出していることになる。   The detector 22 detects the first pulse P1x and the third pulse P3x of the positive pulse signal corresponding to the detected pulses P1, P3 of the engine rotation pulse signal. That is, the detection unit 22 detects the detected pulses P1 and P3 of the engine rotation pulse signal.

処理部23は、検出部22によって第1パルスP1xと第3パルスP3xの何れかが検出された後に、実行中の処理を中断して割り込み処理を開始して、割り込み処理を用いて、タイマ21からタイマ値を取得する。第3パルスP3xが検出された後に取得されたタイマ値は、第1検出タイマ値T1である。   After the detection unit 22 detects either the first pulse P1x or the third pulse P3x, the processing unit 23 interrupts the process being executed and starts the interrupt process. Get timer value from. The timer value acquired after the third pulse P3x is detected is the first detection timer value T1.

目標タイマ値計算部24は、回転数が所定の回転数以上の場合、処理部23で取得された第1検出タイマ値T1に所定の演算点火出力時間(第1出力時間)D1を加算して、その加算結果から、予め求められた誤差時間Eを減算した演算点火タイマカウント値(第1目標タイマ値)C1を計算する。誤差時間Eは、第1パルスP1xと第3パルスP3xの何れかが検出されたタイミングと、第1検出タイマ値T1が取得されたタイミングと、の差である。   The target timer value calculation unit 24 adds a predetermined calculation ignition output time (first output time) D1 to the first detection timer value T1 acquired by the processing unit 23 when the rotation speed is equal to or higher than the predetermined rotation speed. Then, an arithmetic ignition timer count value (first target timer value) C1 is calculated by subtracting a previously determined error time E from the addition result. The error time E is the difference between the timing at which one of the first pulse P1x and the third pulse P3x is detected and the timing at which the first detection timer value T1 is acquired.

この誤差時間Eは、例えば、次の様にして予め求めておく。検出部22は、第1パルスP1xと第3パルスP3xの何れかを検出したタイミングで、パルス検出信号をマイコン50の外部に出力する。また、処理部23は、タイマ21からタイマ値を取得したタイミングで、タイマ値取得信号をマイコン50の外部に出力する。そして、オシロスコープなどの測定器を用いて、上記パルス検出信号と上記タイマ値取得信号とが現れる時間の差を測定する。そして、測定された時間をタイマ21のカウント数に換算して、誤差時間Eとして目標タイマ値計算部24に設定する。この誤差時間Eは、処理部23が他の割り込み処理を実行していない場合、回転数などによらずほぼ一定となる。つまり、工場出荷時等に誤差時間Eを設定しておけば良い。   The error time E is obtained in advance as follows, for example. The detection unit 22 outputs a pulse detection signal to the outside of the microcomputer 50 at a timing at which one of the first pulse P1x and the third pulse P3x is detected. Further, the processing unit 23 outputs a timer value acquisition signal to the outside of the microcomputer 50 at the timing when the timer value is acquired from the timer 21. Then, using a measuring instrument such as an oscilloscope, the difference in time at which the pulse detection signal and the timer value acquisition signal appear is measured. Then, the measured time is converted into the count number of the timer 21 and set as the error time E in the target timer value calculation unit 24. This error time E is substantially constant regardless of the rotational speed or the like when the processing unit 23 is not executing another interrupt process. That is, the error time E may be set at the time of factory shipment.

また、目標タイマ値計算部24は、回転数が所定の回転数より低い場合、キャプチャ処理部30で取得された検出タイマ値T2に所定の固定点火出力時間D2を加算した固定点火タイマカウント値C2を計算する。この固定点火出力時間D2は、例えば、回転数によらず一定である。   Further, the target timer value calculation unit 24 adds a predetermined fixed ignition output time D2 to the detection timer value T2 acquired by the capture processing unit 30 when the rotation number is lower than the predetermined rotation number. Calculate For example, the fixed ignition output time D2 is constant regardless of the rotational speed.

判定部25は、回転数が所定の回転数以上の場合、タイマ21のタイマ値が演算点火タイマカウント値C1に達したか否か判定し、回転数が所定の回転数より低い場合、タイマ21のタイマ値が固定点火タイマカウント値C2に達したか否か判定する。   The determination unit 25 determines whether or not the timer value of the timer 21 has reached the calculated ignition timer count value C1 when the rotational speed is equal to or higher than the predetermined rotational speed, and when the rotational speed is lower than the predetermined rotational speed, the timer 21 It is determined whether or not the timer value has reached the fixed ignition timer count value C2.

点火信号出力部26は、判定部25の制御に基づき、回転数が所定の回転数以上の場合、タイマ21のタイマ値が演算点火タイマカウント値C1に達した時、内燃機関を点火する演算点火信号を出力する。また、点火信号出力部26は、回転数が所定の回転数より低い場合、タイマ21のタイマ値が固定点火タイマカウント値C2に達した時、内燃機関を点火する固定点火信号を出力する   Based on the control of the determination unit 25, the ignition signal output unit 26 calculates ignition that ignites the internal combustion engine when the timer value reaches the calculation ignition timer count value C1 when the rotation speed is equal to or higher than a predetermined rotation speed. Output a signal. The ignition signal output unit 26 outputs a fixed ignition signal for igniting the internal combustion engine when the timer value of the timer 21 reaches the fixed ignition timer count value C2 when the engine speed is lower than the predetermined engine speed.

回転数計算部27は、エンジン回転パルス信号に基づいて内燃機関の回転数を計算する。
点火出力時間設定部28は、回転数が所定の回転数以上の場合、回転数に応じて、上記演算点火出力時間D1を設定する。点火出力時間設定部28は、演算点火出力時間D1と回転数とが対応付けられたテーブルを有している。この演算点火出力時間D1は、誤差時間Eより長い。
The rotation speed calculation unit 27 calculates the rotation speed of the internal combustion engine based on the engine rotation pulse signal.
The ignition output time setting unit 28 sets the calculated ignition output time D1 according to the rotational speed when the rotational speed is equal to or higher than the predetermined rotational speed. The ignition output time setting unit 28 has a table in which the calculated ignition output time D1 and the rotation speed are associated with each other. The calculated ignition output time D1 is longer than the error time E.

キャプチャ検出部29は、エンジン回転パルス信号の被検出パルスP2,P4に対応した、負パルス信号の第2パルスP2xと第4パルスP4xを検出する。つまり、キャプチャ検出部29は、エンジン回転パルス信号の被検出パルスP2,P4を検出していることになる。   The capture detection unit 29 detects the second pulse P2x and the fourth pulse P4x of the negative pulse signal corresponding to the detected pulses P2, P4 of the engine rotation pulse signal. That is, the capture detection unit 29 detects the detected pulses P2 and P4 of the engine rotation pulse signal.

キャプチャ処理部30は、キャプチャ検出部29によって第2パルスP2xと第4パルスP4xの何れかが検出された時に、瞬時にタイマ21からタイマ値を取得する。第4パルスP4xが検出された時に取得されたタイマ値は、検出タイマ値T2である。   The capture processing unit 30 instantaneously acquires a timer value from the timer 21 when either the second pulse P2x or the fourth pulse P4x is detected by the capture detection unit 29. The timer value acquired when the fourth pulse P4x is detected is the detection timer value T2.

次に、図3,4を参照して、パルス信号検出回路14の動作を説明する。   Next, the operation of the pulse signal detection circuit 14 will be described with reference to FIGS.

図3は、本発明の実施例1に係るパルス信号検出回路14の動作を表すフローチャートである。
図4は、本発明の実施例1に係るパルス信号検出回路14の動作を表すタイミング図である。
FIG. 3 is a flowchart showing the operation of the pulse signal detection circuit 14 according to the first embodiment of the present invention.
FIG. 4 is a timing diagram illustrating the operation of the pulse signal detection circuit 14 according to the first embodiment of the invention.

図4には、エンジン回転パルス信号と、負パルス信号と、正パルス信号と、タイマ値と、演算点火信号とが示されている。図4には、エンジン回転パルス信号の一部として、ある1周期(時刻t1〜t5)の被検出パルスP1〜P4と、次の1周期(時刻t5以降)の最初の被検出パルスP1とが示されている。   FIG. 4 shows an engine rotation pulse signal, a negative pulse signal, a positive pulse signal, a timer value, and a calculated ignition signal. In FIG. 4, as a part of the engine rotation pulse signal, detected pulses P1 to P4 in one cycle (time t1 to t5) and the first detected pulse P1 in the next one cycle (after time t5) are shown. It is shown.

また、ここでは、図4の時刻t1より前に、前回の第1パルスP1xが検出された時のタイマ値が得られているとする。   Here, it is assumed that the timer value when the previous first pulse P1x is detected is obtained before the time t1 in FIG.

まず、検出部22は、図4に示す時刻t1に、正パルス信号の第1パルスP1xを検出する(ステップS1)。   First, the detection unit 22 detects the first pulse P1x of the positive pulse signal at time t1 shown in FIG. 4 (step S1).

処理部23は、検出部22により第1パルスP1xが検出された後に、実行中の処理を中断して割り込み処理を開始する(ステップS2)。そして、処理部23は、この割り込み処理を用いて、タイマ21からタイマ値を取得する(ステップS3)。   After detecting the first pulse P1x by the detection unit 22, the processing unit 23 interrupts the process being executed and starts an interrupt process (step S2). And the process part 23 acquires a timer value from the timer 21 using this interruption process (step S3).

回転数計算部27は、前回の第1パルスP1xが検出された時のタイマ値と、今回取得されたタイマ値とに基づいて、前回の第1パルスP1xと今回の第1パルスP1xとの間の時間(1周期時間)を算出する(ステップS4)。   Based on the timer value when the previous first pulse P1x is detected and the timer value acquired this time, the rotation speed calculation unit 27 determines the interval between the previous first pulse P1x and the current first pulse P1x. (1 cycle time) is calculated (step S4).

回転数計算部27は、ステップS4で得られた1周期時間に基づいて内燃機関の回転数を計算する(ステップS5:第7のステップ)。   The rotation speed calculation unit 27 calculates the rotation speed of the internal combustion engine based on the one cycle time obtained in step S4 (step S5: seventh step).

なお、ステップS3で取得されたタイマ値は、割り込み処理に起因した誤差時間Eだけ時刻t1から遅れたタイミングで取得された値であるが、前回の第1パルスP1xが検出された時のタイマ値も誤差時間Eを有しているので、算出された1周期時間の誤差は相殺されて問題とはならない。   Note that the timer value acquired in step S3 is a value acquired at a timing delayed from the time t1 by the error time E caused by the interrupt process, but the timer value when the previous first pulse P1x is detected. Since the error time E also has an error time E, the calculated error of one cycle time is canceled out and does not cause a problem.

次に、検出部22は、図4に示す時刻t2に、正パルス信号の第3パルスP3xを検出する(ステップS6:第1のステップ)。   Next, the detection unit 22 detects the third pulse P3x of the positive pulse signal at time t2 shown in FIG. 4 (step S6: first step).

処理部23は、検出部22により第3パルスP3xが検出された後に、実行中の処理を中断して割り込み処理を開始する(ステップS7:第2のステップ)。   After the detection unit 22 detects the third pulse P3x, the processing unit 23 interrupts the process being executed and starts an interrupt process (step S7: second step).

処理部23は、図4に示す時刻t3に、割り込み処理を用いて、タイマ21からタイマ値を第1検出タイマ値T1として取得する(ステップS8:第3のステップ)。ここで、第3パルスP3xが検出されたタイミング(時刻t2)と、第1検出タイマ値T1が取得されたタイミング(時刻t3)と、の差が誤差時間Eである。   The processing unit 23 acquires a timer value from the timer 21 as the first detection timer value T1 by using interrupt processing at time t3 illustrated in FIG. 4 (step S8: third step). Here, the difference between the timing at which the third pulse P3x is detected (time t2) and the timing at which the first detection timer value T1 is acquired (time t3) is the error time E.

次に、処理部23は、ステップS5において計算された回転数が所定の回転数以上か否か判定する(ステップS9:第9のステップ)。   Next, the processing unit 23 determines whether or not the rotation number calculated in step S5 is equal to or greater than a predetermined rotation number (step S9: ninth step).

処理部23は、回転数が所定の回転数以上の場合(ステップS9;Yes)、目標タイマ値計算部24に第1検出タイマ値T1を出力すると共に、点火出力時間設定部28を制御する。そして、点火出力時間設定部28は、回転数に応じて所定の演算点火出力時間D1を設定する(ステップS10:第8のステップ)。   When the rotational speed is equal to or higher than the predetermined rotational speed (step S9; Yes), the processing unit 23 outputs the first detection timer value T1 to the target timer value calculation unit 24 and controls the ignition output time setting unit 28. And the ignition output time setting part 28 sets predetermined | prescribed calculation ignition output time D1 according to rotation speed (step S10: 8th step).

次に、目標タイマ値計算部24は、ステップS8で取得された第1検出タイマ値T1に演算点火出力時間D1を加算して、その加算結果から、予め求められた誤差時間Eを減算した演算点火タイマカウント値C1を計算する(ステップS11:第4のステップ)。つまり、C1=T1+D1−Eである。   Next, the target timer value calculation unit 24 adds the calculated ignition output time D1 to the first detection timer value T1 acquired in step S8, and subtracts the error time E obtained in advance from the addition result. An ignition timer count value C1 is calculated (step S11: fourth step). That is, C1 = T1 + D1-E.

次に、判定部25は、タイマ21のタイマ値が演算点火タイマカウント値C1に達したか否か判定する(ステップS12:第5のステップ)。達していない場合(ステップS12;No)、ステップS12の判定を繰り返す。   Next, the determination unit 25 determines whether or not the timer value of the timer 21 has reached the calculated ignition timer count value C1 (step S12: fifth step). If not reached (step S12; No), the determination in step S12 is repeated.

判定部25は、図4に示す時刻t4に、タイマ21のタイマ値が演算点火タイマカウント値C1に達した時(ステップS12;Yes)、点火信号出力部26を制御する。そして、点火信号出力部26は、内燃機関を点火する演算点火信号を出力する(ステップS13:第6のステップ)。   The determination unit 25 controls the ignition signal output unit 26 when the timer value of the timer 21 reaches the calculated ignition timer count value C1 at time t4 shown in FIG. 4 (step S12; Yes). And the ignition signal output part 26 outputs the calculation ignition signal which ignites an internal combustion engine (step S13: 6th step).

このように、第3パルスP3xが検出されたタイミング(時刻t2)から演算点火出力時間D1だけ遅れた正確な演算点火タイミング(時刻t4)で演算点火信号を出力することができる。   In this manner, the calculated ignition signal can be output at the accurate calculated ignition timing (time t4) delayed by the calculated ignition output time D1 from the timing (time t2) at which the third pulse P3x is detected.

なお、目標タイマ値計算部24による誤差時間の補正を上記のように行わない場合、上記時刻t4より遅い時刻t4’(=t2+E+D1)に演算点火信号が出力されてしまう。   If the correction of the error time by the target timer value calculation unit 24 is not performed as described above, the calculated ignition signal is output at time t4 '(= t2 + E + D1) later than the time t4.

その後、ステップS1の処理に戻る。つまり、検出部22は、図4に示す時刻t5に、正パルス信号の次の第1パルスP1xを検出する。   Thereafter, the process returns to step S1. That is, the detection unit 22 detects the first pulse P1x next to the positive pulse signal at time t5 shown in FIG.

一方、処理部23は、回転数が所定の回転数より低い場合(ステップS9;No)、キャプチャ処理部30からの検出タイマ値T2を待つように、目標タイマ値計算部24を制御する。なお、以降の処理は、図4のタイミング図への図示を省略する。   On the other hand, when the rotational speed is lower than the predetermined rotational speed (step S9; No), the processing unit 23 controls the target timer value calculation unit 24 to wait for the detection timer value T2 from the capture processing unit 30. The subsequent processing is not shown in the timing diagram of FIG.

キャプチャ検出部29は、負パルス信号の第4パルスP4xを検出する(ステップS14)。   The capture detection unit 29 detects the fourth pulse P4x of the negative pulse signal (Step S14).

次に、キャプチャ処理部30は、タイマ21からタイマ値を検出タイマ値T2として取得する(ステップS15)。キャプチャ処理部30は、割り込み処理を用いずに瞬時にタイマ値を取得できる。   Next, the capture processing unit 30 acquires the timer value from the timer 21 as the detection timer value T2 (step S15). The capture processing unit 30 can acquire a timer value instantaneously without using interrupt processing.

次に、目標タイマ値計算部24は、ステップS15でキャプチャ処理部30により取得された検出タイマ値T2に所定の固定点火出力時間D2を加算した、固定点火タイマカウント値C2を計算する(ステップS16)。この固定点火出力時間は、例えば、回転数によらず一定である。   Next, the target timer value calculation unit 24 calculates a fixed ignition timer count value C2 obtained by adding a predetermined fixed ignition output time D2 to the detection timer value T2 acquired by the capture processing unit 30 in step S15 (step S16). ). The fixed ignition output time is constant regardless of the number of revolutions, for example.

判定部25は、タイマ21のタイマ値が固定点火タイマカウント値C2に達したか否か判定する(ステップS17)。達していない場合(ステップS17;No)、ステップS17の判定を繰り返す。   The determination unit 25 determines whether or not the timer value of the timer 21 has reached the fixed ignition timer count value C2 (step S17). If not reached (step S17; No), the determination in step S17 is repeated.

判定部25は、タイマ21のタイマ値が固定点火タイマカウント値C2に達した時(ステップS17;Yes)、点火信号出力部26を制御する。そして、点火信号出力部26は、内燃機関を点火する固定点火信号を出力する(ステップS18)。   The determination unit 25 controls the ignition signal output unit 26 when the timer value of the timer 21 reaches the fixed ignition timer count value C2 (step S17; Yes). Then, the ignition signal output unit 26 outputs a fixed ignition signal for igniting the internal combustion engine (step S18).

この時、キャプチャ処理部30を用いているため、第4パルスP4xが検出されたタイミングから固定点火出力時間D2だけ遅れた正確な固定点火タイミングで固定点火信号を出力することができる。その後、ステップS1の処理に戻る。   At this time, since the capture processing unit 30 is used, the fixed ignition signal can be output at an accurate fixed ignition timing delayed by the fixed ignition output time D2 from the timing at which the fourth pulse P4x is detected. Thereafter, the process returns to step S1.

以上で説明した様に、本実施例によれば、第3パルスP3xが検出されたタイミングと第1検出タイマ値T1が取得されたタイミングとの差である誤差時間Eを予め求めておいて、取得された第1検出タイマ値T1に演算点火出力時間D1を加算した結果から、その誤差時間Eを減算した演算点火タイマカウント値C1を算出するようにしている。従って、タイマ値がこの演算点火タイマカウント値C1に達したタイミングを検出することで、第3パルスP3xが検出されたタイミングから演算点火出力時間D1だけ遅れた正確なタイミングを得ることができる。これにより、1つのインプットキャプチャ端子と1つの割り込み端子とを有する安価なマイコンを用いた場合であっても、正確な演算点火タイミングを得ることができる。   As described above, according to the present embodiment, the error time E that is the difference between the timing at which the third pulse P3x is detected and the timing at which the first detection timer value T1 is acquired is obtained in advance. The calculated ignition timer count value C1 is calculated by subtracting the error time E from the result of adding the calculated ignition output time D1 to the acquired first detection timer value T1. Therefore, by detecting the timing at which the timer value reaches the calculated ignition timer count value C1, it is possible to obtain an accurate timing delayed by the calculated ignition output time D1 from the timing at which the third pulse P3x is detected. As a result, even when an inexpensive microcomputer having one input capture terminal and one interrupt terminal is used, accurate calculation ignition timing can be obtained.

また、このように上記誤差時間Eを減算するようにしているので、処理部23が、第3パルスP3xが検出されたタイミングで他の割り込み処理を実行中であったとしても、誤差時間Eの補正を上記のように行わない場合より誤差が少ない演算点火タイミングを得ることができる。   Since the error time E is subtracted in this way, even if the processing unit 23 is executing another interrupt process at the timing when the third pulse P3x is detected, the error time E It is possible to obtain a calculated ignition timing with less error than when correction is not performed as described above.

さらに、タイマ21はフリーランタイマであるため、第1検出タイマ値T1が誤差時間Eより小さい値となる場合もあるが、第1検出タイマ値T1に、誤差時間Eより長い演算点火出力時間D1を加算した結果から、誤差時間Eを減算しているので、演算処理におけるアンダーフローを防止できる。これにより、演算処理を簡単に行うことができる。   Furthermore, since the timer 21 is a free-run timer, the first detection timer value T1 may be smaller than the error time E, but the calculated ignition output time D1 longer than the error time E is added to the first detection timer value T1. Since the error time E is subtracted from the result of adding, underflow in the arithmetic processing can be prevented. Thereby, the arithmetic processing can be easily performed.

本実施例は、1つの割り込み端子でエンジン回転パルス信号の正極性及び負極性の被検出パルスを検出するようにして、インプットキャプチャ端子を用いない点が実施例1と異なる。   The present embodiment is different from the first embodiment in that the positive and negative detected pulses of the engine rotation pulse signal are detected by one interrupt terminal and the input capture terminal is not used.

図5は、本発明の実施例2に係るパルス信号検出回路14aのブロック図である。図5に示すように、パルス信号検出回路14aは、図2の実施例1のパルス信号検出回路14のキャプチャ検出部29とキャプチャ処理部30の代わりに、負パルス検出部40を備える。また、処理部23aの機能は、図2の実施例1の処理部23の機能とは異なる。マイコン50aは、ポート入力端子(負パルス入力端子)IN3と、割り込み端子(正負パルス入力端子)IN4と、を有する。その他の回路構成は、図2の実施例1と同一であるため、同一の要素に同一の符号を付して説明を省略する。   FIG. 5 is a block diagram of a pulse signal detection circuit 14a according to the second embodiment of the present invention. As illustrated in FIG. 5, the pulse signal detection circuit 14 a includes a negative pulse detection unit 40 instead of the capture detection unit 29 and the capture processing unit 30 of the pulse signal detection circuit 14 of the first embodiment illustrated in FIG. 2. The function of the processing unit 23a is different from the function of the processing unit 23 of the first embodiment shown in FIG. The microcomputer 50a has a port input terminal (negative pulse input terminal) IN3 and an interrupt terminal (positive / negative pulse input terminal) IN4. Since other circuit configurations are the same as those of the first embodiment shown in FIG. 2, the same components are denoted by the same reference numerals and description thereof is omitted.

パルス信号生成部20aは、エンジン回転パルス信号の正極性の被検出パルスP1,P2,P3,P4にそれぞれ対応した第1パルスP1x、第2パルスP2x、第3パルスP3x及び第4パルスP4xを有する正負パルス信号と、エンジン回転パルス信号の負極性の被検出パルスP2,P4にそれぞれ対応した第2パルスP2x及び第4パルスP4xを有する負パルス信号と、を生成する。   The pulse signal generator 20a has a first pulse P1x, a second pulse P2x, a third pulse P3x, and a fourth pulse P4x corresponding to the detected pulses P1, P2, P3, and P4 having positive polarity of the engine rotation pulse signal, respectively. A positive / negative pulse signal and a negative pulse signal having a second pulse P2x and a fourth pulse P4x respectively corresponding to the detected pulses P2 and P4 having a negative polarity of the engine rotation pulse signal are generated.

正負パルス信号はマイコン50aの割り込み端子IN4に入力され、マイコン50aは正負パルス信号の第1パルスP1xから第4パルスP4xに基づいて時間計測を行う。   The positive / negative pulse signal is input to the interrupt terminal IN4 of the microcomputer 50a, and the microcomputer 50a performs time measurement based on the first pulse P1x to the fourth pulse P4x of the positive / negative pulse signal.

負パルス信号はマイコン50aのポート入力端子IN3に入力される。マイコン50aの負パルス検出部40は、負パルス信号の第2パルスP2xと第4パルスP4xの何れかを検出した時、負パルス検出信号を処理部23aに供給する。   The negative pulse signal is input to the port input terminal IN3 of the microcomputer 50a. The negative pulse detection unit 40 of the microcomputer 50a supplies a negative pulse detection signal to the processing unit 23a when detecting either the second pulse P2x or the fourth pulse P4x of the negative pulse signal.

処理部23aは、検出部22によって第1パルスP1xから第4パルスP4xの何れかが検出された後に、実行中の処理を中断して割り込み処理を開始して、割り込み処理を用いて、タイマ21からタイマ値を取得する。第3パルスP3xが検出された後に取得されたタイマ値は、第1検出タイマ値T1であり、第4パルスP4xが検出された後に取得されたタイマ値は、第2検出タイマ値T2aである。   After the detection unit 22 detects any one of the first pulse P1x to the fourth pulse P4x, the processing unit 23a interrupts the process being executed and starts the interrupt process. Get timer value from. The timer value acquired after the third pulse P3x is detected is the first detection timer value T1, and the timer value acquired after the fourth pulse P4x is detected is the second detection timer value T2a.

目標タイマ値計算部24は、回転数が所定の回転数以上の場合、実施例1と同様に、処理部23aで取得された第1検出タイマ値T1に所定の演算点火出力時間D1を加算して、その加算結果から、予め求められた誤差時間Eを減算した演算点火タイマカウント値C1を計算する。この誤差時間Eは、実施例1と同様に、予め求めておく。   The target timer value calculation unit 24 adds a predetermined calculation ignition output time D1 to the first detection timer value T1 acquired by the processing unit 23a as in the first embodiment when the rotation number is equal to or higher than the predetermined rotation number. The calculated ignition timer count value C1 is calculated by subtracting the error time E obtained in advance from the addition result. The error time E is obtained in advance as in the first embodiment.

また、目標タイマ値計算部24は、回転数が所定の回転数より低い場合、処理部23aで取得された第2検出タイマ値T2aに所定の固定点火出力時間(第2出力時間)D2aを加算した固定点火タイマカウント値(第2目標タイマ値)C2aを計算する。この固定点火出力時間D2aは、例えば、回転数によらず一定である。   The target timer value calculation unit 24 adds a predetermined fixed ignition output time (second output time) D2a to the second detection timer value T2a acquired by the processing unit 23a when the rotation speed is lower than the predetermined rotation speed. The fixed ignition timer count value (second target timer value) C2a is calculated. This fixed ignition output time D2a is, for example, constant regardless of the rotational speed.

判定部25は、実施例1と同様に、回転数が所定の回転数以上の場合、タイマ21のタイマ値が演算点火タイマカウント値C1に達したか否か判定し、回転数が所定の回転数より低い場合、タイマ21のタイマ値が固定点火タイマカウント値C2aに達したか否か判定する。   Similar to the first embodiment, the determination unit 25 determines whether or not the timer value of the timer 21 has reached the calculated ignition timer count value C1 when the rotation speed is equal to or higher than the predetermined rotation speed, and the rotation speed is equal to the predetermined rotation speed. If it is lower than the number, it is determined whether or not the timer value of the timer 21 has reached the fixed ignition timer count value C2a.

点火信号出力部26は、実施例1と同様に、判定部25の制御に基づき、回転数が所定の回転数以上の場合、タイマ21のタイマ値が演算点火タイマカウント値C1に達した時、内燃機関を点火する演算点火信号を出力する。また、点火信号出力部26は、回転数が所定の回転数より低い場合、タイマ21のタイマ値が固定点火タイマカウント値C2aに達した時、内燃機関を点火する固定点火信号を出力する   Similarly to the first embodiment, the ignition signal output unit 26 is based on the control of the determination unit 25, and when the rotation number is equal to or higher than the predetermined rotation number, the timer value of the timer 21 reaches the calculated ignition timer count value C1, An arithmetic ignition signal for igniting the internal combustion engine is output. Further, the ignition signal output unit 26 outputs a fixed ignition signal for igniting the internal combustion engine when the timer value of the timer 21 reaches the fixed ignition timer count value C2a when the engine speed is lower than the predetermined engine speed.

次に、図6,7を参照して、パルス信号検出回路14aの動作を説明する。   Next, the operation of the pulse signal detection circuit 14a will be described with reference to FIGS.

図6は、本発明の実施例2に係るパルス信号検出回路14aの動作を表すフローチャートである。
図7は、本発明の実施例2に係るパルス信号検出回路14aの動作を表すタイミング図である。
FIG. 6 is a flowchart showing the operation of the pulse signal detection circuit 14a according to the second embodiment of the present invention.
FIG. 7 is a timing chart showing the operation of the pulse signal detection circuit 14a according to the second embodiment of the present invention.

図6のフローチャートのステップS1からステップS13は、実施例1と同様であるため、説明を省略し、実施例1と異なる処理のみを以下に説明する。なお、ステップS2とステップS7において、処理部23aは、負パルス検出部40から負パルス検出信号が供給されないことから、ステップS1とステップS6で検出されたパルスが正極性の被検出パルスP1,P3に対応する第1パルスP1xと第3パルスP3xであることを認識できる。   Steps S1 to S13 in the flowchart of FIG. 6 are the same as those in the first embodiment, and thus description thereof will be omitted. In step S2 and step S7, the processing unit 23a is not supplied with the negative pulse detection signal from the negative pulse detection unit 40. Therefore, the pulses detected in steps S1 and S6 are detected pulses P1, P3 having positive polarity. It can be recognized that the first pulse P1x and the third pulse P3x correspond to.

図7には、エンジン回転パルス信号と、負パルス信号と、正負パルス信号と、タイマ値と、固定点火信号とが示されている。図7には、エンジン回転パルス信号の一部として、ある1周期(時刻t1a〜t6a)の被検出パルスP1〜P4と、次の1周期(時刻t6a以降)の最初の被検出パルスP1とが示されている。   FIG. 7 shows an engine rotation pulse signal, a negative pulse signal, a positive / negative pulse signal, a timer value, and a fixed ignition signal. FIG. 7 shows detected pulses P1 to P4 in one cycle (time t1a to t6a) and the first detected pulse P1 in the next cycle (after time t6a) as a part of the engine rotation pulse signal. It is shown.

処理部23aは、回転数が所定の回転数より低い場合(ステップS9;No)、検出部22からの次のパルス検出信号を待つ。   When the rotational speed is lower than the predetermined rotational speed (step S9; No), the processing unit 23a waits for the next pulse detection signal from the detection unit 22.

検出部22は、図7に示す時刻t3aに、正負パルス信号の第4パルスP4xを検出する(ステップS21:第10のステップ)。つまり、検出部22は、ステップS6で検出された正極性の被検出パルス(第1被検出パルス)P3とは異なる負極性の被検出パルス(第2被検出パルス)P4を検出していることになる。このとき、負パルス検出部40も第4パルスP4xを検出しており、負パルス検出信号を処理部23aに供給する。   The detection unit 22 detects the fourth pulse P4x of the positive / negative pulse signal at time t3a shown in FIG. 7 (step S21: tenth step). That is, the detection unit 22 detects a detected pulse (second detected pulse) P4 having a negative polarity different from the detected pulse (first detected pulse) P3 having the positive polarity detected in step S6. become. At this time, the negative pulse detection unit 40 also detects the fourth pulse P4x, and supplies a negative pulse detection signal to the processing unit 23a.

処理部23aは、第4パルスP4xが検出されて検出部22からパルス検出信号が入力された後に、実行中の処理を中断して割り込み処理を開始する(ステップS22:第11のステップ)。ここで、負パルス検出部40からの負パルス検出信号が供給されることによって、処理部23aは、時刻t3aで検出されたパルスが第4パルスP4xであることを認識できる。   After the fourth pulse P4x is detected and the pulse detection signal is input from the detection unit 22, the processing unit 23a interrupts the process being executed and starts an interrupt process (step S22: eleventh step). Here, when the negative pulse detection signal is supplied from the negative pulse detection unit 40, the processing unit 23a can recognize that the pulse detected at time t3a is the fourth pulse P4x.

処理部23aは、図7に示す時刻t4aに、割り込み処理を用いて、タイマ21からタイマ値を第2検出タイマ値T2aとして取得する(ステップS23:第12のステップ)。ここで、第4パルスP4xが検出されたタイミング(時刻t3a)と第2検出タイマ値T2aが取得されたタイミング(時刻t4a)との差が、誤差時間Eである。この誤差時間Eは、実施例1と同様に、予め求めておく。   The processing unit 23a acquires the timer value from the timer 21 as the second detection timer value T2a by using interrupt processing at time t4a illustrated in FIG. 7 (step S23: twelfth step). Here, the difference between the timing at which the fourth pulse P4x is detected (time t3a) and the timing at which the second detection timer value T2a is acquired (time t4a) is the error time E. The error time E is obtained in advance as in the first embodiment.

次に、目標タイマ値計算部24は、ステップS23で取得された第2検出タイマ値T2aに所定の固定点火出力時間D2aを加算して、その加算結果から、予め求められた誤差時間Eを減算した固定点火タイマカウント値C2aを計算する(ステップS24:第13のステップ)。つまり、C2a=T2a+D2a−Eである。   Next, the target timer value calculation unit 24 adds a predetermined fixed ignition output time D2a to the second detection timer value T2a acquired in step S23, and subtracts an error time E obtained in advance from the addition result. The fixed ignition timer count value C2a thus calculated is calculated (step S24: 13th step). That is, C2a = T2a + D2a-E.

次に、判定部25は、タイマ21のタイマ値が固定点火タイマカウント値C2aに達したか否か判定する(ステップS25:第14のステップ)。達していない場合(ステップS25;No)、ステップS25の判定を繰り返す。   Next, the determination unit 25 determines whether or not the timer value of the timer 21 has reached the fixed ignition timer count value C2a (step S25: 14th step). If not reached (step S25; No), the determination in step S25 is repeated.

判定部25は、図7に示す時刻t5aに、タイマ21のタイマ値が固定点火タイマカウント値C2aに達した時(ステップS25;Yes)、点火信号出力部26を制御する。そして、点火信号出力部26は、内燃機関を点火する固定点火信号を出力する(ステップS26:第15のステップ)。   The determination unit 25 controls the ignition signal output unit 26 when the timer value of the timer 21 reaches the fixed ignition timer count value C2a at time t5a shown in FIG. 7 (step S25; Yes). The ignition signal output unit 26 outputs a fixed ignition signal for igniting the internal combustion engine (step S26: 15th step).

このように、第4パルスP4xが検出されたタイミング(時刻t3a)から固定点火出力時間D2aだけ遅れた正確な固定点火タイミング(時刻t5a)で固定点火信号を出力することができる。   Thus, the fixed ignition signal can be output at the accurate fixed ignition timing (time t5a) delayed by the fixed ignition output time D2a from the timing (time t3a) at which the fourth pulse P4x is detected.

なお、目標タイマ値計算部24による誤差時間の補正を上記のように行わない場合、上記時刻t5aより遅い時刻t5a’(=t3a+E+D2a)に固定点火信号が出力されてしまう。   If the error time correction by the target timer value calculation unit 24 is not performed as described above, the fixed ignition signal is output at time t5a ′ (= t3a + E + D2a) later than the time t5a.

その後、ステップS1の処理に戻る。つまり、検出部22は、図7に示す時刻t6aに、正負パルス信号の次の第1パルスP1xを検出する。   Thereafter, the process returns to step S1. That is, the detection unit 22 detects the first pulse P1x next to the positive / negative pulse signal at time t6a shown in FIG.

以上で説明した様に、本実施例によれば、インプットキャプチャ端子を用いずに、1つの割り込み端子IN4と、1つのポート入力端子IN3のみを用いるので、実施例1より更に安価なマイコン50aを用いることができる。   As described above, according to the present embodiment, since only one interrupt terminal IN4 and one port input terminal IN3 are used without using the input capture terminal, the microcomputer 50a, which is cheaper than that of the first embodiment, is provided. Can be used.

その上、誤差時間Eを予め求めておいて、取得された第2検出タイマ値T2aに固定点火出力時間D2aを加算した結果から、その誤差時間Eを減算した固定点火タイマカウント値C2aを算出するようにしている。従って、正確な固定点火タイミングを得ることができる。また、実施例1と同様に、正確な演算点火タイミングを得ることもできる。さらに、他の実施例1と同様の効果も得ることができる。   In addition, the error time E is obtained in advance, and the fixed ignition timer count value C2a is calculated by subtracting the error time E from the result of adding the fixed ignition output time D2a to the acquired second detection timer value T2a. I am doing so. Therefore, accurate fixed ignition timing can be obtained. Further, as in the first embodiment, it is possible to obtain an accurate calculated ignition timing. Furthermore, the same effects as those of the first embodiment can be obtained.

(変形例)
上述した実施例1,2に対して様々な変更を加えることが可能である。以下、変形の一例について説明する。以下の説明では、上述した実施例1,2における対応する部分に対して用いた符号と同一の符号を用いており、重複する説明を省略する。
(Modification)
Various modifications can be made to the first and second embodiments. Hereinafter, an example of modification will be described. In the following description, the same reference numerals as those used for the corresponding parts in the first and second embodiments are used, and redundant description is omitted.

上述した実施例1,2では、パルス信号検出回路14,14aを内燃機関の点火装置に適用する一例について説明したが、これに限られず、内燃機関の点火装置以外の、被検出パルスに基づいてあるタイミングを生成する装置にも適用できる。   In the first and second embodiments described above, an example in which the pulse signal detection circuits 14 and 14a are applied to an ignition device for an internal combustion engine has been described. However, the present invention is not limited to this, and based on detected pulses other than the internal combustion engine ignition device. It can also be applied to a device that generates a certain timing.

また、上述した実施例1,2では、エンジン回転パルス信号は、1周期に、正極性の被検出パルスP1、負極性の被検出パルスP2、正極性の被検出パルスP3および負極性の被検出パルスP4を、この順番に有する一例について説明したが、これに限られない。つまり、被検出パルスの数や極性は、上記以外でも良い。従って、パルス信号検出回路14,14aは、第3パルスP3x以外のパルスに基づいて演算点火信号を生成し、第4パルスP4x以外のパルスに基づいて固定点火信号を生成しても良い。また、パルス信号検出回路14,14aは、第1パルスP1x以外のパルスに基づいて回転数を計算しても良い。   In the first and second embodiments described above, the engine rotation pulse signal is detected in one cycle in the positive polarity to be detected pulse P1, the negative polarity to be detected pulse P2, the positive polarity to be detected pulse P3, and the negative polarity to be detected. Although the example which has the pulse P4 in this order was demonstrated, it is not restricted to this. That is, the number and polarity of the detected pulses may be other than those described above. Therefore, the pulse signal detection circuits 14 and 14a may generate a calculation ignition signal based on a pulse other than the third pulse P3x, and may generate a fixed ignition signal based on a pulse other than the fourth pulse P4x. Further, the pulse signal detection circuits 14 and 14a may calculate the rotation speed based on pulses other than the first pulse P1x.

さらに、上述した実施例1,2で説明したマイコン50,50aを構成しているタイマ21と、検出部22と、処理部23,23aと、目標タイマ値計算部24と、判定部25と、点火信号出力部26と、回転数計算部27と、点火出力時間設定部28と、キャプチャ検出部29と、キャプチャ処理部30と、負パルス検出部40との少なくとも一部は、ハードウェアで構成してもよいし、ソフトウェアで構成してもよい。ソフトウェアで構成する場合には、マイコン50,50aを構成している上記各部の少なくとも一部の機能を実現するプログラムをフレキシブルディスクやCD−ROM等の記録媒体に収納し、コンピュータに読み込ませて実行させてもよい。記録媒体は、磁気ディスクや光ディスク等の着脱可能なものに限定されず、ハードディスク装置やメモリなどの固定型の記録媒体でもよい。   Further, the timer 21, the detection unit 22, the processing units 23 and 23a, the target timer value calculation unit 24, the determination unit 25, which constitute the microcomputers 50 and 50a described in the first and second embodiments, At least a part of the ignition signal output unit 26, the rotation speed calculation unit 27, the ignition output time setting unit 28, the capture detection unit 29, the capture processing unit 30, and the negative pulse detection unit 40 is configured by hardware. Alternatively, it may be configured by software. In the case of software configuration, a program that realizes at least a part of the functions of the above-described units constituting the microcomputers 50 and 50a is stored in a recording medium such as a flexible disk or CD-ROM, and is read by a computer and executed. You may let them. The recording medium is not limited to a removable medium such as a magnetic disk or an optical disk, but may be a fixed recording medium such as a hard disk device or a memory.

また、マイコン50,50aを構成している上記各部の少なくとも一部の機能を実現するプログラムを、インターネット等の通信回線(無線通信も含む)を介して頒布してもよい。さらに、同プログラムを暗号化したり、変調をかけたり、圧縮した状態で、インターネット等の有線回線や無線回線を介して、あるいは記録媒体に収納して頒布してもよい。   In addition, a program that realizes at least a part of the functions of the above-described units constituting the microcomputers 50 and 50a may be distributed via a communication line (including wireless communication) such as the Internet. Further, the program may be distributed in a state where the program is encrypted, modulated or compressed, and stored in a recording medium via a wired line such as the Internet or a wireless line.

10 ロータ
11,12 リラクタ(被検出素子)
13 ピックアップコイル(被検出パルス生成部)
14,14a パルス信号検出回路
15 点火部
20,20a パルス信号生成部
21 タイマ
22 検出部
23,23a 処理部
24 目標タイマ値計算部
25 判定部
26 点火信号出力部(信号出力部)
27 回転数計算部
28 点火出力時間設定部(出力時間設定部)
29 キャプチャ検出部
30 キャプチャ処理部
40 負パルス検出部
50,50a マイコン
10 Rotor 11, 12 Reluctator (Detected element)
13 Pickup coil (Detected pulse generator)
14, 14a Pulse signal detection circuit 15 Ignition unit 20, 20a Pulse signal generation unit 21 Timer 22 Detection unit 23, 23a Processing unit 24 Target timer value calculation unit 25 Determination unit 26 Ignition signal output unit (signal output unit)
27 Rotational Speed Calculation Unit 28 Ignition Output Time Setting Unit (Output Time Setting Unit)
29 Capture detection unit 30 Capture processing unit 40 Negative pulse detection unit 50, 50a Microcomputer

Claims (17)

被検出パルス信号が入力される、検出部と、処理部と、タイマと、目標タイマ値計算部と、判定部と、信号出力部とを備えるパルス信号検出回路におけるパルス信号検出方法であって、
前記検出部により、前記被検出パルス信号の第1被検出パルスを検出する第1のステップと、
前記処理部により、前記第1被検出パルスが検出された後に、実行中の処理を中断して割り込み処理を開始する第2のステップと、
前記処理部により、前記割り込み処理を用いて、前記第1被検出パルスの検出に対応して、前記タイマからタイマ値を第1検出タイマ値として取得する第3のステップと、
前記目標タイマ値計算部により、取得された前記第1検出タイマ値に所定の第1出力時間を加算して、その加算結果から、前記第1被検出パルスが検出されたタイミングと前記第1検出タイマ値が取得されたタイミングとの差である、予め求められた誤差時間を減算した第1目標タイマ値を計算する第4のステップと、
前記判定部により、前記タイマの前記タイマ値が前記第1目標タイマ値に達したか否か判定する第5のステップと、
前記信号出力部により、前記タイマの前記タイマ値が前記第1目標タイマ値に達した時に、第1出力信号を出力する第6のステップと、を含む
ことを特徴とするパルス信号検出方法。
A pulse signal detection method in a pulse signal detection circuit comprising a detection unit, a processing unit, a timer, a target timer value calculation unit, a determination unit, and a signal output unit, to which a detected pulse signal is input,
A first step of detecting a first detected pulse of the detected pulse signal by the detection unit;
A second step of interrupting a process being executed and starting an interrupt process after the first detected pulse is detected by the processing unit;
A third step of acquiring a timer value as a first detection timer value from the timer in response to the detection of the first detected pulse by the processing unit using the interrupt processing;
The target timer value calculation unit adds a predetermined first output time to the acquired first detection timer value, and from the addition result, the timing at which the first detected pulse is detected and the first detection A fourth step of calculating a first target timer value obtained by subtracting a previously determined error time, which is a difference from the timing at which the timer value is acquired;
A fifth step of determining whether or not the timer value of the timer has reached the first target timer value by the determination unit;
And a sixth step of outputting a first output signal when the timer value of the timer reaches the first target timer value by the signal output unit.
前記被検出パルス信号は、内燃機関の回転に応じて生成され、
前記第1出力信号は、前記内燃機関を点火するための信号である
ことを特徴とする請求項1に記載のパルス信号検出方法。
The detected pulse signal is generated according to the rotation of the internal combustion engine,
The pulse signal detection method according to claim 1, wherein the first output signal is a signal for igniting the internal combustion engine.
前記タイマは、前記タイマ値として、初期タイマ値から最終タイマ値までを繰り返しカウントし、
前記第1出力時間は、前記誤差時間より長い
ことを特徴とする請求項2に記載のパルス信号検出方法。
The timer repeatedly counts from the initial timer value to the final timer value as the timer value,
The pulse signal detection method according to claim 2, wherein the first output time is longer than the error time.
前記第1のステップの前に、回転数計算部により、前記被検出パルス信号に基づいて前記内燃機関の回転数を計算する第7のステップをさらに含み、
前記第3のステップと前記第4のステップとの間に、出力時間設定部により、前記回転数に応じて、前記第1出力時間を設定する第8のステップをさらに含む
ことを特徴とする請求項2または請求項3に記載のパルス信号検出方法。
Before the first step, the engine speed calculation unit further includes a seventh step of calculating the rotation speed of the internal combustion engine based on the detected pulse signal,
The method further includes an eighth step of setting the first output time according to the rotation speed by an output time setting unit between the third step and the fourth step. The pulse signal detection method according to claim 2 or claim 3.
前記第3のステップと前記第8のステップとの間に、前記処理部により、前記回転数が所定の回転数以上か否か判定する第9のステップをさらに含み、
前記第9のステップにおいて前記回転数が前記所定の回転数以上の場合に、前記第8のステップに進む
ことを特徴とする請求項4に記載のパルス信号検出方法。
Between the third step and the eighth step, the processing unit further includes a ninth step of determining whether the rotational speed is equal to or higher than a predetermined rotational speed,
5. The pulse signal detection method according to claim 4, wherein when the rotation speed is equal to or higher than the predetermined rotation speed in the ninth step, the process proceeds to the eighth step.
前記第9のステップにおいて前記回転数が前記所定の回転数より低い場合に、前記検出部により、前記第1のステップで検出された前記第1被検出パルスとは異なる第2被検出パルスを検出する第10のステップと、
前記処理部により、前記第10のステップで前記第2被検出パルスが検出された後に、実行中の処理を中断して割り込み処理を開始する第11のステップと、
前記処理部により、前記第11のステップの前記割り込み処理を用いて、前記タイマから前記タイマ値を第2検出タイマ値として取得する第12のステップと、
前記目標タイマ値計算部により、前記第12のステップにおいて取得された前記第2検出タイマ値に第2出力時間を加算して、その加算結果から前記誤差時間を減算した第2目標タイマ値を計算する第13のステップと、
前記判定部により、前記タイマの前記タイマ値が前記第2目標タイマ値に達したか否か判定する第14のステップと、
前記信号出力部により、前記タイマの前記タイマ値が前記第2目標タイマ値に達した時に、前記内燃機関を点火する第2出力信号を出力する第15のステップと、をさらに含む
ことを特徴とする請求項5に記載のパルス信号検出方法。
When the rotation speed is lower than the predetermined rotation speed in the ninth step, the detection unit detects a second detected pulse different from the first detected pulse detected in the first step. A tenth step,
An eleventh step of interrupting a process being executed and starting an interrupt process after the second detected pulse is detected in the tenth step by the processing unit;
A twelfth step of acquiring the timer value as a second detection timer value from the timer by the processing unit using the interrupt process of the eleventh step;
The target timer value calculation unit calculates a second target timer value obtained by adding a second output time to the second detection timer value acquired in the twelfth step and subtracting the error time from the addition result. A thirteenth step,
A fourteenth step of determining whether or not the timer value of the timer has reached the second target timer value by the determination unit;
And fifteenth step of outputting a second output signal for igniting the internal combustion engine when the timer value of the timer reaches the second target timer value by the signal output unit. The pulse signal detection method according to claim 5.
前記第2出力時間は、前記回転数によらず一定である
ことを特徴とする請求項6に記載のパルス信号検出方法。
The pulse signal detection method according to claim 6, wherein the second output time is constant regardless of the number of rotations.
タイマ値により時間を計測するタイマと、
被検出パルス信号の第1被検出パルスを検出する検出部と、
前記第1被検出パルスが検出された後に、実行中の処理を中断して割り込み処理を開始して、前記割り込み処理を用いて、前記第1被検出パルスの検出に対応して、前記タイマから前記タイマ値を第1検出タイマ値として取得する処理部と、
取得された前記第1検出タイマ値に所定の第1出力時間を加算して、その加算結果から、前記第1被検出パルスが検出されたタイミングと前記第1検出タイマ値が取得されたタイミングとの差である、予め求められた誤差時間を減算した第1目標タイマ値を計算する目標タイマ値計算部と、
前記タイマの前記タイマ値が前記第1目標タイマ値に達したか否か判定する判定部と、
前記タイマの前記タイマ値が前記第1目標タイマ値に達した時に、第1出力信号を出力する信号出力部と、を備える
ことを特徴とするパルス信号検出回路。
A timer that measures time according to the timer value;
A detector for detecting a first detected pulse of the detected pulse signal;
After the first detected pulse is detected, the current process is interrupted to start the interrupt process, and the interrupt process is used to detect the first detected pulse from the timer. A processing unit for acquiring the timer value as a first detection timer value;
A predetermined first output time is added to the acquired first detection timer value, and from the addition result, a timing at which the first detected pulse value is detected, a timing at which the first detection timer value is acquired, and A target timer value calculator that calculates a first target timer value obtained by subtracting a previously determined error time,
A determination unit for determining whether or not the timer value of the timer has reached the first target timer value;
And a signal output unit that outputs a first output signal when the timer value of the timer reaches the first target timer value.
前記被検出パルス信号は、内燃機関の回転に応じて生成され、
前記第1出力信号は、前記内燃機関を点火するための信号である
ことを特徴とする請求項8に記載のパルス信号検出回路。
The detected pulse signal is generated according to the rotation of the internal combustion engine,
The pulse signal detection circuit according to claim 8, wherein the first output signal is a signal for igniting the internal combustion engine.
前記タイマは、前記タイマ値として、初期タイマ値から最終タイマ値までを繰り返しカウントし、
前記第1出力時間は、前記誤差時間より長い
ことを特徴とする請求項9に記載のパルス信号検出回路。
The timer repeatedly counts from the initial timer value to the final timer value as the timer value,
The pulse signal detection circuit according to claim 9, wherein the first output time is longer than the error time.
前記被検出パルス信号に基づいて前記内燃機関の回転数を計算する回転数計算部と、
前記回転数に応じて、前記第1出力時間を設定する出力時間設定部と、をさらに備える
ことを特徴とする請求項9または請求項10に記載のパルス信号検出回路。
A rotation speed calculation unit for calculating the rotation speed of the internal combustion engine based on the detected pulse signal;
The pulse signal detection circuit according to claim 9, further comprising: an output time setting unit that sets the first output time according to the number of rotations.
前記処理部は、前記回転数が所定の回転数以上か否か判定し、
前記回転数が前記所定の回転数以上の場合に、
前記出力時間設定部は、前記回転数に応じて、前記第1出力時間を設定し、
前記目標タイマ値計算部は、前記第1目標タイマ値を計算する
ことを特徴とする請求項11に記載のパルス信号検出回路。
The processing unit determines whether the rotational speed is equal to or higher than a predetermined rotational speed,
When the rotational speed is equal to or higher than the predetermined rotational speed,
The output time setting unit sets the first output time according to the rotation speed,
The pulse signal detection circuit according to claim 11, wherein the target timer value calculation unit calculates the first target timer value.
前記回転数が前記所定の回転数より低い場合に、
前記検出部は、前記第1被検出パルスとは異なる第2被検出パルスを検出し、
前記処理部は、前記第2被検出パルスが検出された後、前記割り込み処理を用いて、前記タイマから前記タイマ値を第2検出タイマ値として取得し、
前記目標タイマ値計算部は、前記第2検出タイマ値に第2出力時間を加算して、その加算結果から、前記誤差時間を減算した第2目標タイマ値を計算し、
前記判定部は、前記タイマの前記タイマ値が前記第2目標タイマ値に達したか否か判定し、
前記信号出力部は、前記タイマの前記タイマ値が前記第2目標タイマ値に達した時に、前記内燃機関を点火する第2出力信号を出力する
ことを特徴とする請求項12に記載のパルス信号検出回路。
When the rotational speed is lower than the predetermined rotational speed,
The detecting unit detects a second detected pulse different from the first detected pulse;
The processing unit acquires the timer value as the second detection timer value from the timer using the interrupt process after the second detected pulse is detected,
The target timer value calculation unit adds a second output time to the second detection timer value, calculates a second target timer value obtained by subtracting the error time from the addition result,
The determination unit determines whether the timer value of the timer has reached the second target timer value;
The pulse signal according to claim 12, wherein the signal output unit outputs a second output signal for igniting the internal combustion engine when the timer value of the timer reaches the second target timer value. Detection circuit.
前記第2出力時間は、前記回転数によらず一定である
ことを特徴とする請求項13に記載のパルス信号検出回路。
The pulse signal detection circuit according to claim 13, wherein the second output time is constant regardless of the rotation speed.
内燃機関により駆動されるロータと、
前記ロータの外周に設けられた被検出素子と、
前記被検出素子の前端部および後端部を検出して、前記前端部に対応した正極性の被検出パルスと前記後端部に対応した負極性の被検出パルスとを有する被検出パルス信号を生成する被検出パルス生成部と、
前記被検出パルス信号が入力される請求項9から請求項14の何れかに記載のパルス信号検出回路と、
前記パルス信号検出回路から出力される前記第1出力信号または前記第2出力信号に基づいて前記内燃機関に点火する点火部と、を備える
ことを特徴とする内燃機関の点火装置。
A rotor driven by an internal combustion engine;
Detected elements provided on the outer periphery of the rotor;
A detected pulse signal having a positive detected pulse corresponding to the front end and a negative detected pulse corresponding to the rear end is detected by detecting a front end and a rear end of the detected element. A detected pulse generator to be generated; and
The pulse signal detection circuit according to any one of claims 9 to 14, wherein the detected pulse signal is input;
An ignition device for an internal combustion engine, comprising: an ignition unit that ignites the internal combustion engine based on the first output signal or the second output signal output from the pulse signal detection circuit.
コンピュータを、
タイマ値により時間を計測するタイマ手段と、
被検出パルス信号の第1被検出パルスを検出する検出手段と、
前記第1被検出パルスが検出された後に、実行中の処理を中断して割り込み処理を開始して、前記割り込み処理を用いて、前記第1被検出パルスの検出に対応して、前記タイマ手段から前記タイマ値を第1検出タイマ値として取得する処理手段と、
取得された前記第1検出タイマ値に所定の第1出力時間を加算して、その加算結果から、前記第1被検出パルスが検出されたタイミングと前記第1検出タイマ値が取得されたタイミングとの差である、予め求められた誤差時間を減算した第1目標タイマ値を計算する目標タイマ値計算手段と、
前記タイマ手段の前記タイマ値が前記第1目標タイマ値に達したか否か判定する判定手段と、
前記タイマ手段の前記タイマ値が前記第1目標タイマ値に達した時に、第1出力信号を出力する信号出力手段と、
として機能させるためのプログラム。
Computer
Timer means for measuring time by a timer value;
Detecting means for detecting a first detected pulse of the detected pulse signal;
After the first detected pulse is detected, the current processing is interrupted and interrupt processing is started, and the timer means uses the interrupt processing to correspond to the detection of the first detected pulse. Processing means for acquiring the timer value as a first detection timer value from:
A predetermined first output time is added to the acquired first detection timer value, and from the addition result, a timing at which the first detected pulse value is detected, a timing at which the first detection timer value is acquired, and A target timer value calculating means for calculating a first target timer value obtained by subtracting a previously determined error time,
Determining means for determining whether the timer value of the timer means has reached the first target timer value;
Signal output means for outputting a first output signal when the timer value of the timer means reaches the first target timer value;
Program to function as.
前記被検出パルス信号は、内燃機関の回転に応じて生成され、
前記第1出力信号は、前記内燃機関を点火するための信号である
ことを特徴とする請求項16に記載のプログラム。
The detected pulse signal is generated according to the rotation of the internal combustion engine,
The program according to claim 16, wherein the first output signal is a signal for igniting the internal combustion engine.
JP2011024049A 2011-02-07 2011-02-07 Pulse signal detection method, pulse signal detection circuit, ignition device for internal combustion engine, and program Active JP5674500B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011024049A JP5674500B2 (en) 2011-02-07 2011-02-07 Pulse signal detection method, pulse signal detection circuit, ignition device for internal combustion engine, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011024049A JP5674500B2 (en) 2011-02-07 2011-02-07 Pulse signal detection method, pulse signal detection circuit, ignition device for internal combustion engine, and program

Publications (2)

Publication Number Publication Date
JP2012163044A JP2012163044A (en) 2012-08-30
JP5674500B2 true JP5674500B2 (en) 2015-02-25

Family

ID=46842663

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011024049A Active JP5674500B2 (en) 2011-02-07 2011-02-07 Pulse signal detection method, pulse signal detection circuit, ignition device for internal combustion engine, and program

Country Status (1)

Country Link
JP (1) JP5674500B2 (en)

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6479617A (en) * 1987-09-22 1989-03-24 Nissan Motor Signal processing apparatus of crank angle sensor
JPH0560002A (en) * 1991-09-03 1993-03-09 Matsushita Electric Ind Co Ltd Revolution number measuring device for internal combustion engine
JPH06173836A (en) * 1992-12-14 1994-06-21 Kokusan Denki Co Ltd Ignition device for internal combustion engine
JP3727671B2 (en) * 1994-04-21 2005-12-14 三菱電機株式会社 Engine control device
JP2004176625A (en) * 2002-11-27 2004-06-24 Kokusan Denki Co Ltd Igniter for internal combustion engine
JP4556690B2 (en) * 2005-02-04 2010-10-06 国産電機株式会社 Ignition system for engine
JP4462147B2 (en) * 2005-08-29 2010-05-12 株式会社デンソー Signal output device and electronic control device

Also Published As

Publication number Publication date
JP2012163044A (en) 2012-08-30

Similar Documents

Publication Publication Date Title
JP6044647B2 (en) Dynamometer control device and inertia moment estimation method using the same
US7942041B2 (en) Engine control device
JP2004162605A (en) Crank angle detector
EP3002574B1 (en) Sensor with method to correct offset drift in cyclic signals.
KR20170086663A (en) Control device for dynamometer system
JP2020184029A5 (en)
JPH02272328A (en) Engine knocking detector
JP6911627B2 (en) AD conversion processing device
JP5674500B2 (en) Pulse signal detection method, pulse signal detection circuit, ignition device for internal combustion engine, and program
JP2020091355A5 (en) Control device, image pickup device, lens device and control method
JP2008022649A (en) Device for removing noise from pulse signal
JP6237303B2 (en) Crank angle detector
JP2018180302A (en) Image blur correcting device, interchangeable lens, camera system, and image blur correction method
JP6112832B2 (en) Angle correction device and rotation angle sensor
JP2018135785A (en) Engine control device
JP6583118B2 (en) Engine control device
JP2013084059A (en) Electronic control device
JP5940945B2 (en) Automotive control device
JP2016084709A (en) Accident fire determination control device of engine
JP5983544B2 (en) In-vehicle electronic control unit
JP5854001B2 (en) Rotation angle processing system for engine control and engine control device
JP5654325B2 (en) Vehicle speed pulse signal processor
US9760163B2 (en) Sensor signal processor
JP2019080242A (en) Data acquisition method and data acquisition device
JP2017207382A (en) Electronic controller

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130828

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20140311

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140526

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140603

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140804

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20141125

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20141222

R150 Certificate of patent or registration of utility model

Ref document number: 5674500

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150