JP2996832B2 - Microcomputer for PWM waveform control - Google Patents
Microcomputer for PWM waveform controlInfo
- Publication number
- JP2996832B2 JP2996832B2 JP5121229A JP12122993A JP2996832B2 JP 2996832 B2 JP2996832 B2 JP 2996832B2 JP 5121229 A JP5121229 A JP 5121229A JP 12122993 A JP12122993 A JP 12122993A JP 2996832 B2 JP2996832 B2 JP 2996832B2
- Authority
- JP
- Japan
- Prior art keywords
- signal
- period
- circuit
- pwm waveform
- microcomputer
- 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
Links
- 238000012544 monitoring process Methods 0.000 claims description 26
- 230000002159 abnormal effect Effects 0.000 claims description 10
- 230000005856 abnormality Effects 0.000 description 39
- 238000001514 detection method Methods 0.000 description 38
- 238000004804 winding Methods 0.000 description 9
- 238000010586 diagram Methods 0.000 description 7
- 230000002411 adverse Effects 0.000 description 2
- 230000003111 delayed effect Effects 0.000 description 2
- 238000012806 monitoring device Methods 0.000 description 2
- 238000009825 accumulation Methods 0.000 description 1
Landscapes
- Control Of Ac Motors In General (AREA)
- Inverter Devices (AREA)
Description
【0001】[0001]
【産業上の利用分野】この発明は、PWM波形信号の出
力機能を有するマイクロコンピュータに関し、特に、三
相交流モータをPWM波形信号によってインバータ制御
するPWM波形制御用マイクロコンピュータに関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microcomputer having a function of outputting a PWM waveform signal, and more particularly to a microcomputer for controlling a three-phase AC motor by a PWM waveform signal.
【0002】[0002]
【従来の技術】コンプレッサ等を駆動する三相交流モー
タの回転数をワンチップのマイクロコンピュータによっ
てインバータ制御するものがある。この用途に用いられ
るマイクロコンピュータは、システムの動作制御機能を
有するCPUとインバータ制御のためのPWM波形信号
を発生する回路とを備えている。PWM波形信号を発生
する回路は、パルス幅を設定するディジタル回路部とP
WM波形信号を形成出力するアナログ回路部とからなっ
ている。2. Description of the Related Art There is a type in which the rotation speed of a three-phase AC motor for driving a compressor or the like is inverter-controlled by a one-chip microcomputer. A microcomputer used for this purpose includes a CPU having a system operation control function and a circuit for generating a PWM waveform signal for controlling an inverter. A circuit for generating a PWM waveform signal includes a digital circuit unit for setting a pulse width and a P circuit.
And an analog circuit for forming and outputting a WM waveform signal.
【0003】ところで、三相交流モータをインバータ制
御する場合、3個の捲線のそれぞれを電源の+側にも−
側にも切換接続するため、捲線に電源の+側,−側と接
続するための2個のトランジスタ(パワートランジス
タ)を接続し(図1参照)、ロータの回転角度に合わせ
ていずれか一方のトランジスタのみをオンするようにし
ている。[0003] When an inverter is controlled for a three-phase AC motor, each of the three windings is connected to the minus side of the power supply.
Side, two transistors (power transistors) for connecting to the + side and the-side of the power supply are connected to the winding (see FIG. 1), and one of them is connected to the rotation angle of the rotor. Only the transistor is turned on.
【0004】モータを高い駆動力で駆動するためには
(理想的には)、一方のトランジスタのオフと同時に他
方のトランジスタをオンするのがよいが、トランジスタ
はシャットオフにある程度の時間がかかるため、両方の
トランジスタを同時にオン/オフ切り換えすると切り換
えタイミングに両トランジスタの同時オン状態ができて
電源が短絡してしまう。そこで、前記他方のトランジス
タのオンタイミングを前記一方のトランジスタのオフタ
イミングよりも所定時間(遅延時間)遅らせてオールオ
フ期間dを作るようにしている(図2参照)。In order to drive the motor with a high driving force (ideally), it is preferable to turn off one transistor and turn on the other transistor at the same time. However, the transistor takes a certain amount of time to shut off. If both transistors are turned on / off at the same time, both transistors are turned on simultaneously at the switching timing, and the power supply is short-circuited. Therefore, the on-timing of the other transistor is delayed by a predetermined time (delay time) from the off-timing of the one transistor to create an all-off period d (see FIG. 2).
【0005】このオールオフ期間dの長さ(遅延時間)
は、前記ディジタル回路のレジスタにクロック信号のカ
ウント数として記憶されており、パルス幅を設定すると
き読みだされるようになっている。The length (delay time) of the all-off period d
Is stored in the register of the digital circuit as the count number of the clock signal, and is read when the pulse width is set.
【0006】[0006]
【発明が解決しようとする課題】一方、ワンチップマイ
クロコンピュータのアナログ回路は温度等の影響を受け
やすく、発生したPWM波形信号のパルス幅にもずれが
生じることがあった。On the other hand, the analog circuit of the one-chip microcomputer is susceptible to temperature and the like, and the generated PWM waveform signal sometimes has a deviation in pulse width.
【0007】ずれが生じた場合、オールオフ期間が短く
なり過ぎたり、長くなり過ぎたりする問題点がある。オ
ールオフ期間が短くなり過ぎると、上記のように2つの
トランジスタが同時にオンする期間が生じ、このときこ
れら2つのトランジスタを介して電源電流が短絡的に流
れシステムに悪影響を及ぼすことがあった。一方、オー
ルオフ期間が長くなり過ぎた場合は、モータの駆動力が
低下してしまう欠点があった。[0007] When a shift occurs, there is a problem that the all-off period becomes too short or too long. If the all-off period becomes too short, a period occurs in which the two transistors are simultaneously turned on as described above, and at this time, the power supply current may flow short-circuited through these two transistors, adversely affecting the system. On the other hand, when the all-off period is too long, there is a disadvantage that the driving force of the motor is reduced.
【0008】しかしながら、従来の三相交流モータの駆
動制御システムでは、電源系に電流監視装置を設け、こ
の電流監視装置が過電流等を検出したときシステムが異
常であると判断するようにしていたため、オールオフ期
間が大きく変動した場合のみしか検出することができな
かった。このため、オールオフ期間の微小なずれやこれ
によるリークを防止することができず、ノイズや耐久性
等に対する信頼性を低下させてしまうおそれがあった。However, in a conventional drive control system for a three-phase AC motor, a current monitoring device is provided in a power supply system, and when the current monitoring device detects an overcurrent or the like, the system is determined to be abnormal. However, it was possible to detect only when the all-off period greatly fluctuated. For this reason, it is not possible to prevent a minute shift during the all-off period and a leak due to the shift, and there is a risk that reliability with respect to noise, durability, and the like may be reduced.
【0009】この発明は、アナログ回路が発生したPW
M波形信号のパルス幅のずれを内部で検出することによ
り、早期の対応が可能なマイクロコンピュータを提供す
ることを目的とする。The present invention relates to a PW generated by an analog circuit.
It is an object of the present invention to provide a microcomputer capable of promptly responding by detecting a shift in the pulse width of the M waveform signal internally.
【0010】[0010]
【課題を解決するための手段】この発明は、負荷端子を
電源の正極または負極に択一的に接続する第1および第
2のスイッチ手段をPWM波形信号でオン/オフするマ
イクロコンピュータであって、一方のスイッチ手段に出
力するPWM波形信号をオン信号からオフ信号に切り換
えたのち、所定のオールオフ期間の経過を待って、他方
のスイッチ手段に出力するPWM波形信号をオフ信号か
らオン信号に切り換えるマイクロコンピュータにおい
て、前記オールオフ期間の許容最短時間および許容最長
時間を設定する許容時間設定手段と、前記第1および第
2のスイッチ手段に出力されるPWM波形信号を入力し
その両方がオフ信号であるオールオフ期間が前記許容最
短時間と前記許容最長時間の間の正常範囲にあるか否か
を監視するオールオフ期間監視手段と、前記オールオフ
期間監視手段がオールオフ期間が前記正常範囲でないこ
とを検出した回数をカウントアップし、カウント値が所
定値になったとき異常信号を生成出力する異常信号出力
手段と、を1チップに内蔵したことを特徴とする。SUMMARY OF THE INVENTION The present invention is a microcomputer for turning on / off first and second switch means for selectively connecting a load terminal to a positive electrode or a negative electrode of a power supply with a PWM waveform signal. After switching the PWM waveform signal output to one switch means from the ON signal to the OFF signal, and after a predetermined all-off period has elapsed, the PWM waveform signal output to the other switch means is changed from the OFF signal to the ON signal. In the switching microcomputer, an allowable time setting means for setting an allowable minimum time and an allowable maximum time of the all-off period, and a PWM waveform signal output to the first and second switch means, both of which are off signals Monitoring whether the all-off period is within the normal range between the minimum allowable time and the maximum allowable time. A period monitoring unit, an abnormal signal output unit that counts up the number of times that the all-off period monitoring unit detects that the all-off period is not in the normal range, and generates and outputs an abnormal signal when the count value reaches a predetermined value; , Are incorporated in one chip.
【0011】また、この発明は、前記異常信号出力手段
に、前記オールオフ期間監視手段が、オールオフ期間が
前記正常範囲であることを所定回数検出したとき前記カ
ウント値をカウントダウンする手段が含まれることを特
徴とする。Further, in the present invention, the abnormal signal output means includes means for counting down the count value when the all-off period monitoring means detects that the all-off period is within the normal range a predetermined number of times. It is characterized by the following.
【0012】[0012]
【作用】第1,第2のスイッチ手段に出力される2つの
PWM波形信号は、一方がオン信号からオフ信号に切り
換わって、さらにオールオフ期間経過したのち他方がオ
フ信号からオン信号に切り換わる。このオールオフ期間
が許容範囲(許容最短時間と許容最長時間の間)になる
か否かをオールオフ期間監視手段が監視し、オールオフ
期間が正常範囲から外れた回数をカウントアップする。
このカウント値が所定値になったときPWM波形信号
(オールオフ期間)が正常でないとして異常信号を生成
出力する。この異常信号に基づいて、制御は所定の異常
対応動作を行うことができる。前記許容最短時間および
許容最長時間を狭い範囲に設定しておくことにより、微
小なずれも検出することができる。One of the two PWM waveform signals output to the first and second switch means is switched from an ON signal to an OFF signal, and the other is switched from an OFF signal to an ON signal after an all-off period has elapsed. Be replaced. The all-off period monitoring means monitors whether or not the all-off period is within an allowable range (between the shortest allowable time and the longest allowable time), and counts up the number of times the all-off period is out of the normal range.
When the count value reaches a predetermined value, an abnormal signal is generated and output assuming that the PWM waveform signal (all-off period) is not normal. Based on this abnormality signal, the control can perform a predetermined abnormality response operation. By setting the allowable minimum time and the allowable maximum time in a narrow range, a minute shift can be detected.
【0013】さらに、この発明では、オールオフ期間が
正常範囲であった回数に応じて前記カウント値を減算す
る。これにより、稀に起きるエラーはキャンセルされ、
このようなエラーの蓄積による異常信号の出力を防ぐこ
とができる。Further, in the present invention, the count value is subtracted according to the number of times that the all-off period is within the normal range. This cancels the rare error,
Output of an abnormal signal due to accumulation of such errors can be prevented.
【0014】[0014]
【実施例】図1はこの発明の実施例であるPWM波形制
御用マイクロコンピュータを用いたコンプレッサ制御回
路の構成図である。また、図2は同コンプレッサ制御回
路における三相交流モータ5を駆動するためのPWM波
形信号のタイミングチャートである。FIG. 1 is a block diagram of a compressor control circuit using a microcomputer for controlling a PWM waveform according to an embodiment of the present invention. FIG. 2 is a timing chart of a PWM waveform signal for driving the three-phase AC motor 5 in the compressor control circuit.
【0015】コンプレッサの動力源である三相交流モー
タ5の3本の捲線5a,5b,5cは、それぞれ、トラ
ンジスタ4−1,4−3,4−5を介して電源3の+極
に接続されるとともに、トランジスタ4−0,4−2,
4−4を介して電源3の−極に接続される。各捲線5
a,5b,5cに接続されている2個のトランジスタ
(4−0,4−1),(4−2,4−3),(4−4,
4−5)は、それぞれ対になっており、いずれか一方の
みがオンするように制御される。すなわち、一方のトラ
ンジスタがオフしたのち他方のトランジスタがオンする
よう制御される(図2参照)。この制御において、トラ
ンジスタのシャットオフ時間の遅れによって2個のトラ
ンジスタが同時にオンしないように、他方のトランジス
タをオンするタイミングを一方のトランジスタのオフタ
イミングよりも微小時間dだけ遅らせるようにしてい
る。この微小時間dがオールオフ期間である。これによ
り、一方のトランジスタが完全にオフしない間に他方の
トランジスタがオンして電源3の+極から−極へ直接電
流が流れるという短絡状態を回避している。The three windings 5a, 5b, 5c of the three-phase AC motor 5, which is the power source of the compressor, are connected to the positive terminal of the power source 3 via transistors 4-1 to 4-3, respectively. And transistors 4-0, 4-2,
It is connected to the negative pole of the power supply 3 via 4-4. Each winding 5
a, 5b, 5c, two transistors (4-0, 4-1), (4-2, 4-3), (4-4,
4-5) are paired, and are controlled so that only one of them is turned on. That is, control is performed so that one transistor is turned off and then the other transistor is turned on (see FIG. 2). In this control, the timing to turn on the other transistor is delayed by a minute time d from the timing to turn off one transistor so that the two transistors are not turned on at the same time due to the delay of the shut-off time of the transistor. This minute time d is the all-off period. This avoids a short-circuit state in which one transistor is not completely turned off and the other transistor is turned on, so that a current flows directly from the positive pole to the negative pole of the power supply 3.
【0016】図2に示すPWM波形信号は、マイクロコ
ンピュータ1によって形成される。The PWM waveform signal shown in FIG.
【0017】マイクロコンピュータから出力されたPW
M波形信号は、フォトカプラ2でアイソレートされたの
ち、各トランジスタ4−0,4−1,4−2,4−3,
4−4,4−5のベースに入力される。PW output from microcomputer
After the M waveform signal is isolated by the photocoupler 2, each of the transistors 4-0, 4-1, 4-2, 4-3,
Input to bases 4-4 and 4-5.
【0018】図3は前記マイクロコンピュータ1の構成
を示す図である。このマイクロコンピュータ1は、制御
部であるCPU10を備えているほか、PWM波形信号
を形成するためのディジタル回路,アナログ回路を備え
ている。ディジタル回路は、オールオフ期間設定レジス
タ11,オールオフ期間設定カウンタ12,PWM波形
設定回路13で構成されており、アナログ回路はPWM
波形発生回路14からなっている。また、これ以外にマ
イクロコンピュータ1にはPWM波形信号の異常を検出
する異常検出回路15が内蔵されている。FIG. 3 is a diagram showing the configuration of the microcomputer 1. The microcomputer 1 includes a CPU 10 as a control unit, and further includes a digital circuit and an analog circuit for forming a PWM waveform signal. The digital circuit is composed of an all-off period setting register 11, an all-off period setting counter 12, and a PWM waveform setting circuit 13, and the analog circuit is a PWM circuit.
It comprises a waveform generating circuit 14. In addition, the microcomputer 1 has a built-in abnormality detection circuit 15 for detecting an abnormality in the PWM waveform signal.
【0019】CPU10には、外部からコンプレッサ制
御信号が入力される。エアコンの場合、コンプレッサ制
御信号は室内の気温や設定温度等に基づいて生成され
る。CPU10は、入力されたコンプレッサ制御信号に
基づいてモータ5のオン/オフおよび回転速度を決定
し、PWM波形制御信号を出力する。このPWM波形制
御信号はPWM波形設定回路13に入力される。PWM
波形設定回路13は、この信号に基づいてパルス幅信号
を発生する。パルス幅信号は、三相交流モータ5の捲線
5a,5b,5cのそれぞれに印加する電圧の極性を決
定するものであり、トランジスタ4−0/4−1,4−
2/4−3,4−4/4−5に出力するオン信号の切換
タイミングを指示するものである。パルス幅信号は、各
捲線5a,5b,5cのそれぞれに対応して3つ発生さ
れる。The CPU 10 receives a compressor control signal from outside. In the case of an air conditioner, a compressor control signal is generated based on the indoor temperature, a set temperature, and the like. CPU 10 determines ON / OFF and rotation speed of motor 5 based on the input compressor control signal, and outputs a PWM waveform control signal. This PWM waveform control signal is input to the PWM waveform setting circuit 13. PWM
The waveform setting circuit 13 generates a pulse width signal based on this signal. The pulse width signal determines the polarity of the voltage applied to each of the windings 5a, 5b, 5c of the three-phase AC motor 5, and includes transistors 4-0 / 4-1 and 4-
This is for instructing the switching timing of the ON signal to be output to 2 / 4-3, 4-4 / 4-5. Three pulse width signals are generated corresponding to each of the windings 5a, 5b, 5c.
【0020】パルス幅信号はPWM波形発生回路14に
入力される。PWM波形発生回路14は前記6個のトラ
ンジスタ4−0〜4−5に対応して6個並列に設けられ
ている。また、これらPWM波形発生回路14にはオー
ルオフ期間設定カウンタ12が接続されている。オール
オフ期間設定カウンタ12はPWM波形発生回路14に
カウント終了信号を出力する。PWM波形発生回路14
は、パルス幅信号およびカウント終了信号に基づいてP
WM波形信号を発生する。すなわち、パルス幅信号(オ
フ信号)が入力されたときはPWM波形を直ちに“H”
にし、パルス幅信号(オン信号)が入力されたときは、
オールオフ期間設定カウンタ12からカウント終了信号
が入力されるのを待ってPWM波形を“L”にする。The pulse width signal is input to the PWM waveform generation circuit 14. Six PWM waveform generating circuits 14 are provided in parallel corresponding to the six transistors 4-0 to 4-5. Further, an all-off period setting counter 12 is connected to the PWM waveform generating circuit 14. The all-off period setting counter 12 outputs a count end signal to the PWM waveform generation circuit 14. PWM waveform generation circuit 14
Is based on the pulse width signal and the count end signal.
Generate a WM waveform signal. That is, when a pulse width signal (OFF signal) is input, the PWM waveform is immediately changed to “H”.
When a pulse width signal (ON signal) is input,
After the count-off signal is input from the all-off period setting counter 12, the PWM waveform is set to "L".
【0021】ここで、オールオフ期間設定カウンタ12
にはオールオフ期間設定レジスタ11が接続されてい
る。オールオフ期間設定レジスタ11はオールオフ期間
dのカウント数を記憶している。オールオフ期間設定カ
ウンタ12はPWM波形設定回路13からパルス幅信号
(捲線の極性を反転させる信号)が入力されたときカウ
ントを開始し、オールオフ期間dに対応するカウント数
をカウントしたとき、入力されたパルス幅信号に基づい
てトランジスタをオンする(PWM波形を“L”に落と
す)PWM波形発生回路14に対してカウントアップ信
号を出力する。なお、オールオフ期間設定レジスタ11
に記憶されたカウント数は、CPU10によって立ち上
げ時に設定される。Here, the all-off period setting counter 12
Is connected to an all-off period setting register 11. The all-off period setting register 11 stores the count number of the all-off period d. The all-off period setting counter 12 starts counting when a pulse width signal (a signal for inverting the polarity of the winding) is input from the PWM waveform setting circuit 13, and starts counting when the count number corresponding to the all-off period d is counted. A count-up signal is output to the PWM waveform generation circuit 14 which turns on the transistor (drops the PWM waveform to "L") based on the pulse width signal thus obtained. The all-off period setting register 11
Is set by the CPU 10 at the time of startup.
【0022】このようにして形成出力されたPWM波形
信号PWM0〜PWM5がフォトカプラ2を介してトラ
ンジスタ4−0〜4−5のベースに印加されるととも
に、マイクロコンピュータ1内の異常検出回路15に入
力される。異常検出回路15は、PWM波形発生回路1
4が6個並列に設けられているのに対して各捲線5a,
5b,5c(トランジスタ対)に対応して3個設けられ
ている。各異常検出回路15には各々2個のPWM波形
信号PWMi ,PWMi+1 (i=0,2,4)が入力さ
れる。異常検出回路15は、入力された2つのPWM波
形信号からオールオフ期間を計測し、これが許容最短時
間以上、且つ、許容最長時間以下であるかを監視する。
オールオフ期間が許容範囲から外れていることを検出し
た場合には、カウンタをカウントアップし、そのカウン
ト数が所定値以上になったときCPU10に対して異常
信号を出力する。The PWM waveform signals PWM0 to PWM5 formed and output as described above are applied to the bases of the transistors 4-0 to 4-5 via the photocoupler 2 and are sent to the abnormality detection circuit 15 in the microcomputer 1. Is entered. The abnormality detection circuit 15 includes the PWM waveform generation circuit 1
4 are provided in parallel, whereas each winding 5a,
Three are provided corresponding to 5b and 5c (transistor pair). Two PWM waveform signals PWMi, PWMi + 1 (i = 0, 2, 4) are input to each abnormality detection circuit 15, respectively. The abnormality detection circuit 15 measures the all-off period from the two input PWM waveform signals, and monitors whether the period is equal to or longer than the allowable minimum time and equal to or shorter than the allowable maximum time.
When it is detected that the all-off period is out of the allowable range, the counter is counted up, and an abnormal signal is output to the CPU 10 when the counted number becomes a predetermined value or more.
【0023】図4は異常検出回路の構成図である。ま
た、図5〜図7は同異常検出回路の各部の信号のタイミ
ングチャートである。PWM波形信号(PWMi ,PW
Mi+1)はAND回路21およびXOR回路27に入力
される。PWM波形信号はアクティブロー(図2参照)
であるため、オールオフ期間中は、PWMi ,PWMi+
1 が両方とも“H”であり、AND回路21は“H”
(オールオフ検出信号)を出力する。また、XOR回路
27は、一方のPWM波形信号のみ“H”のとき“H”
(通常動作検出信号)を出力する。XOR回路27の通
常動作検出信号は、AND回路28に入力されるととも
に、最短オールオフ期間監視カウンタ24および最長オ
ールオフ期間監視カウンタ32にロード信号LDとして
入力される。FIG. 4 is a configuration diagram of the abnormality detection circuit. FIGS. 5 to 7 are timing charts of signals of various parts of the abnormality detection circuit. PWM waveform signals (PWMi, PWM
Mi + 1) is input to the AND circuit 21 and the XOR circuit 27. PWM waveform signal is active low (see Fig. 2)
Therefore, during the all-off period, PWMi, PWMi +
1 are both “H”, and the AND circuit 21 is “H”
(All-off detection signal). The XOR circuit 27 outputs “H” when only one PWM waveform signal is “H”.
(Normal operation detection signal). The normal operation detection signal of the XOR circuit 27 is input to the AND circuit 28 and input to the shortest all-off period monitoring counter 24 and the longest all-off period monitoring counter 32 as a load signal LD.
【0024】最短オールオフ期間監視カウンタ24は、
ロード信号LDが入力されたとき、最短オールオフ期間
監視レジスタ23に記憶されている許容最短時間のカウ
ント値をロードする。また、最長オールオフ期間監視カ
ウンタ32は、ロード信号LDが入力されたとき、最長
オールオフ期間監視レジスタ31に記憶されている許容
最長時間のカウント値をロードする。The shortest all-off period monitoring counter 24
When the load signal LD is inputted, the count value of the allowable minimum time stored in the shortest all-off period monitoring register 23 is loaded. Further, when the load signal LD is input, the longest all-off period monitoring counter 32 loads the count value of the allowable maximum time stored in the longest all-off period monitoring register 31.
【0025】また、AND回路21のオールオフ検出信
号はAND回路22およびリセットパルス発生回路26
に入力される。AND回路22の他の入力端子にはクロ
ック信号CLKが入力されている。したがって、オール
オフ期間のみクロック信号CLKがAND回路22を通
過して出力される。このクロック信号は最短オールオフ
期間監視カウンタ24およびAND回路30に出力され
る。The all-off detection signal of the AND circuit 21 is transmitted to the AND circuit 22 and the reset pulse generation circuit 26.
Is input to The clock signal CLK is input to another input terminal of the AND circuit 22. Therefore, the clock signal CLK is output through the AND circuit 22 only during the all-off period. This clock signal is output to the shortest all-off period monitoring counter 24 and the AND circuit 30.
【0026】最短オールオフ期間監視カウンタ24はダ
ウンカウンタであり、ロードした値(許容最短時間のカ
ウント値)をクロック信号CLKの入力によってカウン
トダウンしてゆき、カウントダウンし終わるとボロー信
号BR1を出力する。したがって、このボロー信号BR
1はオールオフ期間が許容最短時間よりも長いことを意
味する信号である。このボロー信号BR1はラッチ回路
25にラッチされる。The shortest all-off period monitoring counter 24 is a down counter, and counts down the loaded value (the count value of the allowable minimum time) by inputting the clock signal CLK, and outputs the borrow signal BR1 when the countdown is completed. Therefore, this borrow signal BR
1 is a signal indicating that the all-off period is longer than the allowable minimum time. This borrow signal BR1 is latched by the latch circuit 25.
【0027】ラッチされた信号はAND回路30に入力
されるとともに、反転されたのちAND回路28に入力
される。AND回路28の他方の入力端子には前記XO
R回路27の通常動作検出信号が入力される。したがっ
て,AND回路28は、オールオフ期間から通常動作に
移行しても、ラッチ回路25からボロー信号BR1が入
力されていないときには、オールオフ期間が短すぎると
して“H”信号(過短異常検出信号)を出力する(図6
参照)。The latched signal is input to an AND circuit 30, and is inverted and then input to an AND circuit 28. The other input terminal of the AND circuit 28 has the XO
The normal operation detection signal of the R circuit 27 is input. Therefore, even when the AND circuit 28 shifts to the normal operation from the all-off period, when the borrow signal BR1 is not input from the latch circuit 25, the AND circuit 28 determines that the all-off period is too short and outputs the "H" signal (the short-circuit abnormality detection signal). ) (FIG. 6)
reference).
【0028】この過短異常検出信号はOR回路29を介
して異常検出カウンタ34に入力される。異常検出カウ
ンタ34は、異常検出信号が入力されるごとにカウント
値を更新してゆく。このカウント値は比較回路36に入
力される。また、比較回路36には、異常検出レジスタ
35の記憶値が入力されている。比較回路36は異常検
出カウンタ34のカウント値が異常検出レジスタ35の
記憶値よりも大きくなったとき異常信号をCPU10に
対して出力する。This short-circuit abnormality detection signal is input to the abnormality detection counter 34 via the OR circuit 29. The abnormality detection counter 34 updates the count value each time an abnormality detection signal is input. This count value is input to the comparison circuit 36. The value stored in the abnormality detection register 35 is input to the comparison circuit 36. The comparison circuit 36 outputs an abnormality signal to the CPU 10 when the count value of the abnormality detection counter 34 becomes larger than the value stored in the abnormality detection register 35.
【0029】一方、AND回路30には、上述したよう
に、ラッチ回路25でラッチされたボロー信号BR1、
および、AND回路22からオールオフ期間中のみ出力
されるクロック信号CLKが入力される。したがって、
AND回路30は許容最短時間が経過したのちオールオ
フ期間が終わるまでクロックCLKを出力する。このク
ロック信号CLKは最長オールオフ期間監視カウンタ3
2に入力される。最長オールオフ期間監視カウンタ32
は、最長オールオフ期間監視レジスタ31からロードし
た値(許容最長時間のカウント値)をクロック信号LC
Kによってカウントダウンしてゆく。この値をカウント
ダウンし終えるまえにクロック信号の入力が無くなった
場合には、オールオフ期間は許容最長時間以内であると
して最長オールオフ期間監視カウンタ32はボロー信号
BR2を出力しない。On the other hand, as described above, the borrow signals BR 1, BR 1,
Further, a clock signal CLK output only during the all-off period from the AND circuit 22 is input. Therefore,
The AND circuit 30 outputs the clock CLK after the elapse of the minimum allowable time and until the all-off period ends. This clock signal CLK is the longest all-off period monitoring counter 3
2 is input. Longest all-off period monitoring counter 32
Calculates the value loaded from the longest all-off period monitoring register 31 (the count value of the allowable maximum time) as the clock signal LC.
Count down by K. If no clock signal is input before the countdown of this value is completed, the longest all-off period monitoring counter 32 does not output the borrow signal BR2 because the all-off period is within the allowable maximum time.
【0030】一方、最長オールオフ期間監視カウンタ3
2に、許容最長時間のカウント値をカウントダウンし終
える期間クロック信号CLKが入力されていた場合に
は、最長オールオフ期間監視カウンタ32はボロー信号
BR2を出力する。したがって、このボロー信号BR2
はオールオフ期間が長すぎることを意味する。ボロー信
号BR2はラッチ回路33にラッチされる。ラッチ回路
33にラッチされたボロー信号BR2は、過長異常検出
信号としてOR回路29を介して前記異常検出カウンタ
34に入力される。On the other hand, the longest all-off period monitoring counter 3
If the clock signal CLK has been input to the period 2 in which the count value of the maximum allowable count value has been counted down, the longest all-off period monitoring counter 32 outputs the borrow signal BR2. Therefore, this borrow signal BR2
Means that the all-off period is too long. The borrow signal BR2 is latched by the latch circuit 33. The borrow signal BR2 latched by the latch circuit 33 is input to the abnormality detection counter 34 via the OR circuit 29 as an excessively long abnormality detection signal.
【0031】なお、ラッチ回路25,33はリセットパ
ルス発生回路26が発生するリセットパルスによってリ
セットされる。このリセットパルス発生回路26は、A
ND回路21のオールオフ検出信号に基づいてリセット
パルスを発生する。The latch circuits 25 and 33 are reset by a reset pulse generated by a reset pulse generating circuit 26. This reset pulse generation circuit 26
A reset pulse is generated based on the all-off detection signal of the ND circuit 21.
【0032】このように、オールオフ期間が許容最短時
間よりも短いときは最短オールオフ期間監視カウンタ2
4がボロー信号BR1を出力しないことによって異常が
検出され、オールオフ期間が許容最長時間よりも長いと
きには最長オールオフ期間監視カウンタ32がボロー信
号BR2を出力することによって異常が検出される。As described above, when the all-off period is shorter than the allowable minimum time, the shortest all-off period monitoring counter 2
4 does not output the borrow signal BR1, the abnormality is detected. When the all-off period is longer than the allowable maximum time, the abnormality is detected by the longest all-off period monitoring counter 32 outputting the borrow signal BR2.
【0033】なお、前記最短オールオフ期間監視レジス
タ23および最長オールオフ期間監視レジスタ31に記
憶されるカウント値は、トランジスタ4がターンオフす
るために必要十分な範囲で狭く設定されているものとす
る。これにより、オールオフ期間の微小なずれも異常と
して、マイクロコンピュータ内で検出することができ
る。It is assumed that the count value stored in the shortest all-off period monitoring register 23 and the longest all-off period monitoring register 31 is set to be as narrow as necessary and sufficient for the transistor 4 to turn off. Thus, even a slight deviation during the all-off period can be detected as an abnormality in the microcomputer.
【0034】なお、この回路では、異常検出カウンタ3
4が過短異常検出信号と過長異常検出信号とを一緒にカ
ウントするようにしているが、これらを別々のカウンタ
でカウントするようにしてもよい。また、これらのカウ
ント値を3個の異常検出回路について合算するようにし
てもよい。In this circuit, the abnormality detection counter 3
4 counts the short-term abnormality detection signal and the excessive-length abnormality detection signal together, but these may be counted by separate counters. Further, these count values may be added up for the three abnormality detection circuits.
【0035】さらに、この実施例の異常検出回路15で
は、異常検出カウンタ34は異常検出信号を加算するの
みであるが、正常な状態が継続した場合には、カウント
値を減算するようにしてもよい。これによって、稀に発
生する異常をキャンセルすることができる。このような
回路にするためには、異常検出カウンタ34を、アップ
/ダウンカウンタで構成するとともに、正常状態(リセ
ット時に異常検出信号が出力されていない状態:OR回
路29の出力を反転して生成する)を所定回数カウント
する正常回数カウンタを設け、この正常回数カウンタの
キャリー信号を前記アップ/ダウンカウンタのカウント
ダウン端子に入力すればよい。正常回数カウンタのカウ
ント数は1以上の適当な回数に設定する。また、異常検
出信号が出力されたときこの正常回数カウンタがリセッ
トされるようにしてもよい。Further, in the abnormality detection circuit 15 of this embodiment, the abnormality detection counter 34 only adds the abnormality detection signal. However, if the normal state continues, the count value may be decremented. Good. As a result, a rarely occurring abnormality can be canceled. In order to realize such a circuit, the abnormality detection counter 34 is constituted by an up / down counter, and is in a normal state (a state in which an abnormality detection signal is not output at the time of reset: the output of the OR circuit 29 is inverted. ) Is provided, and a carry signal of the normal number counter may be input to a countdown terminal of the up / down counter. The count number of the normal number counter is set to an appropriate number of one or more. Further, when the abnormality detection signal is output, the normal number counter may be reset.
【0036】[0036]
【発明の効果】以上のようにこの発明によれば、PWM
波形信号のオールオフ期間が許容範囲よりも短い場合や
長い場合をマイクロコンピュータ内で検出することがで
き、システムに悪影響を及ぼす前に対応することが可能
になる。As described above, according to the present invention, the PWM
The case where the all-off period of the waveform signal is shorter or longer than the allowable range can be detected in the microcomputer, and it is possible to take measures before the system is adversely affected.
【図1】この発明の実施例であるコンプレッサ制御装置
のブロック図FIG. 1 is a block diagram of a compressor control device according to an embodiment of the present invention.
【図2】同コンプレッサ制御装置のPWM波形信号の例
を示す図FIG. 2 is a diagram showing an example of a PWM waveform signal of the compressor control device.
【図3】同コンプレッサ制御装置のマイクロコンピュー
タのブロック図FIG. 3 is a block diagram of a microcomputer of the compressor control device.
【図4】同マイクロコンピュータの異常検出回路のブロ
ック図FIG. 4 is a block diagram of an abnormality detection circuit of the microcomputer.
【図5】同異常検出回路の各部の信号のタイミングチャ
ートFIG. 5 is a timing chart of signals of various parts of the abnormality detection circuit.
【図6】同異常検出回路の各部の信号のタイミングチャ
ートFIG. 6 is a timing chart of signals of various parts of the abnormality detection circuit.
【図7】同異常検出回路の各部の信号のタイミングチャ
ートFIG. 7 is a timing chart of signals of various parts of the abnormality detection circuit.
1−マイクロコンピュータ 3−電源 4−トランジスタ 5−三相交流モータ 5a,5b,5c−捲線 15−異常検出回路 1-microcomputer 3-power supply 4-transistor 5-three-phase AC motor 5a, 5b, 5c-winding 15-abnormality detection circuit
Claims (2)
的に接続する第1および第2のスイッチ手段をPWM波
形信号でオン/オフするマイクロコンピュータであっ
て、一方のスイッチ手段に出力するPWM波形信号をオ
ン信号からオフ信号に切り換えたのち、所定のオールオ
フ期間の経過を待って、他方のスイッチ手段に出力する
PWM波形信号をオフ信号からオン信号に切り換えるマ
イクロコンピュータにおいて、 前記オールオフ期間の許容最短時間および許容最長時間
を設定する許容時間設定手段と、 前記第1および第2のスイッチ手段に出力されるPWM
波形信号を入力し、その両方がオフ信号であるオールオ
フ期間が前記許容最短時間と前記許容最長時間の間の正
常範囲にあるか否かを監視するオールオフ期間監視手段
と、 前記オールオフ期間監視手段が、オールオフ期間が前記
正常範囲でないことを検出した回数をカウントアップ
し、カウント値が所定値になったとき異常信号を生成出
力する異常信号出力手段と、 を1チップに内蔵したPWM波形制御用マイクロコンピ
ュータ。1. A microcomputer which turns on / off first and second switch means for selectively connecting a load terminal to a positive electrode or a negative electrode of a power supply with a PWM waveform signal, and outputs the signal to one of the switch means. A microcomputer which switches a PWM waveform signal from an off signal to an on signal after switching a PWM waveform signal from an on signal to an off signal and then waiting for a predetermined all-off period to elapse, and further comprising: Allowable time setting means for setting an allowable minimum time and an allowable maximum time of a period; and PWM output to the first and second switch means
An all-off period monitoring unit that receives a waveform signal and monitors whether an all-off period in which both of them are off signals is within a normal range between the allowable minimum time and the allowable maximum time, and the all-off period An abnormal signal output unit that counts up the number of times that the monitoring unit detects that the all-off period is not in the normal range and generates and outputs an abnormal signal when the count value reaches a predetermined value; Microcomputer for waveform control.
フ期間監視手段が、オールオフ期間が前記正常範囲であ
ることを所定回数検出したとき前記カウント値をカウン
トダウンする手段を含む請求項1記載のPWM波形制御
用マイクロコンピュータ。2. The abnormal signal output means includes means for counting down the count value when the all-off period monitoring means detects a predetermined number of times that an all-off period is within the normal range. A microcomputer for PWM waveform control.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP5121229A JP2996832B2 (en) | 1993-05-24 | 1993-05-24 | Microcomputer for PWM waveform control |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP5121229A JP2996832B2 (en) | 1993-05-24 | 1993-05-24 | Microcomputer for PWM waveform control |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH06335260A JPH06335260A (en) | 1994-12-02 |
JP2996832B2 true JP2996832B2 (en) | 2000-01-11 |
Family
ID=14806101
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP5121229A Expired - Fee Related JP2996832B2 (en) | 1993-05-24 | 1993-05-24 | Microcomputer for PWM waveform control |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2996832B2 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4536272B2 (en) * | 2001-01-24 | 2010-09-01 | 東芝エレベータ株式会社 | Elevator control device |
JP5652240B2 (en) | 2011-02-18 | 2015-01-14 | 株式会社デンソー | Electric compressor |
JP7385439B2 (en) * | 2019-11-18 | 2023-11-22 | 日立Astemo株式会社 | Inverter control device |
-
1993
- 1993-05-24 JP JP5121229A patent/JP2996832B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JPH06335260A (en) | 1994-12-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5345764B2 (en) | Microcomputer for motor control and control method therefor | |
JP5477407B2 (en) | Gate drive circuit | |
JPH1169635A (en) | Charge and discharge control circuit with detecting function of charging and discharging currents / and rechargeable power supply | |
JP2009095206A (en) | Inverter control circuit and control method thereof | |
JP2996832B2 (en) | Microcomputer for PWM waveform control | |
JPH037071A (en) | Correcting device for output voltage error of inverter | |
JP2004129388A (en) | Current detection device and motor drive device | |
KR101626762B1 (en) | Motor driver | |
JP2014054042A (en) | Overcurrent protection circuit | |
JP2003189683A (en) | Electric load driver | |
JP3576847B2 (en) | Power supply switching device | |
JP3480718B2 (en) | Phase control circuit and switching regulator | |
JP3564950B2 (en) | Semiconductor integrated circuit | |
JP4015368B2 (en) | Brushless motor control device | |
JP3365808B2 (en) | Motor drive control circuit, device provided with motor drive control circuit, and motor drive control method | |
JP4148243B2 (en) | Abnormality detection circuit | |
JPH02266891A (en) | Control circuit for motor | |
CN215378766U (en) | IGBT inversion driving control circuit | |
JP2567732Y2 (en) | Step motor constant current drive circuit | |
JP2000032770A (en) | Inverter device | |
JP2004282806A (en) | Drive circuit of voltage drive element | |
JPH10223260A (en) | Battery unit | |
JPH0199482A (en) | Regenerative brake control device for motor | |
JPH06283986A (en) | Power transistor protecting circuit | |
JPH05300731A (en) | Overcurrent protection circuit of switching power supply |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20071029 Year of fee payment: 8 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20081029 Year of fee payment: 9 |
|
LAPS | Cancellation because of no payment of annual fees |