JP2010088186A - Motor control circuit - Google Patents
Motor control circuit Download PDFInfo
- Publication number
- JP2010088186A JP2010088186A JP2008253403A JP2008253403A JP2010088186A JP 2010088186 A JP2010088186 A JP 2010088186A JP 2008253403 A JP2008253403 A JP 2008253403A JP 2008253403 A JP2008253403 A JP 2008253403A JP 2010088186 A JP2010088186 A JP 2010088186A
- Authority
- JP
- Japan
- Prior art keywords
- motor
- circuit
- clock
- motor control
- control circuit
- 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.)
- Ceased
Links
Images
Landscapes
- Control Of Stepping Motors (AREA)
- Control Of Electric Motors In General (AREA)
Abstract
Description
本発明は、モータ制御回路に関し、特にシリアル通信を用いて、外部から制御を行うモータ制御回路に関する。 The present invention relates to a motor control circuit, and more particularly to a motor control circuit that performs external control using serial communication.
例えば、特許文献1には、大量のデータ転送をサーボモータとコンピュータの間で行う場合の転送の技術についての開示がある。特許文献1では、サーボモータの状態データをサンプリングする測定装置があり、測定装置で測定した測定結果を記憶する記憶装置があり、その記憶装置に記憶されている内容をマイコンとシリアル変換装置を使って、CPUに出力するものである。
For example, Japanese Patent Application Laid-Open No. H10-228561 discloses a transfer technique when a large amount of data is transferred between a servo motor and a computer. In
特許文献2には、サーボモータ装置において、コントローラへシリアル伝送するシリアルインターフェイス回路を備えたサーボモータ装置の開示がある。特許文献2では、モータのID情報を分割し、その分割したモータのID情報をボールセンサからの磁極情報に重畳させてコントローラへシリアル伝送するものである。
どちらも、サーボモータと通信する技術の開示があるが、モータの制御とは、直接、関係の無いデータをシリアル通信により、マイコンが通信する手法である。 In both cases, there is a disclosure of a technique for communicating with a servo motor. However, motor control is a technique in which a microcomputer communicates unrelated data directly by serial communication.
従来のモータ制御において、ドライバはモータの数に応じて必要であり、複数個のモータを制御する為には、同じたけ複数個ドライバが必要である。近年、複数個のドライバの機能を内蔵するICが販売されている。複数個のドライバを内蔵する構成では、例えば、特許文献3には、複数のモータを駆動する多チャンネル負荷駆動装置が提案されている。
しかしながら、ドライバICを外部のマイコンから、信号線を使って制御する場合、ちょうど、モータの大電流変化動作時に、ぶつかる事がある。その時、モータには駆動時の瞬間、大電流が流れ、ドライバICのグランドラインに、ノイズが乗ることがある。 However, when the driver IC is controlled from an external microcomputer using a signal line, the driver IC may collide with a large current changing operation of the motor. At that time, a large current flows through the motor at the moment of driving, and noise may get on the ground line of the driver IC.
その信号線に、マイコンから新しい設定値が設定されたとすると、上記のノイズの影響を受け、その新しい設定値が誤設定される可能性がある。この誤設定による誤動作により、モータが破損するといった問題があった。 If a new set value is set to the signal line from the microcomputer, the new set value may be erroneously set under the influence of the noise. There has been a problem that the motor is damaged due to a malfunction caused by the erroneous setting.
本発明は、クロック端子とデータ端子の2端子で通信するシリアル通信を用いて、前記シリアル通信を通じて設定された設定値を基にモータの駆動を制御するモータ制御回路において、前記モータに供給する電流を制御するトランジスタの制御信号を受け、無効期間を示す無効期間信号を出力する無効期間検出回路と、前記無効期間信号が無効期間を示す期間、前記クロック端子から印加されるクロックをゲートするゲート回路と、を備えることを特徴とするモータ制御回路を提供する。 The present invention relates to a current supplied to the motor in a motor control circuit that controls driving of the motor based on a set value set through the serial communication using serial communication that communicates with two terminals of a clock terminal and a data terminal. An invalid period detection circuit that receives a control signal of a transistor that controls the period and outputs an invalid period signal indicating an invalid period, and a gate circuit that gates a clock applied from the clock terminal during the period when the invalid period signal indicates an invalid period And a motor control circuit comprising:
或いは、更にクロック端子とデータ端子の2端子で通信するシリアル通信を用いて、前記シリアル通信を通じて設定された設定値を基にモータの駆動を制御するモータ制御回路において、前記モータに供給する電流を制御するトランジスタの制御信号を受け、無効期間を示す無効期間信号を出力する無効期間検出回路と、前記無効期間信号が無効期間を示す期間、前記クロック端子から印加されるクロックをゲートするゲート回路と、を備えることを特徴とするモータ制御回路を提供する。 Alternatively, in the motor control circuit that controls the driving of the motor based on the set value set through the serial communication using the serial communication that communicates with the two terminals of the clock terminal and the data terminal, the current supplied to the motor is An invalid period detection circuit that receives a control signal of a transistor to be controlled and outputs an invalid period signal indicating an invalid period; a gate circuit that gates a clock applied from the clock terminal during a period when the invalid period signal indicates an invalid period; A motor control circuit is provided.
本発明の外部からモータの制御する際、設定値の誤りによる誤動作を防止することが出来る。 When controlling the motor from the outside of the present invention, it is possible to prevent malfunction due to an error in the set value.
図1は、本発明に係るモータ制御回路のモータ制御回路1を示すブロック図である。モータ制御回路1はマイコン2と接続されており、マイコン2によって制御される。マイコン2は、シリアルポートを持ち、このシリアルポートを使って、他のICを制御することが出来る。パラレルポートでも良いが、パラレルポートは通信に多数の外部端子が必要になり、現実的は不向きである。
FIG. 1 is a block diagram showing a
シリアルポートはクロック端子と当該クロック端子に同期するデータ端子との2端子で構成されるものが一般的であり、その中でも、I2Cバスは、特に一般的で、数多くのICで用いられており、汎用性が高い。今回は一例として、I2Cバスを用いたケースで紹介する。I2Cバスでは、複数のスレーブICを接続する事が出来、マスタICは個別に決められたスレーブICのアドレスを指定し、スレーブICと通信することで、そのスレーブICを自由自在に制御することが出来る。 The serial port is generally composed of two terminals, a clock terminal and a data terminal synchronized with the clock terminal. Among them, the I 2 C bus is particularly common and is used in many ICs. And versatility. This time, as an example, we will introduce a case using an I 2 C bus. With the I 2 C bus, a plurality of slave ICs can be connected, and the master IC can freely control the slave IC by designating the address of the slave IC determined individually and communicating with the slave IC. I can do it.
I2Cバスの詳細仕様に関しては、一般的な事項であり、詳細はフィリプス社のホームページ等に開示されており、ここでは省略する。I2Cバスで用いられる2本の信号線は、シリアルクロック(SCK)とシリアルデータ(SDA)であり、SCKは端子104、SDAは端子105から、それぞれ印加される。通信を始めるには、マスタICが通信により選択されるスレーブICのアドレスを指定する必要がある。マスタICはマイコン2に相当し、スレーブICはモータ制御回路1に相当する。
The detailed specification of the I 2 C bus is a general matter, and details are disclosed on the website of Philips, etc., and are omitted here. Two signal lines used in the I 2 C bus are a serial clock (SCK) and serial data (SDA), and SCK is applied from a
モータ制御回路1の内部には、第1モータ3と第2モータ4をドライブする第1ドライバ回路7と第2ドライバ回路8の2つのドライバ回路が内蔵されている。但し、1つのI2Cバスで、2つのドライバ回路を個別に制御するために、それぞれのモータドライバ回路に固有のアドレスを2つ用意する必要は無く、1つの固有のアドレスを用意すれば良い。
The
ここで、固有のアドレスを設定するために、本実施例ではアドレス端子を設けている。端子106、端子107、端子108の3端子がそれに相当し、一般的なI2Cバスで設定されるスレーブICに割り振られた固有のアドレス値7ビットのうち、下位3ビットを端子の状態により、外部から設定できる様にしている。これは、下位の3ビットを変えることで、最大で8個のICを同一のI2Cバスに接続できる構成としている。また、1個しか接続しない場合や、外部端子を設けられない場合には、内部のROMを用いて、ROMのデータと照合しても良い。
Here, in order to set a unique address, an address terminal is provided in this embodiment. The
図2に示す様に、マイコン2から、I2Cバスで通信するためのスタートコンディションが送られた後に、クロックに同期して、スレーブICに割り振られた固有のアドレス値(7ビット)が出力される。インターフェイス回路11の内にあるI2Cバスコントローラ回路12は、スタートコンディション後に送られたデータ(アドレス)を、受信データバッファ回路13に送る。受信データバッファ回路13は、保持したデータ(アドレス)を、アドレス一致検出回路14に送る。
As shown in FIG. 2, after a start condition for communication via the I 2 C bus is sent from the
アドレス一致検出回路14では、予め、内部にアドレス値を保持している。もし、送られて来たデータ(アドレス値)が、第1モータ3、第2モータ4を示すアドレス値であることを確認出来ると、マイコン2からのデータが順次、送信が許可され、当モータ制御回路と通信可能状態となる。
The address match detection circuit 14 holds an address value therein in advance. If the sent data (address value) can be confirmed to be the address values indicating the
アドレス一致検出回路14は、第1モータ3のアドレス値と、第2モータ4のアドレス値、それぞれ、2つのアドレス値を持って、第1モータ3と第2モータ4、それぞれに個別に設定しても良いが、アドレスが1つでも、その1つのアドレスが示すメモリのうち、最初の半分の24ビットが第1モータ3の設定で、後の半分の24ビットが第2モータ4の設定と分けておけば、敢えて、2つのアドレスを必要としない。
The address coincidence detection circuit 14 has two address values, that is, the address value of the
これにより、それぞれのモータドライバ回路に固有のアドレスを設定する必要は無く、ICとしての単一アドレスを設定することが出来る。これにより複数のドライバ回路を有する場合でも、I2Cバスのアドレスを1つ用意すれば良く、IC識別としてアドレス数に制限を受けても有効に使うことが出来る。 Thus, it is not necessary to set a unique address for each motor driver circuit, and a single address as an IC can be set. As a result, even when a plurality of driver circuits are provided, it is sufficient to prepare one address of the I 2 C bus, and even if the number of addresses is limited as IC identification, it can be used effectively.
従来は、モータドライバを2個搭載する場合には、ICは別々となるので、当然、個別に設定する必要があり、2つのアドレスを必要としたが、内蔵するモータドライバの個数が増えても、レジスタの容量を増やすだけで対応することが出来、1つのI2Cバスのアドレス端子のみを用いて、複数のモータとの通信が可能となる。例えば、モータドドライバ4個入りICが8個あっても、32個分のアドレスは必要なく、ICの個数と同じ、8個あれば良い。 Conventionally, when two motor drivers are mounted, since the ICs are separate, naturally, it is necessary to set each individually, and two addresses are required. However, even if the number of built-in motor drivers increases, This can be dealt with by simply increasing the capacity of the register, and communication with a plurality of motors is possible using only the address terminal of one I 2 C bus. For example, even if there are 8 ICs with 4 motored drivers, there is no need for 32 addresses, and there may be 8 which is the same as the number of ICs.
本実施例では、モータドライバの2個分の設定値の通信が終了すると、マイコン2はモータ制御回路1にデータ転送終了のストップコンディションを送信し、第1モータ3と第2モータ4への設定が終了する。データ転送の間、受信バッファ回路13では、受け取ったデータを8ビット単位で、受信データ格納レジスタ15に書き込んで行く。
In this embodiment, when the communication of the set values for the two motor drivers is completed, the
受信データバッファ回路13と受信データ格納レジスタ15は、フリップフロップで構成されたレジスタ(記憶装置)が利用される。SRAMやDRAMの様なメモリで構成しても良いが、アドレス管理が必要になり、返って、ICのチップ面積が拡大し、システム設計も複雑になってしまう。レジスタだと 決まった順序で記憶するだけで、アドレス管理は必要なく、必要な情報を効率よく記憶出来る。
As the reception
一般的に、モータは動作中にモータの動作環境が大きく変更されると、モータ自体の故障の原因になることがあるので、受信データ格納レジスタ15に書き込まれた最新の設定値は、直ぐに第1モータ3の動作環境には反映されない。
In general, if the motor operating environment is significantly changed during operation, the motor itself may be damaged, so the latest set value written in the received data storage register 15 is immediately updated. It is not reflected in the operating environment of 1
モータの最新の設定値の反映は、I2Cバスを通じて、ストップコンディションによりデータ転送が終了した後、I2Cバスのクロック端子(SCK)とは、別途、設けられたモータの駆動用パルス(CLK1)端子100を用いて、その駆動パルスの変化を検出し、その変化のタイミングによって、最新の設定がモータ動作環境に反映される。端子100から印加されたモータの駆動パルス(CLK1)は、第1整形ノイズ除去回路20によって、ヒゲの様なノイズを除去し、第1立上り検出回路24と第1遅延回路28の双方に印加される。
Reflects the most recent setting value of the motor, through the
第1立上り検出回路24では、停止状態から、駆動パルス(CLK1)の変化を検知する。第1立上り検出回路24の構成は、内部にコンパレータとカウンタを持ち、一定の期間、変化が無いと停止状態と判断し、その後、入力信号である駆動パルスの状態の変化を検知すると、その変化を第1モータモード設定保持回路16に知らせる。第1モータモード設定保持回路16は、第1立上り検出回路24からの信号に応じて、受信データ格納レジスタ回路15に保持されているデータがそのまま転送されてくる。
The first rise detection circuit 24 detects a change in the drive pulse (CLK1) from the stop state. The configuration of the first rising edge detection circuit 24 has a comparator and a counter inside, and if there is no change for a certain period, it is determined as a stopped state. Is notified to the first motor mode
第1遅延回路28は、駆動パルス(CLK1)を遅延させる。第1遅延回路28は、1サイクル程の大きな遅れは必要ないので、バッファを数段組み合わせた基本的な遅延回路で構成する。十分に時間を取りたい場合には、シフトレジスタを用いて、遅延させても良い。この第1遅延回路28で遅延されている間に、第1モータモード設定保持回路16の設定値は、実際にモータを制御する第1ドライバ回路7内に設けられたモータ動作環境に反映されることになる。
The
図3は、上記のI2Cバスを通じたストップコンディションの後のモータ駆動パルス(CLK1)の立上り変化によって、最新の設定値が反映される詳細タイミング図を示す。先ず、受信データ格納レジスタ回路15に最新のモータ設定値が保持される。次に、モータ駆動パルス(CLK1)及びモータ駆動パルス(CLK2)の立上り変化を検知し、そのタイミングで受信データ格納レジスタ回路15に保持されている最新の設定値を、第1モータモード設定保持回路16及び第2モータモード設定保持回路17に書き込む。
FIG. 3 shows a detailed timing diagram in which the latest set value is reflected by the rising change of the motor drive pulse (CLK1) after the stop condition through the I 2 C bus. First, the latest motor setting value is held in the reception data storage register circuit 15. Next, the rising change of the motor driving pulse (CLK1) and the motor driving pulse (CLK2) is detected, and the latest setting value held in the reception data storage register circuit 15 at the timing is changed to the first motor mode setting holding circuit. 16 and the second motor mode
この時、ストップコンディションの後、受信データ格納レジスタ回路15に、最新のデータが格納されても、直ちに、最新の設定値を反映した動作を行わない。シリアルポートを使った通信では、シリアルでデータを送信して行くため、短い時間で、最新の設定値が完成する分けでは無い。時間がかかるので、いつも決まったタイミングで更新できないという問題がある。 At this time, even if the latest data is stored in the reception data storage register circuit 15 after the stop condition, the operation reflecting the latest setting value is not performed immediately. In communication using a serial port, since the data is transmitted serially, the latest setting values are not completed in a short time. Since it takes time, there is a problem that it cannot always be updated at a fixed timing.
そこで、最新の設定値を反映するタイミングを確定するため、駆動パルス(CLK1)を利用する。駆動パルス(CLK1)を一定の期間、Lレベル(停止状態)とし、次に、動作を開始するタイミング(再始動タイミング)で、最新のモータ設定値を反映する。 Therefore, the drive pulse (CLK1) is used to determine the timing for reflecting the latest set value. The drive pulse (CLK1) is set to L level (stopped state) for a certain period, and then the latest motor set value is reflected at the timing of starting the operation (restart timing).
この処理により、第1モータ3に最新の設定値を反映させるタイミングを明確にすることが出来る。しかし、駆動パルス(CLK1)は、モータの回転に直接、関係しているので、第1モータモード設定保持回路16の内容が切り換わり、直ちに、回転を制御することは難しい。そこで、若干の時間差が必要になる。この若干の時間差を作成するために、第1遅延回路28が必要になる。
By this process, the timing at which the latest set value is reflected on the
この動作のポイントは、比較的に時間の掛かるシリアルポートを用いて、最新の設定値を受信データレジスタ回路15に格納させておき、一定期間の駆動パルスの停止期間を利用し、最新の設定値に更新するタイミングを確定するために構成とする。 The point of this operation is that the latest setting value is stored in the reception data register circuit 15 using a relatively time-consuming serial port, and the driving pulse stop period for a certain period is used to obtain the latest setting value. It is configured to determine the update timing.
上記の手順により、マイコン2から、第1モータ3の最新の設定値に更新するタイミングを自由自在に操作することが可能となる。モータは必ずしも、停止状態からの回転状態になるとは限らない。モータの回転中に、設定値を変更することはよくあることで、動作中に、カウンタの設定値を変更すると、誤動作を引き越す可能性があり、連続したモータ動作が出来ない不都合が生じる。そこで、駆動パルスを一定期間、停止状態とし、次の動作開始のタイミングで設定値を更新することは、モータに取っては、最も安全なタイミングでもある。
With the above procedure, the
受信データ格納レジスタ回路15の容量は、モータを制御するのに必要なビット数分だけ、記憶容量が必要であり、48ビット程度あると、第1モータ3、第2モータ4を制御するのに、必要なビット数となる。受信データバッファ回路13は、8ビットとすると、6回、受信データ格納レジスタ回路15に送信すると、データは一杯になる。つまり、I2Cバスを通じて、6回分、データを送信した後に、ストップコンディションを送り、データを完成させる必要がある。
The capacity of the reception data storage register circuit 15 needs to have a storage capacity corresponding to the number of bits necessary to control the motor. If there are about 48 bits, the capacity of the
更に、受信データ格納レジスタ回路15は、第1モータモード設定保持回路16と第2モータモード設定保持回路17を合わせたビット数と同じであると、都合が良い。同じビット数であると、アドレスデコーダなどの介在は必要とせず、そのまま、同じビットの位置に、転送するだけ済み、シンプルな構成が可能となる。
Further, it is convenient that the reception data storage register circuit 15 has the same number of bits as the sum of the first motor mode
図4は、第1ドライバ回路7の内部のブロック図を示す。第1ドライバ回路7の内部には、モータを制御するクロックの立上り/立下り検出回路71、モータの各励磁モードを設定する励磁モード設定回路72、基準電圧を生成しモータの電流を決定する基準電圧生成回路73、立上り/立下り検出回路71からの検出結果と励磁モード設定回路72からの設定信号に応じて、動作する進相カウンタ74と、実際に第1モータ3を制御するトランジスタ50、51、52、53のスイッチング制御を行う相励磁信号生成回路75、基準電圧生成回路73と進相カウンタ74からの信号を受け、擬似的な正弦波を生成する擬似正弦波生成回路76、擬似正弦波生成回路76からの正弦波を受け、その正弦波に応じたPWM波形を生成するPWM制御回路77を備えている。
FIG. 4 shows an internal block diagram of the
第1モータモード設定保持回路16では、順番に、最初の4ビット(1ビット目〜4ビット目まで)が立上り/立下り検出回路71の設定に利用され、次の4ビット(5ビット目〜8ビット目まで)が励磁モード設定回路72の設定に利用され、次の4ビット(9ビット目〜12ビット目まで)が進相カウンタ74の設定に利用され、次の4ビット(13ビット目〜16ビット目まで)が相励磁信号生成回路75の設定に利用され、次の4ビット(17ビット目〜20ビット目まで)が基準電圧生成回路73の設定に利用される。各ビットの順序は、第1ドライバ回路の動作環境に合わせれば良い。
相励磁信号生成回路75では、進相カウンタ74からカウント値を用いて、その励磁モードに必要な信号を作成する。これら一連の設定により、モータ制御回路1は、第1モータ3に対し、2相の駆動端子φ1(A)、φ2(AB)、φ3(B)、φ4(BB)を出力する。
In the first motor mode
The phase excitation
具体的な出力例として、図5に2相励磁モードのタイミングチャートを示し、図6に1−2相励磁モードのタイミングチャートを示す。相励磁信号生成回路75からの進相カウンタ値によって、多岐に渡るモータ励磁モードを自在に設定することが出来る。
As a specific output example, FIG. 5 shows a timing chart of the two-phase excitation mode, and FIG. 6 shows a timing chart of the 1-2 phase excitation mode. Various motor excitation modes can be freely set according to the phase advance counter value from the phase excitation
また、上記の実施例では、2相のステッピングモータを用いた場合を説明したが、3相モータ、5相モータでも、制御トランジスタが増加するだけ、基本的な回路構成には大きな変更は無い。
<<詳細の説明>>
モータ制御回路1は、I2Cバスの信号線を使ってマイコン2から、設定値を受ける瞬間、ちょうど、第1モータ3、第2モータ4の大電流変化動作時に、ぶつかる事がある。その際、モータには駆動時の瞬間、大電流が流れ、モータ制御回路1のGNDラインに、ノイズが乗ることがあり、IC全体の動作に影響を与える場合がある。
In the above-described embodiment, a case where a two-phase stepping motor is used has been described. However, even in a three-phase motor and a five-phase motor, the basic circuit configuration is not significantly changed as the number of control transistors increases.
<< Detailed explanation >>
The
すると、I2Cバスの信号線にも、影響を与えることがあり、マイコン2からの新しい設定値が、上記のノイズの影響を受け、誤設定される可能性がある。誤設定でモータが誤動作し、モータやICが破損することがある。
Then, the signal line of the I 2 C bus may be affected, and a new set value from the
図8は上記の動作を示す。第1モータ3、第2モータ4の駆動を制御するトランジスタ50〜57がオンオフするトランジスタ駆動信号(φ1〜φ4)が変化するタイミングで、100nsの間でGNDノイズが出ることがある。IC内部にも影響を与え、出力信号波形に示す様に、信号波形にもGNDノイズの影響を及ぼす。当然、このGNDノイズの期間に、I2Cバスの信号線を通じて、マイコン2からの設定された信号は、信頼性が低くなる。
FIG. 8 shows the above operation. A GND noise may occur for 100 ns at the timing when the transistor drive signals (φ1 to φ4) that turn on and off the transistors 50 to 57 that control the driving of the
そこで、GNDノイズが出る期間、マイコン2からの設定された信号を取り込まない様に、トランジスタ駆動信号(φ1〜φ4)が立ち上がるタイミングから、少しの期間、無効期間信号を作成する。この無効期間信号は、無効期間検出回路93で作成する。無効期間検出回路93は、第1ドライバ回路7、第2ドライバ回路8にある相励磁信号生成回路からの信号が立上りを検知し、GNDノイズが出る一定期間、アクティブになる信号を作成する。この一定期間を作成するのは、カウンタを用いても、ディレイ回路を用いても良い。
Therefore, an invalid period signal is generated for a short period from the timing when the transistor drive signals (φ1 to φ4) rise so that the set signal from the
図9は、モータの制御に用いられるCLK1を基に生成されるモータ定電流制御用トランジスタ駆動信号(ゲート駆動波形)と、I2CバスのSCK(シリアルクロック)と、無効期間信号と、システムクロックと、ゲート回路94からの出力を示す。無効期間信号により、システムクロックを止めて、サンプリングを止めても、ゲート回路94からの出力は、図9に示す通り、ノイズのみを除去することが出来る。これは、サンプリングクロックがある程度、高速で、無効期間信号がそれ程、長い期間で無いという条件があるが、GNDノイズの影響を無視することが出来、I2Cバスの信号線を通じて、マイコン2からの設定された信号は、格段に信頼性を向上させることが出来る。
FIG. 9 illustrates a motor constant current control transistor drive signal (gate drive waveform) generated based on CLK1 used for motor control, an I 2 C bus SCK (serial clock), an invalid period signal, a system The clock and the output from the gate circuit 94 are shown. Even if the system clock is stopped and sampling is stopped by the invalid period signal, only the noise can be removed from the output from the gate circuit 94 as shown in FIG. Although there is a condition that the sampling clock is fast to some extent and the invalid period signal is not so long, the influence of the GND noise can be ignored, and from the
図10は、ゲート回路94の内部の詳細を示す。ここでは4段の立上り検出回路の一例として示している。ゲート回路94は、特に影響を与えるI2Cバスのうち、クロック端子(SCK)の側に設ける。 FIG. 10 shows details of the inside of the gate circuit 94. Here, an example of a four-stage rising detection circuit is shown. The gate circuit 94 is provided on the clock terminal (SCK) side of the I 2 C bus that particularly affects the gate circuit 94.
先ず、クロックジェネレータ92からの出力は、水晶発振子90からの信号を受け、矩形波を生成するクロック発振回路91を通じ、クロック発振回路91からの信号をプログラマブルに分周比を変える分周回路(クロックジェネレータ92)からの出力となる。クロックジェネレータ92から出力されるクロックは、モータ制御回路1の内部で、ラッチ、フリップフロップ等のタイミングに使用されるシステムクロックとして、IC内部で幅広く使用される。
First, an output from the clock generator 92 receives a signal from the crystal oscillator 90, and through a clock oscillation circuit 91 that generates a rectangular wave, a frequency dividing circuit (programmably changing the frequency dividing ratio of the signal from the clock oscillation circuit 91). The output from the clock generator 92). The clock output from the clock generator 92 is widely used inside the IC as a system clock used for timing of latches, flip-flops and the like inside the
ゲート回路94の入力信号は3つある。I2Cバスのバスクロック信号(SCK)と、クロックジェネレータ92からのシステムクロックと、無効期間検出回路からの無効期間信号の3つである。SCKは、直列に4段、接続されたフリップフロップのデータ端子に印加され、フリップフロップのクロック端子には、システムクロックを無効期間信号でゲートしたゲートクロックを使用する。 There are three input signals to the gate circuit 94. The bus clock signal (SCK) of the I 2 C bus, the system clock from the clock generator 92, and the invalid period signal from the invalid period detection circuit. SCK is applied to data terminals of flip-flops connected in four stages in series, and a gate clock obtained by gating the system clock with an invalid period signal is used as the clock terminal of the flip-flop.
上記の構成により、SCKにGNDノイズが載ったとしても、4段のフリップフロップと、GNDノイズの期間を避けたゲートクロックを用いることで、GNDノイズの影響を受けない構成が出来る。GNDノイズによって、ある期間のシステムクロックを出さない様にしても、システムの影響は無い。 With the above configuration, even if the GND noise is placed on the SCK, a configuration that is not affected by the GND noise can be achieved by using a four-stage flip-flop and a gate clock that avoids the GND noise period. Even if the system clock is not output for a certain period due to the GND noise, there is no influence of the system.
その理由としては、システムクロックは、一般的に10MHz程度以上を予定している。水晶発振子90は、20MHz程度以上の発振子を用いており、それを2分周して、システムクロックとしている。I2Cバスのクロック信号(SCK)は、高速仕様もあるが、一般的には、1MHz程度を用いることが多く、GNDノイズが出る期間、1サイクル程度、SCKをサンプリングしなくても、GNDノイズが無くなってからのタイミングで、SCKを変化させても、システムクロックが高速なので、次の処理で問題が起こることは無い。 The reason is that the system clock is generally scheduled to be about 10 MHz or more. The crystal oscillator 90 uses an oscillator of about 20 MHz or more, and divides it by two to obtain a system clock. The I 2 C bus clock signal (SCK) has a high-speed specification, but generally, about 1 MHz is often used, and GND is generated even if SCK is not sampled for about one cycle during a period of GND noise. Even if the SCK is changed at the timing after the noise disappears, the system clock is high speed, so that no problem occurs in the next processing.
また、図10では、4段、直列接続したフリップフロップによる立上り検出回路としたが、1段でも、2段でも効果がある。ただし、ここで問題としているノイズの原因はSCKを送り出す外部回路のGNDラインと本ICの入力回路ブロックのGNDライン間の瞬間的なレベル変動によるものであるため、信号の入り口に当たる入力回路の初段に挿入されていないと効果はない。そうしていないと、一度IC内に取り込まれてしまった場合、後段の処理回路で誤動作を招かないよう、さらに二重三重の特別な対策を施す必要が出てくる。 Further, in FIG. 10, the rise detection circuit is constituted by four stages of flip-flops connected in series, but it is effective in one or two stages. However, since the cause of the noise in question here is due to instantaneous level fluctuations between the GND line of the external circuit that sends out SCK and the GND line of the input circuit block of this IC, the first stage of the input circuit that hits the signal entrance If it is not inserted, it has no effect. Otherwise, once it is taken into the IC, it is necessary to take a special measure of double-triple so as not to cause a malfunction in the subsequent processing circuit.
以上発明を実施するための最良の形態について説明したが、上記実施の形態は本発明の理解を容易にするためのものであり、本発明を限定して解釈するためのものではない。本発明はその趣旨を逸脱することなく変更、改良され得ると共に、本発明にはその等価物も含まれる。 Although the best mode for carrying out the invention has been described above, the above embodiment is intended to facilitate understanding of the present invention and is not intended to limit the present invention. The present invention can be changed and improved without departing from the gist thereof, and the present invention includes equivalents thereof.
例えば、図1に示したモータドライバ回路は、2個を内蔵したケースとしたが、モータドライバを3個、4個を内蔵した場合でも、同様に利用することが出来る。図7に、モータドライバ回路を4個、内蔵した場合を示す。モータドライバ回路を4個、内蔵した場合でも、アドレス一致検出回路内には、固有のアドレス値を1つ、予め用意しておけば良い。
以上の様に、モータドライバ回路が増えてもレジスタの容量を増やせばよく、新たに外部端子を設ける必要がなく、効率的にモータの制御を実現できる。
For example, although the motor driver circuit shown in FIG. 1 is a case with two built-in cases, it can be similarly used even when three or four motor drivers are built-in. FIG. 7 shows a case where four motor driver circuits are incorporated. Even when four motor driver circuits are built in, one unique address value may be prepared in advance in the address match detection circuit.
As described above, even if the number of motor driver circuits is increased, it is only necessary to increase the capacity of the register, and it is not necessary to newly provide an external terminal, so that the motor can be efficiently controlled.
1 モータ制御回路
2 マイコン
3 第1モータ
4 第2モータ
5 第3モータ
6 第4モータ
7 第1ドライバ回路
8 第2ドライバ回路
11 インターフェイス回路
12 I2Cバスコントローラ回路
13 受信バッファ回路
14 アドレス一致検出回路
15 受信データ格納レジスタ回路
16 第1モータモード設定保持回路
17 第2モータモード設定保持回路
20 第1整形ノイズ除去回路
21 第2整形ノイズ除去回路
24 第1立上り検出回路
25 第2立上り検出回路
28 第1遅延回路
29 第2遅延回路
1
Claims (3)
前記モータに供給する電流を制御するトランジスタの制御信号を受け、無効期間を示す無効期間信号を出力する無効期間検出回路と、
前記無効期間信号が無効期間を示す期間、前記クロック端子から印加されるクロックをゲートするゲート回路と、を備えることを特徴とするモータ制御回路。 In the motor control circuit for controlling the driving of the motor based on the set value set through the serial communication, using the serial communication communicating with the two terminals of the clock terminal and the data terminal,
An invalid period detection circuit that receives a control signal of a transistor that controls a current supplied to the motor and outputs an invalid period signal indicating an invalid period;
A motor control circuit comprising: a gate circuit that gates a clock applied from the clock terminal during a period when the invalid period signal indicates an invalid period.
クロック発振回路を備え、
前記ゲート回路は、ロジック回路と、フリップフロップと、を有し、前記ロジック回路は、前記クロック発振回路からの信号を前記無効期間信号でゲートしたゲートクロックを作成し、前記ゲートクロックを前記フリップフロップに印加することを特徴とする請求項1記載のモータ制御回路。 The motor control circuit according to claim 1,
It has a clock oscillation circuit,
The gate circuit includes a logic circuit and a flip-flop, and the logic circuit creates a gate clock obtained by gating the signal from the clock oscillation circuit with the invalid period signal, and the gate clock is converted into the flip-flop. The motor control circuit according to claim 1, wherein the motor control circuit is applied to the motor.
前記複数個のフリップフロップの初段のデータ端子に前記クロックを印加し、前記複数個のフリップフロップのクロック端子に前記ゲートクロックを印加することを特徴とする請求項2記載のモータ制御回路。 The gate circuit includes a plurality of flip-flops connected in series,
3. The motor control circuit according to claim 2, wherein the clock is applied to a first data terminal of the plurality of flip-flops, and the gate clock is applied to clock terminals of the plurality of flip-flops.
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008253403A JP2010088186A (en) | 2008-09-30 | 2008-09-30 | Motor control circuit |
US12/570,449 US8791660B2 (en) | 2008-09-30 | 2009-09-30 | Motor control circuit |
US14/340,928 US9331628B2 (en) | 2008-09-30 | 2014-07-25 | Motor control circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008253403A JP2010088186A (en) | 2008-09-30 | 2008-09-30 | Motor control circuit |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2010088186A true JP2010088186A (en) | 2010-04-15 |
Family
ID=42251596
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008253403A Ceased JP2010088186A (en) | 2008-09-30 | 2008-09-30 | Motor control circuit |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2010088186A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014045381A (en) * | 2012-08-27 | 2014-03-13 | Fanuc Ltd | Data communication device that performs serial communication to control motor |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH06189584A (en) * | 1992-12-18 | 1994-07-08 | Seiko Epson Corp | Control device for position sensorless and brushless motor |
JPH09229972A (en) * | 1996-02-28 | 1997-09-05 | Mitsubishi Electric Corp | Current detector |
JP2006246698A (en) * | 1997-04-14 | 2006-09-14 | Sony Corp | Motor drive device |
JP2007116858A (en) * | 2005-10-21 | 2007-05-10 | Rohm Co Ltd | Motor drive device and electronic device using it |
-
2008
- 2008-09-30 JP JP2008253403A patent/JP2010088186A/en not_active Ceased
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH06189584A (en) * | 1992-12-18 | 1994-07-08 | Seiko Epson Corp | Control device for position sensorless and brushless motor |
JPH09229972A (en) * | 1996-02-28 | 1997-09-05 | Mitsubishi Electric Corp | Current detector |
JP2006246698A (en) * | 1997-04-14 | 2006-09-14 | Sony Corp | Motor drive device |
JP2007116858A (en) * | 2005-10-21 | 2007-05-10 | Rohm Co Ltd | Motor drive device and electronic device using it |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014045381A (en) * | 2012-08-27 | 2014-03-13 | Fanuc Ltd | Data communication device that performs serial communication to control motor |
US8952636B2 (en) | 2012-08-27 | 2015-02-10 | Fanuc Corporation | Data communication device that carries out serial communication in order to control motor |
DE102013013848B4 (en) * | 2012-08-27 | 2018-01-11 | Fanuc Corporation | A data communication device that performs serial communication for controlling a motor |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7586337B2 (en) | Circuit for switching between two clock signals independently of the frequency of the clock signals | |
US20060156112A1 (en) | Reduced signaling interface method & apparatus | |
US9331628B2 (en) | Motor control circuit | |
US10083137B2 (en) | Peripheral interface circuit for serial memory | |
US20070038795A1 (en) | Asynchronous bus interface and processing method thereof | |
US7420869B2 (en) | Memory device, use thereof and method for synchronizing a data word | |
CN110767254A (en) | Read delay control circuit and method | |
US7587533B2 (en) | Digital programming interface between a baseband processor and an integrated radio-frequency module | |
US8018445B2 (en) | Serial data input system | |
Yang et al. | A configurable SPI interface based on APB bus | |
US8375238B2 (en) | Memory system | |
JP2001127827A (en) | Data transfer system | |
JP6230757B2 (en) | Communication device and power conversion device | |
JP2010088186A (en) | Motor control circuit | |
GB2454776A (en) | Generating a second clock signal from a first clock signal based upon a delayed control signal | |
JP2010088188A (en) | Motor control circuit | |
KR100389038B1 (en) | Synchronous sram device with late write function | |
US10915485B2 (en) | Circuit for asynchronous data transfer | |
US20160187422A1 (en) | Semiconductor device | |
JP2010088184A (en) | Motor control circuit | |
US7224623B2 (en) | Memory device having off-chip driver enable circuit and method for reducing delays during read operations | |
JP2001022692A (en) | Microcomputer and control system | |
KR100314807B1 (en) | Pipe control device of semiconductor memory device | |
JPH1125030A (en) | Bus extension control circuit | |
JP2007121063A (en) | Frequency measurement circuit |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A711 | Notification of change in applicant |
Free format text: JAPANESE INTERMEDIATE CODE: A711 Effective date: 20110531 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20110905 |
|
A711 | Notification of change in applicant |
Free format text: JAPANESE INTERMEDIATE CODE: A711 Effective date: 20130208 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20130322 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20130521 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20130819 |
|
A045 | Written measure of dismissal of application |
Free format text: JAPANESE INTERMEDIATE CODE: A045 Effective date: 20140325 |