JP3727763B2 - Power window control device - Google Patents

Power window control device Download PDF

Info

Publication number
JP3727763B2
JP3727763B2 JP27481397A JP27481397A JP3727763B2 JP 3727763 B2 JP3727763 B2 JP 3727763B2 JP 27481397 A JP27481397 A JP 27481397A JP 27481397 A JP27481397 A JP 27481397A JP 3727763 B2 JP3727763 B2 JP 3727763B2
Authority
JP
Japan
Prior art keywords
pulse signal
timer
rotation
determination
process proceeds
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP27481397A
Other languages
Japanese (ja)
Other versions
JPH11107624A (en
Inventor
藤 雄 伊
藤 勝 加
Original Assignee
自動車電機工業株式会社
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 自動車電機工業株式会社 filed Critical 自動車電機工業株式会社
Priority to JP27481397A priority Critical patent/JP3727763B2/en
Publication of JPH11107624A publication Critical patent/JPH11107624A/en
Application granted granted Critical
Publication of JP3727763B2 publication Critical patent/JP3727763B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
この発明は、ウインドガラスを自動的に駆動させるパワーウインド制御装置に関する。
【0002】
【従来の技術】
ウインドガラスを自動的に駆動させるパワーウインド制御装置としては、モータに備えたアーマチュアシャフトがガラス昇降器を介してウインドガラスに結合されているものが知られている。そして、モータのアーマチュアシャフトに回転検出センサが結合されている。回転検出センサは、アーマチュアシャフト上に取付けられたマグネットと、このマグネットのまわりに配置されたホール素子とからなる。アーマチュアシャフトが回転するとマグネットが回転し、マグネットが回転することにより、ホール素子よりパルス状の検出信号(ホール電圧)が発生するため、コントローラにより検出信号のパルス幅を検出することによってアーマチュアシャフトの回転数が算出される。
【0003】
【発明が解決しようとする課題】
ところが、上記のパワーウインド制御装置において、回転検出センサのマグネットのN極およびS極の着磁にばらつきがあると、マグネットが回転する際に、ホール素子によって検出されるパルス状の検出信号のパルス幅に狂いが生ずるため、結果的に、コントローラによって算出した回転数データに誤差が発生して正確な回転数が得られ難いという問題点があった。
【0004】
また、回転検出センサのマグネットが外径の小さいものであると、着磁される磁極が単一のN極および単一のS極の2個が限度になるため、多数の極が着磁されたマグネットを用いる場合と比べて、細かい回転数データを得難いという問題点があった。
【0005】
【発明の目的】
この発明に係わるパワーウインド制御装置は、モータの正確な回転数を得ることによってウインドガラスの正確な位置データを得ることができるとともに、極数が少ない回転検出センサを用いても細かな回転数データを得ることができるパワーウインド制御装置を提供することを目的としている。
【0006】
【発明の構成】
【0007】
【課題を解決するための手段】
この発明の請求項1に係わるパワーウインド制御装置では、N極およびS極が対向配置されたマグネットをもち、モータのアーマチュアシャフトに結合されて該アーマチュアシャフトとともに回転する回転体と、回転体のまわりに回転体に非接触で配置されていてマグネットのN極およびS極の境界線から予め定められた角度まで回転体が回転した位置での磁束密度に対するしきい値をもち、しきい値によりパルス信号を発生する信号発生器を備えた回転検出センサと、オン切換えされることにより下降指令信号を発生する開スイッチと、オン切換えされることにより上昇指令信号を発生する閉スイッチと、オン切換えされることにより連続指令信号を発生する自動スイッチと、ウインドガラスに結合され、通電により該ウインドガラスを開側に駆動する一方、通電によりウインドガラスを閉側に駆動するアーマチュアシャフトをもつモータと、モータに電気的に接続された駆動回路と、電源に接続されているとともに駆動回路に電気的に接続され、開スイッチの下降指令信号、閉スイッチの上昇指令信号、自動スイッチの連続指令信号により電源の電流を駆動回路に与えるとともに、回転体が回転したときに回転検出センサが発生したパルス信号のエッジから、回転体が一回転したときに回転検出センサが発生したパルス信号のエッジまでの時間に基づきアーマチュアシャフトの回転速度を検出してウインドガラスの動作制御を行うマイクロコンピュータをもつ制御ユニットを備えている構成としたことを特徴としている。
【0008】
この発明の請求項に係わるパワーウインド制御装置では、マグネットには、単一のN極および単一のS極の2極が対向配置され、回転検出センサには、第1のパルス信号を発生する第1の信号発生器と、この第1の信号発生器に対し予め定められた角度を介して配置されて第2のパルス信号を発生する第2の信号発生器とが備えられており、制御ユニットのマイクロコンピュータには、時間の経過によりカウントアップするフリーランニングカウンタと、回転検出センサの第1の信号発生器が発生した第1のパルス信号の立上りエッジから、その後に回転体が一回転したときに第1の信号発生器が発生した第1のパルス信号の立上りエッジまでの時間を回転体の回転毎に計測する第1のタイマと、回転検出センサの第2の信号発生器が発生した第2のパルス信号の立上りエッジから、その後に回転体が一回転したときに第2の信号発生器が発生した第2のパルス信号の立上りエッジまでの時間を回転体の回転毎に計測する第2のタイマと、回転検出センサの第1の信号発生器が発生した第1のパルス信号の立下りエッジから、その後に回転体が一回転したときに第1の信号発生器が発生した第1のパルス信号の立下りエッジまでの時間を回転体の回転毎に計測する第3のタイマと、回転検出センサの第2の信号発生器が発生した第2のパルス信号の立下りエッジから、その後に回転体が一回転したときに第2の信号発生器が発生した第2のパルス信号の立下りエッジまでの時間を回転体の回転毎に計測する第4のタイマを備え、制御ユニットのマイクロコンピュータは、フリーランニングカウンタの値と、第1、第2、第3、第4のタイマの値とによりパルス周期の算出処理を行う構成としたことを特徴としている。
【0009】
この発明の請求項に係わるパワーウインド制御装置では、マグネットには、一対のN極および一対のS極の4極が対向配置され、回転検出センサには、第1のパルス信号を発生する第1の信号発生器と、この第1の信号発生器に対し予め定められた角度を介して配置されて第2のパルス信号を発生する第2の信号発生器とが備えられており、制御ユニットのマイクロコンピュータには、時間の経過によりカウントアップするフリーランニングカウンタと、回転検出センサの第1の信号発生器が発生した第1のパルス信号の立上りエッジから、その後に回転体が一回転したときに第1の信号発生器が発生した第1のパルス信号の立上りエッジまでの時間を回転体の回転毎に計測する第1のタイマと、回転検出センサの第2の信号発生器が発生した第2のパルス信号の立上りエッジから、その後に回転体が一回転したときに第2の信号発生器が発生した第2のパルス信号の立上りエッジまでの時間を回転体の回転毎に計測する第2のタイマと、上記第1のタイマに1/4周期隔て、回転検出センサの第1の信号発生器が発生した第1のパルス信号の立下りエッジから、その後に回転体が一回転したときに第1の信号発生器が発生した第1のパルス信号の立下りエッジまでの時間を回転体の回転毎に計測する第3のタイマと、上記第2のタイマに1/4周期隔て、回転検出センサの第2の信号発生器が発生した第2のパルス信号の立下りエッジから、その後に回転体が一回転したときに第2の信号発生器が発生した第2のパルス信号の立下りエッジまでの時間を回転体の回転毎に計測する第4のタイマと、上記第3のタイマに1/4周期隔て、回転検出センサの第1の信号発生器が発生した第1のパルス信号の立上りエッジから、その後に回転体が一回転したときに第1の信号発生器が発生した第1のパルス信号の立上りエッジまでの時間を回転体の回転毎に計測する第5のタイマと、上記第4のタイマに1/4周期隔て、回転検出センサの第2の信号発生器が発生した第2のパルス信号の立上りエッジから、その後に回転体が一回転したときに第2の信号発生器が発生した第2のパルス信号の立上りエッジまでの時間を回転体の回転毎に計測する第6のタイマと、上記第5のタイマに1/4周期隔て、回転検出センサの第1の信号発生器が発生した第1のパルス信号の立下りエッジから、その後に回転体が一回転したときに第1の信号発生器が発生した第1のパルス信号の立下りエッジまでの時間を回転体の回転毎に計測する第7のタイマと、上記第6のタイマに1/4周期隔て、回転検出センサの第2の信号発生器が発生した第2のパルス信号の立下りエッジから、その後に回転体が一回転したときに第2の信号発生器が発生した第2のパルス信号の立下りエッジまでの時間を回転体の回転毎に計測する第8のタイマとを備え、制御ユニットのマイクロコンピュータは、フリーランニングカウンタの値と、第1、第2、第3、第4、第5、第6、第7、第8のタイマの値とによりパルス周期の算出処理を行う構成としたことを特徴としている。
【0010】
【発明の作用】
この発明の請求項1に係わるパワーウインド制御装置において、回転検出センサは、回転体が回転し、信号発生器に対してマグネットのN極およびS極の境界線から予め定められた位置まで来ると、その位置でのマグネットの磁束密度に対してのしきい値によって信号発生器がパルス信号を発生する。それ故、回転体の円周上の同一点での計測が行われるから、回転体のマグネットに着磁のばらつきがあったとしても、パルス信号の周期に狂いが生ずることがなくなり、また、回転検出センサのマグネットが外径の小さいものであっても、細かい回転数データが得られる。
【0011】
この発明の請求項に係わるパワーウインド制御装置において、制御ユニットのマイクロコンピュータは、それぞれが1/4周期つづ位相差をもっていて回転体の一回転毎にパルス信号を発生する第1、第2、第3、第4のタイマの値と、フリーランニングカウンタの値とによりパルス周期の算出処理を行うことによって、アーマチュアシャフトの回転速度が検出される。それ故、請求項1の作用に加え、マイクロコンピュータに内蔵するタイマが4個で済む。
【0012】
この発明の請求項に係わるパワーウインド制御装置において、制御ユニットのマイクロコンピュータは、それぞれが1/8周期つづ位相差をもっていて回転体の一回転毎にパルス信号を発生する第1、第2、第3、第4、第5、第6、第7、第8のタイマの値と、フリーランニングカウンタの値とによりパルス周期の算出処理を行うことによって、アーマチュアシャフトの回転速度が検出される。それ故、請求項1の作用に加え、マイクロコンピュータに内蔵するタイマが8個で済む。
【0013】
【実施例】
図1ないし図14にはこの発明に係わるパワーウインド制御装置の第1実施例が示されている。
【0014】
図示されるパワーウインド制御装置1は、主として、開スイッチ2、閉スイッチ3、自動スイッチ4、イグニションスイッチ5、電源50、モータ6、回転検出センサ(センサ)7、ウインドガラス60、制御ユニット20から構成されており、制御ユニット20に、定電圧回路21、リセット回路22、電源電圧検出回路23、マイクロコンピュータCPU、駆動回路24が備えられている。
【0015】
開スイッチ2は、オン切換えされることによって下降指令信号を発生する。開スイッチ2が発生した下降指令信号は、図示しない電圧クランプ回路を通じて制御ユニット20に備えたマイクロコンピュータCPUの第1のスイッチ入力ポートP1に与えられる。
【0016】
閉スイッチ3は、オン切換えされることによって上昇指令信号を発生する。閉スイッチ3が発生した上昇指令信号は、図示しない電圧クランプ回路を通じて制御ユニット20に備えたマイクロコンピュータCPUの第2のスイッチ入力ポートP2に与えられる。
【0017】
自動スイッチ4は、オン切換えされることによって自動指令信号を発生する。自動スイッチ4が発生した自動指令信号は、図示しない電圧クランプ回路を通じて制御ユニット20に備えたマイクロコンピュータCPUの第3のスイッチ入力ポートP3に与えられる。
【0018】
イグニションスイッチ5は、一方が電源50に接続され、他方が制御ユニット20に備えた電源電圧検出回路23に接続されている。イグニションスイッチ5はオン切換えされることによって電源電圧検出回路23に電源50の電位を与える。
【0019】
電源電圧検出回路23は、他方がマイクロコンピュータCPUの電圧検出ポートP4に接続されている。電源電圧検出回路23は、マイクロコンピュータCPUに与えられる電源電圧のレベルを検出する。
【0020】
定電圧回路21は、一方がイグニションスイッチ5に接続され、他方がマイクロコンピュータCPUのレギュレータポートP5に接続されている。定電圧回路21は、イグニションスイッチ5がオン切換えされることによって、マイクロコンピュータCPUのレギュレータポートP5に所定のマイコンドライブ電圧を与える。
【0021】
リセット回路22は、一方がイグニションスイッチ5に接続され、他方がマイクロコンピュータCPUのリセットポートP6に接続されている。リセット回路22は、電源50が制御ユニット20に接続されることによって、マイクロコンピュータCPUのリセットポートP6を所定時間ローレベルとすることによってマイクロコンピュータCPUを初期状態にリセットする。
【0022】
駆動回路24は、リレーやスイッチングトランジスタなどによって構成されており、一方がマイクロコンピュータCPUの第1の出力ポートP7、第2の出力ポートP8にそれぞれ接続され、他方がモータ6に備えた第1のブラシ端子6a、第2のブラシ端子6bにそれぞれ接続されている。
【0023】
駆動回路24は、マイクロコンピュータCPUの第1の出力ポートP7がハイレベルになるとともに、マイクロコンピュータCPUの第2の出力ポートP8がローレベルになることによって正回転側がオンし、モータ6の第2のブラシ端子6bにローレベルを与えるとともに、モータ6の第1のブラシ端子6aに電源50の電位(ハイレベル)を与える。これに反して、駆動回路24は、マイクロコンピュータCPUの第1の出力ポートP7がローレベルになるとともに、マイクロコンピュータCPUの第2の出力ポートP8がハイレベルになることによって逆回転側がオンし、モータ6の第1のブラシ端子6aにローレベルを与えるとともに、モータ6の第2のブラシ端子6bに電源50の電位(ハイレベル)を与える。
【0024】
モータ6には、図示しないアーマチュアに備えたアーマチュアシャフト6cが図示しないガラス昇降器を介してウインドガラス60に結合されている。モータ6は、第1のブラシ端子6aにハイレベルが与えられ、第2のブラシ端子6bにローレベルが与えられることによってアーマチュアシャフト6cが正回転し、アーマチュアシャフト6cの正回転によってウインドガラス60を開ける。これに反して、モータ6は、第2のブラシ端子6bにハイレベルが与えられ、第2のブラシ端子6aにローレベルが与えられることによってアーマチュアシャフト6cが逆回転し、アーマチュアシャフト6cの逆回転によってウインドガラス60を閉める。モータ6のアーマチュアシャフト6cには回転検出センサ7が結合されている。
【0025】
回転検出センサ7には、図2に示されるように、回転体7a、第1の信号発生器7b、第2の信号発生器7cが備えられている。
【0026】
回転体7aには、単一のN極および単一のS極が対向配置されたマグネット7dが備えられている。回転体7aは、中心がモータ6のアーマチュアシャフト6cに同心に結合されているため、アーマチュアシャフト6cとともに回転する。
【0027】
第1、第2の信号発生器7b、7cは、回転体7aのまわりに配置されている。第1、第2の信号発生器7b、7cはそれぞれホール素子であり、回転体7aに非接触で配置されている。第1の信号発生器7bと第2の信号発生器7cとは回転体7aの円周上に90度の範囲を置いて配置されている。
【0028】
第1の信号発生器7bは、電源端子が定電圧回路21に接続されているとともに、接地端子が接地され、ホール電圧出力端子がマイクロコンピュータCPUの第1の回転検出ポートP9に接続されている。第1の信号発生器7bは、図2に示されるように、マグネット7dのS極に対してのしきい値THSと、マグネット7dのN極に対してのしきい値THNをもっているため、マグネット7dのS極とN極との境界線からS極側に予め定められた角度の位置まで回転体7aが回転した際に、しきい値THSによりホール電圧が発生し、マグネット7dのS極とN極との境界線からN極側に予め定められた角度の位置まで回転体7aが回転した際に、しきい値THNによりホール電圧が消滅する。
【0029】
第2の信号発生器7cは、電源端子が定電圧回路21に接続されているとともに、接地端子が接地され、ホール電圧出力端子がマイクロコンピュータCPUの第2の回転検出ポートP10に接続されている。第2の信号発生器7cは、第1の信号発生器7bと同様にして図2に示されるように、マグネット7dのS極に対してのしきい値THSと、マグネット7dのN極に対してのしきい値THNをもっているため、マグネット7dのS極とN極との境界線からS極側に予め定められた角度の位置まで回転体7aが回転した際に、しきい値THSによりホール電圧が発生し、マグネット7dのS極とN極との境界線からN極側に予め定められた角度の位置まで回転体7aが回転した際に、しきい値THNによりホール電圧が消滅する。
【0030】
回転検出センサ7は、アーマチュアシャフト6cが正回転することによって回転体7aがアーマチュアシャフト6cとともに正回転するため、図2に示されるように、第1の信号発生器7bから第1のパルス信号Aが発生し、マイクロコンピュータCPUの第1の回転検出ポートP9に第1のパルス信号Aが取り込まれる。そして、アーマチュアシャフト6cの回転によって、第1のパルス信号Aに1/4周期ずれて第2の信号発生器7cから第2のパルス信号Bが発生し、マイクロコンピュータCPUの第2の回転検出ポートP10に第2のパルス信号Bが取り込まれる。
【0031】
マイクロコンピュータCPUには、計時用のクロック、図4に示されるフリーランニングカウンタFRC(8ビット)、図2に示される第1、第2、第3、第4のタイマTAR、TBR、TAF、TBFがそれぞれ内蔵されている。
【0032】
マイクロコンピュータCPUでは、第1のスイッチ入力ポートP1に下降指令信号が与えられると、駆動回路24の正回転側がオンし、モータ6の第2のブラシ端子6bにローレベルを与えるとともに、モータ6の第1のブラシ端子6aに電源50の電位(ハイレベル)を与えてマニュアル開状態となる。
【0033】
また、マイクロコンピュータCPUでは、第2のスイッチ入力ポートP2に上昇指令信号が与えられると、駆動回路24の逆回転側がオンし、モータ6の第1のブラシ端子6aにローレベルを与えるとともに、モータ6の第2のブラシ端子6bに電源50の電位(ハイレベル)を与えてマニュアル閉状態となる。
【0034】
そして、マイクロコンピュータCPUでは、第1のスイッチ入力ポートP1に下降指令信号が与えられ、且つ、第3のスイッチ入力ポートP3に自動指令信号が与えられると、駆動回路24の正回転側がオンし、モータ6の第2のブラシ端子6bにローレベルを与えるとともに、モータ6の第1のブラシ端子6aに電源50の電位(ハイレベル)を与え、開スイッチ2がオフ切換えされてからも、駆動回路24の正回転側をオンし続け、モータ6の第2のブラシ端子6bにローレベルを与えるとともに、モータ6の第1のブラシ端子6aに電源50の電位(ハイレベル)を与え続けて自動開状態となる。
【0035】
そしてまた、マイクロコンピュータCPUでは、第2のスイッチ入力ポートP2に上昇指令信号が与えられ、且つ、第3のスイッチ入力ポートP3に自動指令信号が与えられると、駆動回路24の逆回転側がオンし、モータ6の第1のブラシ端子6aにローレベルを与えるとともに、モータ6の第2のブラシ端子6bに電源50の電位(ハイレベル)を与え、閉スイッチ3がオフ切換えされてからも、駆動回路24の逆回転側をオンし続け、モータ6の第1のブラシ端子6aにローレベルを与えるとともに、モータ6の第2のブラシ端子6bに電源50の電位(ハイレベル)を与え続けて自動閉状態となる。
【0036】
マイクロコンピュータCPUのフリーランニングカウンタFRCは、クロックに同期してカウントアップされ、図4に示されるように、カウント値がFF(16)になることによってオーバフローし、次のカウントでは“0”カウントにリセットされる。フリーランニングカウンタFRCがリセットされることによってマイクコンピュータCPUでは、図5に示されるタイマ割り込みが実行される。タイマ割込みでは、ステップ400において第1のタイマTARがインクリメントされてステップ401に移行し、ステップ401において第2のタイマTBRがインクリメントされてステップ402に移行し、ステップ402において第3のタイマTAFがインクリメントされてステップ403に移行し、ステップ403において第4のタイマTBFがインクリメントされるルーチンが実行される。
【0037】
第1のタイマTARは、図2に示されるように、時間T2 において回転検出センサ7の第1の信号発生器7bが発生した第1のパルス信号Aの立上りエッジから、その後に回転体7aが一回転した時間T10において第1の信号発生器7bが発生した第1のパルス信号Aの立上りエッジまでの時間を回転体7aの回転毎に計測する16ビットのメモリである。第1のタイマTARは、立上りT0への読み出しが実行されると“0”カウントにリセットされる。また、第1のタイマTARは、タイマ割り込みのルーチンで上位バイト(H)の値がインクリメント(+1)される。
【0038】
第2のタイマTBRは、図2に示されるように、時間T4 において回転検出センサ7の第2の信号発生器7cが発生した第2のパルス信号Bの立上りエッジから、その後に回転体7aが一回転した時間T12において第2の信号発生器7cが発生した第2のパルス信号Bの立上りエッジまでの時間を回転体7aの回転毎に計測する16ビットのメモリである。第2のタイマTBRは、立上りT0への読み出しが実行されると“0”カウントにリセットされる。また、第2のタイマTBRは、タイマ割り込みのルーチンで上位バイト(H)の値がインクリメント(+1)される。
【0039】
第3のタイマTAFは、図2に示されるように、時間T6 において回転検出センサ7の第1の信号発生器7bが発生した第1のパルス信号Aの立下りエッジから、その後に回転体7aが一回転した時間T14において第1の信号発生器7bが発生した第1のパルス信号Aの立下りエッジまでの時間を回転体7aの回転毎に計測する16ビットのメモリである。第3のタイマTAFは、立上りT0への読み出しが実行されると“0”カウントにリセットされる。また、第3のタイマTAFは、タイマ割り込みのルーチンで上位バイト(H)の値がインクリメント(+1)される。
【0040】
第4のタイマTBFは、図2に示されるように、時間T8 において回転検出センサ7の第2の信号発生器7cが発生した第2のパルス信号Bの立下りエッジから、その後に回転体7aが一回転した時間T16において第2の信号発生器7cが発生した第2のパルス信号Bの立下りエッジまでの時間を回転体7aの回転毎に計測する16ビットのメモリである。第4のタイマTBFは、立下がりT0への読み出しが実行されると“0”カウントにリセットされる。また、第4のタイマTBFは、タイマ割り込みのルーチンで上位バイト(H)の値がインクリメント(+1)される。
【0041】
マイクロコンピュータCPUでは、図4に示される時間Kにおいて、パルスエッジが検出されると、パルスエッジ割込みルーチンが実行される。そして、タイマ割込みで処理された第1、第2、第3、第4のタイマTAR、TBR、TAF、TBFの上位バイト(H)の値と、フリーランニングカウンタFRCの下位バイト(L)の値が求められる。
【0042】
このとき、t1≧t0であると、TAR(L)=t1−t0となる。これに反して、t1<t0であると、TAR(H)=TAR(H)−1、TAR(L)=t1+(FF−t0)となる。t0は前回パルスエッジが検出されたときのフリーランニングカウンタFRCのカウンタ値であり、t1は今回パルスエッジが検出されたときのフリーランニングカウンタFRCのカウンタ値である。マイクロのタイマTAR、TBR、TAF、TBFに入る値を算出処理する。
【0043】
そして、マイクロコンピュータCPUでは、図6に示されるように、第1のパルス信号Aの立上りエッジが検出された際に第2のパルス信号Bがローレベルにあって、その後に第2のパルス信号Bの立上りが検出された場合をモータ6のアーマチュアシャフト6cが正回転してウインドガラス60が開く側に移動していると認識し、これに対して、第1のパルス信号Aの立上りエッジが検出された際に、第2のパルス信号Bがハイレベルにあって、その後に第2のパルス信号Bの立下りが検出された場合をモータ6のアーマチュアシャフト6cが逆回転してウインドガラス60が閉る側に移動していると認識することによって、作動方向を検出する。
【0044】
また、マイクロコンピュータCPUでは、ウインドガラス60が全閉位置にある際のカウンタ値PCを“0”とし、カウンタ値PCが“0”から、ウインドガラス60が全閉位置からわずかに開く側に移動したときのカウンタ値PCXまでを非反転領域として反転動作を行わない範囲とし、カウンタ値PCXからウインドガラス60が全開位置のカウンタ値までを反転領域として反転動作を行う範囲としている。カウンタ値は、ウインドガラス60が開く側に移動する際にプラスカウントされ、これに反して、ウインドガラス60が閉る側に移動する際にプラスカウントされる。
【0045】
上記のパワーウインド制御装置1は、図7ないし図9に示されるメインルーチン、図10に示される出力ルーチン、図11および図12に示されるパルスエッジ割り込みルーチン、図13に示される負荷検出ルーチンを実行することによってウインドガラス60の動きを制御する。
【0046】
イグニションスイッチ5がオン切換えされ、開スイッチ2、閉スイッチ3、自動スイッチ4がいずれもオン切換えされていないと、メインルーチンのステップ100においての判別で“停止状態がセットされているので”ステップ101に移行し、ステップ101においての判別で“反転要求はセットされていないので”ステップ102に移行し、ステップ102においての判別で“閉スイッチ3はオン切換えされておらず、上昇指令信号が与えられていないので”ステップ103に移行し、ステップ103においての判別で“開スイッチ2はオン切換えされておらず、下降指令信号が与えられていないので”ステップ100に復帰するルーチンが実行され、出力ルーチンに移行する。
【0047】
出力ルーチンのステップ300においての判別で“停止状態がセットされているので”ステップ306に移行し、ステップ306において“停止出力”が実行される。
【0048】
開スイッチ2、閉スイッチ3、自動スイッチ5がいずれもオン切換えされていないと、マイクロコンピュータCPUの第1、第2の出力ポートP7、P8はいずれもローレベルになり、駆動回路24は作動せずに、モータ5に電流が供給されないから、ウインドガラス60は全閉位置に停止している。
【0049】
ウインドガラス60が全閉位置にある状態で、イグニションスイッチ5がオン切換えされ、図2に示される時間T1 において開スイッチ2がオン切換えされると、開スイッチ2が発生した下降指令信号がマイクロコンピュータCPUに取込まれる。すると、メインルーチンのステップ100においての判別で“停止状態がセットされているので”ステップ101に移行し、ステップ101においての判別で“反転要求はセットされていないので”ステップ102に移行し、ステップ102においての判別で“閉スイッチ3はオン切換えされていないので”ステップ103に移行し、ステップ103においての判別で“開スイッチ2がオン切換えされていて下降指令信号が取込まれているので”ステップ107に移行して“開状態(マニュアル開状態)”をセットして出力ルーチンに移行する。
【0050】
出力ルーチンのステップ300においての判別で“停止状態がセットされていないので”ステップ301に移行し、ステップ301においての判別で“マニュアル閉状態がセットされていないので”ステップ302に移行し、ステップ302においての判別で“マニュアル開状態がセットされているので”ステップ308に移行して“開駆動出力”が実行される。“開駆動出力”が実行されることによって、マイクロコンピュータCPUの第1の出力ポートP7がハイレベルになるとともにマイクロコンピュータCPUの第2の出力ポートP8がローレベルになり、モータ6の第2のブラシ端子6bが接地されている状態でモータ6の第1のブラシ端子6aに電源の電位が与えられるため、アーマチュアシャフト6cが正回転することによってウインドガラス60が開く。
【0051】
図2に示される時間T1 においてアーマチュアシャフト6cが正回転を開始してウインドガラス60が開く側に移動を開始すると、時間T2 において回転検出センサ7は、第1の信号発生器7bが第1のパルス信号Aを発生し、第1のパルス信号Aに1/4周期の位相差をもって第2の信号発生器7cが第2のパルス信号Bを発生する。
【0052】
時間T2 において第1のパルス信号Aが発生し、第1のパルス信号Aの立上りエッジが検出されると、パルスエッジ割り込みルーチンのステップ200においての判別で“エッジは第1のパルス信号Aであるので”ステップ201に移行し、ステップ201においての判別で“立上りエッジであるので”ステップ202に移行して“第1のタイマTARのカウント値の0クリア”が実行されてステップ203に移行し、ステップ203において“第1のタイマTARのカウント値より速度ω0を算出処理する”が実行されてステップ208に移行する。
【0053】
そして、ステップ208においての判別で“エッジは第1のパルス信号Aであるので”ステップ209に移行し、ステップ209においての判別で“立上りエッジであるので”ステップ210に移行し、ステップ210においての判別で“第2のパルス信号Bはローレベルなので”ステップ212に移行してパルスカウントPCがプラス1カウント(+1)されて割り込み処理を終了する。
【0054】
時間T2 の以後、回転検出センサ7の回転体7aが1/4回転した図2に示される時間T4 において第2のパルス信号Bが立上る。第2のパルス信号Bが立上ると、割り込みルーチンのステップ200においての判別で“エッジは第1のパルス信号Aではないので”ステップ204に移行し、ステップ204においての判別で“立上りエッジであるので”ステップ206に移行して“第2のタイマTBRのカウント値の0クリア“が実行されてステップ203に移行し、ステップ203において“第2のタイマTBRのカウント値より速度ω0を算出処理する”が実行されてステップ208に移行する。
【0055】
そして、ステップ208においての判別で“エッジは第1のパルス信号Aではないので”ステップ216に移行し、ステップ216においての判別で“立上りエッジであるので”ステップ217に移行し、ステップ217においての判別で“第1のパルス信号Aはローレベルではないので”ステップ220に移行してパルスカウントPCがプラス1カウント(+1)されて割り込み処理を終了する。
【0056】
時間T4 の以後、回転検出センサ7の回転体7aが1/2回転した図2に示される時間T6 において第1のパルス信号Aが立下る。第1のパルス信号Aが立下ると、割り込みルーチンのステップ200においての判別で“エッジは第1のパルス信号Aであるので”ステップ201に移行し、ステップ201においての判別で“立上りエッジではないので”ステップ205に移行して“第3のタイマTAFのカウント値の0クリア“が実行されてステップ203に移行し、ステップ203において“第3のタイマTAFのカウント値より速度ω0を算出処理する”が実行されてステップ208に移行する。
【0057】
そして、ステップ208においての判別で“エッジは第1のパルス信号Aであるので”ステップ209に移行し、ステップ209においての判別で“立上りエッジではないので”ステップ211に移行し、ステップ211においての判別で“第2のパルス信号Bはローレベルではないので”ステップ215に移行してパルスカウントPCがプラス1カウント(+1)されて割り込み処理を終了する。
【0058】
時間T6 の以後、回転検出センサ7の回転体7aが3/4回転した図2に示される時間T8 において第2のパルス信号Bが立下る。第2のパルス信号Bが立下ると、割り込みルーチンのステップ200においての判別で“エッジは第1のパルス信号Aではないので”ステップ204に移行し、ステップ204においての判別で“立上りエッジではないので”ステップ207に移行して“第4のタイマTBFのカウント値の0クリア“が実行されてステップ203に移行し、ステップ203において“第4のタイマTBFのカウント値より速度ω0を算出処理する”が実行されてステップ208に移行する。
【0059】
そして、ステップ208においての判別で“エッジは第1のパルス信号Aではないので”ステップ216に移行し、ステップ216においての判別で“立上りエッジではないので”ステップ218に移行し、ステップ218においての判別で“第1のパルス信号Aはローレベルなので”ステップ221に移行してパルスカウントPCがプラス1カウント(+1)されて割り込み処理を終了する。
【0060】
時間T8 の以後、回転検出センサ7の回転体7aは図2に示される時間T10において1回転を終了し、2回転目に入るため、第1のパルス信号Aが再び立上る。第1のパルス信号Aが立上ると、割り込みルーチンのステップ200においての判別で“エッジは第1のパルス信号Aであるので”ステップ201に移行し、ステップ201においての判別で“立上りエッジであるので”ステップ202に移行して“第1のタイマTARのカウント値の0クリア”が実行されてステップ203に移行し、ステップ203において“第1のタイマTARのカウント値より速度ω0を算出処理する”が実行されてステップ208に移行する。
【0061】
そして、ステップ208においての判別で“エッジは第1のパルス信号Aであるので”ステップ209に移行し、ステップ209においての判別で“立上りエッジであるので”ステップ210に移行し、ステップ210においての判別で“第2のパルス信号Bはローレベルなので”ステップ212に移行してパルスカウントPCがプラス1カウント(+1)されて割り込み処理を終了する。
【0062】
時間T10の以後、回転検出センサ7の回転体7aが5/4回転した図2に示される時間T12において第2のパルス信号Bが再び立上る。第2のパルス信号Bが立上ると、割り込みルーチンのステップ200においての判別で“エッジは第1のパルス信号Aではないので”ステップ204に移行し、ステップ204においての判別で“立上りエッジであるので”ステップ206に移行して“第2のタイマTBRのカウント値の0クリア”が実行されてステップ203に移行し、ステップ203において“第2のタイマTBRのカウント値より速度ω0を算出処理する”が実行されてステップ208に移行する。
【0063】
そして、ステップ208においての判別で“エッジは第1のパルス信号Aではないので”ステップ216に移行し、ステップ216においての判別で“立上りエッジであるので”ステップ217に移行し、ステップ217においての判別で“第1のパルス信号Aはローレベルではないので”ステップ220に移行してパルスカウントPCがプラス1カウント(+1)されて割り込み処理を終了する。
【0064】
時間T12の以後、回転検出センサ7の回転体7aが3/2回転した図2に示される時間T14において第1のパルス信号Aが立下る。第1のパルス信号Aが立下ると、割り込みルーチンのステップ200においての判別で“エッジは第1のパルス信号Aであるので”ステップ201に移行し、ステップ201においての判別で“立上りエッジではないので”ステップ205に移行して“第3のタイマTAFのカウント値の0クリア”が実行されてステップ203に移行し、ステップ203において“第3のタイマTAFのカウント値より速度ω0を算出処理する”が実行されてステップ208に移行する。
【0065】
そして、ステップ208においての判別で“エッジは第1のパルス信号Aであるので”ステップ209に移行し、ステップ209においての判別で“立上りエッジではないので”ステップ211に移行し、ステップ211においての判別で“第2のパルス信号Bはローレベルではないので”ステップ215に移行してパルスカウントPCがプラス1カウント(+1)されて割り込み処理を終了する。
【0066】
時間T14の以後、回転検出センサ7の回転体7aが7/4回転した図2に示される時間T16において第2のパルス信号Bが立下る。第2のパルス信号Bが立下ると、割り込みルーチンのステップ200においての判別で“エッジは第1のパルス信号Aではないので”ステップ204に移行し、ステップ204においての判別で“立上りエッジではないので”ステップ207に移行して“第4のタイマTBFのカウント値の0クリア”が実行されてステップ203に移行し、ステップ203において“第4のタイマTBFのカウント値より速度ω0を算出処理する”が実行されてステップ208に移行する。
【0067】
そして、ステップ208においての判別で“エッジは第1のパルス信号Aではないので”ステップ216に移行し、ステップ216においての判別で“立上りエッジではないので”ステップ218に移行し、ステップ218においての判別で“第1のパルス信号Aはローレベルなので”ステップ221に移行してパルスカウントPCがプラス1カウント(+1)されて割り込み処理を終了する。
【0068】
上述したように、アーマチュアシャフト6cが正回転を開始してウインドガラス60が開く側に移動を開始することによって、回転検出センサ7が第1のパルス信号A、第2のパルス信号Bを発生すると、第1のタイマTARが回転検出センサ7の回転体7aの一回転毎にカウントを0クリアしながらプラスカウントを行い、この第1のタイマTARに1/4周期ずれて、第2のタイマTBRが回転検出センサ7の回転体7aの一回転毎にカウントを0クリアしながらプラスカウントを行い、この第1のタイマTBRに1/4周期ずれて、第3のタイマTAFが回転検出センサ7の回転体7aの一回転毎にカウントを0クリアしながらプラスカウントを行い、この第3のタイマTBRに1/4周期ずれて、第4のタイマTBFが回転検出センサ7の回転体7aの一回転毎にカウントを0クリアしながらプラスカウントを行うことによって、マイクロコンピュータCPUがウインドガラス60の現在位置を間接的に検出する。
【0069】
このとき、アーマチュアシャフト6cが正回転を開始してウインドガラス60が開く側に移動を開始した際に、負荷検出ルーチンが同時に実行されている。負荷検出ルーチンのステップ500においての判別で“閉動作がセットされていないので”ステップ508に移行し、ステップ508においての判別でウインドガラス60が開く側に移動していることによって“パルスエッジ割り込みルーチンで算出された速度ω0が予め定められた最小値ωminより小さくなっていないので”最初のステップ500に戻るルーチンが繰り返し実行される。
【0070】
ウインドガラス60が開く側に移動している途中で、開スイッチ2がオフ切換えされると、開スイッチ2が発生していた下降指令信号がマイクロコンピュータCPUに取込まれなくなる。すると、メインルーチンのステップ100においての判別で“停止状態がセットされていないので”ステップ108に移行し、ステップ108においての判別で“マニュアル閉状態がセットされていないので”ステップ117に移行し、ステップ117においての判別で“マニュアル開状態がセットされているので”ステップ118に移行し、ステップ118においての判別で“モータロックの検出はされていないので”ステップ119に移行し、ステップ119においての判別で“開スイッチ2がオフ切換えされているので”ステップ122に移行して“停止状態”をセットして出力ルーチンに移行する。
【0071】
出力ルーチンのステップ300においての判別で“停止状態がセットされているので”ステップ306に移行して“停止出力”が実行される。“停止出力”が実行されることによって、マイクロコンピュータCPUの第1の出力ポートP7がローレベルになるとともにマイクロコンピュータCPUの第2の出力ポートP8がローレベルになるため、モータ6の第1、第2のブラシ端子6a、6bに電流が供給されなくなり、アーマチュアシャフト6cが正回転を停止することによってウインドガラス60が止まる。
【0072】
ウインドガラス60が停止している際に、開スイッチ2がオン切換えされるとともに自動スイッチ4がオン切換えされると、開スイッチ2よりの下降指令信号、自動スイッチ4よりの自動指令信号がマイクロコンピュータCPUに取り込まれる。すると、メインルーチンのステップ100においての判別で“停止状態がセットされているので”ステップ101に移行し、ステップ101においての判別で“反転要求はセットされていないので”ステップ102に移行し、ステップ102においての判別で“閉スイッチ3はオン切換えされていないので”ステップ103に移行し、ステップ103においての判別で“開スイッチ2はオン切換えされているので”ステップ107に移行して“開状態”をセットしてステップ100に戻り、次の回のメインルーチンのステップ100においての判別で“停止状態はセットされていないので”ステップ108に移行し、ステップ108においての判別で“マニュアル閉状態がセットされていないので”ステップ117に移行し、ステップ117においての判別で“マニュアル開状態がセットされているので”ステップ118に移行し、ステップ118においての判別で“モータロックの検出はされていないので”ステップ119に移行し、ステップ119においての判別で開スイッチ2はオフ切換えされていないので”ステップ120に移行し、ステップ120においての判別で“自動スイッチ4はオン切換えされているので”ステップ123に移行して“自動開状態”をセットして出力ルーチンに移行する。
【0073】
出力ルーチンのステップ300においての判別で“停止状態はセットされていないので”ステップ301に移行し、ステップ301においての判別で“マニュアル閉状態がセットされていないので”ステップ302に移行し、ステップ302においての判別で“マニュアル開状態がセットされていないので”ステップ303に移行し、ステップ303においての判別で“自動閉状態がセットされていないので”ステップ304に移行し、ステップ304においての判別で“自動開状態がセットされているので”ステップ310に移行して開駆動出力が連続的に実行される。
【0074】
連続的な開駆動出力によって、モータ6の第1のブラシ端子6aに電源が接続されるとともに、モータ6の第2のブラシ端子6bが接地され、開駆動出力は、その後に開スイッチ2がオフ切換えされてからも続けられるため、アーマチュアシャフト6cが正回転して、ウインドガラス60が開く側に連続的に移動する。
【0075】
そして、図2に示されるように、時間T1 においてモータ6のアーマチュアシャフト6cが正回転を開始することによって、時間T2 において回転検出センサ7は、第1の信号発生器7bが第1のパルス信号Aを発生し、第1のパルス信号Aに1/4周期の位相差をもって第2の信号発生器7cが第2のパルス信号Bを発生する。
【0076】
時間T2 において第1のパルス信号Aが発生し、第1のパルス信号Aの立上りエッジが検出されると、パルスエッジ割り込みルーチンのステップ200においての判別で“エッジは第1のパルス信号Aであるので”ステップ201に移行し、ステップ201においての判別で“立上りエッジであるので”ステップ202に移行して“第1のタイマTARのカウント値の0クリア”が実行されてステップ203に移行し、ステップ203において“第1のタイマTARのカウント値より速度ω0を算出処理する”が実行されてステップ208に移行する。
【0077】
そして、ステップ208においての判別で“エッジは第1のパルス信号Aであるので”ステップ209に移行し、ステップ209においての判別で“立上りエッジであるので”ステップ210に移行し、ステップ210においての判別で“第2のパルス信号Bはローレベルなので”ステップ212に移行してパルスカウントPCがプラス1カウント(+1)されて割り込み処理を終了する。
【0078】
時間T2 の以後、回転検出センサ7の回転体7aが1/4回転した図2に示される時間T4 において第2のパルス信号Bが立上る。第2のパルス信号Bが立上ると、割り込みルーチンのステップ200においての判別で“エッジは第1のパルス信号Aではないので”ステップ204に移行し、ステップ204においての判別で“立上りエッジであるので”ステップ206に移行して“第2のタイマTBRのカウント値の0クリア“が実行されてステップ203に移行し、ステップ203において“第2のタイマTBRのカウント値より速度ω0を算出処理する”が実行されてステップ208に移行する。
【0079】
そして、ステップ208においての判別で“エッジは第1のパルス信号Aではないので”ステップ216に移行し、ステップ216においての判別で“立上りエッジであるので”ステップ217に移行し、ステップ217においての判別で“第1のパルス信号Aはローレベルではないので”ステップ220に移行してパルスカウントPCがプラス1カウント(+1)されて割り込み処理を終了する。
【0080】
時間T4 の以後、回転検出センサ7の回転体7aが1/2回転した図2に示される時間T6 において第1のパルス信号Aが立下る。第1のパルス信号Aが立下ると、割り込みルーチンのステップ200においての判別で“エッジは第1のパルス信号Aであるので”ステップ201に移行し、ステップ201においての判別で“立上りエッジではないので”ステップ205に移行して“第3のタイマTAFのカウント値の0クリア“が実行されてステップ203に移行し、ステップ203において“第3のタイマTAFのカウント値より速度ω0を算出処理する”が実行されてステップ208に移行する。
【0081】
そして、ステップ208においての判別で“エッジは第1のパルス信号Aであるので”ステップ209に移行し、ステップ209においての判別で“立上りエッジではないので”ステップ211に移行し、ステップ211においての判別で“第2のパルス信号Bはローレベルではないので”ステップ215に移行してパルスカウントPCがプラス1カウント(+1)されて割り込み処理を終了する。
【0082】
時間T6 の以後、回転検出センサ7の回転体7aが3/4回転した図2に示される時間T8 において第2のパルス信号Bが立下る。第2のパルス信号Bが立下ると、割り込みルーチンのステップ200においての判別で“エッジは第1のパルス信号Aではないので”ステップ204に移行し、ステップ204においての判別で“立上りエッジではないので”ステップ207に移行して“第4のタイマTBFのカウント値の0クリア“が実行されてステップ203に移行し、ステップ203において“第4のタイマTBFのカウント値より速度ω0を算出処理する”が実行されてステップ208に移行する。
【0083】
そして、ステップ208においての判別で“エッジは第1のパルス信号Aではないので”ステップ216に移行し、ステップ216においての判別で“立上りエッジではないので”ステップ218に移行し、ステップ218においての判別で“第1のパルス信号Aはローレベルなので”ステップ221に移行してパルスカウントPCがプラス1カウント(+1)されて割り込み処理を終了する。
【0084】
時間T8 の以後、回転検出センサ7の回転体7aは図2に示される時間T10において1回転を終了し、2回転目に入るため、第1のパルス信号Aが再び立上る。第1のパルス信号Aが立上ると、割り込みルーチンのステップ200においての判別で“エッジは第1のパルス信号Aであるので”ステップ201に移行し、ステップ201においての判別で“立上りエッジであるので”ステップ202に移行して“第1のタイマTARのカウント値の0クリア”が実行されてステップ203に移行し、ステップ203において“第1のタイマTARのカウント値より速度ω0を算出処理する”が実行されてステップ208に移行する。
【0085】
そして、ステップ208においての判別で“エッジは第1のパルス信号Aであるので”ステップ209に移行し、ステップ209においての判別で“立上りエッジであるので”ステップ210に移行し、ステップ210においての判別で“第2のパルス信号Bはローレベルなので”ステップ212に移行してパルスカウントPCがプラス1カウント(+1)されて割り込み処理を終了する。
【0086】
時間T10の以後、回転検出センサ7の回転体7aが5/4回転した図2に示される時間T12において第2のパルス信号Bが再び立上る。第2のパルス信号Bが立上ると、割り込みルーチンのステップ200においての判別で“エッジは第1のパルス信号Aではないので”ステップ204に移行し、ステップ204においての判別で“立上りエッジであるので”ステップ206に移行して“第2のタイマTBRのカウント値の0クリア”が実行されてステップ203に移行し、ステップ203において“第2のタイマTBRのカウント値より速度ω0を算出処理する”が実行されてステップ208に移行する。
【0087】
そして、ステップ208においての判別で“エッジは第1のパルス信号Aではないので”ステップ216に移行し、ステップ216においての判別で“立上りエッジであるので”ステップ217に移行し、ステップ217においての判別で“第1のパルス信号Aはローレベルではないので”ステップ220に移行してパルスカウントPCがプラス1カウント(+1)されて割り込み処理を終了する。
【0088】
時間T12の以後、回転検出センサ7の回転体7aが3/2回転した図2に示される時間T14において第1のパルス信号Aが立下る。第1のパルス信号Aが立下ると、割り込みルーチンのステップ200においての判別で“エッジは第1のパルス信号Aであるので”ステップ201に移行し、ステップ201においての判別で“立上りエッジではないので”ステップ205に移行して“第3のタイマTAFのカウント値の0クリア”が実行されてステップ203に移行し、ステップ203において“第3のタイマTAFのカウント値より速度ω0を算出処理する”が実行されてステップ208に移行する。
【0089】
そして、ステップ208においての判別で“エッジは第1のパルス信号Aであるので”ステップ209に移行し、ステップ209においての判別で“立上りエッジではないので”ステップ211に移行し、ステップ211においての判別で“第2のパルス信号Bはローレベルではないので”ステップ215に移行してパルスカウントPCがプラス1カウント(+1)されて割り込み処理を終了する。
【0090】
時間T14の以後、回転検出センサ7の回転体7aが7/4回転した図2に示される時間T16において第2のパルス信号Bが立下る。第2のパルス信号Bが立下ると、割り込みルーチンのステップ200においての判別で“エッジは第1のパルス信号Aではないので”ステップ204に移行し、ステップ204においての判別で“立上りエッジではないので”ステップ207に移行して“第4のタイマTBFのカウント値の0クリア”が実行されてステップ203に移行し、ステップ203において“第4のタイマTBFのカウント値より速度ω0を算出処理する”が実行されてステップ208に移行する。
【0091】
そして、ステップ208においての判別で“エッジは第1のパルス信号Aではないので”ステップ216に移行し、ステップ216においての判別で“立上りエッジではないので”ステップ218に移行し、ステップ218においての判別で“第1のパルス信号Aはローレベルではないので”ステップ221に移行してパルスカウントPCがプラス1カウント(+1)されて割り込み処理を終了する。
【0092】
上述したように、アーマチュアシャフト6cが正回転を開始してウインドガラス60が開く側に移動を開始することによって、回転検出センサ7が第1のパルス信号A、第2のパルス信号Bを発生すると、第1のタイマTARが回転検出センサ7の回転体7aの一回転毎にカウントを0クリアしながらプラスカウントを行い、この第1のタイマTARに1/4周期ずれて、第2のタイマTBRが回転検出センサ7の回転体7aの一回転毎にカウントを0クリアしながらプラスカウントを行い、この第1のタイマTBRに1/4周期ずれて、第3のタイマTAFが回転検出センサ7の回転体7aの一回転毎にカウントを0クリアしながらプラスカウントを行い、この第3のタイマTBRに1/4周期ずれて、第4のタイマTBFが回転検出センサ7の回転体7aの一回転毎にカウントを0クリアしながらプラスカウントを行うことによって、マイクロコンピュータCPUがウインドガラス60の現在位置を間接的に検出する。
【0093】
このとき、アーマチュアシャフト6cが正回転を開始してウインドガラス60が開く側に移動を開始した際に、負荷検出ルーチンが同時に実行されている。負荷検出ルーチンのステップ500においての判別で“閉動作がセットされていないので”ステップ508に移行し、ステップ508においての判別でウインドガラス60が開く側に移動していることによって“パルスエッジ割り込みルーチンで算出された速度ω0が予め定められた最小値ωminより小さくなっていないので”最初のステップ500に戻るルーチンが繰り返し実行される。
【0094】
ウインドガラス60は、開く側に移動を続けると、全開位置で車体側に衝突することによって移動を阻止される。すると、負荷検出ルーチンのステップ500においての判別で“閉動作がセットされていないので”ステップ508に移行し、ステップ508においての判別でウインドガラス60が開く側に移動していることによって“パルスエッジ割り込みルーチンで算出された速度ω0が予め定められた最小値ωminより小さくなるので”ステップ509に移行して“モータロック検知”をセットしてメインルーチンに移行する。
【0095】
メインルーチンのステップ100においての判別で“停止状態がセットされていないので”ステップ108に移行し、ステップ108においての判別で“マニュアル閉状態がセットされていないので”ステップ117に移行し、ステップ117においての判別で“マニュアル開状態がセットされていないので”ステップ124に移行し、ステップ124においての判別で“自動閉状態がセットされていないので”ステップ131に移行し、ステップ131においての判別で“自動開状態がセットされているので”ステップ132に移行し、ステップ132においての判別で“モータロック検知”がセットされているので”ステップ134に移行して“停止状態”がセットされて出力ルーチンに移行する。
【0096】
出力ルーチンのステップ300においての判別で“停止状態がセットされているので”ステップ306に移行して“停止出力”が実行される。停止出力によって、モータ6の第1、第2のブラシ端子6a、6bがローレベルになるため、モータ6はアーマチュアシャフト6cが回転を停止して、ウインドガラス60が全開位置で停止する。
【0097】
ウインドガラス60が全開位置に停止している際に、閉スイッチ3がオン切換えされると、閉スイッチ3よりの上昇指令信号がマイクロコンピュータCPUに取り込まれる。すると、メインルーチンのステップ100においての判別で“停止状態がセットされているので”ステップ101に移行し、ステップ101においての判別で“反転要求がセットされていないので”ステップ102に移行し、ステップ102においての判別で“閉スイッチ3はオン切換えされているので”ステップ104に移行し、ステップ104においての判別で“開スイッチ2はオフ切換えされているので”ステップ106に移行して“閉状態(マニュアル閉状態)”をセットして出力ルーチンに移行する。
【0098】
そして、出力ルーチンのステップ300においての判別で“閉状態がセットされているので”ステップ301に移行し、ステップ301においての判別で“マニュアル閉状態がセットされているので”ステップ307に移行して閉駆動出力が実行される。
【0099】
閉駆動出力によって、モータ6の第1のブラシ端子6aが接地されるとともに、モータ6の第2のブラシ端子6bに電源が接続されるため、アーマチュアシャフト6cが逆回転して、ウインドガラス60が閉る側に移動を開始する。
【0100】
そして、図3に示されるように、モータ6のアーマチュアシャフト6cが時間T18において逆回転を開始することによって、時間T19において回転検出センサ7は、第1の信号発生器7bが第1のパルス信号Aを発生し、第1のパルス信号Aに1/4周期の位相差をもって第2の信号発生器7cが第2のパルス信号Bを発生する。
【0101】
時間T19において第1のパルス信号Aが発生し、第1のパルス信号Aの立上りエッジが検出されると、パルスエッジ割り込みルーチンのステップ200においての判別で“エッジは第1のパルス信号Aであるので”ステップ201に移行し、ステップ201においての判別で“立上りエッジであるので”ステップ202に移行して“第1のタイマTARのカウント値の0クリア”が実行されてステップ203に移行し、ステップ203において“第1のタイマTARのカウント値より速度ω0を算出処理する”が実行されてステップ208に移行する。
【0102】
そして、ステップ208においての判別で“エッジは第1のパルス信号Aであるので”ステップ209に移行し、ステップ209においての判別で“立上りエッジであるので”ステップ210に移行し、ステップ210においての判別で“第2のパルス信号Bはローレベルではないので”ステップ213に移行してパルスカウントPCがマイナス1カウント(−1)されて割り込み処理を終了する。
【0103】
時間T19の以後、回転検出センサ7の回転体7aが1/4回転した図3に示される時間T21において第2のパルス信号Bが立下る。第2のパルス信号Bが立下ると、割り込みルーチンのステップ200においての判別で“エッジは第1のパルス信号Aではないので”ステップ204に移行し、ステップ204においての判別で“立上りエッジではないので”ステップ207に移行して“第4のタイマTBFのカウント値の0クリア”が実行されてステップ203に移行し、ステップ203において“第4のタイマTBFのカウント値より速度ω0を算出処理する”が実行されてステップ208に移行する。
【0104】
そして、ステップ208においての判別で“エッジは第1のパルス信号Aではないので”ステップ216に移行し、ステップ216においての判別で“立上りエッジではないので”ステップ218に移行し、ステップ218においての判別で“第1のパルス信号Aはローレベルではないので”ステップ222に移行してパルスカウントPCがマイナス1カウント(−1)されて割り込み処理を終了する。
【0105】
時間T21の以後、回転検出センサ7の回転体7aが1/2回転した図3に示される時間T23において第1のパルス信号Aが立下る。第1のパルス信号Aが立下ると、割り込みルーチンのステップ200においての判別で“エッジは第1のパルス信号Aであるので”ステップ201に移行し、ステップ201においての判別で“立上りエッジではないので”ステップ205に移行して“第3のタイマTAFのカウント値の0クリア”が実行されてステップ203に移行し、ステップ203において“第3のタイマTAFのカウント値より速度ω0を算出処理する”が実行されてステップ208に移行する。
【0106】
そして、ステップ208においての判別で“エッジは第1のパルス信号Aであるので”ステップ209に移行し、ステップ209においての判別で“立上りエッジではないので”ステップ211に移行し、ステップ211においての判別で“第2のパルス信号Bはローレベルなので”ステップ214に移行してパルスカウントPCがマイナス1カウント(−1)されて割り込み処理を終了する。
【0107】
時間T23の以後、回転検出センサ7の回転体7aが3/4回転した図3に示される時間T25において第2のパルス信号Bが立上る。第2のパルス信号Bが立上ると、割り込みルーチンのステップ200においての判別で“エッジは第1のパルス信号Aではないので”ステップ204に移行し、ステップ204においての判別で“立上りエッジではないので”ステップ207に移行して“第4のタイマTBFのカウント値の0クリア”が実行されてステップ203に移行し、ステップ203において“第4のタイマTBFのカウント値より速度ω0を算出処理する”が実行されてステップ208に移行する。
【0108】
そして、ステップ208においての判別で“エッジは第1のパルス信号Aではないので”ステップ216に移行し、ステップ216においての判別で“立上りエッジであるので”ステップ217に移行し、ステップ217においての判別で“第1のパルス信号Aはローレベルなので”ステップ219に移行してパルスカウントPCがマイナス1カウント(−1)されて割り込み処理を終了する。
【0109】
時間T25の以後、回転検出センサ7の回転体7aが1回転した図3に示される時間T27において第1のパルス信号Aが再び立上る。第1のパルス信号Aが立上ると、割り込みルーチンのステップ200においての判別で“エッジは第1のパルス信号Aであるので”ステップ201に移行し、ステップ201においての判別で“立上りエッジであるので”ステップ202に移行して“第1のタイマTARのカウント値の0クリア”が実行されてステップ203に移行し、ステップ203において“第1のタイマTARのカウント値より速度ω0を算出処理する”が実行されてステップ208に移行する。
【0110】
そして、ステップ208においての判別で“エッジは第1のパルス信号Aであるので”ステップ209に移行し、ステップ209においての判別で“立上りエッジであるので”ステップ210に移行し、ステップ210においての判別で“第2のパルス信号Bはローレベルではないので”ステップ213に移行してパルスカウントPCがマイナス1カウント(−1)されて割り込み処理を終了する。
【0111】
時間T27の以後、回転検出センサ7の回転体7aが5/4回転した図3に示される時間T29において第2のパルス信号Bが立下る。第2のパルス信号Bが立下ると、割り込みルーチンのステップ200においての判別で“エッジは第1のパルス信号Aではないので”ステップ204に移行し、ステップ204においての判別で“立上りエッジではないので”ステップ207に移行して“第4のタイマTBFのカウント値の0クリア”が実行されてステップ203に移行し、ステップ203において“第4のタイマTBFのカウント値より速度ω0を算出処理する”が実行されてステップ208に移行する。
【0112】
そして、ステップ208においての判別で“エッジは第1のパルス信号Aではないので”ステップ216に移行し、ステップ216においての判別で“立上りエッジではないので”ステップ218に移行し、ステップ218においての判別で“第1のパルス信号Aはローレベルではないので”ステップ222に移行してパルスカウントPCがマイナス1カウント(−1)されて割り込み処理を終了する。
【0113】
時間T29の以後、回転検出センサ7の回転体7aが3/2回転した図3に示される時間T31において第1のパルス信号Aが立下る。第1のパルス信号Aが立下ると、割り込みルーチンのステップ200においての判別で“エッジは第1のパルス信号Aであるので”ステップ201に移行し、ステップ201においての判別で“立上りエッジではないので”ステップ205に移行して“第3のタイマTAFのカウント値の0クリア”が実行されてステップ203に移行し、ステップ203において“第3のタイマTAFのカウント値より速度ω0を算出処理する”が実行されてステップ208に移行する。
【0114】
そして、ステップ208においての判別で“エッジは第1のパルス信号Aであるので”ステップ209に移行し、ステップ209においての判別で“立上りエッジではないので”ステップ211に移行し、ステップ211においての判別で“第2のパルス信号Bはローレベルなので”ステップ214に移行してパルスカウントPCがマイナス1カウント(−1)されて割り込み処理を終了する。
【0115】
時間T31の以後、回転検出センサ7の回転体7aが7/4回転した図3に示される時間T33において第2のパルス信号Bが立上る。第2のパルス信号Bが立上ると、割り込みルーチンのステップ200においての判別で“エッジは第1のパルス信号Aではないので”ステップ204に移行し、ステップ204においての判別で“立上りエッジなので”ステップ206に移行して“第2のタイマTBRのカウント値の0クリア”が実行されてステップ203に移行し、ステップ203において“第2のタイマTBRのカウント値より速度ω0を算出処理する”が実行されてステップ208に移行する。
【0116】
そして、ステップ208においての判別で“エッジは第1のパルス信号Aではないので”ステップ216に移行し、ステップ216においての判別で“立上りエッジであるので”ステップ217に移行し、ステップ217においての判別で“第1のパルス信号Aはローレベルなので”ステップ219に移行してパルスカウントPCがマイナス1カウント(−1)されて割り込み処理を終了する。
【0117】
上述したように、アーマチュアシャフト6cが逆回転を開始してウインドガラス60が閉る側に移動を開始することによって、回転検出センサ7が第1のパルス信号A、第2のパルス信号Bを発生すると、第1のタイマTARが回転検出センサ7の回転体7aの一回転毎にカウントを0クリアしながらマイナスカウントを行い、この第1のタイマTARに1/4周期ずれて、第4のタイマTBFが回転検出センサ7の回転体7aの一回転毎にカウントを0クリアしながらマイナスカウントを行い、この第4のタイマTBFに1/4周期ずれて、第3のタイマTAFが回転検出センサ7の回転体7aの一回転毎にカウントを0クリアしながらマイナスカウントを行い、この第3のタイマTAFに1/4周期ずれて、第2のタイマTBRが回転検出センサ7の回転体7aの一回転毎にカウントを0クリアしながらマイナスカウントを行うことによって、マイクロコンピュータCPUがウインドガラス60の現在位置を間接的に検出する。
【0118】
このとき、アーマチュアシャフト6cが逆回転を開始してウインドガラス60が閉る側に移動を開始した際に、負荷検出ルーチンが同時に実行されている。負荷検出ルーチンのステップ500においての判別で“閉動作がセットされているので”ステップ501に移行し、ステップ501においての判別で“パルスエッジ割り込みルーチンで速度データω0が更新されているので”ステップ502に移行して“電源電圧レベルV0を検出”してステップ503に移行し、ステップ503において速度データω0、電源電圧レベルV0により負荷トルクTL0を算出”してステップ504に移行し、ステップ504においての判別で“パルスカウントPCが反転領域の限界値(絶対値)PCXよりも大きいので”ステップ506に移行する。
【0119】
ステップ504から移行したステップ506においては負荷データの更新が行われる。負荷データの更新は、以前のルーチンで蓄積されているTLnからTL1までの負荷データをシフトすることによって行われる。そして、ステップ506からステップ507に移行し、ステップ507において挟み込み判定値TLref を算出する。挟み込み判定値TLref の算出は、図14に示されるように、以前のルーチンで蓄積されているTLnからTL1までの負荷データのなかでの最小値TLmin に、挟み込みによる負荷増加限界値として予め定められた値TLADD (定数)を加算することによって得られる。挟み込み判定値TLref はステップ503において得られた負荷トルクTL0との比較に用いられる。マイクロコンピュータCPUは、負荷トルクTL0が挟み込み判定値TLref よりも大きくなったときを反転動作を行うタイミングとしている。そして、ステップ507から最初のステップ500に復帰する。
【0120】
ウインドガラス60が閉る側に移動している途中で、閉スイッチ3がオフ切換えされると、閉スイッチ3が発生していた上昇指令信号がマイクロコンピュータCPUに取込まれなくなる。すると、メインルーチンのステップ100においての判別で“停止状態がセットされていないので”ステップ108に移行し、ステップ108においての判別で“マニュアル閉状態がセットされているので”ステップ109に移行し、ステップ109においての判別で“反転要求はセットされていないので”ステップ110に移行し、ステップ110においての判別で“モータロックはセットされていないので”ステップ111に移行し、ステップ111においての判別で“閉スイッチ3はオフ切換えされているので”ステップ115に移行して“停止状態”をセットして出力ルーチンに移行する。
【0121】
出力ルーチンのステップ300においての判別で“停止状態がセットされている”ステップ306に移行して“停止出力”が実行される。“停止出力”が実行されることによって、マイクロコンピュータCPUの第1の出力ポートP7がローレベルになるとともにマイクロコンピュータCPUの第2の出力ポートP8がローレベルになるため、モータ6の第1、第2のブラシ端子6a、6bが電流が供給されなくなって、アーマチュアシャフト6cが正回転を停止することによってウインドガラス60が止まる。
【0122】
そして、ウインドガラス60が停止している際に、閉スイッチ3がオン切換えされるとともに自動スイッチ4がオン切換えされると、閉スイッチ3よりの上昇指令信号、自動スイッチ4よりの自動指令信号がマイクロコンピュータCPUに取り込まれる。すると、メインルーチンのステップ100においての判別で“停止状態がセットされているので”ステップ101に移行し、ステップ101においての判別で“反転要求はセットされていないので”ステップ102に移行し、ステップ102においての判別で“閉スイッチ3はオン切換えされているので”ステップ104に移行し、ステップ104においての判別で“開スイッチ2はオン切換えされていないので”ステップ106に移行して“閉状態”をセットしてステップ100に戻り、次の回のメインルーチンのステップ100においての判別で“閉状態がセットされているので”ステップ108に移行し、ステップ108においての判別で“マニュアル閉状態がセットされているので”ステップ109に移行し、ステップ109においての判別で“反転要求がセットされていないので”ステップ110に移行し、ステップ110においての判別で“モータロックがセットされていないので”ステップ111に移行し、ステップ111においての判別で“閉スイッチ3はオフ切換えされてないので”ステップ112に移行し、ステップ112においての判別で“自動スイッチ4はオン切換えされているので”ステップ116に移行して“自動閉状態”がセットされて出力ルーチンに移行する。
【0123】
そして、出力ルーチンのステップ300においての判別で“停止状態はセットされていないので”ステップ301に移行し、ステップ301においての判別で“マニュアル閉状態はセットされていないので”ステップ302に移行し、ステップ302においての判別で“マニュアル開状態はセットされていないので”ステップ303に移行し、ステップ303においての判別で“自動閉状態がセットされているので”ステップ309に移行して連続的な閉駆動出力が実行される。
【0124】
連続的な閉駆動出力によって、モータ6の第2のブラシ端子6bに電源が接続されるとともに、モータ6の第1のブラシ端子6aが接地され、閉駆動出力は、その後に閉スイッチ3がオフ切換えされてからも続けられるため、アーマチュアシャフト6cが逆回転して、ウインドガラス60が連続的に閉る側に移動する。
【0125】
そして、図3に示されるように、モータ6のアーマチュアシャフト6cが時間T18において逆回転を開始することによって、時間T19において回転検出センサ7は、第1の信号発生器7bが第1のパルス信号Aを発生し、第1のパルス信号Aに1/4周期の位相差をもって第2の信号発生器7cが第2のパルス信号Bを発生する。
【0126】
時間T19において第1のパルス信号Aが発生し、第1のパルス信号Aの立上りエッジが検出されると、パルスエッジ割り込みルーチンのステップ200においての判別で“エッジは第1のパルス信号Aであるので”ステップ201に移行し、ステップ201においての判別で“立上りエッジであるので”ステップ202に移行して“第1のタイマTARのカウント値の0クリア”が実行されてステップ203に移行し、ステップ203において“第1のタイマTARのカウント値より速度ω0を算出処理する”が実行されてステップ208に移行する。
【0127】
そして、ステップ208においての判別で“エッジは第1のパルス信号Aであるので”ステップ209に移行し、ステップ209においての判別で“立上りエッジであるので”ステップ210に移行し、ステップ210においての判別で“第2のパルス信号Bはローレベルではないので”ステップ213に移行してパルスカウントPCがマイナス1カウント(−1)されて割り込み処理を終了する。
【0128】
時間T19の以後、回転検出センサ7の回転体7aが1/4回転した図3に示される時間T21において第2のパルス信号Bが立下る。第2のパルス信号Bが立下ると、割り込みルーチンのステップ200においての判別で“エッジは第1のパルス信号Aではないので”ステップ204に移行し、ステップ204においての判別で“立上りエッジではないので”ステップ207に移行して“第4のタイマTBFのカウント値の0クリア”が実行されてステップ203に移行し、ステップ203において“第4のタイマTBFのカウント値より速度ω0を算出処理する”が実行されてステップ208に移行する。
【0129】
そして、ステップ208においての判別で“エッジは第1のパルス信号Aではないので”ステップ216に移行し、ステップ216においての判別で“立上りエッジではないので”ステップ218に移行し、ステップ218においての判別で“第1のパルス信号Aはローレベルではないので”ステップ222に移行してパルスカウントPCがマイナス1カウント(−1)されて割り込み処理を終了する。
【0130】
時間T21の以後、回転検出センサ7の回転体7aが1/2回転した図3に示される時間T23において第1のパルス信号Aが立下る。第1のパルス信号Aが立下ると、割り込みルーチンのステップ200においての判別で“エッジは第1のパルス信号Aであるので”ステップ201に移行し、ステップ201においての判別で“立上りエッジなので”ステップ206に移行して“第3のタイマTAFのカウント値の0クリア”が実行されてステップ203に移行し、ステップ203において“第3のタイマTAFのカウント値より速度ω0を算出処理する”が実行されてステップ208に移行する。
【0131】
そして、ステップ208においての判別で“エッジは第1のパルス信号Aであるので”ステップ209に移行し、ステップ209においての判別で“立上りエッジではないので”ステップ211に移行し、ステップ211においての判別で“第2のパルス信号Bはローレベルなので”ステップ214に移行してパルスカウントPCがマイナス1カウント(−1)されて割り込み処理を終了する。
【0132】
時間T23の以後、回転検出センサ7の回転体7aが3/4回転した図3に示される時間T25において第2のパルス信号Bが立上る。第2のパルス信号Bが立上ると、割り込みルーチンのステップ200においての判別で“エッジは第1のパルス信号Aではないので”ステップ204に移行し、ステップ204においての判別で“立上りエッジなので”ステップ206に移行して“第2のタイマTBRのカウント値の0クリア”が実行されてステップ203に移行し、ステップ203において“第4のタイマTBFのカウント値より速度ω0を算出処理する”が実行されてステップ208に移行する。
【0133】
そして、ステップ208においての判別で“エッジは第1のパルス信号Aではないので”ステップ216に移行し、ステップ216においての判別で“立上りエッジであるので”ステップ217に移行し、ステップ217においての判別で“第1のパルス信号Aはローレベルなので”ステップ219に移行してパルスカウントPCがマイナス1カウント(−1)されて割り込み処理を終了する。
【0134】
時間T25の以後、回転検出センサ7の回転体7aが1回転した図3に示される時間T27において第1のパルス信号Aが再び立上る。第1のパルス信号Aが立上ると、割り込みルーチンのステップ200においての判別で“エッジは第1のパルス信号Aであるので”ステップ201に移行し、ステップ201においての判別で“立上りエッジであるので”ステップ202に移行して“第1のタイマTARのカウント値の0クリア”が実行されてステップ203に移行し、ステップ203において“第1のタイマTARのカウント値より速度ω0を算出処理する”が実行されてステップ208に移行する。
【0135】
そして、ステップ208においての判別で“エッジは第1のパルス信号Aであるので”ステップ209に移行し、ステップ209においての判別で“立上りエッジであるので”ステップ210に移行し、ステップ210においての判別で“第2のパルス信号Bはローレベルではないので”ステップ213に移行してパルスカウントPCがマイナス1カウント(−1)されて割り込み処理を終了する。
【0136】
時間T27の以後、回転検出センサ7の回転体7aが5/4回転した図3に示される時間T29において第2のパルス信号Bが立下る。第2のパルス信号Bが立下ると、割り込みルーチンのステップ200においての判別で“エッジは第1のパルス信号Aではないので”ステップ204に移行し、ステップ204においての判別で“立上りエッジではないので”ステップ207に移行して“第4のタイマTBFのカウント値の0クリア”が実行されてステップ203に移行し、ステップ203において“第4のタイマTBFのカウント値より速度ω0を算出処理する”が実行されてステップ208に移行する。
【0137】
そして、ステップ208においての判別で“エッジは第1のパルス信号Aではないので”ステップ216に移行し、ステップ216においての判別で“立上りエッジではないので”ステップ218に移行し、ステップ218においての判別で“第1のパルス信号Aはローレベルではないので”ステップ222に移行してパルスカウントPCがマイナス1カウント(−1)されて割り込み処理を終了する。
【0138】
時間T29の以後、回転検出センサ7の回転体7aが3/2回転した図3に示される時間T31において第1のパルス信号Aが立下る。第1のパルス信号Aが立下ると、割り込みルーチンのステップ200においての判別で“エッジは第1のパルス信号Aであるので”ステップ201に移行し、ステップ201においての判別で“立上りエッジではないので”ステップ205に移行して“第3のタイマTAFのカウント値の0クリア”が実行されてステップ203に移行し、ステップ203において“第3のタイマTAFのカウント値より速度ω0を算出処理する”が実行されてステップ208に移行する。
【0139】
そして、ステップ208においての判別で“エッジは第1のパルス信号Aであるので”ステップ209に移行し、ステップ209においての判別で“立上りエッジではないので”ステップ211に移行し、ステップ211においての判別で“第2のパルス信号Bはローレベルなので”ステップ214に移行してパルスカウントPCがマイナス1カウント(−1)されて割り込み処理を終了する。
【0140】
時間T31の以後、回転検出センサ7の回転体7aが7/4回転した図3に示される時間T33において第2のパルス信号Bが立上る。第2のパルス信号Bが立上ると、割り込みルーチンのステップ200においての判別で“エッジは第1のパルス信号Aではないので”ステップ204に移行し、ステップ204においての判別で“立上りエッジではないので”ステップ207に移行して“第2のタイマTBRのカウント値の0クリア”が実行されてステップ203に移行し、ステする”が実行されてステップ208に移行する。
【0141】
そして、ステップ208においての判別で“エッジは第1のパルス信号Aではないので”ステップ216に移行し、ステップ216においての判別で“立上りエッジであるので”ステップ217に移行し、ステップ217においての判別で“第1のパルス信号Aはローレベルなので”ステップ219に移行してパルスカウントPCがマイナス1カウント(−1)されて割り込み処理を終了する。
【0142】
上述したように、アーマチュアシャフト6cが逆回転を開始してウインドガラス60が閉る側に移動を開始することによって、回転検出センサ7が第1のパルス信号A、第2のパルス信号Bを発生すると、第1のタイマTARが回転検出センサ7の回転体7aの一回転毎にカウントを0クリアしながらマイナスのカウントを行い、この第1のタイマTARに1/4周期ずれて、第4のタイマTBFが回転検出センサ7の回転体7aの一回転毎にカウントを0クリアしながらマイナスカウントを行い、この第4のタイマTBFに1/4周期ずれて、第3のタイマTAFが回転検出センサ7の回転体7aの一回転毎にカウントを0クリアしながらマイナスカウントを行い、この第3のタイマTBRに1/4周期ずれて、第2のタイマTBFが回転検出センサ7の回転体7aの一回転毎にカウントを0クリアしながらマイナスカウントを行うことによって、マイクロコンピュータCPUがウインドガラス60の現在位置を間接的に検出する。
【0143】
このとき、アーマチュアシャフト6cが逆回転を開始してウインドガラス60が閉る側に移動を開始した際に、負荷検出ルーチンが同時に実行されている。負荷検出ルーチンのステップ500においての判別で“閉動作がセットされているので”ステップ501に移行し、ステップ501においての判別で“パルスエッジ割り込みルーチンで速度データω0が更新されているので”ステップ502に移行して“電源電圧レベルV0を検出”してステップ503に移行し、ステップ503において速度データω0、電源電圧レベルV0により負荷トルクTL0を算出”してステップ504に移行し、ステップ504においての判別で“パルスカウントPCが反転領域の限界値(絶対値)PCXよりも大きいので”ステップ505に移行し、ステップ505においての判別で“負荷トルクTL0が挟み込
み判定値TLref よりも大きくなっていないので”ステップ506に移行する。
【0144】
ステップ505から移行したステップ506においては負荷データの更新が行われる。負荷データの更新は、以前のルーチンで蓄積されているTLnからTL1までの負荷データをシフトすることによって行われる。そして、ステップ506からステップ507に移行し、ステップ507において挟み込み判定値TLref を算出する。挟み込み判定値TLref の算出は、図14に示されるように、以前のルーチンで蓄積されているTLnからTL1までの負荷データのなかでの最小値TLmin に、挟み込みによる負荷増加限界値として予め定められた値TLADD (定数)を加算することによって得られる。挟み込み判定値TLref はステップ503において得られた負荷トルクTL0との比較に用いられる。マイクロコンピュータCPUは、負荷トルクTL0が挟み込み判定値TLref よりも大きくなったときを反転動作を行うタイミングとしている。そして、ステップ507から最初のステップ500に復帰する。
【0145】
そして、ウインドガラス60が閉る側に移動している途中、反転領域内で挟み込みが発生すると、負荷検出ルーチンのステップ500においての判別で“閉動作がセットされているので”ステップ501に移行し、ステップ501においての判別で“パルスエッジ割り込みルーチンで速度データω0が更新されているので”ステップ502に移行して“電源電圧レベルV0を検出”してステップ503に移行し、ステップ503において速度データω0、電源電圧レベルV0により負荷トルクTL0を算出”してステップ504に移行し、ステップ504においての判別で“パルスカウントPCが反転領域の限界値(絶対値)PCXよりも大きいので”ステップ505に移行する。
【0146】
ステップ504から移行したステップ505においての判別で“挟み込みによって負荷トルクTL0が挟み込み判定値TLref よりも大きくなっているので”ステップ510に移行して“反転要求のセット”を実行してメインルーチンに移行する。
【0147】
メインルーチンのステップ100においての判別で“停止状態がセットされていないので”ステップ108に移行し、ステップ108においての判別で“マニュアル閉状態がセットされていないので”ステップ117に移行し、ステップ117においての判別で“マニュアル開状態はセットされていないので”ステップ124に移行し、ステップ124においての判別で“自動閉状態はセットされているので”ステップ125に移行し、ステップ125においての判別で“反転要求がセットされているので”ステップ128に移行して“停止状態”をセットして出力ルーチンに移行する。
【0148】
出力ルーチンのステップ300においての判別で“停止状態がセットされているので”ステップ306に移行して“停止出力”が実行され、メインルーチンに移行する。“停止出力”が実行されることによって、マイクロコンピュータCPUの第1の出力ポートP7がローレベルになるとともにマイクロコンピュータCPUの第2の出力ポートP8がローレベルになるため、モータ6の第1、第2のブラシ端子6a、6bに電流が供給されなくなって、アーマチュアシャフト6cが正回転を そして、メインルーチンのステップ100においての判別で“停止状態がセットされているので”ステップ101に移行し、ステップ101においての判別で“反転要求がセットされているので”ステップ105に移行して“反転状態をセット”して出力ルーチンに移行する。
【0149】
出力ルーチンのステップ300においての判別で“停止状態はセットされていないので”ステップ301に移行し、ステップ301においての判別で“マニュアル閉状態はセットされていないので”ステップ302に移行し、ステップ302においての判別で“マニュアル開状態はセットされていないので”ステップ303に移行し、ステップ303においての判別で“自動閉状態はセットされていないので”ステップ304に移行し、ステップ304においての判別で“自動開状態はセットされていないので”ステップ305に移行し、ステップ305においての判別で“反転状態がセットされているので”ステップ311に移行して“開駆動出力”が実行される。
【0150】
“開駆動出力”が実行されることによって、マイクロコンピュータCPUの第1の出力ポートP7がハイレベルになるとともにマイクロコンピュータCPUの第2の出力ポートP8がローレベルになり、モータ6の第2のブラシ端子6bが接地されている状態でモータ6の第1のブラシ端子6aに電源の電位が与えられるため、モータ6のアーマチュアシャフト6cが正回転することによってウインドガラス60が開く側に反転移動される。
【0151】
アーマチュアシャフト6cが正回転を開始することによってウインドガラス60が開く側に反転移動すると、図2に示されるように、モータ6のアーマチュアシャフト6cが時間T1 から正回転を開始し、時間T2 において第1の信号発生器7bより第1のパルス信号Aが発生し、この第1のパルス信号Aに1/4周期ずれて第2の信号発生器7cより第2のパルス信号Bが発生する。
【0152】
時間T2 において第1のパルス信号Aが発生し、第1のパルス信号Aの立上りエッジが検出されると、パルスエッジ割り込みルーチンのステップ200においての判別で“エッジは第1のパルス信号Aであるので”ステップ201に移行し、ステップ201においての判別で“立上りエッジであるので”ステップ202に移行して“第1のタイマTARのカウント値の0クリア”が実行されてステップ203に移行し、ステップ203において“第1のタイマTARのカウント値より速度ω0を算出処理する”が実行されてステップ208に移行する。
【0153】
そして、ステップ208においての判別で“エッジは第1のパルス信号Aであるので”ステップ209に移行し、ステップ209においての判別で“立上りエッジであるので”ステップ210に移行し、ステップ210においての判別で“第2のパルス信号Bはローレベルなので”ステップ212に移行してパルスカウントPCがプラス1カウント(+1)されて割り込み処理を終了する。
【0154】
時間T2 の以後、回転検出センサ7の回転体7aが1/4回転した図2に示される時間T4 において第2のパルス信号Aが立上る。第2のパルス信号Bが立上ると、割り込みルーチンのステップ200においての判別で“エッジは第1のパルス信号Aではないので”ステップ204に移行し、ステップ204においての判別で“立上りエッジであるので”ステップ206に移行して“第2のタイマTBRのカウント値の0クリア“が実行されてステップ203に移行し、ステップ203において“第2のタイマTBRのカウント値より速度ω0を算出処理する”が実行されてステップ208に移行する。
【0155】
そして、ステップ208においての判別で“エッジは第1のパルス信号Aではないので”ステップ216に移行し、ステップ216においての判別で“立上りエッジであるので”ステップ217に移行し、ステップ217においての判別で“第1のパルス信号Aはローレベルではないので”ステップ220に移行してパルスカウントPCがプラス1カウント(+1)されて割り込み処理を終了する。
【0156】
時間T4 の以後、回転検出センサ7の回転体7aが1/2回転した図2に示される時間T6 において第1のパルス信号Aが立下る。第1のパルス信号Aが立下ると、割り込みルーチンのステップ200においての判別で“エッジは第1のパルス信号Aであるので”ステップ201に移行し、ステップ201においての判別で“立上りエッジではないので”ステップ205に移行して“第3のタイマTAFのカウント値の0クリア“が実行されてステップ203に移行し、ステップ203において“第3のタイマTAFのカウント値より速度ω0を算出処理する”が実行されてステップ208に移行する。
【0157】
そして、ステップ208においての判別で“エッジは第1のパルス信号Aであるので”ステップ209に移行し、ステップ209においての判別で“立上りエッジではないので”ステップ211に移行し、ステップ211においての判別で“第2のパルス信号Bはローレベルではないので”ステップ215に移行してパルスカウントPCがプラス1カウント(+1)されて割り込み処理を終了する。
【0158】
時間T6 の以後、回転検出センサ7の回転体7aが3/4回転した図2に示される時間T8 において第2のパルス信号Bが立下る。第2のパルス信号Bが立下ると、割り込みルーチンのステップ200においての判別で“エッジは第1のパルス信号Aではないので”ステップ204に移行し、ステップ204においての判別で“立上りエッジではないので”ステップ207に移行して“第4のタイマTBFのカウント値の0クリア“が実行されてステップ203に移行し、ステップ203において“第4のタイマTBFのカウント値より速度ω0を算出処理する”が実行されてステップ208に移行する。
【0159】
そして、ステップ208においての判別で“エッジは第1のパルス信号Aではないので”ステップ216に移行し、ステップ216においての判別で“立上りエッジではないので”ステップ218に移行し、ステップ218においての判別PCがプラス1カウント(+1)されて割り込み処理を終了する。
【0160】
時間T8 の以後、回転検出センサ7の回転体7aは図2に示される時間T10において1回転を終了し、2回転目に入るため、第1のパルス信号Aが再び立上る。第1のパルス信号Aが立上ると、割り込みルーチンのステップ200においての判別で“エッジは第1のパルス信号Aであるので”ステップ201に移行し、ステップ201においての判別で“立上りエッジであるので”ステップ202に移行して“第1のタイマTARのカウント値の0クリア”が実行されてステップ203に移行し、ステップ203において“第1のタイマTARのカウント値より速度ω0を算出処理する”が実行されてステップ208に移行する。
【0161】
そして、ステップ208においての判別で“エッジは第1のパルス信号Aであるので”ステップ209に移行し、ステップ209においての判別で“立上りエッジであるので”ステップ210に移行し、ステップ210においての判別で“第2のパルス信号Bはローレベルなので”ステップ212に移行してパルスカウントPCがプラス1カウント(+1)されて割り込み処理を終了する。
【0162】
時間T10の以後、回転検出センサ7の回転体7aが5/4回転した図2に示される時間T12において第2のパルス信号Bが再び立上る。第2のパルス信号Bが立上ると、割り込みルーチンのステップ200においての判別で“エッジは第1のパルス信号Aではないので”ステップ204に移行し、ステップ204においての判別で“立上りエッジであるので”ステップ206に移行して“第2のタイマTBRのカウント値の0クリア”が実行されてステップ203に移行し、ステップ203において“第2のタイマTBRのカウント値より速度ω0を算出処理する”が実行されてステップ208に移行する。
【0163】
そして、ステップ208においての判別で“エッジは第1のパルス信号Aではないので”ステップ216に移行し、ステップ216においての判別で“立上りエッジであるので”ステップ217に移行し、ステップ217においての判別で“第1のパルス信号Aはローレベルではないので”ステップ220に移行してパルスカウントPCがプラス1カウント(+1)されて割り込み処理を終了する。
【0164】
時間T12の以後、回転検出センサ7の回転体7aが3/2回転した図2に示される時間T14において第1のパルス信号Aが立下る。第1のパルス信号Aが立下ると、割り込みルーチンのステップ200においての判別で“エッジは第1のパルス信号Aであるので”ステップ201に移行し、ステップ201においての判別で“立上りエッジではないので”ステップ205に移行して“第3のタイマTAFのカウント値の0クリア”が実行されてステップ203に移行し、ステップ203において“第3のタイマTAFのカウント値より速度ω0を算出処理する”が実行されてステップ208に移行する。
【0165】
そして、ステップ208においての判別で“エッジは第1のパルス信号Aであるので”ステップ209に移行し、ステップ209においての判別で“立上りエッジではないので”ステップ211に移行し、ステップ211においての判別で“第2のパルス信号Bはローレベルではないので”ステップ215に移行してパルスカウントPCがプラス1カウント(+1)されて割り込み処理を終了する。
【0166】
時間T14の以後、回転検出センサ7の回転体7aが7/4回転した図2に示される時間T16において第2のパルス信号Bが立下る。第2のパルス信号Bが立下ると、割り込みルーチンのステップ200においての判別で“エッジは第1のパルス信号Aではないので”ステップ204に移行し、ステップ204においての判別で“立上りエッジではないので”ステップ207に移行して“第4のタイマTBFのカウント値の0クリア”が実行されてステップ203に移行し、ステップ203において“第4のタイマTBFのカウント値より速度ω0を算出処理する”が実行されてステップ208に移行する。
【0167】
そして、ステップ208においての判別で“エッジは第1のパルス信号Aではないので”ステップ216に移行し、ステップ216においての判別で“立上りエッジではないので”ステップ218に移行し、ステップ218においての判別で“第1のパルス信号Aはローレベルなので”ステップ221に移行してパルスカウントPCがプラス1カウント(+1)されて割り込み処理を終了する。
【0168】
上述したように、アーマチュアシャフト6cが正回転を開始してウインドガラス60が開く側に移動を開始することによって、回転検出センサ7が第1のパルス信号A、第2のパルス信号Bを発生すると、第1のタイマTARが回転検出センサ7の回転体7aの一回転毎にカウントを0クリアしながらプラスカウントを行い、この第1のタイマTARに1/4周期ずれて、第2のタイマTBRが回転検出センサ7の回転体7aの一回転毎にカウントを0クリアしながらプラスカウントを行い、この第1のタイマTBRに1/4周期ずれて、第3のタイマTAFが回転検出センサ7の回転体7aの一回転毎にカウントを0クリアしながらプラスカウントを行い、この第3のタイマTBRに1/4周期ずれて、第4のタイマTBFが回転検出センサ7の回転体7aの一回転毎にカウントを0クリアしながらプラスカウントを行うことによって、マイクロコンピュータCPUがウインドガラス60の現在位置を間接的に検出する。
【0169】
アーマチュアシャフト6cが正回転を開始すると、メインルーチンのステップ100においての判別で“停止状態がセットされていないので”ステップ108に移行し、ステップ108においての判別で“マニュアル閉状態はセットされていないので”ステップ117に移行し、ステップ117においての判別で“マニュアル開状態はセットされていないので”ステップ124に移行し、ステップ124においての判別で“自動閉状態はセットされていないので”ステップ131に移行し、ステップ131においての判別で“自動開状態はセットされていないので”ステップ136に移行し、ステップ136においての判別で“反転状態がセットされているので”ステップ137に移行し、ステップ137においての判別で“モータロックはセットされていないので”ステップ138に移行し、ステップ138においての判別が行われる。ステップ138においての判別は、ウインドガラス60が予め定められた位置まで下降したところでウインドガラス60を停止させるようにする判別ステップである。反転を開始した当初は、ステップ138においての判別で“パルスカウントPCが予め定められた反転停止カウントPCreを越えないので”ステップ100に復帰してメインルーチンを繰り返し、ウインドガラス60が予め定められた位置まで下降したことによって“パルスカウントPCが予め定められた反転停止カウントPCreを越えると”ステップ138からステップ140に移行して“停止状態”をセットして出力ルーチンに移行する。
【0170】
出力ルーチンのステップ300においての判別で“停止状態がセットされているので”ステップ306に移行して“停止出力”が実行される。“停止出力”が実行されることによって、マイクロコンピュータCPUの第1の出力ポートP7がローレベルになるとともにマイクロコンピュータCPUの第2の出力ポートP8がローレベルになるため、モータ6の第1、第2のブラシ端子6a、6bが電流が供給されなくなって、モータ6のアーマチュアシャフト6cが正回転を停止することによってウインドガラス60が止まる。
【0171】
また、ウインドガラス60が全開位置に近いところで挟み込みが発生したことによって、アーマチュアシャフト6cが正回転に反転を開始した場合、パルスカウントPCが予め定められた反転停止カウントPCreを越える以前にウインドガラス60が全開位置に到達して移動を阻止されるため、負荷検出ルーチンのステップ500においての判別で“閉動作はセットされていないので”ステップ508に移行し、ステップ508においての判別で“パルスエッジ割り込みルーチンで算出された速度ω0が予め定められた最小値ωminより小さくなっているので”ステップ509に移行して“モータロック検知”がセットされてメインルーチンが実行される。
【0172】
そして、メインルーチンのステップ136においての判別で“反転状態がセットされているので”ステップ137に移行し、ステップ137においての判別で“モータロック検知がセットされているので”ステップ139に移行して“停止状態”をセットして出力ルーチンが実行される。
【0173】
出力ルーチンのステップ300においての判別で“停止状態がセットされているので”ステップ306に移行して“停止出力”が実行され、メインルーチンに移行する。“停止出力”が実行されることによって、マイクロコンピュータCPUの第1の出力ポートP7がローレベルになるとともにマイクロコンピュータCPUの第2の出力ポートP8がローレベルになるため、モータ6の第1、第2のブラシ端子6a、6bが電流が供給されなくなって、アーマチュアシャフト6cが正回転を停止することによってウインドガラス60が全開位置で停止する。
【0174】
上述したように、アーマチュアシャフト6cが反転の正回転を開始してウインドガラス60が開く側に移動を開始することによって、回転検出センサ7が第1のパルス信号A、第2のパルス信号Bを発生すると、第1のタイマTARが回転検出センサ7の回転体7aの一回転毎にカウントを0クリアしながらプラスカウントを行い、この第1のタイマTARに1/4周期ずれて、第2のタイマTBRが回転検出センサ7の回転体7aの一回転毎にカウントを0クリアしながらプラスカウントを行い、この第1のタイマTBRに1/4周期ずれて、第3のタイマTAFが回転検出センサ7の回転体7aの一回転毎にカウントを0クリアしながらプラスカウントを行い、この第3のタイマTBRに1/4周期ずれて、第4のタイマTBFが回転検出センサ7の回転体7aの一回転毎にカウントを0クリアしながらプラスカウントを行うことによって、マイクロコンピュータCPUがウインドガラス60の現在位置を間接的に検出する。
【0175】
図15ないし図17には、この発明に係わるパワーウインド制御装置の第2実施例が示されている。
【0176】
この場合、回転検出センサ7の回転体7aには、一対のN極および一対のS極が対向配置されている。そのため、回転検出センサ7は、回転体7aが回転することによって、第1の信号発生器7bが発生する第1のパルス信号Aに対して、1/8周期ずれて第2の信号発生器7cから第2のパルス信号Bが発生する。
【0177】
そして、マイクロコンピュータCPUには、図17に示されるように、第1のタイマTAR1、第2のタイマTBR1、第3のタイマTAF1、第4のタイマTBF1、第5のタイマTAR2、第6のタイマTBR2、第7のタイマTAF2、第8のタイマTBF2がそれぞれ内蔵されており、他の部位は第1実施例と同様になっている。
【0178】
そして、この場合も、アーマチュアシャフト6cが正回転を開始してウインドガラス60が開く側に移動を開始することによって、回転検出センサ7が第1のパルス信号A、第2のパルス信号Bを発生すると、第1のタイマTAR1が回転検出センサ7の回転体7aの一回転毎にカウントを0クリアしながらプラスカウントを行い、この第1のタイマTAR1に1/8周期ずれて、第2のタイマTBR1が回転検出センサ7の回転体7aの一回転毎にカウントを0クリアしながらプラスカウントを行い、この第1のタイマTBR1に1/8周期ずれて、第3のタイマTAF1が回転検出センサ7の回転体7aの一回転毎にカウントを0クリアしながらプラスカウントを行い、この第3のタイマTBR1に1/8周期ずれて、第4のタイマTBF1が回転検出センサ7の回転体7aの一回転毎にカウントを0クリアしながらプラスカウントを行い、この第4のタイマTBF1に1/8周期ずれて、第5のタイマTAR2が回転検出センサ7の回転体7aの一回転毎にカウントを0クリアしながらプラスカウントを行い、この第5のタイマTAR2に1/8周期ずれて、第6のタイマTBR2が回転検出センサ7の回転体7aの一回転毎にカウントを0クリアしながらプラスカウントを行い、この第6のタイマTBR2に1/8周期ずれて、第7のタイマTAF2が回転検出センサ7の回転体7aの一回転毎にカウントを0クリアしながらプラスカウントを行い、この第7のタイマTBR2に1/8周期ずれて、第8のタイマTBF2が回転検出センサ7の回転体7aの一回転毎にカウントを0クリアしながらプラスカウントを行うことによって、マイクロコンピュータCPUがウインドガラス60の現在位置を間接的に検出する。
【0179】
【発明の効果】
以上説明してきたように、この発明の請求項1に係わるパワーウインド制御装置によれば、回転検出センサは、回転体が回転し、信号発生器に対してマグネットのN極およびS極の境界線から予め定められた位置まで来ると、その位置でのマグネットの磁束密度に対してのしきい値によって信号発生器がパルス信号を発生する。それ故、回転体の円周上の同一点での計測が行われるから、回転体のマグネットに着磁のばらつきがあったとしても、パルス信号の周期に狂いが生ずることがなくなり、また、回転検出センサのマグネットが外径の小さいものであっても、細かい回転数データが得られるという優れた効果を奏する。
【0180】
この発明の請求項に係わるパワーウインド制御装置によれば、制御ユニットのマイクロコンピュータは、それぞれが1/4周期つづ位相差をもっていて回転体の一回転毎にパルス信号を発生する第1、第2、第3、第4のタイマの値と、フリーランニングカウンタの値とによりパルス周期の算出処理を行うことによって、アーマチュアシャフトの回転速度が検出される。それ故、請求項1の効果に加え、マイクロコンピュータに内蔵するタイマが4個で済むという優れた効果を奏する。
【0181】
この発明の請求項に係わるパワーウインド制御装置によれば、制御ユニットのマイクロコンピュータは、それぞれが1/8周期つづ位相差をもっていて回転体の一回転毎にパルス信号を発生する第1、第2、第3、第4、第5、第6、第7、第8のタイマの値と、フリーランニングカウンタの値とによりパルス周期の算出処理を行うことによって、アーマチュアシャフトの回転速度が検出される。それ故、請求項1の効果に加え、マイクロコンピュータに内蔵するタイマが8個で済むという優れた効果を奏する。
【図面の簡単な説明】
【図1】この発明に係わるパワーウインド制御装置の第1実施例のブロック構成図である。
【図2】図1に示したパワーウインド制御装置の動作を説明するタイミングチャートである。
【図3】図1に示したパワーウインド制御装置の動作を説明するタイミングチャートである。
【図4】図1に示したパワーウインド制御装置においてのパルスカウント算出処理の説明図である。
【図5】図1に示したパワーウインド制御装置においてのタイマ割り込みのフローチャートである
【図6】図1に示したパワーウインド制御装置においてのパルスによる作動方向の検出処理の説明図である。
【図7】図1に示したパワーウインド制御装置の制御動作に用いるメインルーチンのフローチャートである。
【図8】図1に示したパワーウインド制御装置の制御動作に用いるメインルーチンのフローチャートである。
【図9】図1に示したパワーウインド制御装置の制御動作に用いるメインルーチンのフローチャートである。
【図10】図1に示したパワーウインド制御装置の制御動作に用いる出力ルーチンのフローチャートである。
【図11】図1に示したパワーウインド制御装置の制御動作に用いるパルスエッジ割り込みルーチンのフローチャートである。
【図12】図1に示したパワーウインド制御装置の制御動作に用いるパルスエッジ割り込みルーチンのフローチャートである。
【図13】図1に示したパワーウインド制御装置の制御動作に用いる負荷検出ルーチンのフローチャートである。
【図14】図1に示したパワーウインド制御装置の負荷検出処理の説明図である。
【図15】この発明に係わるパワーウインド制御装置の第2実施例の動作を説明するタイミングチャートである。
【図16】図15に示したパワーウインド制御装置の動作を説明するタイミングチャートである。
【図17】図15に示したパワーウインド制御装置のタイマの制御動作を説明するタイミングチャートである。
【符号の説明】
1 パワーウインド制御装置
2 開スイッチ
3 閉スイッチ
4 自動スイッチ
6 モータ
6c アーマチュアシャフト
7 回転検出センサ
7a 回転体
7b (信号発生器)第1の信号発生器
7c (信号発生器)第2の信号発生器
20 制御ユニット
24 駆動回路
50 電源
60 ウインドガラス
CPU マイクロコンピュータ
FRC フリーランニングカウンタ
TAR 第1のタイマ
TBR 第2のタイマ
TAF 第3のタイマ
TBF 第4のタイマ
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a power window control device that automatically drives a window glass.
[0002]
[Prior art]
As a power window control device for automatically driving a window glass, an apparatus in which an armature shaft provided in a motor is coupled to a window glass via a glass elevator is known. A rotation detection sensor is coupled to the armature shaft of the motor. The rotation detection sensor includes a magnet mounted on an armature shaft and a hall element disposed around the magnet. When the armature shaft rotates, the magnet rotates. When the magnet rotates, a pulsed detection signal (Hall voltage) is generated from the Hall element. Therefore, the rotation of the armature shaft is detected by detecting the pulse width of the detection signal by the controller. A number is calculated.
[0003]
[Problems to be solved by the invention]
However, in the above power window control device, if the magnetization of the N pole and S pole of the magnet of the rotation detection sensor varies, the pulse of the pulse-shaped detection signal detected by the Hall element when the magnet rotates. Since the width is deviated, as a result, there is a problem that an error occurs in the rotational speed data calculated by the controller and it is difficult to obtain an accurate rotational speed.
[0004]
In addition, if the rotation detection sensor has a small outer diameter, the number of magnetic poles to be magnetized is limited to a single N pole and a single S pole. As compared with the case where a magnet is used, there is a problem that it is difficult to obtain detailed rotation speed data.
[0005]
OBJECT OF THE INVENTION
The power window control device according to the present invention can obtain accurate position data of the window glass by obtaining an accurate rotational speed of the motor, and can also obtain detailed rotational speed data even if a rotational detection sensor with a small number of poles is used. An object of the present invention is to provide a power window control device capable of obtaining the above.
[0006]
[Structure of the invention]
[0007]
[Means for Solving the Problems]
In the power window control device according to the first aspect of the present invention, there is provided a rotating body having a magnet in which the N pole and the S pole are opposed to each other, coupled to the armature shaft of the motor and rotating together with the armature shaft, Is placed in contact with the rotating bodyMagnetic flux density at the position where the rotating body has rotated from the boundary between the north and south poles of the magnet to a predetermined angleA rotation detection sensor having a signal generator for generating a pulse signal according to the threshold, an open switch for generating a lowering command signal when switched on, and an increase when switched on A closed switch that generates a command signal, an automatic switch that generates a continuous command signal when switched on, and a window glass that is coupled to the window glass to drive the window glass to the open side when energized, while the window glass is closed by energization. Motor with armature shaft driven to the side, drive circuit electrically connected to the motor, and connected to the power source and electrically connected to the drive circuit, open switch lowering command signal, closing switch rising The power supply current is given to the drive circuit by the command signal and the continuous command signal of the automatic switch. Motion control of the window glass by detecting the rotation speed of the armature shaft based on the time from the edge of the pulse signal generated by the rotation detection sensor to the edge of the pulse signal generated by the rotation detection sensor when the rotating body makes one rotation It is characterized by having a control unit having a microcomputer for performing the above.
[0008]
Claims of the invention2In the power window control apparatus according to the first embodiment, the magnet has two poles, a single N pole and a single S pole, facing each other, and the rotation detection sensor generates a first signal for generating a first pulse signal. And a second signal generator arranged at a predetermined angle with respect to the first signal generator to generate a second pulse signal. The first time when the rotating body makes one rotation from the rising edge of the first pulse signal generated by the first signal generator of the rotation detecting sensor and the first signal generator of the rotation detection sensor. A first timer that measures the time until the rising edge of the first pulse signal generated by the signal generator for each rotation of the rotating body, and a second pulse signal generated by the second signal generator of the rotation detection sensor. A second timer that measures the time from the rising edge of the second rotation signal to the rising edge of the second pulse signal generated by the second signal generator when the rotating body makes one rotation thereafter; From the falling edge of the first pulse signal generated by the first signal generator of the rotation detection sensor, the rising edge of the first pulse signal generated by the first signal generator when the rotating body subsequently makes one revolution. From the falling edge of the second pulse signal generated by the third timer that measures the time until the falling edge for each rotation of the rotating body and the second signal generator of the rotation detecting sensor, The microcomputer of the control unit is provided with a fourth timer that measures the time until the falling edge of the second pulse signal generated by the second signal generator when rotating, for each rotation of the rotating body. Counter When the first, second, third, and characterized in that a configuration for performing a process for calculating a pulse period by a value of the fourth timer.
[0009]
Claims of the invention3In the power window control device according to the present invention, the magnet is provided with a pair of N poles and a pair of S poles facing each other, and the rotation detection sensor includes a first signal generator for generating a first pulse signal; And a second signal generator for generating a second pulse signal disposed at a predetermined angle with respect to the first signal generator, and the microcomputer of the control unit includes: A free running counter that counts up over time and a first signal generated when the rotating body makes one revolution after the rising edge of the first pulse signal generated by the first signal generator of the rotation detection sensor A first timer that measures the time until the rising edge of the first pulse signal generated by the detector for each rotation of the rotating body, and a second pulse signal generated by the second signal generator of the rotation detection sensor. A second timer that measures the time from the rising edge of the second rotation signal to the rising edge of the second pulse signal generated by the second signal generator when the rotating body makes one rotation thereafter; The first signal when the rotating body makes one revolution after the falling edge of the first pulse signal generated by the first signal generator of the rotation detection sensor at a quarter period apart from the first timer. A third timer that measures the time until the falling edge of the first pulse signal generated by the generator for each rotation of the rotating body, and a second period of the rotation detection sensor that is separated from the second timer by a quarter cycle. The time from the falling edge of the second pulse signal generated by the second signal generator to the falling edge of the second pulse signal generated by the second signal generator when the rotating body makes one revolution thereafter A fourth timer for measuring each rotation of the rotating body; The first signal is generated when the rotating body makes one rotation after the rising edge of the first pulse signal generated by the first signal generator of the rotation detection sensor, with a quarter period separated from the third timer. A fifth timer for measuring the time until the rising edge of the first pulse signal generated by the detector for each rotation of the rotating body, and the second signal of the rotation detection sensor separated by a quarter period from the fourth timer. The time from the rising edge of the second pulse signal generated by the generator to the rising edge of the second pulse signal generated by the second signal generator when the rotating body makes one rotation thereafter is the rotation of the rotating body. From the falling edge of the first pulse signal generated by the first signal generator of the rotation detection sensor at intervals of ¼ period from the sixth timer measured every time and the fifth timer The first signal generator is activated when the A seventh timer for measuring the time until the falling edge of the generated first pulse signal for each rotation of the rotating body, and a second signal generation of the rotation detection sensor at intervals of ¼ period from the sixth timer. The time from the falling edge of the second pulse signal generated by the generator to the falling edge of the second pulse signal generated by the second signal generator when the rotating body makes one revolution thereafter is And an eighth timer for measuring each rotation, and the microcomputer of the control unit, the value of the free running counter, the first, second, third, fourth, fifth, sixth, seventh, eighth It is characterized in that the calculation process of the pulse period is performed according to the timer value.
[0010]
[Effects of the Invention]
In the power window control device according to claim 1 of the present invention, the rotation detection sensor comprises:When the rotating body rotates and comes to a predetermined position from the boundary line between the north and south poles of the magnet with respect to the signal generator,The signal generator generates a pulse signal according to a threshold value for the magnetic flux density of the magnet. Therefore,Because the measurement at the same point on the circumference of the rotating body is performed,Even if the magnet of the rotating body has a variation in magnetization,The cycle of the pulse signal will not be out of order,Further, even if the magnet of the rotation detection sensor has a small outer diameter, fine rotation speed data can be obtained.
[0011]
Claims of the invention2In the power window control apparatus according to the first, second, third, and fourth microcomputers of the control unit, each having a phase difference of ¼ period and generating a pulse signal for each rotation of the rotating body. The rotation speed of the armature shaft is detected by performing a pulse period calculation process based on the timer value and the free running counter value. Therefore,Action of Claim 1In addition, four timers are built in the microcomputer.
[0012]
Claims of the invention3In the power window control apparatus according to the first, second, third, fourth, and the like, the microcomputer of the control unit generates a pulse signal for each rotation of the rotating body, each having a phase difference of 1/8 period. The rotation speed of the armature shaft is detected by performing a pulse cycle calculation process based on the values of the fifth, sixth, seventh, and eighth timers and the value of the free running counter. Therefore,Action of Claim 1In addition, only eight timers are built in the microcomputer.
[0013]
【Example】
1 to 14 show a first embodiment of a power window control device according to the present invention.
[0014]
The illustrated power window control device 1 mainly includes an open switch 2, a close switch 3, an automatic switch 4, an ignition switch 5, a power supply 50, a motor 6, a rotation detection sensor (sensor) 7, a window glass 60, and a control unit 20. The control unit 20 includes a constant voltage circuit 21, a reset circuit 22, a power supply voltage detection circuit 23, a microcomputer CPU, and a drive circuit 24.
[0015]
The open switch 2 generates a lowering command signal when turned on. The lowering command signal generated by the open switch 2 is given to the first switch input port P1 of the microcomputer CPU provided in the control unit 20 through a voltage clamp circuit (not shown).
[0016]
The close switch 3 generates an ascending command signal when switched on. The ascending command signal generated by the closing switch 3 is given to the second switch input port P2 of the microcomputer CPU provided in the control unit 20 through a voltage clamp circuit (not shown).
[0017]
The automatic switch 4 generates an automatic command signal when switched on. The automatic command signal generated by the automatic switch 4 is given to the third switch input port P3 of the microcomputer CPU provided in the control unit 20 through a voltage clamp circuit (not shown).
[0018]
One of the ignition switches 5 is connected to the power supply 50, and the other is connected to the power supply voltage detection circuit 23 provided in the control unit 20. The ignition switch 5 is turned on to apply the potential of the power supply 50 to the power supply voltage detection circuit 23.
[0019]
The other of the power supply voltage detection circuit 23 is connected to the voltage detection port P4 of the microcomputer CPU. The power supply voltage detection circuit 23 detects the level of the power supply voltage supplied to the microcomputer CPU.
[0020]
One of the constant voltage circuits 21 is connected to the ignition switch 5 and the other is connected to the regulator port P5 of the microcomputer CPU. The constant voltage circuit 21 applies a predetermined microcomputer drive voltage to the regulator port P5 of the microcomputer CPU when the ignition switch 5 is turned on.
[0021]
One of the reset circuits 22 is connected to the ignition switch 5, and the other is connected to the reset port P6 of the microcomputer CPU. When the power supply 50 is connected to the control unit 20, the reset circuit 22 resets the microcomputer CPU to an initial state by setting the reset port P6 of the microcomputer CPU to a low level for a predetermined time.
[0022]
The drive circuit 24 is configured by a relay, a switching transistor, etc., one of which is connected to the first output port P7 and the second output port P8 of the microcomputer CPU, respectively, and the other is a first provided in the motor 6. The brush terminal 6a and the second brush terminal 6b are connected to each other.
[0023]
When the first output port P7 of the microcomputer CPU becomes high level and the second output port P8 of the microcomputer CPU becomes low level, the drive circuit 24 is turned on at the positive rotation side, and the second output port P7 of the motor 6 is turned on. A low level is applied to the brush terminal 6b of the motor 6, and a potential (high level) of the power source 50 is applied to the first brush terminal 6a of the motor 6. On the other hand, the drive circuit 24 turns on the reverse rotation side when the first output port P7 of the microcomputer CPU becomes low level and the second output port P8 of the microcomputer CPU becomes high level, A low level is applied to the first brush terminal 6a of the motor 6, and a potential (high level) of the power supply 50 is applied to the second brush terminal 6b of the motor 6.
[0024]
An armature shaft 6c provided to an armature (not shown) is coupled to the motor 6 via a glass elevator (not shown) to a window glass 60. In the motor 6, when the high level is given to the first brush terminal 6a and the low level is given to the second brush terminal 6b, the armature shaft 6c rotates forward, and the wind glass 60 is moved by the forward rotation of the armature shaft 6c. Open. On the other hand, the motor 6 is given a high level to the second brush terminal 6b, and a low level is given to the second brush terminal 6a, whereby the armature shaft 6c rotates backward, and the armature shaft 6c rotates backward. To close the window glass 60. A rotation detection sensor 7 is coupled to the armature shaft 6 c of the motor 6.
[0025]
As shown in FIG. 2, the rotation detection sensor 7 includes a rotating body 7a, a first signal generator 7b, and a second signal generator 7c.
[0026]
The rotating body 7a is provided with a magnet 7d in which a single N pole and a single S pole are arranged to face each other. Since the center of the rotating body 7a is concentrically coupled to the armature shaft 6c of the motor 6, the rotating body 7a rotates together with the armature shaft 6c.
[0027]
The first and second signal generators 7b and 7c are arranged around the rotating body 7a. Each of the first and second signal generators 7b and 7c is a Hall element, and is arranged in a non-contact manner with the rotating body 7a. The first signal generator 7b and the second signal generator 7c are arranged with a range of 90 degrees on the circumference of the rotating body 7a.
[0028]
The first signal generator 7b has a power supply terminal connected to the constant voltage circuit 21, a ground terminal connected to the ground, and a Hall voltage output terminal connected to the first rotation detection port P9 of the microcomputer CPU. . As shown in FIG. 2, the first signal generator 7b has a threshold value THS for the S pole of the magnet 7d and a threshold value THN for the N pole of the magnet 7d. When the rotating body 7a rotates from the boundary line between the S pole and the N pole of 7d to a position at a predetermined angle on the S pole side, a Hall voltage is generated by the threshold value THS, and the S pole of the magnet 7d When the rotating body 7a rotates from the boundary line with the N pole to a position at a predetermined angle on the N pole side, the Hall voltage disappears due to the threshold value THN.
[0029]
The second signal generator 7c has a power supply terminal connected to the constant voltage circuit 21, a ground terminal connected to the ground, and a Hall voltage output terminal connected to the second rotation detection port P10 of the microcomputer CPU. . As shown in FIG. 2, the second signal generator 7c is similar to the first signal generator 7b, and has a threshold value THS for the S pole of the magnet 7d and an N pole of the magnet 7d. Therefore, when the rotating body 7a rotates from the boundary line between the S pole and the N pole of the magnet 7d to a position at a predetermined angle on the S pole side, the threshold THS causes a hole. When a voltage is generated and the rotating body 7a rotates from the boundary line between the S pole and the N pole of the magnet 7d to a position at a predetermined angle on the N pole side, the Hall voltage disappears due to the threshold value THN.
[0030]
As shown in FIG. 2, the rotation detection sensor 7 has a first pulse signal A from the first signal generator 7b because the rotating body 7a rotates forward together with the armature shaft 6c when the armature shaft 6c rotates forward. Occurs, and the first pulse signal A is taken into the first rotation detection port P9 of the microcomputer CPU. Then, the second pulse signal B is generated from the second signal generator 7c with a quarter period shift from the first pulse signal A by the rotation of the armature shaft 6c, and the second rotation detection port of the microcomputer CPU. The second pulse signal B is taken into P10.
[0031]
The microcomputer CPU includes a clock for clocking, a free running counter FRC (8 bits) shown in FIG. 4, and first, second, third, and fourth timers TAR, TBR, TAF, and TBF shown in FIG. Are built in.
[0032]
In the microcomputer CPU, when the lowering command signal is given to the first switch input port P1, the forward rotation side of the drive circuit 24 is turned on, the low level is given to the second brush terminal 6b of the motor 6, and the motor 6 The potential (high level) of the power supply 50 is applied to the first brush terminal 6a to enter the manual open state.
[0033]
Further, in the microcomputer CPU, when the ascending command signal is given to the second switch input port P2, the reverse rotation side of the drive circuit 24 is turned on, the low level is given to the first brush terminal 6a of the motor 6, and the motor The potential of the power source 50 (high level) is applied to the second brush terminal 6b of No. 6, and the manual close state is established.
[0034]
In the microcomputer CPU, when the lowering command signal is given to the first switch input port P1 and the automatic command signal is given to the third switch input port P3, the positive rotation side of the drive circuit 24 is turned on, The drive circuit is provided even after the low level is given to the second brush terminal 6b of the motor 6 and the potential (high level) of the power source 50 is given to the first brush terminal 6a of the motor 6 and the open switch 2 is turned off. 24 continues to be turned on, gives a low level to the second brush terminal 6b of the motor 6, and continues to give the potential (high level) of the power source 50 to the first brush terminal 6a of the motor 6 to automatically open. It becomes a state.
[0035]
Further, in the microcomputer CPU, when the up command signal is given to the second switch input port P2 and the automatic command signal is given to the third switch input port P3, the reverse rotation side of the drive circuit 24 is turned on. In addition, a low level is applied to the first brush terminal 6a of the motor 6 and a potential (high level) of the power source 50 is applied to the second brush terminal 6b of the motor 6 to drive the motor after the closed switch 3 is turned off. The reverse rotation side of the circuit 24 is continuously turned on, and the low level is applied to the first brush terminal 6a of the motor 6, and the potential (high level) of the power source 50 is continuously applied to the second brush terminal 6b of the motor 6 to automatically Closed.
[0036]
The free running counter FRC of the microcomputer CPU is counted up in synchronization with the clock, and overflows when the count value becomes FF (16), as shown in FIG. Reset. When the free running counter FRC is reset, the microphone computer CPU executes the timer interrupt shown in FIG. In the timer interruption, the first timer TAR is incremented in step 400 and the process proceeds to step 401. In step 401, the second timer TBR is incremented and the process proceeds to step 402. In step 402, the third timer TAF is incremented. Then, the process proceeds to step 403, where a routine for incrementing the fourth timer TBF is executed in step 403.
[0037]
As shown in FIG. 2, the first timer TAR starts from the rising edge of the first pulse signal A generated by the first signal generator 7b of the rotation detection sensor 7 at time T2, and then the rotating body 7a This is a 16-bit memory that measures the time until the rising edge of the first pulse signal A generated by the first signal generator 7b at the time T10 when it rotates once for each rotation of the rotating body 7a. The first timer TAR is reset to “0” count when reading to the rising edge T0 is executed. In the first timer TAR, the value of the upper byte (H) is incremented (+1) by a timer interrupt routine.
[0038]
As shown in FIG. 2, the second timer TBR starts from the rising edge of the second pulse signal B generated by the second signal generator 7 c of the rotation detection sensor 7 at time T 4, and thereafter the rotating body 7 a This is a 16-bit memory for measuring the time until the rising edge of the second pulse signal B generated by the second signal generator 7c at the time T12 when the rotation is completed, for each rotation of the rotating body 7a. The second timer TBR is reset to “0” count when reading to the rising edge T0 is executed. In the second timer TBR, the value of the upper byte (H) is incremented (+1) by the timer interrupt routine.
[0039]
As shown in FIG. 2, the third timer TAF starts from the falling edge of the first pulse signal A generated by the first signal generator 7b of the rotation detection sensor 7 at time T6, and then rotates the rotating body 7a. Is a 16-bit memory that measures the time until the falling edge of the first pulse signal A generated by the first signal generator 7b at the time T14 when the rotation of the rotating body 7a is completed. The third timer TAF is reset to “0” count when reading to the rising edge T0 is executed. In the third timer TAF, the value of the upper byte (H) is incremented (+1) in the timer interrupt routine.
[0040]
As shown in FIG. 2, the fourth timer TBF starts from the falling edge of the second pulse signal B generated by the second signal generator 7c of the rotation detection sensor 7 at time T8, and thereafter the rotating body 7a. Is a 16-bit memory that measures the time until the falling edge of the second pulse signal B generated by the second signal generator 7c at the time T16 when the rotation of the rotating body 7a is performed. The fourth timer TBF is reset to “0” count when reading to the falling T0 is executed. In the fourth timer TBF, the value of the upper byte (H) is incremented (+1) by the timer interrupt routine.
[0041]
In the microcomputer CPU, when a pulse edge is detected at time K shown in FIG. 4, a pulse edge interruption routine is executed. The value of the upper byte (H) of the first, second, third, and fourth timers TAR, TBR, TAF, and TBF processed by the timer interrupt and the value of the lower byte (L) of the free running counter FRC Is required.
[0042]
At this time, if t1 ≧ t0, TAR (L) = t1−t0. On the other hand, if t1 <t0, TAR (H) = TAR (H) −1 and TAR (L) = t1 + (FF−t0). t0 is the counter value of the free running counter FRC when the previous pulse edge is detected, and t1 is the counter value of the free running counter FRC when the current pulse edge is detected. The values that enter the micro timers TAR, TBR, TAF, and TBF are calculated.
[0043]
In the microcomputer CPU, as shown in FIG. 6, when the rising edge of the first pulse signal A is detected, the second pulse signal B is at the low level, and then the second pulse signal When the rising edge of B is detected, it is recognized that the armature shaft 6c of the motor 6 is rotating forward and the window glass 60 is moving, and the rising edge of the first pulse signal A is detected. When detected, when the second pulse signal B is at a high level and the trailing edge of the second pulse signal B is detected thereafter, the armature shaft 6c of the motor 6 rotates reversely and the window glass 60 The direction of operation is detected by recognizing that is moving to the closing side.
[0044]
In the microcomputer CPU, the counter value PC when the window glass 60 is in the fully closed position is set to “0”, and the counter value PC is moved from “0” to the side where the window glass 60 is slightly opened from the fully closed position. The counter value PCX up to the counter value PCX at this time is set as a non-inverted area and the inversion operation is not performed, and the counter value PCX to the counter value at the fully open position is set as the inversion area. The counter value is incremented when the window glass 60 moves to the opening side, and on the contrary, it is incremented when the window glass 60 moves to the closing side.
[0045]
The power window control apparatus 1 includes a main routine shown in FIGS. 7 to 9, an output routine shown in FIG. 10, a pulse edge interrupt routine shown in FIGS. 11 and 12, and a load detection routine shown in FIG. The movement of the window glass 60 is controlled by executing.
[0046]
If the ignition switch 5 is switched on and the open switch 2, the closed switch 3, and the automatic switch 4 are not switched on, the determination in step 100 of the main routine is “because the stop state is set”, step 101. In step 101, the process proceeds to step 102 because “inversion request is not set”. In step 102, “closed switch 3 is not switched on, and an up command signal is given. Therefore, the routine proceeds to step 103, and in the determination in step 103, the routine returning to step 100 is executed and the output routine is executed because "the open switch 2 is not switched on and no lowering command signal is given" Migrate to
[0047]
In the determination in step 300 of the output routine, “stop state is set”, the process proceeds to step 306, and “stop output” is executed in step 306.
[0048]
If none of the open switch 2, the close switch 3, and the automatic switch 5 are turned on, the first and second output ports P7 and P8 of the microcomputer CPU are all at a low level, and the drive circuit 24 is not operated. In addition, since no current is supplied to the motor 5, the window glass 60 is stopped at the fully closed position.
[0049]
When the window glass 60 is in the fully closed position, the ignition switch 5 is turned on, and when the open switch 2 is turned on at time T1 shown in FIG. 2, the down command signal generated by the open switch 2 is sent to the microcomputer. Captured by the CPU. Then, in the determination in step 100 of the main routine, the process proceeds to step 101 because “stop state is set”, and in the determination in step 101, the process proceeds to step 102 because “inversion request is not set”. In the determination in 102, “because the closed switch 3 has not been switched on”, the process proceeds to step 103, and in the determination in step 103, “the open switch 2 has been switched on and the descent command signal is taken in” The process proceeds to step 107, where the “open state (manual open state)” is set and the process proceeds to the output routine.
[0050]
In the determination in step 300 of the output routine, the process proceeds to step 301 because “stop state is not set”, and in the determination in step 301, the process proceeds to step 302 “because the manual closed state is not set”. In step 308, “manual open state is set”, the process proceeds to step 308 and “open drive output” is executed. When the “open drive output” is executed, the first output port P7 of the microcomputer CPU becomes high level, the second output port P8 of the microcomputer CPU becomes low level, and the second output port of the motor 6 becomes low. Since the power supply potential is applied to the first brush terminal 6a of the motor 6 while the brush terminal 6b is grounded, the window glass 60 is opened by the normal rotation of the armature shaft 6c.
[0051]
When the armature shaft 6c starts to rotate forward at the time T1 shown in FIG. 2 and starts moving to the side where the window glass 60 opens, at the time T2, the rotation detection sensor 7 indicates that the first signal generator 7b is the first signal generator 7b. The pulse signal A is generated, and the second signal generator 7c generates the second pulse signal B with a phase difference of ¼ period from the first pulse signal A.
[0052]
When the first pulse signal A is generated at time T2 and the rising edge of the first pulse signal A is detected, it is determined in step 200 of the pulse edge interrupt routine that “the edge is the first pulse signal A”. Therefore, the process proceeds to “Step 201”, and in the determination in Step 201, “Because it is a rising edge”, the process proceeds to Step 202 and “Clear count value of first timer TAR” is executed, and the process proceeds to Step 203. In step 203, “calculate the speed ω0 from the count value of the first timer TAR” is executed, and the routine proceeds to step 208.
[0053]
Then, in the determination in step 208, “because the edge is the first pulse signal A”, the process proceeds to step 209, and in the determination in step 209, the process proceeds to “because of the rising edge”, step 210. In the determination, “because the second pulse signal B is at a low level”, the routine proceeds to step 212, where the pulse count PC is incremented by 1 (+1), and the interrupt processing is terminated.
[0054]
After the time T2, the second pulse signal B rises at a time T4 shown in FIG. 2 in which the rotating body 7a of the rotation detection sensor 7 has rotated 1/4. When the second pulse signal B rises, the determination in step 200 of the interrupt routine proceeds to “because the edge is not the first pulse signal A”, and the process proceeds to step 204, and the determination in step 204 indicates “rising edge”. Therefore, the process proceeds to step 206 and “clears the count value of the second timer TBR to 0” is executed, and the process proceeds to step 203. In step 203, the speed ω0 is calculated from the count value of the second timer TBR. "Is executed and the routine goes to Step 208.
[0055]
Then, in the determination in step 208, “the edge is not the first pulse signal A”, the process proceeds to step 216, and in the determination in step 216, the process proceeds to “because of the rising edge”, step 217. In the determination, “because the first pulse signal A is not at a low level”, the process proceeds to step 220, the pulse count PC is incremented by 1 (+1), and the interrupt process is terminated.
[0056]
After time T4, the first pulse signal A falls at time T6 shown in FIG. When the first pulse signal A falls, the determination in step 200 of the interrupt routine proceeds to “201 because the edge is the first pulse signal A”, and the determination in step 201 indicates “not a rising edge”. Therefore, the process proceeds to “Step 205” where “clearing the count value of the third timer TAF to 0” is executed, and the process proceeds to Step 203. In Step 203, the speed ω0 is calculated from the count value of the third timer TAF. "Is executed and the routine goes to Step 208.
[0057]
Then, in the determination in step 208, “the edge is the first pulse signal A” shifts to step 209, and in the determination in step 209, the flow shifts to step 211 “because it is not a rising edge”. In the determination, “because the second pulse signal B is not at a low level”, the process proceeds to step 215, the pulse count PC is incremented by 1 (+1), and the interrupt process is terminated.
[0058]
After time T6, the second pulse signal B falls at time T8 shown in FIG. 2 in which the rotating body 7a of the rotation detecting sensor 7 has rotated 3/4. When the second pulse signal B falls, the determination at step 200 of the interrupt routine proceeds to “because the edge is not the first pulse signal A”, shifts to step 204, and the determination at step 204 indicates “not a rising edge” Therefore, the process proceeds to “Step 207” where “Clear the count value of the fourth timer TBF” is executed and the process proceeds to Step 203. In Step 203, “the speed ω0 is calculated from the count value of the fourth timer TBF. "Is executed and the routine goes to Step 208.
[0059]
Then, in the determination in step 208, “because the edge is not the first pulse signal A”, the process proceeds to step 216, and in the determination in step 216, the process proceeds to “because it is not a rising edge”, and the process proceeds to step 218. In the determination, “because the first pulse signal A is at a low level”, the process proceeds to step 221 where the pulse count PC is incremented by 1 (+1) and the interrupt process is terminated.
[0060]
After time T8, the rotating body 7a of the rotation detection sensor 7 completes one rotation at time T10 shown in FIG. 2 and enters the second rotation, so that the first pulse signal A rises again. When the first pulse signal A rises, the determination at step 200 of the interrupt routine proceeds to “201 because the edge is the first pulse signal A”, and the determination at step 201 indicates “rising edge”. Therefore, "the process proceeds to step 202 and" clears the count value of the first timer TAR to 0 "is executed, and the process proceeds to step 203. In step 203, the speed ω0 is calculated from the count value of the first timer TAR. "Is executed and the routine goes to Step 208.
[0061]
Then, in the determination in step 208, “because the edge is the first pulse signal A”, the process proceeds to step 209, and in the determination in step 209, the process proceeds to “because of the rising edge”, step 210. In the determination, “because the second pulse signal B is at a low level”, the routine proceeds to step 212, where the pulse count PC is incremented by 1 (+1), and the interrupt processing is terminated.
[0062]
After time T10, the second pulse signal B rises again at time T12 shown in FIG. 2 in which the rotating body 7a of the rotation detection sensor 7 rotates 5/4. When the second pulse signal B rises, the determination in step 200 of the interruption routine proceeds to “because the edge is not the first pulse signal A”, and the process proceeds to step 204, and the determination in step 204 indicates “rising edge”. Therefore, the process proceeds to "Step 206" and "Clear 0 of the count value of the second timer TBR" is executed, and the process proceeds to Step 203. In Step 203, the speed ω0 is calculated from the count value of the second timer TBR. "Is executed and the routine goes to Step 208.
[0063]
Then, in the determination in step 208, “the edge is not the first pulse signal A”, the process proceeds to step 216, and in the determination in step 216, the process proceeds to “because of the rising edge”, step 217. In the determination, “because the first pulse signal A is not at a low level”, the process proceeds to step 220, the pulse count PC is incremented by 1 (+1), and the interrupt process is terminated.
[0064]
After time T12, the first pulse signal A falls at time T14 shown in FIG. 2 in which the rotating body 7a of the rotation detection sensor 7 has rotated 3/2. When the first pulse signal A falls, the determination in step 200 of the interrupt routine proceeds to “201 because the edge is the first pulse signal A”, and the determination in step 201 indicates “not a rising edge”. Therefore, the process proceeds to “Step 205” where “Clear the count value of the third timer TAF” is executed and the process proceeds to Step 203. In Step 203, the speed ω0 is calculated from the count value of the third timer TAF. "Is executed and the routine goes to Step 208.
[0065]
Then, in the determination in step 208, “the edge is the first pulse signal A” shifts to step 209, and in the determination in step 209, the flow shifts to step 211 “because it is not a rising edge”. In the determination, “because the second pulse signal B is not at a low level”, the process proceeds to step 215, the pulse count PC is incremented by 1 (+1), and the interrupt process is terminated.
[0066]
After the time T14, the second pulse signal B falls at a time T16 shown in FIG. 2 in which the rotator 7a of the rotation detection sensor 7 rotates 7/4. When the second pulse signal B falls, the determination at step 200 of the interrupt routine proceeds to “because the edge is not the first pulse signal A”, shifts to step 204, and the determination at step 204 indicates “not a rising edge” Therefore, the process proceeds to “Step 207 and“ Clear count value of fourth timer TBF ”is executed” and the process proceeds to Step 203. In Step 203, “speed ω0 is calculated from the count value of fourth timer TBF. "Is executed and the routine goes to Step 208.
[0067]
Then, in the determination in step 208, “because the edge is not the first pulse signal A”, the process proceeds to step 216, and in the determination in step 216, the process proceeds to “because it is not a rising edge”, and the process proceeds to step 218. In the determination, “because the first pulse signal A is at a low level”, the process proceeds to step 221 where the pulse count PC is incremented by 1 (+1) and the interrupt process is terminated.
[0068]
As described above, when the rotation detection sensor 7 generates the first pulse signal A and the second pulse signal B by starting the forward rotation of the armature shaft 6c and starting to move the window glass 60 to the opening side. The first timer TAR performs a positive count while clearing the count to zero for each rotation of the rotating body 7a of the rotation detection sensor 7, and is shifted by a quarter cycle from the first timer TAR, and the second timer TBR Performs a positive count while clearing the count to zero for each rotation of the rotating body 7a of the rotation detection sensor 7, and the third timer TAF is shifted from the first timer TBR by a quarter period. A positive count is performed while clearing the count to zero for each rotation of the rotating body 7a, and the fourth timer TBF is shifted by a quarter period from the third timer TBR. By performing the plus count while the count is cleared to zero 7 per one rotation of the rotary member 7a of the microcomputer CPU is indirectly detects the current position of the window glass 60.
[0069]
At this time, when the armature shaft 6c starts to rotate forward and starts moving to the side where the window glass 60 opens, the load detection routine is executed simultaneously. In the determination in step 500 of the load detection routine, “the closing operation is not set”, the process proceeds to step 508, and in the determination in step 508, the window glass 60 is moved to the opening side. Since the speed ω0 calculated in step S1 is not smaller than the predetermined minimum value ωmin, the routine for returning to the first step 500 is repeatedly executed.
[0070]
If the open switch 2 is turned off while the window glass 60 is moving to the opening side, the lowering command signal generated by the open switch 2 is not taken into the microcomputer CPU. Then, in the determination in step 100 of the main routine, the process proceeds to “step 108 because the stop state is not set”, and in the determination in step 108, the process proceeds to “step 117” because “the manual closed state is not set”. In step 117, the process proceeds to step 118 because "the manual open state is set", and in step 118, the process proceeds to step 119 because "no motor lock is detected". If it is determined that “the open switch 2 is switched off”, the routine proceeds to step 122, where “stop state” is set and the routine proceeds to the output routine.
[0071]
As a result of determination in step 300 of the output routine, “stop state is set”, the process proceeds to step 306 and “stop output” is executed. By executing the “stop output”, the first output port P7 of the microcomputer CPU becomes low level and the second output port P8 of the microcomputer CPU becomes low level. The current is not supplied to the second brush terminals 6a and 6b, and the window glass 60 stops when the armature shaft 6c stops rotating forward.
[0072]
If the open switch 2 is turned on and the automatic switch 4 is turned on while the window glass 60 is stopped, the descending command signal from the open switch 2 and the automatic command signal from the automatic switch 4 are sent to the microcomputer. Captured by the CPU. Then, in the determination in step 100 of the main routine, the process proceeds to step 101 because “stop state is set”, and in the determination in step 101, the process proceeds to step 102 because “inversion request is not set”. In the determination in 102, “the closed switch 3 is not switched on” shifts to step 103, and in the determination in step 103, “the open switch 2 is switched on” shifts to step 107 and “open state” ”Is set and the process returns to step 100. In the next determination of step 100 in the main routine,“ stop state is not set ”, the process proceeds to step 108. In step 108,“ manual closed state is Since it is not set, go to Step 117 and Step 117 In the determination in step 118, “the manual open state is set”, the process proceeds to step 118. In determination in step 118, “the motor lock is not detected”, the process proceeds to step 119, and the determination in step 119. Since the open switch 2 is not switched off, the process proceeds to "Step 120", and in the determination in Step 120, "Since the automatic switch 4 is switched on", the process proceeds to Step 123 and the "automatic open state" is set. To move to the output routine.
[0073]
In the determination in step 300 of the output routine, “stop state is not set”, the process proceeds to step 301. In the determination in step 301, “manual closed state is not set”, the process proceeds to step 302. If the manual open state is not set in step 304, the process proceeds to step 303. In step 303, the process proceeds to step 304 because the automatic close state is not set. In step 304, the determination is made. “Because the automatic open state is set”, the process proceeds to step 310, and the open drive output is continuously executed.
[0074]
With continuous open drive output, the power is connected to the first brush terminal 6a of the motor 6, and the second brush terminal 6b of the motor 6 is grounded, and the open drive output is then turned off by the open switch 2. Since the armature shaft 6c is rotated in the forward direction after the switching, the window glass 60 continuously moves to the opening side.
[0075]
Then, as shown in FIG. 2, the armature shaft 6c of the motor 6 starts to rotate forward at time T1, so that at time T2, the rotation detection sensor 7 causes the first signal generator 7b to receive the first pulse signal. A is generated, and the second signal generator 7c generates the second pulse signal B with a phase difference of ¼ period from the first pulse signal A.
[0076]
When the first pulse signal A is generated at time T2 and the rising edge of the first pulse signal A is detected, it is determined in step 200 of the pulse edge interrupt routine that “the edge is the first pulse signal A”. Therefore, the process proceeds to “Step 201”, and in the determination in Step 201, “Because it is a rising edge”, the process proceeds to Step 202 and “Clear count value of first timer TAR” is executed, and the process proceeds to Step 203. In step 203, “calculate the speed ω0 from the count value of the first timer TAR” is executed, and the routine proceeds to step 208.
[0077]
Then, in the determination in step 208, “because the edge is the first pulse signal A”, the process proceeds to step 209, and in the determination in step 209, the process proceeds to “because of the rising edge”, step 210. In the determination, “because the second pulse signal B is at a low level”, the routine proceeds to step 212, where the pulse count PC is incremented by 1 (+1), and the interrupt processing is terminated.
[0078]
After the time T2, the second pulse signal B rises at a time T4 shown in FIG. 2 in which the rotating body 7a of the rotation detection sensor 7 has rotated 1/4. When the second pulse signal B rises, the determination in step 200 of the interrupt routine proceeds to “because the edge is not the first pulse signal A”, and the process proceeds to step 204, and the determination in step 204 indicates “rising edge”. Therefore, the process proceeds to step 206 and “clears the count value of the second timer TBR to 0” is executed, and the process proceeds to step 203. In step 203, the speed ω0 is calculated from the count value of the second timer TBR. "Is executed and the routine goes to Step 208.
[0079]
Then, in the determination in step 208, “the edge is not the first pulse signal A”, the process proceeds to step 216, and in the determination in step 216, the process proceeds to “because of the rising edge”, step 217. In the determination, “because the first pulse signal A is not at a low level”, the process proceeds to step 220, the pulse count PC is incremented by 1 (+1), and the interrupt process is terminated.
[0080]
After time T4, the first pulse signal A falls at time T6 shown in FIG. When the first pulse signal A falls, the determination in step 200 of the interrupt routine proceeds to “201 because the edge is the first pulse signal A”, and the determination in step 201 indicates “not a rising edge”. Therefore, the process proceeds to “Step 205” where “clearing the count value of the third timer TAF to 0” is executed, and the process proceeds to Step 203. In Step 203, the speed ω0 is calculated from the count value of the third timer TAF. "Is executed and the routine goes to Step 208.
[0081]
Then, in the determination in step 208, “the edge is the first pulse signal A” shifts to step 209, and in the determination in step 209, the flow shifts to step 211 “because it is not a rising edge”. In the determination, “because the second pulse signal B is not at a low level”, the process proceeds to step 215, the pulse count PC is incremented by 1 (+1), and the interrupt process is terminated.
[0082]
After time T6, the second pulse signal B falls at time T8 shown in FIG. 2 in which the rotating body 7a of the rotation detecting sensor 7 has rotated 3/4. When the second pulse signal B falls, the determination at step 200 of the interrupt routine proceeds to “because the edge is not the first pulse signal A”, shifts to step 204, and the determination at step 204 indicates “not a rising edge” Therefore, the process proceeds to “Step 207” where “Clear the count value of the fourth timer TBF” is executed and the process proceeds to Step 203. In Step 203, “the speed ω0 is calculated from the count value of the fourth timer TBF. "Is executed and the routine goes to Step 208.
[0083]
Then, in the determination in step 208, “because the edge is not the first pulse signal A”, the process proceeds to step 216, and in the determination in step 216, the process proceeds to “because it is not a rising edge”, and the process proceeds to step 218. In the determination, “because the first pulse signal A is at a low level”, the process proceeds to step 221 where the pulse count PC is incremented by 1 (+1) and the interrupt process is terminated.
[0084]
After time T8, the rotating body 7a of the rotation detection sensor 7 completes one rotation at time T10 shown in FIG. 2 and enters the second rotation, so that the first pulse signal A rises again. When the first pulse signal A rises, the determination at step 200 of the interrupt routine proceeds to “201 because the edge is the first pulse signal A”, and the determination at step 201 indicates “rising edge”. Therefore, "the process proceeds to step 202 and" clears the count value of the first timer TAR to 0 "is executed, and the process proceeds to step 203. In step 203, the speed ω0 is calculated from the count value of the first timer TAR. "Is executed and the routine goes to Step 208.
[0085]
Then, in the determination in step 208, “because the edge is the first pulse signal A”, the process proceeds to step 209, and in the determination in step 209, the process proceeds to “because of the rising edge”, step 210. In the determination, “because the second pulse signal B is at a low level”, the routine proceeds to step 212, where the pulse count PC is incremented by 1 (+1), and the interrupt processing is terminated.
[0086]
After time T10, the second pulse signal B rises again at time T12 shown in FIG. 2 in which the rotating body 7a of the rotation detection sensor 7 rotates 5/4. When the second pulse signal B rises, the determination in step 200 of the interruption routine proceeds to “because the edge is not the first pulse signal A”, and the process proceeds to step 204, and the determination in step 204 indicates “rising edge”. Therefore, the process proceeds to "Step 206" and "Clear 0 of the count value of the second timer TBR" is executed, and the process proceeds to Step 203. In Step 203, the speed ω0 is calculated from the count value of the second timer TBR. "Is executed and the routine goes to Step 208.
[0087]
Then, in the determination in step 208, “the edge is not the first pulse signal A”, the process proceeds to step 216, and in the determination in step 216, the process proceeds to “because of the rising edge”, step 217. In the determination, “because the first pulse signal A is not at a low level”, the process proceeds to step 220, the pulse count PC is incremented by 1 (+1), and the interrupt process is terminated.
[0088]
After time T12, the first pulse signal A falls at time T14 shown in FIG. 2 in which the rotating body 7a of the rotation detection sensor 7 has rotated 3/2. When the first pulse signal A falls, the determination in step 200 of the interrupt routine proceeds to “201 because the edge is the first pulse signal A”, and the determination in step 201 indicates “not a rising edge”. Therefore, the process proceeds to “Step 205” where “Clear the count value of the third timer TAF” is executed and the process proceeds to Step 203. In Step 203, the speed ω0 is calculated from the count value of the third timer TAF. "Is executed and the routine goes to Step 208.
[0089]
Then, in the determination in step 208, “the edge is the first pulse signal A” shifts to step 209, and in the determination in step 209, the flow shifts to step 211 “because it is not a rising edge”. In the determination, “because the second pulse signal B is not at a low level”, the process proceeds to step 215, the pulse count PC is incremented by 1 (+1), and the interrupt process is terminated.
[0090]
After the time T14, the second pulse signal B falls at a time T16 shown in FIG. 2 in which the rotator 7a of the rotation detection sensor 7 rotates 7/4. When the second pulse signal B falls, the determination at step 200 of the interrupt routine proceeds to “because the edge is not the first pulse signal A”, shifts to step 204, and the determination at step 204 indicates “not a rising edge” Therefore, the process proceeds to “Step 207 and“ Clear count value of fourth timer TBF ”is executed” and the process proceeds to Step 203. In Step 203, “speed ω0 is calculated from the count value of fourth timer TBF. "Is executed and the routine goes to Step 208.
[0091]
Then, in the determination in step 208, “because the edge is not the first pulse signal A”, the process proceeds to step 216, and in the determination in step 216, the process proceeds to “because it is not a rising edge”, and the process proceeds to step 218. In the determination, “because the first pulse signal A is not at a low level”, the process proceeds to step 221 where the pulse count PC is incremented by 1 (+1) and the interrupt process is terminated.
[0092]
As described above, when the rotation detection sensor 7 generates the first pulse signal A and the second pulse signal B by starting the forward rotation of the armature shaft 6c and starting to move the window glass 60 to the opening side. The first timer TAR performs a positive count while clearing the count to zero for each rotation of the rotating body 7a of the rotation detection sensor 7, and is shifted by a quarter cycle from the first timer TAR, and the second timer TBR Performs a positive count while clearing the count to zero for each rotation of the rotating body 7a of the rotation detection sensor 7, and the third timer TAF is shifted from the first timer TBR by a quarter period. A positive count is performed while clearing the count to zero for each rotation of the rotating body 7a, and the fourth timer TBF is shifted by a quarter period from the third timer TBR. By performing the plus count while the count is cleared to zero 7 per one rotation of the rotary member 7a of the microcomputer CPU is indirectly detects the current position of the window glass 60.
[0093]
At this time, when the armature shaft 6c starts to rotate forward and starts moving to the side where the window glass 60 opens, the load detection routine is executed simultaneously. In the determination in step 500 of the load detection routine, “the closing operation is not set”, the process proceeds to step 508, and in the determination in step 508, the window glass 60 is moved to the opening side. Since the speed ω0 calculated in step S1 is not smaller than the predetermined minimum value ωmin, the routine for returning to the first step 500 is repeatedly executed.
[0094]
When the window glass 60 continues to move to the opening side, the window glass 60 is prevented from moving by colliding with the vehicle body at the fully opened position. Then, in the determination in step 500 of the load detection routine, “the closing operation is not set”, the process proceeds to step 508, and in the determination in step 508, the window glass 60 is moved to the opening side, thereby “pulse edge Since the speed ω0 calculated in the interruption routine is smaller than the predetermined minimum value ωmin, the process proceeds to “Step 509,“ Motor lock detection ”is set, and the process proceeds to the main routine.
[0095]
In the determination in step 100 of the main routine, the process proceeds to “step 108 because the stop state is not set”, and in the determination in step 108, the process proceeds to step 117 “because the manual closed state is not set”. If the manual open state is not set at step 124, the process proceeds to step 124. If the determination at step 124 is "automatic closed state is not set", the process proceeds to step 131. “Since the automatic open state is set”, the process proceeds to step 132, and “Motor lock detection” is set in the determination in step 132. Therefore, the process proceeds to “step 134, and“ stop state ”is set and output. Move to routine.
[0096]
As a result of determination in step 300 of the output routine, “stop state is set”, the process proceeds to step 306 and “stop output” is executed. Due to the stop output, the first and second brush terminals 6a and 6b of the motor 6 go to a low level, so that the armature shaft 6c of the motor 6 stops rotating and the window glass 60 stops at the fully open position.
[0097]
When the close switch 3 is turned on while the window glass 60 is stopped at the fully open position, an ascending command signal from the close switch 3 is taken into the microcomputer CPU. Then, in the determination in step 100 of the main routine, the process proceeds to “step 101 because the stop state is set”, and in the determination in step 101, the process proceeds to step 102 because “inversion request is not set”. In the determination in 102, “because the closed switch 3 is turned on”, the process proceeds to step 104, and in the determination in step 104, “the open switch 2 is switched off”, the process proceeds to step 106, and “closed state”. (Manually closed state) ”is set and the process proceeds to the output routine.
[0098]
Then, the determination in step 300 of the output routine proceeds to “because the closed state is set”, and the process proceeds to step 301. In the determination in step 301, the process proceeds to “307 because the manual closed state is set”. A closed drive output is executed.
[0099]
Due to the closed drive output, the first brush terminal 6a of the motor 6 is grounded and the power source is connected to the second brush terminal 6b of the motor 6, so that the armature shaft 6c rotates in reverse and the window glass 60 is moved. Start moving to the closing side.
[0100]
Then, as shown in FIG. 3, the armature shaft 6c of the motor 6 starts reverse rotation at time T18, so that at time T19, the rotation detection sensor 7 causes the first signal generator 7b to receive the first pulse signal. A is generated, and the second signal generator 7c generates the second pulse signal B with a phase difference of ¼ period from the first pulse signal A.
[0101]
When the first pulse signal A is generated at time T19 and the rising edge of the first pulse signal A is detected, it is determined in step 200 of the pulse edge interrupt routine that “the edge is the first pulse signal A”. Therefore, the process proceeds to "Step 201", and in the determination in Step 201, "Because it is a rising edge", the process proceeds to Step 202, "Clear count value of first timer TAR" is executed, and the process proceeds to Step 203. In step 203, “calculate the speed ω0 from the count value of the first timer TAR” is executed, and the routine proceeds to step 208.
[0102]
Then, in the determination in step 208, “because the edge is the first pulse signal A”, the process proceeds to step 209, and in the determination in step 209, the process proceeds to “because of the rising edge”, step 210. In the determination, “because the second pulse signal B is not at a low level”, the process proceeds to step 213, the pulse count PC is decremented by 1 (−1), and the interrupt process ends.
[0103]
After the time T19, the second pulse signal B falls at a time T21 shown in FIG. 3 in which the rotating body 7a of the rotation detection sensor 7 has rotated 1/4. When the second pulse signal B falls, the determination at step 200 of the interrupt routine proceeds to “because the edge is not the first pulse signal A”, shifts to step 204, and the determination at step 204 indicates “not a rising edge” Therefore, the process proceeds to “Step 207 and“ Clear count value of fourth timer TBF ”is executed” and the process proceeds to Step 203. In Step 203, “speed ω0 is calculated from the count value of fourth timer TBF. "Is executed and the routine goes to Step 208.
[0104]
Then, in the determination in step 208, “because the edge is not the first pulse signal A”, the process proceeds to step 216, and in the determination in step 216, the process proceeds to “because it is not a rising edge”, and the process proceeds to step 218. In the determination, “because the first pulse signal A is not at a low level”, the process proceeds to step 222, the pulse count PC is decremented by 1 (−1), and the interrupt process is terminated.
[0105]
After time T21, the first pulse signal A falls at time T23 shown in FIG. When the first pulse signal A falls, the determination in step 200 of the interrupt routine proceeds to “201 because the edge is the first pulse signal A”, and the determination in step 201 indicates “not a rising edge”. Therefore, the process proceeds to “Step 205” where “Clear the count value of the third timer TAF” is executed and the process proceeds to Step 203. In Step 203, the speed ω0 is calculated from the count value of the third timer TAF. "Is executed and the routine goes to Step 208.
[0106]
Then, in the determination in step 208, “the edge is the first pulse signal A” shifts to step 209, and in the determination in step 209, the flow shifts to step 211 “because it is not a rising edge”. In the determination, “because the second pulse signal B is at a low level”, the routine proceeds to step 214, where the pulse count PC is decremented by 1 (−1) and the interrupt processing is terminated.
[0107]
After the time T23, the second pulse signal B rises at a time T25 shown in FIG. 3 in which the rotating body 7a of the rotation detection sensor 7 rotates 3/4. When the second pulse signal B rises, the determination in step 200 of the interrupt routine proceeds to “because the edge is not the first pulse signal A”, and the process proceeds to step 204, and the determination in step 204 indicates “not a rising edge”. Therefore, the process proceeds to “Step 207 and“ Clear count value of fourth timer TBF ”is executed” and the process proceeds to Step 203. In Step 203, “speed ω0 is calculated from the count value of fourth timer TBF. "Is executed and the routine goes to Step 208.
[0108]
Then, in the determination in step 208, “the edge is not the first pulse signal A”, the process proceeds to step 216, and in the determination in step 216, the process proceeds to “because of the rising edge”, step 217. In the determination, “because the first pulse signal A is at the low level”, the process proceeds to step 219, where the pulse count PC is decremented by 1 (−1) and the interrupt process is terminated.
[0109]
After time T25, the first pulse signal A rises again at time T27 shown in FIG. 3 in which the rotating body 7a of the rotation detection sensor 7 makes one rotation. When the first pulse signal A rises, the determination at step 200 of the interrupt routine proceeds to “201 because the edge is the first pulse signal A”, and the determination at step 201 indicates “rising edge”. Therefore, "the process proceeds to step 202 and" clears the count value of the first timer TAR to 0 "is executed, and the process proceeds to step 203. In step 203, the speed ω0 is calculated from the count value of the first timer TAR. "Is executed and the routine goes to Step 208.
[0110]
Then, in the determination in step 208, “because the edge is the first pulse signal A”, the process proceeds to step 209, and in the determination in step 209, the process proceeds to “because of the rising edge”, step 210. In the determination, “because the second pulse signal B is not at a low level”, the process proceeds to step 213, the pulse count PC is decremented by 1 (−1), and the interrupt process ends.
[0111]
After time T27, the second pulse signal B falls at time T29 shown in FIG. 3 in which the rotating body 7a of the rotation detection sensor 7 rotates 5/4. When the second pulse signal B falls, the determination at step 200 of the interrupt routine proceeds to “because the edge is not the first pulse signal A”, shifts to step 204, and the determination at step 204 indicates “not a rising edge” Therefore, the process proceeds to “Step 207 and“ Clear count value of fourth timer TBF ”is executed” and the process proceeds to Step 203. In Step 203, “speed ω0 is calculated from the count value of fourth timer TBF. "Is executed and the routine goes to Step 208.
[0112]
Then, in the determination in step 208, “because the edge is not the first pulse signal A”, the process proceeds to step 216, and in the determination in step 216, the process proceeds to “because it is not a rising edge”, and the process proceeds to step 218. In the determination, “because the first pulse signal A is not at a low level”, the process proceeds to step 222, the pulse count PC is decremented by 1 (−1), and the interrupt process is terminated.
[0113]
After the time T29, the first pulse signal A falls at a time T31 shown in FIG. 3 in which the rotating body 7a of the rotation detection sensor 7 rotates 3/2. When the first pulse signal A falls, the determination in step 200 of the interrupt routine proceeds to “201 because the edge is the first pulse signal A”, and the determination in step 201 indicates “not a rising edge”. Therefore, the process proceeds to “Step 205” where “Clear the count value of the third timer TAF” is executed and the process proceeds to Step 203. In Step 203, the speed ω0 is calculated from the count value of the third timer TAF. "Is executed and the routine goes to Step 208.
[0114]
Then, in the determination in step 208, “the edge is the first pulse signal A” shifts to step 209, and in the determination in step 209, the flow shifts to step 211 “because it is not a rising edge”. In the determination, “because the second pulse signal B is at a low level”, the routine proceeds to step 214, where the pulse count PC is decremented by 1 (−1) and the interrupt processing is terminated.
[0115]
After the time T31, the second pulse signal B rises at a time T33 shown in FIG. 3 in which the rotating body 7a of the rotation detection sensor 7 rotates 7/4. When the second pulse signal B rises, the determination in step 200 of the interrupt routine proceeds to “because the edge is not the first pulse signal A”, and the process proceeds to step 204, and the determination in step 204 indicates “because it is a rising edge”. The process proceeds to step 206 where “clearing the count value of the second timer TBR to 0” is executed and then the process proceeds to step 203. In step 203, “calculating the speed ω0 from the count value of the second timer TBR” is performed. The process proceeds to step 208.
[0116]
Then, in the determination in step 208, “the edge is not the first pulse signal A”, the process proceeds to step 216, and in the determination in step 216, the process proceeds to “because of the rising edge”, step 217. In the determination, “because the first pulse signal A is at the low level”, the process proceeds to step 219, where the pulse count PC is decremented by 1 (−1) and the interrupt process is terminated.
[0117]
As described above, the rotation detection sensor 7 generates the first pulse signal A and the second pulse signal B by starting the reverse rotation of the armature shaft 6c and starting the movement to the side where the window glass 60 is closed. Then, the first timer TAR performs a minus count while clearing the count to zero for each rotation of the rotating body 7a of the rotation detection sensor 7, and shifts by a quarter cycle from the first timer TAR, and the fourth timer The TBF performs a minus count while clearing the count to zero for each rotation of the rotating body 7a of the rotation detection sensor 7. The third timer TAF is shifted by a quarter cycle from the fourth timer TBF, and the rotation detection sensor 7 A negative count is performed while clearing the count to zero every rotation of the rotating body 7a, and the second timer TBR detects the rotation by shifting by a quarter period from the third timer TAF. By performing the negative count while the count for each one rotation of the rotary member 7a of the sensor 7 is cleared to 0, the microcomputer CPU is indirectly detects the current position of the window glass 60.
[0118]
At this time, when the armature shaft 6c starts reverse rotation and starts moving to the side where the window glass 60 is closed, the load detection routine is simultaneously executed. In the determination in step 500 of the load detection routine, “because the closing operation is set”, the process proceeds to step 501, and in the determination in step 501, “the speed data ω0 is updated in the pulse edge interrupt routine”. To "Detect the power supply voltage level V0" and go to Step 503. In Step 503, calculate the load torque TL0 from the speed data ω0 and the power supply voltage level V0 and go to Step 504. If it is determined, “the pulse count PC is larger than the limit value (absolute value) PCX of the inversion region”, the process proceeds to step 506.
[0119]
In step 506 transferred from step 504, the load data is updated. The load data is updated by shifting the load data from TLn to TL1 accumulated in the previous routine. Then, the process proceeds from step 506 to step 507, and in step 507, the pinching determination value TLref is calculated. As shown in FIG. 14, the pinching determination value TLref is calculated in advance as a load increase limit value due to pinching to the minimum value TLmin in the load data from TLn to TL1 accumulated in the previous routine. It is obtained by adding the value TLADD (constant). The pinching determination value TLref is used for comparison with the load torque TL0 obtained in step 503. The microcomputer CPU sets the timing of performing the reversal operation when the load torque TL0 becomes larger than the sandwiching determination value TLref. Then, the process returns from step 507 to the first step 500.
[0120]
If the closing switch 3 is switched off while the window glass 60 is moving to the closing side, the upward command signal generated by the closing switch 3 is not taken into the microcomputer CPU. Then, in the determination in step 100 of the main routine, the process proceeds to “step 108 because the stop state is not set”, and in the determination in step 108, the process proceeds to “step 109” because “the manual closed state is set”. In the determination in step 109, the process proceeds to step 110 because “reversal request is not set”, and in the determination in step 110, the process proceeds to step 111, “motor lock is not set”. “Since the closed switch 3 is switched off”, the process proceeds to step 115, “stop state” is set, and the process proceeds to the output routine.
[0121]
As a result of the determination in step 300 of the output routine, the process proceeds to “stop state is set” step 306 and “stop output” is executed. By executing the “stop output”, the first output port P7 of the microcomputer CPU becomes low level and the second output port P8 of the microcomputer CPU becomes low level. The current is not supplied to the second brush terminals 6a and 6b, and the window glass 60 stops when the armature shaft 6c stops normal rotation.
[0122]
When the window glass 60 is stopped, when the closed switch 3 is turned on and the automatic switch 4 is turned on, the rising command signal from the closed switch 3 and the automatic command signal from the automatic switch 4 are received. It is taken into the microcomputer CPU. Then, in the determination in step 100 of the main routine, the process proceeds to step 101 because “stop state is set”, and in the determination in step 101, the process proceeds to step 102 because “inversion request is not set”. In the determination in 102, “because the closed switch 3 is switched on”, the process proceeds to step 104, and in the determination in step 104, “the open switch 2 is not switched on”, the process proceeds to step 106, and “closed state”. ”Is returned to step 100, and the determination in step 100 of the next main routine proceeds to“ because the closed state is set ”, and the process proceeds to step 108. Since it has been set, go to step 109 and in step 109 In the determination of "No reversal request is set", the process proceeds to Step 110. In the determination in Step 110, the process proceeds to "Because the motor lock is not set". In Step 111, the determination is made as "Closed switch". Since 3 is not switched off, the process proceeds to step 112, and in the determination in step 112, "automatic switch 4 is switched on", the process proceeds to step 116 and "automatic closed state" is set and the output routine Migrate to
[0123]
Then, in the determination in step 300 of the output routine, “stopped state is not set”, the process proceeds to step 301, and in the determination in step 301, “manually closed state is not set”, the process proceeds to step 302. In step 302, “the manual open state is not set”, the process proceeds to step 303, and in step 303, “automatically closed state is set”, the process proceeds to step 309 and the continuous closing is performed. Drive output is executed.
[0124]
With the continuous closed drive output, the power supply is connected to the second brush terminal 6b of the motor 6, the first brush terminal 6a of the motor 6 is grounded, and the closed switch 3 is then turned off. Since it continues even after switching, the armature shaft 6c reversely rotates, and the window glass 60 moves to the side that is continuously closed.
[0125]
Then, as shown in FIG. 3, the armature shaft 6c of the motor 6 starts reverse rotation at time T18, so that at time T19, the rotation detection sensor 7 causes the first signal generator 7b to receive the first pulse signal. A is generated, and the second signal generator 7c generates the second pulse signal B with a phase difference of ¼ period from the first pulse signal A.
[0126]
When the first pulse signal A is generated at time T19 and the rising edge of the first pulse signal A is detected, it is determined in step 200 of the pulse edge interrupt routine that “the edge is the first pulse signal A”. Therefore, the process proceeds to "Step 201", and in the determination in Step 201, "Because it is a rising edge", the process proceeds to Step 202, "Clear count value of first timer TAR" is executed, and the process proceeds to Step 203. In step 203, “calculate the speed ω0 from the count value of the first timer TAR” is executed, and the routine proceeds to step 208.
[0127]
Then, in the determination in step 208, “because the edge is the first pulse signal A”, the process proceeds to step 209, and in the determination in step 209, the process proceeds to “because of the rising edge”, step 210. In the determination, “because the second pulse signal B is not at a low level”, the process proceeds to step 213, the pulse count PC is decremented by 1 (−1), and the interrupt process ends.
[0128]
After the time T19, the second pulse signal B falls at a time T21 shown in FIG. 3 in which the rotating body 7a of the rotation detection sensor 7 has rotated 1/4. When the second pulse signal B falls, the determination at step 200 of the interrupt routine proceeds to “because the edge is not the first pulse signal A”, shifts to step 204, and the determination at step 204 indicates “not a rising edge” Therefore, the process proceeds to “Step 207 and“ Clear count value of fourth timer TBF ”is executed” and the process proceeds to Step 203. In Step 203, “speed ω0 is calculated from the count value of fourth timer TBF. "Is executed and the routine goes to Step 208.
[0129]
Then, in the determination in step 208, “because the edge is not the first pulse signal A”, the process proceeds to step 216, and in the determination in step 216, the process proceeds to “because it is not a rising edge”, and the process proceeds to step 218. In the determination, “because the first pulse signal A is not at a low level”, the process proceeds to step 222, the pulse count PC is decremented by 1 (−1), and the interrupt process is terminated.
[0130]
After time T21, the first pulse signal A falls at time T23 shown in FIG. When the first pulse signal A falls, the determination in step 200 of the interrupt routine proceeds to “201 because the edge is the first pulse signal A”, and the determination in step 201 “is a rising edge”. The process proceeds to step 206, where “clearing the count value of the third timer TAF to 0” is executed, and the process proceeds to step 203. In step 203, “calculating the speed ω0 from the count value of the third timer TAF” is performed. The process proceeds to step 208.
[0131]
Then, in the determination in step 208, “the edge is the first pulse signal A” shifts to step 209, and in the determination in step 209, the flow shifts to step 211 “because it is not a rising edge”. In the determination, “because the second pulse signal B is at a low level”, the routine proceeds to step 214, where the pulse count PC is decremented by 1 (−1) and the interrupt processing is terminated.
[0132]
After the time T23, the second pulse signal B rises at a time T25 shown in FIG. 3 in which the rotating body 7a of the rotation detection sensor 7 rotates 3/4. When the second pulse signal B rises, the determination in step 200 of the interrupt routine proceeds to “because the edge is not the first pulse signal A”, and the process proceeds to step 204, and the determination in step 204 indicates “because it is a rising edge”. The process proceeds to step 206 where “clearing the count value of the second timer TBR to 0” is executed and then the process proceeds to step 203. In step 203, “calculating the speed ω0 from the count value of the fourth timer TBF” is performed. The process proceeds to step 208.
[0133]
Then, in the determination in step 208, “the edge is not the first pulse signal A”, the process proceeds to step 216, and in the determination in step 216, the process proceeds to “because of the rising edge”, step 217. In the determination, “because the first pulse signal A is at the low level”, the process proceeds to step 219, where the pulse count PC is decremented by 1 (−1) and the interrupt process is terminated.
[0134]
After time T25, the first pulse signal A rises again at time T27 shown in FIG. 3 in which the rotating body 7a of the rotation detection sensor 7 makes one rotation. When the first pulse signal A rises, the determination at step 200 of the interrupt routine proceeds to “201 because the edge is the first pulse signal A”, and the determination at step 201 indicates “rising edge”. Therefore, "the process proceeds to step 202 and" clears the count value of the first timer TAR to 0 "is executed, and the process proceeds to step 203. In step 203, the speed ω0 is calculated from the count value of the first timer TAR. "Is executed and the routine goes to Step 208.
[0135]
Then, in the determination in step 208, “because the edge is the first pulse signal A”, the process proceeds to step 209, and in the determination in step 209, the process proceeds to “because of the rising edge”, step 210. In the determination, “because the second pulse signal B is not at a low level”, the process proceeds to step 213, the pulse count PC is decremented by 1 (−1), and the interrupt process ends.
[0136]
After time T27, the second pulse signal B falls at time T29 shown in FIG. 3 in which the rotating body 7a of the rotation detection sensor 7 rotates 5/4. When the second pulse signal B falls, the determination at step 200 of the interrupt routine proceeds to “because the edge is not the first pulse signal A”, shifts to step 204, and the determination at step 204 indicates “not a rising edge” Therefore, the process proceeds to “Step 207 and“ Clear count value of fourth timer TBF ”is executed” and the process proceeds to Step 203. In Step 203, “speed ω0 is calculated from the count value of fourth timer TBF. "Is executed and the routine goes to Step 208.
[0137]
Then, in the determination in step 208, “because the edge is not the first pulse signal A”, the process proceeds to step 216, and in the determination in step 216, the process proceeds to “because it is not a rising edge”, and the process proceeds to step 218. In the determination, “because the first pulse signal A is not at a low level”, the process proceeds to step 222, the pulse count PC is decremented by 1 (−1), and the interrupt process is terminated.
[0138]
After the time T29, the first pulse signal A falls at a time T31 shown in FIG. 3 in which the rotating body 7a of the rotation detection sensor 7 rotates 3/2. When the first pulse signal A falls, the determination in step 200 of the interrupt routine proceeds to “201 because the edge is the first pulse signal A”, and the determination in step 201 indicates “not a rising edge”. Therefore, the process proceeds to “Step 205” where “Clear the count value of the third timer TAF” is executed and the process proceeds to Step 203. In Step 203, the speed ω0 is calculated from the count value of the third timer TAF. "Is executed and the routine goes to Step 208.
[0139]
Then, in the determination in step 208, “the edge is the first pulse signal A” shifts to step 209, and in the determination in step 209, the flow shifts to step 211 “because it is not a rising edge”. In the determination, “because the second pulse signal B is at a low level”, the routine proceeds to step 214, where the pulse count PC is decremented by 1 (−1) and the interrupt processing is terminated.
[0140]
After the time T31, the second pulse signal B rises at a time T33 shown in FIG. 3 in which the rotating body 7a of the rotation detection sensor 7 rotates 7/4. When the second pulse signal B rises, the determination in step 200 of the interrupt routine proceeds to “because the edge is not the first pulse signal A”, and the process proceeds to step 204, and the determination in step 204 indicates “not a rising edge”. Therefore, the process proceeds to “Step 207 and“ Clear 0 of the count value of the second timer TBR ”is executed, and the process proceeds to Step 203, and“ STE ”is executed and the process proceeds to Step 208.
[0141]
Then, in the determination in step 208, “the edge is not the first pulse signal A”, the process proceeds to step 216, and in the determination in step 216, the process proceeds to “because of the rising edge”, step 217. In the determination, “because the first pulse signal A is at the low level”, the process proceeds to step 219, where the pulse count PC is decremented by 1 (−1) and the interrupt process is terminated.
[0142]
As described above, the rotation detection sensor 7 generates the first pulse signal A and the second pulse signal B by starting the reverse rotation of the armature shaft 6c and starting the movement to the side where the window glass 60 is closed. Then, the first timer TAR performs a negative count while clearing the count to 0 for each rotation of the rotating body 7a of the rotation detection sensor 7, and shifts to the first timer TAR by a quarter cycle, The timer TBF performs a minus count while clearing the count to zero for each rotation of the rotating body 7a of the rotation detection sensor 7, and the third timer TAF is shifted by a quarter cycle from this fourth timer TBF, and the rotation detection sensor 7 for each rotation of the rotating body 7a, minus count is performed while clearing the count to zero, and the second timer TBF rotates with a shift of 1/4 cycle from the third timer TBR. By performing the negative count while the count for each one rotation of the rotary member 7a of the sensor 7 is cleared to zero out, the microcomputer CPU is indirectly detects the current position of the window glass 60.
[0143]
At this time, when the armature shaft 6c starts reverse rotation and starts moving to the side where the window glass 60 is closed, the load detection routine is simultaneously executed. In the determination in step 500 of the load detection routine, “because the closing operation is set”, the process proceeds to step 501, and in the determination in step 501, “the speed data ω 0 is updated in the pulse edge interruption routine”, step 502. To "Detect the power supply voltage level V0" and go to Step 503. In Step 503, calculate the load torque TL0 from the speed data ω0 and the power supply voltage level V0 and go to Step 504. In the determination, “the pulse count PC is larger than the limit value (absolute value) PCX of the inversion region”, the process proceeds to step 505, and in the determination in step 505, “the load torque TL0 is caught.
Since it is not larger than the determination value TLref, the process proceeds to “Step 506”.
[0144]
In step 506 transferred from step 505, the load data is updated. The load data is updated by shifting the load data from TLn to TL1 accumulated in the previous routine. Then, the process proceeds from step 506 to step 507, and in step 507, the pinching determination value TLref is calculated. As shown in FIG. 14, the pinching determination value TLref is calculated in advance as a load increase limit value due to pinching to the minimum value TLmin in the load data from TLn to TL1 accumulated in the previous routine. It is obtained by adding the value TLADD (constant). The pinching determination value TLref is used for comparison with the load torque TL0 obtained in step 503. The microcomputer CPU sets the timing of performing the reversal operation when the load torque TL0 becomes larger than the sandwiching determination value TLref. Then, the process returns from step 507 to the first step 500.
[0145]
Then, when the window glass 60 is moving toward the closing side, if pinching occurs in the reversal area, it is determined in step 500 of the load detection routine that “the closing operation is set” and the process proceeds to step 501. As a result of the determination in step 501, “Since the speed data ω0 has been updated in the pulse edge interrupt routine”, the process proceeds to step 502, “detects the power supply voltage level V0”, and the process proceeds to step 503. In step 503, the speed data The load torque TL0 is calculated based on ω0 and the power supply voltage level V0, and the process proceeds to step 504. In the determination in step 504, “because the pulse count PC is larger than the limit value (absolute value) PCX of the inversion region” Transition.
[0146]
In the determination in step 505 transferred from step 504, “the load torque TL0 is larger than the pinching determination value TLref due to the pinching”, the flow shifts to step 510 and “set reverse request” is executed and the flow shifts to the main routine. To do.
[0147]
In the determination in step 100 of the main routine, the process proceeds to “step 108 because the stop state is not set”, and in the determination in step 108, the process proceeds to step 117 “because the manual closed state is not set”. In the determination in step 124, “the manual open state is not set”, the process proceeds to step 124. In the determination in step 124, “the automatic close state is set”, the process proceeds to step 125, and in step 125, the determination is made. “Because the reversal request is set”, the process proceeds to step 128, “stop state” is set, and the process proceeds to the output routine.
[0148]
In the determination in step 300 of the output routine, “Since the stop state is set”, the process proceeds to step 306, “stop output” is executed, and the process proceeds to the main routine. By executing the “stop output”, the first output port P7 of the microcomputer CPU becomes low level and the second output port P8 of the microcomputer CPU becomes low level. The current is not supplied to the second brush terminals 6a, 6b, the armature shaft 6c rotates forward, and the determination in step 100 of the main routine proceeds to step 101 because “stop state is set”. In the determination in step 101, “inversion request is set”, the process proceeds to step 105, “inversion state is set”, and the process proceeds to the output routine.
[0149]
The determination in step 300 of the output routine proceeds to “step 301 because the stop state is not set”, and the process proceeds to step 302 in the determination in step 301 because “the manual closed state is not set”. If the manual open state is not set, the process proceeds to step 303. If the determination in step 303 is "Automatic closed state is not set", the process proceeds to step 304, and the determination in step 304 is performed. “Since the automatic open state is not set”, the process proceeds to step 305, and in the determination in step 305, “reversed state is set”, the process proceeds to step 311 and “open drive output” is executed.
[0150]
When the “open drive output” is executed, the first output port P7 of the microcomputer CPU becomes high level, the second output port P8 of the microcomputer CPU becomes low level, and the second output port of the motor 6 becomes low. Since the potential of the power supply is applied to the first brush terminal 6a of the motor 6 while the brush terminal 6b is grounded, the window glass 60 is reversely moved to the opening side when the armature shaft 6c of the motor 6 rotates forward. The
[0151]
When the armature shaft 6c starts to rotate forward and reversely moves to the side where the window glass 60 opens, the armature shaft 6c of the motor 6 starts to rotate forward from time T1, as shown in FIG. The first pulse signal A is generated from the first signal generator 7b, and the second pulse signal B is generated from the second signal generator 7c with a ¼ period shifted from the first pulse signal A.
[0152]
When the first pulse signal A is generated at time T2 and the rising edge of the first pulse signal A is detected, it is determined in step 200 of the pulse edge interrupt routine that “the edge is the first pulse signal A”. Therefore, the process proceeds to “Step 201”, and in the determination in Step 201, “Because it is a rising edge”, the process proceeds to Step 202 and “Clear count value of first timer TAR” is executed, and the process proceeds to Step 203. In step 203, “calculate the speed ω0 from the count value of the first timer TAR” is executed, and the routine proceeds to step 208.
[0153]
Then, in the determination in step 208, “because the edge is the first pulse signal A”, the process proceeds to step 209, and in the determination in step 209, the process proceeds to “because of the rising edge”, step 210. In the determination, “because the second pulse signal B is at a low level”, the routine proceeds to step 212, where the pulse count PC is incremented by 1 (+1), and the interrupt processing is terminated.
[0154]
After the time T2, the second pulse signal A rises at a time T4 shown in FIG. 2 in which the rotating body 7a of the rotation detection sensor 7 has rotated 1/4. When the second pulse signal B rises, the determination in step 200 of the interrupt routine proceeds to “because the edge is not the first pulse signal A”, and the process proceeds to step 204, and the determination in step 204 indicates “rising edge”. Therefore, the process proceeds to step 206 and “clears the count value of the second timer TBR to 0” is executed, and the process proceeds to step 203. In step 203, the speed ω0 is calculated from the count value of the second timer TBR. "Is executed and the routine goes to Step 208.
[0155]
Then, in the determination in step 208, “the edge is not the first pulse signal A”, the process proceeds to step 216, and in the determination in step 216, the process proceeds to “because of the rising edge”, step 217. In the determination, “because the first pulse signal A is not at a low level”, the process proceeds to step 220, the pulse count PC is incremented by 1 (+1), and the interrupt process is terminated.
[0156]
After time T4, the first pulse signal A falls at time T6 shown in FIG. When the first pulse signal A falls, the determination in step 200 of the interrupt routine proceeds to “201 because the edge is the first pulse signal A”, and the determination in step 201 indicates “not a rising edge”. Therefore, the process proceeds to “Step 205” where “clearing the count value of the third timer TAF to 0” is executed, and the process proceeds to Step 203. In Step 203, the speed ω0 is calculated from the count value of the third timer TAF. "Is executed and the routine goes to Step 208.
[0157]
Then, in the determination in step 208, “the edge is the first pulse signal A” shifts to step 209, and in the determination in step 209, the flow shifts to step 211 “because it is not a rising edge”. In the determination, “because the second pulse signal B is not at a low level”, the process proceeds to step 215, the pulse count PC is incremented by 1 (+1), and the interrupt process is terminated.
[0158]
After time T6, the second pulse signal B falls at time T8 shown in FIG. 2 in which the rotating body 7a of the rotation detecting sensor 7 has rotated 3/4. When the second pulse signal B falls, the determination at step 200 of the interrupt routine proceeds to “because the edge is not the first pulse signal A”, shifts to step 204, and the determination at step 204 indicates “not a rising edge” Therefore, the process proceeds to “Step 207” where “Clear the count value of the fourth timer TBF” is executed and the process proceeds to Step 203. In Step 203, “the speed ω0 is calculated from the count value of the fourth timer TBF. "Is executed and the routine goes to Step 208.
[0159]
Then, in the determination in step 208, “because the edge is not the first pulse signal A”, the process proceeds to step 216, and in the determination in step 216, the process proceeds to “because it is not a rising edge”, and the process proceeds to step 218. The discrimination PC is incremented by 1 (+1) and the interrupt process is terminated.
[0160]
After time T8, the rotating body 7a of the rotation detection sensor 7 completes one rotation at time T10 shown in FIG. 2 and enters the second rotation, so that the first pulse signal A rises again. When the first pulse signal A rises, the determination at step 200 of the interrupt routine proceeds to “201 because the edge is the first pulse signal A”, and the determination at step 201 indicates “rising edge”. Therefore, "the process proceeds to step 202 and" clears the count value of the first timer TAR to 0 "is executed, and the process proceeds to step 203. In step 203, the speed ω0 is calculated from the count value of the first timer TAR. "Is executed and the routine goes to Step 208.
[0161]
Then, in the determination in step 208, “because the edge is the first pulse signal A”, the process proceeds to step 209, and in the determination in step 209, the process proceeds to “because of the rising edge”, step 210. In the determination, “because the second pulse signal B is at a low level”, the routine proceeds to step 212, where the pulse count PC is incremented by 1 (+1), and the interrupt processing is terminated.
[0162]
After time T10, the second pulse signal B rises again at time T12 shown in FIG. 2 in which the rotating body 7a of the rotation detection sensor 7 rotates 5/4. When the second pulse signal B rises, the determination in step 200 of the interruption routine proceeds to “because the edge is not the first pulse signal A”, and the process proceeds to step 204, and the determination in step 204 indicates “rising edge”. Therefore, the process proceeds to "Step 206" and "Clear 0 of the count value of the second timer TBR" is executed, and the process proceeds to Step 203. In Step 203, the speed ω0 is calculated from the count value of the second timer TBR. "Is executed and the routine goes to Step 208.
[0163]
Then, in the determination in step 208, “the edge is not the first pulse signal A”, the process proceeds to step 216, and in the determination in step 216, the process proceeds to “because of the rising edge”, step 217. In the determination, “because the first pulse signal A is not at a low level”, the process proceeds to step 220, the pulse count PC is incremented by 1 (+1), and the interrupt process is terminated.
[0164]
After time T12, the first pulse signal A falls at time T14 shown in FIG. 2 in which the rotating body 7a of the rotation detection sensor 7 has rotated 3/2. When the first pulse signal A falls, the determination in step 200 of the interrupt routine proceeds to “201 because the edge is the first pulse signal A”, and the determination in step 201 indicates “not a rising edge”. Therefore, the process proceeds to “Step 205” where “Clear the count value of the third timer TAF” is executed and the process proceeds to Step 203. In Step 203, the speed ω0 is calculated from the count value of the third timer TAF. "Is executed and the routine goes to Step 208.
[0165]
Then, in the determination in step 208, “the edge is the first pulse signal A” shifts to step 209, and in the determination in step 209, the flow shifts to step 211 “because it is not a rising edge”. In the determination, “because the second pulse signal B is not at a low level”, the process proceeds to step 215, the pulse count PC is incremented by 1 (+1), and the interrupt process is terminated.
[0166]
After the time T14, the second pulse signal B falls at a time T16 shown in FIG. 2 in which the rotator 7a of the rotation detection sensor 7 rotates 7/4. When the second pulse signal B falls, the determination at step 200 of the interrupt routine proceeds to “because the edge is not the first pulse signal A”, shifts to step 204, and the determination at step 204 indicates “not a rising edge” Therefore, the process proceeds to “Step 207 and“ Clear count value of fourth timer TBF ”is executed” and the process proceeds to Step 203. In Step 203, “speed ω0 is calculated from the count value of fourth timer TBF. "Is executed and the routine goes to Step 208.
[0167]
Then, in the determination in step 208, “because the edge is not the first pulse signal A”, the process proceeds to step 216, and in the determination in step 216, the process proceeds to “because it is not a rising edge”, and the process proceeds to step 218. In the determination, “because the first pulse signal A is at a low level”, the process proceeds to step 221 where the pulse count PC is incremented by 1 (+1) and the interrupt process is terminated.
[0168]
As described above, when the rotation detection sensor 7 generates the first pulse signal A and the second pulse signal B by starting the forward rotation of the armature shaft 6c and starting to move the window glass 60 to the opening side. The first timer TAR performs a positive count while clearing the count to zero for each rotation of the rotating body 7a of the rotation detection sensor 7, and is shifted by a quarter cycle from the first timer TAR, and the second timer TBR Performs a positive count while clearing the count to zero for each rotation of the rotating body 7a of the rotation detection sensor 7, and the third timer TAF is shifted from the first timer TBR by a quarter period. A positive count is performed while clearing the count to zero for each rotation of the rotating body 7a, and the fourth timer TBF is shifted by a quarter period from the third timer TBR. By performing the plus count while the count is cleared to zero 7 per one rotation of the rotary member 7a of the microcomputer CPU is indirectly detects the current position of the window glass 60.
[0169]
When the armature shaft 6c starts to rotate forward, the process proceeds to “Because the stop state is not set” in step 100 of the main routine, and proceeds to step 108. In the determination in step 108, “manually closed state is not set. Therefore, the process proceeds to “step 117,” and in the determination in step 117, “the manual open state is not set”, the process proceeds to step 124, and in the determination in step 124, “the automatic close state is not set”, step 131. In step 131, “automatic open state is not set”, the process proceeds to step 136. In step 136, “inverted state is set”, the process proceeds to step 137. At 137, “Motor lock is Since Tsu not bets "proceeds to step 138, a determination is in step 138 is performed. The determination in step 138 is a determination step in which the window glass 60 is stopped when the window glass 60 is lowered to a predetermined position. At the beginning of the reversal, it is determined in step 138 that “the pulse count PC does not exceed the predetermined reversal stop count PCre”, the process returns to step 100 and the main routine is repeated, and the window glass 60 is predetermined. When the pulse count PC has exceeded the predetermined reverse stop count PCre as a result of descending to the position, the routine proceeds from step 138 to step 140 to set “stop state” and the routine proceeds to the output routine.
[0170]
As a result of determination in step 300 of the output routine, “stop state is set”, the process proceeds to step 306 and “stop output” is executed. By executing the “stop output”, the first output port P7 of the microcomputer CPU becomes low level and the second output port P8 of the microcomputer CPU becomes low level. The current is not supplied to the second brush terminals 6a and 6b, and the window glass 60 stops when the armature shaft 6c of the motor 6 stops rotating forward.
[0171]
Further, when the armature shaft 6c starts reversal in the forward rotation due to the pinching occurring near the fully open position of the window glass 60, the window glass 60 before the pulse count PC exceeds the predetermined reversal stop count PCre. Has reached the fully open position and is prevented from moving, the determination in step 500 of the load detection routine proceeds to “because the closing operation is not set”, and the process proceeds to step 508, and in the determination in step 508 “pulse edge interrupt” Since the speed ω0 calculated in the routine is smaller than the predetermined minimum value ωmin, the process proceeds to “Step 509 to set“ motor lock detection ”and the main routine is executed.
[0172]
Then, in the determination in step 136 of the main routine, the process proceeds to step 137 because “inverted state is set”, and in the determination in step 137, the process proceeds to “139 because motor lock detection is set”. The output routine is executed with “Stop” set.
[0173]
In the determination in step 300 of the output routine, “Since the stop state is set”, the process proceeds to step 306, “stop output” is executed, and the process proceeds to the main routine. By executing the “stop output”, the first output port P7 of the microcomputer CPU becomes low level and the second output port P8 of the microcomputer CPU becomes low level. The second brush terminals 6a and 6b are no longer supplied with current, and the armature shaft 6c stops rotating in the forward direction, whereby the window glass 60 stops at the fully open position.
[0174]
As described above, when the armature shaft 6c starts reverse rotation and starts moving to the side where the window glass 60 opens, the rotation detection sensor 7 outputs the first pulse signal A and the second pulse signal B. When this occurs, the first timer TAR performs a positive count while clearing the count to zero for each rotation of the rotating body 7a of the rotation detection sensor 7, and shifts by a quarter cycle from the first timer TAR. The timer TBR performs a positive count while clearing the count to zero for each rotation of the rotating body 7a of the rotation detection sensor 7, and the third timer TAF is shifted by a quarter period from the first timer TBR. 7 for each rotation of the rotating body 7a, plus counting is performed while the count is cleared to 0, and the fourth timer TBF is detected by detecting the rotation of the third timer TBR by a quarter cycle. By performing the plus count while the count for each one rotation of the rotary member 7a of the sensor 7 is cleared to 0, the microcomputer CPU is indirectly detects the current position of the window glass 60.
[0175]
15 to 17 show a second embodiment of the power window control device according to the present invention.
[0176]
In this case, a pair of N poles and a pair of S poles are opposed to the rotating body 7a of the rotation detection sensor 7. Therefore, the rotation detection sensor 7 is shifted by 1/8 cycle from the first pulse signal A generated by the first signal generator 7b by the rotation of the rotating body 7a, and the second signal generator 7c. To generate a second pulse signal B.
[0177]
As shown in FIG. 17, the microcomputer CPU includes a first timer TAR1, a second timer TBR1, a third timer TAF1, a fourth timer TBF1, a fifth timer TAR2, and a sixth timer. A TBR2, a seventh timer TAF2, and an eighth timer TBF2 are incorporated therein, and the other parts are the same as those in the first embodiment.
[0178]
Also in this case, the rotation detection sensor 7 generates the first pulse signal A and the second pulse signal B by starting the forward rotation of the armature shaft 6c and starting to move the window glass 60 to the opening side. Then, the first timer TAR1 performs a positive count while clearing the count to zero for each rotation of the rotating body 7a of the rotation detection sensor 7, and shifts to the first timer TAR1 by 1/8 cycle, and the second timer The TBR1 performs a positive count while clearing the count to zero for each rotation of the rotating body 7a of the rotation detection sensor 7. The third timer TAF1 is shifted by 1/8 cycle from the first timer TBR1. A positive count is performed while clearing the count to zero for each rotation of the rotating body 7a of the rotating body 7a, and the fourth timer TB is shifted by 1/8 cycle from the third timer TBR1. 1 is incremented while clearing the count to 0 for each rotation of the rotating body 7a of the rotation detection sensor 7, and the fifth timer TAR2 is shifted by 1/8 cycle from the fourth timer TBF1. The positive count is performed while clearing the count to zero for each rotation of the rotating body 7a, and the sixth timer TBR2 is shifted to the fifth timer TAR2 by 1/8 period, and the sixth timer TBR2 A positive count is performed while clearing the count to 0 every rotation, and the sixth timer TBR2 is shifted by 1/8 cycle, and the seventh timer TAF2 counts to 0 for each rotation of the rotating body 7a of the rotation detection sensor 7. While clearing, a positive count is performed, and the seventh timer TBR2 deviates by 1/8 cycle, and the eighth timer TBF2 counts every rotation of the rotating body 7a of the rotation detection sensor 7. By performing the positive counts while the door is cleared to zero, the microcomputer CPU is indirectly detects the current position of the window glass 60.
[0179]
【The invention's effect】
As described above, according to the power window control device according to claim 1 of the present invention, the rotation detection sensor isWhen the rotating body rotates and comes to a predetermined position from the boundary line between the north and south poles of the magnet with respect to the signal generator,The signal generator generates a pulse signal according to a threshold value for the magnetic flux density of the magnet. Therefore,Because the measurement at the same point on the circumference of the rotating body is performed,Even if the magnet of the rotating body has a variation in magnetization,The cycle of the pulse signal will not be out of order,In addition, even if the magnet of the rotation detection sensor has a small outer diameter, there is an excellent effect that fine rotation speed data can be obtained.
[0180]
Claims of the invention2In the power window control apparatus according to the first, second, third, and second microcomputers, each of which has a phase difference of ¼ period and generates a pulse signal for each rotation of the rotating body. The rotation speed of the armature shaft is detected by performing a pulse period calculation process using the timer value 4 and the free running counter value. Therefore,Effect of claim 1In addition, the microcomputer has an excellent effect that only four timers are required.
[0181]
Claims of the invention3In the power window control apparatus according to the first, second, third, and second microcomputers, each of which has a phase difference of 1/8 period and generates a pulse signal for each rotation of the rotating body. 4, 5th, 6th, 7th, 8th timer value and free running counter valueBy performing the calculation process, the rotation speed of the armature shaft is detected.Therefore,Effect of claim 1In addition, the microcomputer has an excellent effect that only eight timers are required.
[Brief description of the drawings]
FIG. 1 is a block diagram of a first embodiment of a power window control device according to the present invention.
FIG. 2 is a timing chart for explaining the operation of the power window control device shown in FIG. 1;
FIG. 3 is a timing chart for explaining the operation of the power window control device shown in FIG. 1;
4 is an explanatory diagram of a pulse count calculation process in the power window control device shown in FIG. 1. FIG.
FIG. 5 is a flowchart of timer interruption in the power window control device shown in FIG. 1;
6 is an explanatory diagram of an operation direction detection process using pulses in the power window control device shown in FIG. 1; FIG.
FIG. 7 is a flowchart of a main routine used for control operation of the power window control device shown in FIG. 1;
FIG. 8 is a flowchart of a main routine used for a control operation of the power window control device shown in FIG.
9 is a flowchart of a main routine used for a control operation of the power window control device shown in FIG.
FIG. 10 is a flowchart of an output routine used for control operation of the power window control device shown in FIG. 1;
FIG. 11 is a flowchart of a pulse edge interrupt routine used for the control operation of the power window control device shown in FIG. 1;
12 is a flowchart of a pulse edge interrupt routine used for the control operation of the power window control device shown in FIG.
FIG. 13 is a flowchart of a load detection routine used for control operation of the power window control device shown in FIG. 1;
14 is an explanatory diagram of a load detection process of the power window control device shown in FIG. 1. FIG.
FIG. 15 is a timing chart for explaining the operation of the second embodiment of the power window control apparatus according to the present invention;
16 is a timing chart for explaining the operation of the power window control device shown in FIG. 15;
17 is a timing chart for explaining a control operation of a timer of the power window control device shown in FIG.
[Explanation of symbols]
1 Power window control device
2 Open switch
3 Close switch
4 Automatic switch
6 Motor
6c Armature shaft
7 Rotation detection sensor
7a Rotating body
7b (Signal generator) First signal generator
7c (Signal generator) Second signal generator
20 Control unit
24 Drive circuit
50 power supply
60 wind glass
CPU microcomputer
FRC free running counter
TAR first timer
TBR second timer
TAF third timer
TBF 4th timer

Claims (3)

N極およびS極が対向配置されたマグネットをもち、モータのアーマチュアシャフトに結合されて該アーマチュアシャフトとともに回転する回転体と、該回転体のまわりに回転体に非接触で配置されていて前記マグネットのN極およびS極の境界線から予め定められた角度まで前記回転体が回転した位置での磁束密度に対するしきい値をもち、該しきい値によりパルス信号を発生する信号発生器を備えた回転検出センサと、オン切換えされることにより下降指令信号を発生する開スイッチと、オン切換えされることにより上昇指令信号を発生する閉スイッチと、オン切換えされることにより連続指令信号を発生する自動スイッチと、ウインドガラスに結合され、通電により該ウインドガラスを開側に駆動する一方、通電により該ウインドガラスを閉側に駆動するアーマチュアシャフトをもつモータと、上記モータに電気的に接続された駆動回路と、電源に接続されているとともに上記駆動回路に電気的に接続され、上記開スイッチの下降指令信号、上記閉スイッチの上昇指令信号、上記自動スイッチの連続指令信号により該電源の電流を駆動回路に与えるとともに、上記回転体が回転したときに回転検出センサが発生したパルス信号のエッジから、上記回転体が一回転したときに回転検出センサが発生したパルス信号のエッジまでの時間に基づき上記アーマチュアシャフトの回転速度を検出して上記ウインドガラスの動作制御を行うマイクロコンピュータをもつ制御ユニットを備えていることを特徴とするパワーウインド制御装置。Has N poles and S poles magnet arranged opposite said be arranged a rotating body that rotates together with the armature shaft being coupled to the motor armature shaft, in a non-contact to the rotating body around the rotating body magnet And a signal generator for generating a pulse signal based on the threshold value with respect to a magnetic flux density at a position where the rotating body has rotated from a boundary line between the N pole and the S pole to a predetermined angle . A rotation detection sensor, an open switch that generates a down command signal when switched on, a closed switch that generates a lift command signal when switched on, and an automatic that generates a continuous command signal when switched on A switch is coupled to the window glass and drives the window glass to the open side when energized, while the window glass is energized when energized. A motor having an armature shaft for driving the motor to a closed side, a drive circuit electrically connected to the motor, a power source and a motor connected to the drive circuit, and a lowering command signal for the open switch In addition, the current of the power source is supplied to the drive circuit by the up command signal of the closed switch and the continuous command signal of the automatic switch, and the rotation is detected from the edge of the pulse signal generated by the rotation detection sensor when the rotating body rotates. A control unit having a microcomputer for controlling the operation of the window glass by detecting the rotation speed of the armature shaft based on the time to the edge of the pulse signal generated by the rotation detection sensor when the body makes one rotation. A power window control device characterized by that. マグネットには、単一のN極および単一のS極の2極が対向配置され、回転検出センサには、第1のパルス信号を発生する第1の信号発生器と、この第1の信号発生器に対し予め定められた角度を介して配置されて第2のパルス信号を発生する第2の信号発生器とが備えられており、制御ユニットのマイクロコンピュータには、時間の経過によりカウントアップするフリーランニングカウンタと、回転検出センサの第1の信号発生器が発生した第1のパルス信号の立上りエッジから、その後に回転体が一回転したときに該第1の信号発生器が発生した第1のパルス信号の立上りエッジまでの時間を回転体の回転毎に計測する第1のタイマと、回転検出センサの第2の信号発生器が発生した第2のパルス信号の立上りエッジから、その後に回転体が一回転したときに該第2の信号発生器が発生した第2のパルス信号の立上りエッジまでの時間を回転体の回転毎に計測する第2のタイマと、回転検出センサの第1の信号発生器が発生した第1のパルス信号の立下りエッジから、その後に回転体が一回転したときに該第1の信号発生器が発生した第1のパルス信号の立下りエッジまでの時間を回転体の回転毎に計測する第3のタイマと、回転検出センサの第2の信号発生器が発生した第2のパルス信号の立下りエッジから、その後に回転体が一回転したときに該第2の信号発生器が発生した第2のパルス信号の立下りエッジまでの時間を回転体の回転毎に計測する第4のタイマを備え、制御ユニットのマイクロコンピュータは、上記フリーランニングカウンタの値と、上記第1、第2、第3、第4のタイマの値とによりパルス周期の算出処理を行うことを特徴とする請求項1に記載のパワーウインド制御装置。The magnet has two poles, a single N pole and a single S pole, facing each other, and the rotation detection sensor has a first signal generator for generating a first pulse signal, and the first signal. And a second signal generator for generating a second pulse signal arranged at a predetermined angle with respect to the generator, and the microcomputer of the control unit counts up over time And a first signal generator generated by the first signal generator when the rotating body makes one revolution after the rising edge of the first pulse signal generated by the first signal generator of the rotation detecting sensor and the rotation detection sensor. From the rising edge of the second pulse signal generated by the first timer that measures the time until the rising edge of one pulse signal for each rotation of the rotating body and the second signal generator of the rotation detection sensor, rotation A second timer for measuring the time until the rising edge of the second pulse signal generated by the second signal generator for each rotation of the rotating body, and the first signal of the rotation detection sensor The time from the falling edge of the first pulse signal generated by the generator to the falling edge of the first pulse signal generated by the first signal generator when the rotating body makes one revolution after that is rotated. From the falling edge of the second pulse signal generated by the third timer that measures every rotation of the body and the second signal generator of the rotation detection sensor, the second timer A fourth timer for measuring the time until the falling edge of the second pulse signal generated by the signal generator for each rotation of the rotating body, the microcomputer of the control unit includes the value of the free running counter, First, second, second , Power window control apparatus according to claim 1, which comprises carrying out a process for calculating a pulse period by a value of the fourth timer. マグネットには、一対のN極および一対のS極の4極が対向配置され、回転検出センサには、第1のパルス信号を発生する第1の信号発生器と、この第1の信号発生器に対し予め定められた角度を介して配置されて第2のパルス信号を発生する第2の信号発生器とが備えられており、制御ユニットのマイクロコンピュータには、時間の経過によりカウントアップするフリーランニングカウンタと、回転検出センサの第1の信号発生器が発生した第1のパルス信号の立上りエッジから、その後に回転体が一回転したときに該第1の信号発生器が発生した第1のパルス信号の立上りエッジまでの時間を回転体の回転毎に計測する第1のタイマと、回転検出センサの第2の信号発生器が発生した第2のパルス信号の立上りエッジから、その後に回転体が一回転したときに該第2の信号発生器が発生した第2のパルス信号の立上りエッジまでの時間を回転体の回転毎に計測する第2のタイマと、上記第1のタイマに1/4周期隔て、回転検出センサの第1の信号発生器が発生した第1のパルス信号の立下りエッジから、その後に回転体が一回転したときに該第1の信号発生器が発生した第1のパルス信号の立下りエッジまでの時間を回転体の回転毎に計測する第3のタイマと、上記第2のタイマに1/4周期隔て、回転検出センサの第2の信号発生器が発生した第2のパルス信号の立下りエッジから、その後に回転体が一回転したときに該第2の信号発生器が発生した第2のパルス信号の立下りエッジまでの時間を回転体の回転毎に計測する第4のタイマと、上記第3のタイマに1/4周期隔て、回転検出センサの第1の信号発生器が発生した第1のパルス信号の立上りエッジから、その後に回転体が一回転したときに該第1の信号発生器が発生した第1のパルス信号の立上りエッジまでの時間を回転体の回転毎に計測する第5のタイマと、上記第4のタイマに1/4周期隔て、回転検出センサの第2の信号発生器が発生した第2のパルス信号の立上りエッジから、その後に回転体が一回転したときに該第2の信号発生器が発生した第2のパルス信号の立上りエッジまでの時間を回転体の回転毎に計測する第6のタイマと、上記第5のタイマに1/4周期隔て、回転検出センサの第1の信号発生器が発生した第1のパルス信号の立下りエッジから、その後に回転体が一回転したときに該第1の信号発生器が発生した第1のパルス信号の立下りエッジまでの時間を回転体の回転毎に計測する第7のタイマと、上記第6のタイマに1/4周期隔て、回転検出センサの第2の信号発生器が発生した第2のパルス信号の立下りエッジから、その後に回転体が一回転したときに該第2の信号発生器が発生した第2のパルス信号の立下りエッジまでの時間を回転体の回転毎に計測する第8のタイマとを備え、制御ユニットのマイクロコンピュータは、上記フリーランニングカウンタの値と、上記第1、第2、第3、第4、第5、第6、第7、第8のタイマの値とによりパルス周期の算出処理を行うことを特徴とする請求項1に記載のパワーウインド制御装置。The magnet has a pair of N poles and a pair of S poles, and the rotation detection sensor includes a first signal generator that generates a first pulse signal, and the first signal generator. And a second signal generator for generating a second pulse signal arranged at a predetermined angle, and the microcomputer of the control unit is free to count up over time. From the rising edge of the first pulse signal generated by the running counter and the first signal generator of the rotation detection sensor, the first signal generator generated by the first signal generator when the rotating body makes one revolution thereafter. The first timer that measures the time until the rising edge of the pulse signal for each rotation of the rotating body and the rising edge of the second pulse signal generated by the second signal generator of the rotation detection sensor are rotated thereafter. A second timer for measuring the time until the rising edge of the second pulse signal generated by the second signal generator for each rotation of the rotating body, and 1 / The first signal generator generated by the first signal generator when the rotating body makes one revolution after the falling edge of the first pulse signal generated by the first signal generator of the rotation detection sensor at intervals of four cycles. A third timer for measuring the time until the falling edge of the pulse signal for each rotation of the rotating body, and the second signal generator of the rotation detection sensor generated by a quarter period apart from the second timer. The time from the falling edge of the second pulse signal to the falling edge of the second pulse signal generated by the second signal generator when the rotating body makes one rotation thereafter is determined for each rotation of the rotating body. The fourth timer to measure and the third timer to 1/4 cycle Then, from the rising edge of the first pulse signal generated by the first signal generator of the rotation detection sensor, the first pulse signal generated by the first signal generator when the rotating body makes one revolution after that. And a second pulse generated by the second signal generator of the rotation detection sensor at intervals of ¼ period between the fifth timer and the fourth timer. A sixth timer for measuring the time from the rising edge of the signal to the rising edge of the second pulse signal generated by the second signal generator when the rotating body makes one rotation thereafter, for each rotation of the rotating body And when the rotating body makes one rotation after the falling edge of the first pulse signal generated by the first signal generator of the rotation detection sensor, with a quarter cycle interval from the fifth timer. First pulse signal generated by one signal generator The second timer generated by the second signal generator of the rotation detection sensor is separated by a quarter period from the seventh timer that measures the time until the falling edge of each time the rotor rotates. The time from the falling edge of the pulse signal to the falling edge of the second pulse signal generated by the second signal generator when the rotating body makes one rotation thereafter is measured for each rotation of the rotating body. The timer of the control unit includes the value of the free running counter and the values of the first, second, third, fourth, fifth, sixth, seventh, and eighth timers. The power window control device according to claim 1, wherein a pulse cycle calculation process is performed.
JP27481397A 1997-10-07 1997-10-07 Power window control device Expired - Fee Related JP3727763B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP27481397A JP3727763B2 (en) 1997-10-07 1997-10-07 Power window control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP27481397A JP3727763B2 (en) 1997-10-07 1997-10-07 Power window control device

Publications (2)

Publication Number Publication Date
JPH11107624A JPH11107624A (en) 1999-04-20
JP3727763B2 true JP3727763B2 (en) 2005-12-14

Family

ID=17546930

Family Applications (1)

Application Number Title Priority Date Filing Date
JP27481397A Expired - Fee Related JP3727763B2 (en) 1997-10-07 1997-10-07 Power window control device

Country Status (1)

Country Link
JP (1) JP3727763B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009147778A (en) * 2007-12-17 2009-07-02 Mabuchi Motor Co Ltd Pulse signal generating apparatus, rotating machine, controller, and power window controller
JP4964112B2 (en) * 2007-12-19 2012-06-27 マブチモーター株式会社 Motor characteristic acquisition device

Also Published As

Publication number Publication date
JPH11107624A (en) 1999-04-20

Similar Documents

Publication Publication Date Title
US6426604B1 (en) Power window controlling device
US8358093B1 (en) Sample and hold time stamp for sensing zero crossing of back elecromotive force in 3-phase brushless DC motors
JP3730795B2 (en) Power window device pinching detection method
JP4595155B2 (en) Opening / closing control device for opening covering material
US20040070356A1 (en) Digital adaptive sensorless commutational drive controller for a brushless DC motor
JP3727763B2 (en) Power window control device
JP2002544498A (en) Method and apparatus for incrementally detecting a rotational reversal of a rotary drive that starts after a preceding rotational direction switch
JP4596079B2 (en) Opening / closing control device for opening covering material
JP2010188997A (en) Opening/closing control device for opening covering material
JPS63165682A (en) Switchgear for window glass
KR100291269B1 (en) Apparatus and method for determining the commutation time of a sensorless BID motor
JP2942127B2 (en) Power window drive control device
CN111827167B (en) Pedestrian passageway gate wing structure self-oscillation judging method and pedestrian passageway gate machine
JP2001349136A (en) Power window apparatus
JP4652610B2 (en) Step motor rotation control device
JP3828715B2 (en) Power window control device
JPH07158338A (en) Opening and closing control method for opening and closing body
JP3787186B2 (en) Method for detecting pinching of opening / closing mechanism for vehicle window
JP3841586B2 (en) Power window control device
JP2000320246A (en) Power window controller
CN217812856U (en) Stroke control device based on infrared geminate transistors
JPH01122388A (en) Sensorless brushless motor
JP2954469B2 (en) Opening / closing body opening / closing control method
JPH10109534A (en) Catch detector by dc motor
JP3826512B2 (en) Motor driver and motor device

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20040811

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040907

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20041027

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: 20050906

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050929

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081007

Year of fee payment: 3

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081007

Year of fee payment: 3

R371 Transfer withdrawn

Free format text: JAPANESE INTERMEDIATE CODE: R371

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081007

Year of fee payment: 3

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081007

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081007

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091007

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees