JPH10285995A - Stepping-motor controller - Google Patents

Stepping-motor controller

Info

Publication number
JPH10285995A
JPH10285995A JP9368097A JP9368097A JPH10285995A JP H10285995 A JPH10285995 A JP H10285995A JP 9368097 A JP9368097 A JP 9368097A JP 9368097 A JP9368097 A JP 9368097A JP H10285995 A JPH10285995 A JP H10285995A
Authority
JP
Japan
Prior art keywords
phase
step motor
voltage
motor
stepping motor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP9368097A
Other languages
Japanese (ja)
Inventor
Junji Ishimaru
純二 石丸
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sharp Corp
Original Assignee
Sharp Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sharp Corp filed Critical Sharp Corp
Priority to JP9368097A priority Critical patent/JPH10285995A/en
Publication of JPH10285995A publication Critical patent/JPH10285995A/en
Pending legal-status Critical Current

Links

Landscapes

  • Control Of Stepping Motors (AREA)

Abstract

PROBLEM TO BE SOLVED: To improve response by maximally shortening the time required for transfer from the state of the stoppage of a stepping motor to the state of rotation at constant velocity. SOLUTION: The device has initializing means 1, 18 for initializing the phase of a stepping motor 14 a voltage-fluctuation detecting means 20 for detecting voltage fluctuation from the stepping motor 14, and a decision means 1 for deciding the presence of the displacement of phase generated during the stoppage of the stepping motor 14 and starting the initializing means 1. 18 only when phase is displaced. The time required for starting the stepping motor 14 is shortened by detecting the change of phase generated owing to an external factor under the state of stoppage, in which no control signal is outputted to the stepping motor 14 at that time.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、プリンタ等の機器
を駆動するステップモータを制御するための装置に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an apparatus for controlling a step motor for driving a device such as a printer.

【0002】[0002]

【従来の技術】一般に、ステップモータは、その起動時
において永久磁石の磁極位置と通電するコイルの位置と
の位置関係(=相)がずれていると、一時的に逆回転を起
こしたりして脱調する可能性が有るので、起動の際、永
久磁石の磁極位置に対応した所定のコイルが励磁される
ように、両者の位置関係を確定させる必要がある。
2. Description of the Related Art Generally, when a step motor has a positional relationship (= phase) between the position of the magnetic pole of a permanent magnet and the position of a coil to be energized at the time of startup, the step motor temporarily causes reverse rotation. Since there is a possibility of step-out, it is necessary to determine the positional relationship between the two at the time of startup so that a predetermined coil corresponding to the magnetic pole position of the permanent magnet is excited.

【0003】そのため、従来、ステップモータの駆動時
には、図8に示すように、初期化制御を行ってから、加
速制御を経て所望の等速制御に移行させるようにしてい
る。
For this reason, conventionally, when a step motor is driven, as shown in FIG. 8, initialization control is performed, and then control is shifted to desired constant speed control via acceleration control.

【0004】すなわち、図8には、4相ステップモータ
を2相励磁で駆動する制御方式の場合の一例を示してい
る。
FIG. 8 shows an example of a control system in which a four-phase step motor is driven by two-phase excitation.

【0005】ここで、ステップモータを停止状態から初
めて起動する場合には、まず、ステップモータの通電制
御用の制御信号のハイレベル期間T1を等速制御の場合
のパルス幅T3よりも大きく設定してモータが余分な慣
性力をもたないように比較的ゆっくりと回転させ、永久
磁石の磁極位置と通電するコイルの位置の関係(=相)を
最初に確定させる初期化制御を行う。こうして、初期化
制御によって相合わせが行われると、次に、制御信号の
ハイレベル期間をT21>T22>T23というように次第に
短くしてモータを加速する加速制御を行う。この加速制
御後は、一定のパルス幅T3の制御信号を加えてモータ
を等速回転させる等速制御を行う。なお、図8から分か
るように、A相とC相の各制御信号、また、B相とD相
の各制御信号はそれぞれ位相が反転しており、かつ、4
相の制御信号の各位相は順次ずれた状態で同期して制御
される。
When the step motor is started for the first time from the stop state, first, the high level period T 1 of the control signal for controlling the energization of the step motor is set to be larger than the pulse width T 3 in the case of the constant speed control. The motor is rotated relatively slowly so as not to have an extra inertial force by setting the motor, and initialization control is performed to first determine the relationship (= phase) between the magnetic pole position of the permanent magnet and the position of the energized coil. After the matching is performed by the initialization control, the high-level period of the control signal is gradually shortened to T 21 > T 22 > T 23 to perform acceleration control for accelerating the motor. After the acceleration control performs constant speed control for rotating at a constant speed motor by adding a constant control signal having a pulse width T 3. As can be seen from FIG. 8, the control signals of the A phase and the C phase, and the control signals of the B phase and the D phase are each inverted in phase.
The phases of the phase control signals are controlled synchronously with the phases shifted sequentially.

【0006】ところで、ステップモータを使用するプリ
ンタ等の情報機器においては、ステップモータの通電制
御用の制御信号がソフト的なプログラムミスなどに起因
して予め決められた位相でもって出力されていない場合
や、あるいはハード的な電圧変動などに起因して制御信
号のレベルが低下して予め決められた位相でもって出力
されていないような場合があり、そのときには、メカ機
構等が破損するおそれがある。
In an information device such as a printer using a step motor, a control signal for controlling the energization of the step motor is not output at a predetermined phase due to a software program error or the like. Or the level of the control signal is reduced due to a hardware-like voltage fluctuation, and the control signal is not output at a predetermined phase. In this case, there is a possibility that the mechanical mechanism may be damaged. .

【0007】このため、従来技術では、たとえば特開平
2―87995号公報に開示されているように、ステッ
プモータに出力される制御信号の各位相の違い(図8参
照)を利用して、ステップモータの保護を行うようにし
ている。
For this reason, in the prior art, as disclosed in, for example, Japanese Patent Application Laid-Open No. 2-87995, the difference between the phases of the control signal output to the stepping motor (see FIG. 8) is utilized. The motor is protected.

【0008】すなわち、各A相〜D相の制御信号を入力
する論理回路等を備えた位相検出回路を設け、各制御信
号が予め決められた位相でもって出力されていない場合
には、この位相検出回路から異常検出信号を出力してス
テップモータを強制的に停止させるようにしている。
That is, a phase detection circuit having a logic circuit or the like for inputting control signals for each of the A-phase to D-phase is provided. If each control signal is not output at a predetermined phase, this phase An abnormality detection signal is output from the detection circuit to forcibly stop the step motor.

【0009】[0009]

【発明が解決しようとする課題】しかしながら、上記の
特開平2―87995号公報に開示されている従来技術
の場合には、次の問題がある。
However, the prior art disclosed in Japanese Patent Laid-Open No. 2-87995 has the following problem.

【0010】(1) 位相検出回路は、ステップモータの
通電制御用の制御信号出力に基づいてモータの異常の有
無を判断するものであるため、制御信号が出力されてい
ないとき、すなわちステップモータの停止中に外的要因
(たとえば、プリンタの紙送りが手動で行われたため
に、これに伴ってステップモータが回転したような場
合)によって永久磁石の位置と通電するコイルの位置と
の組合わせがずれたときには、これを検出することがで
きない。
(1) Since the phase detection circuit determines whether or not the motor is abnormal based on the control signal output for controlling the energization of the step motor, when the control signal is not output, that is, when the step motor is External factors during outage
When the combination of the position of the permanent magnet and the position of the energized coil is misaligned due to (for example, when the stepper motor rotates accompanying the manual paper feeding of the printer), Not detectable.

【0011】このため、ステップモータの起動時には、
毎回、必ず相合わせ制御(初期化制御)を行う必要があ
り、ステップモータを等速制御するまでに時間がかかっ
ている。
Therefore, when the step motor is started,
It is necessary to always perform the phase matching control (initialization control) every time, and it takes time to control the stepping motor at a constant speed.

【0012】(2) また、プリンタに紙詰り等が生じて
いてステップモータがスムーズに回転できない状態、い
わゆるモータロックが生じているときでも、制御信号は
出力され続けており、かつ、この制御信号出力の位相に
異常がなければ、位相検出回路からは異常検出信号が出
力されないため、ステップモータを停止させることがで
きない。
(2) Further, even when the printer is jammed or the like and the stepping motor cannot rotate smoothly, that is, when a so-called motor lock occurs, the control signal continues to be output. If there is no abnormality in the output phase, no abnormality detection signal is output from the phase detection circuit, so that the stepping motor cannot be stopped.

【0013】このような不都合をなくして、モータロッ
クを確実に検出するためには、従来、別途にモータロッ
ク検出専用のセンサを設ける必要があるため、その分、
コストアップとなる。
In order to eliminate such inconveniences and reliably detect the motor lock, conventionally, it is necessary to separately provide a dedicated motor lock detection sensor.
This will increase costs.

【0014】本発明は、従来のこのような問題点に鑑み
てなされたもので、ステップモータに対して制御信号が
出力されていない停止状態において外的要因のために発
生した相の変化を検出できるようにして、起動時間をで
きるだけ短縮化し、さらに、従来のような専用のセンサ
を設けなくても、ステップモータのモータロックの有無
を検出できるようにして、コストダウンを図ることを課
題とする。
The present invention has been made in view of such a conventional problem, and detects a phase change caused by an external factor in a stop state in which a control signal is not output to a step motor. It is an object of the present invention to reduce the startup time as much as possible, and to detect the presence or absence of the motor lock of the step motor without providing a dedicated sensor as in the related art, thereby reducing costs. .

【0015】[0015]

【課題を解決するための手段】本発明は、上記の課題を
解決するため、次の構成を採用している。
The present invention employs the following structure to solve the above-mentioned problems.

【0016】すなわち、請求項1記載の発明に係るステ
ップモータ制御装置は、ステップモータの相を初期化す
る初期化手段と、ステップモータからの電圧変動を検出
する電圧変動検出手段と、この電圧変動検出手段からの
検出出力に応じて、ステップモータ停止中に発生した相
のずれの有無を判断し、相のずれが発生した場合にのみ
前記初期化手段を起動する判断手段とを備えている。
That is, according to the first aspect of the present invention, there is provided a step motor control device, comprising: an initializing means for initializing a phase of a step motor; a voltage fluctuation detecting means for detecting a voltage fluctuation from the step motor; A determination means is provided for determining the presence or absence of a phase shift occurring during stoppage of the step motor in accordance with the detection output from the detection means, and for activating the initialization means only when a phase shift has occurred.

【0017】この構成においては、ステップモータを制
御してないときに外的要因によって相のずれが発生した
か否かを検出できるので、相がずれていない場合には初
期化制御を省略することができる。
In this configuration, it is possible to detect whether or not a phase shift has occurred due to an external factor when the step motor is not controlled. Therefore, if the phase has not shifted, the initialization control is omitted. Can be.

【0018】請求項2記載の発明に係るステップモータ
制御装置は、請求項1記載の構成において、前記電圧変
動検出手段からの検出出力に基づいて、いずれの相から
電圧変動が発生したかを判定する相判定手段と、この相
判定手段で判定された相のデータを記憶する相記憶手段
と、この相記憶手段に記憶されている相のデータに基づ
いて、ステップモータの駆動に際して起動すべき相を決
定する相決定手段とを備えている。
According to a second aspect of the present invention, in the configuration of the first aspect, based on the detection output from the voltage fluctuation detecting means, it is determined from which phase the voltage fluctuation has occurred. Phase determining means, phase storing means for storing data of the phase determined by the phase determining means, and a phase to be started when the step motor is driven based on the phase data stored in the phase storing means. And phase determining means for determining

【0019】この構成においては、外的要因によって相
がずれても、相がずれた後のステップモータの相の位置
を特定できるため、請求項1の場合よりも初期化制御を
行う頻度が一層少なくなり、起動時間をさらに短縮化す
ることが可能となる。
In this configuration, even if the phase shifts due to an external factor, the position of the phase of the step motor after the phase shift can be specified, so that the initialization control is performed more frequently than in the case of the first aspect. And the startup time can be further reduced.

【0020】請求項3記載の発明に係るステップモータ
制御装置は、請求項1または請求項2記載の構成におい
て、ステップモータ駆動中の駆動電圧を計測する駆動電
圧計測手段と、この駆動電圧計測手段の出力を予め設定
された基準値と比較し、ステップモータの駆動電圧が基
準値よりも低下した場合には、モータ異常と判断してス
テップモータを強制的に停止させる停止手段とを備えて
いる。
According to a third aspect of the present invention, there is provided a stepping motor control device according to the first or second aspect, wherein the driving voltage measuring means measures a driving voltage during driving of the stepping motor, and the driving voltage measuring means. And a stop means for comparing the output of the step motor with a preset reference value, and when the drive voltage of the step motor falls below the reference value, determining that the motor is abnormal and forcibly stopping the step motor. .

【0021】この構成においては、紙詰りなどでステッ
プモータがモータロックしていることを検出できるた
め、別の専用のセンサーを設ける必要がなく、コストダ
ウンを図ることができる。
In this configuration, since it is possible to detect that the step motor is locked due to paper jam or the like, it is not necessary to provide another dedicated sensor, and the cost can be reduced.

【0022】[0022]

【発明の実施の形態】この実施形態では、電子式金銭登
録機のプリンタの紙送り装置として、本発明のステップ
モータ制御装置を使用した場合について説明するが、本
発明は必ずしもこのような機器に限定されるものではな
く、広くステップモータを備えた機器において、これを
制御する装置に適用可能である。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS In this embodiment, a case will be described in which the step motor control device of the present invention is used as a paper feeding device of a printer of an electronic cash register. However, the present invention is not necessarily applied to such a device. The present invention is not limited to the above and can be widely applied to a device having a step motor and a device for controlling the same.

【0023】図1は、電子式金銭登録機の全体構成を示
すブロック図である。
FIG. 1 is a block diagram showing the overall structure of an electronic cash register.

【0024】この金銭登録機は、装置全体の動作を制御
するCPU1、各周辺機器を制御するための各種の命令
が予め記憶されているROM2、各周辺機器の制御時の
データやフラグを記憶するRAM3、設定データを入力
するキーボード4、設定が完了したときやエラーを知ら
せるブザー5、キー入力されたデータや設定状況等を表
示するディスプレイ7、赤外線通信を行う通信I/F
(インターフェイス)8、設定したデータや装置の状態等
を印字するプリンタ9、金銭や小切手等を収納するため
のドロワー10を備える。
This cash register machine stores a CPU 1 for controlling the operation of the entire apparatus, a ROM 2 in which various commands for controlling each peripheral device are stored in advance, and data and flags for controlling each peripheral device. RAM 3, keyboard 4 for inputting setting data, buzzer 5 for notifying when setting is completed or an error, display 7 for displaying key-input data, setting status, etc., communication I / F for infrared communication
(Interface) 8, a printer 9 for printing set data, device status, and the like, and a drawer 10 for storing money, checks, and the like.

【0025】図2(a)はROM2の内部の記憶領域を示
す説明図、図2(b)はRAM3の記憶領域を示す説明図
である。
FIG. 2A is an explanatory view showing a storage area inside the ROM 2, and FIG. 2B is an explanatory view showing a storage area in the RAM 3.

【0026】ROM2には、装置全体を制御するための
アプリケーションプログラム21、ステップモータを駆
動するための制御データが格納された制御データテーブ
ル22、ステップモータを駆動した際に計測される駆動
電圧が正常か否かを比較するための基準値のデータが格
納されたデータテーブル23、計測されたデータが異常
であった場合にその旨を知らせるための表示用データが
格納されたメッセージテーブル24の各記憶領域がそれ
ぞれ確保されている。
The ROM 2 includes an application program 2 1 for controlling the entire apparatus, a control data table 2 2 storing control data for driving the step motor, and a drive voltage measured when the step motor is driven. data table 2 3 where data is stored in the reference value for the compare whether normal or not, the measured message table 2 the data display data for notifying to that effect if an abnormal are stored Each of the storage areas 4 is secured.

【0027】また、RAM3には、アプリケーション動
作時の各種設定値やフラグを格納するためのデータバッ
ファ31、表示すべきデータを格納するための表示デー
タバッファ32、印字データを格納するためのプリント
データバッファ33、ステップモータ停止中に発生した
電圧変動のフラグや相のデータ等を格納するための電圧
変動データバッファ34、ステップモータ駆動中に計測
した電圧を格納記憶するための計測電圧データバッファ
5の各記憶領域がそれぞれ確保されている。そして、
このRAM3が特許請求の範囲における相記憶手段に対
応している。
Further, the RAM 3, the display data buffer 3 2 for storing data buffer 3 1 for storing various setting values and flags during application operation, the data to be displayed, for storing print data print data buffer 3 3, step motor voltage fluctuations that occurred during stop flag or a phase voltage variation data buffer 3 4 for storing the data of the measurement voltage for storing stores the voltage measured during step motor drive each storage area of the data buffer 35 is ensured, respectively. And
This RAM 3 corresponds to the phase storage means in the claims.

【0028】図3は、プリンタ9とその駆動制御の部分
の構成を示すブロック図である。
FIG. 3 is a block diagram showing the configuration of the printer 9 and its drive control portion.

【0029】プリンタ9は、印字ヘッド12と紙送り用
のステップモータ14とを備える。ステップモータ14
は、本例では、2相励磁方式の4相ステップモータであ
るが、3相や2相のステップモータであっても本発明を
適用することができる。
The printer 9 includes a print head 12 and a step motor 14 for feeding paper. Step motor 14
Is a two-phase excitation type four-phase step motor in this example, but the present invention can be applied to a three-phase or two-phase step motor.

【0030】印字ヘッドドライブ回路16は、CPU1
から与えられる制御信号に応じて、駆動信号を生成し、
この駆動信号によって印字ヘッド12を駆動するもので
ある。
The print head drive circuit 16 includes the CPU 1
Generates a drive signal according to a control signal given from
The print head 12 is driven by this drive signal.

【0031】また、ステップモータドライブ回路18
は、CPU1から与えられる図8に示したような制御信
号に応じてスイッチングトランジスタ(図示せず)がオン
・オフすることで駆動信号を生成するもので、この駆動
信号がステップモータ14の各コイルLA〜LDに流れて
該モータ14が回転駆動される。
The step motor drive circuit 18
Generates a drive signal by turning on / off a switching transistor (not shown) in response to a control signal as shown in FIG. 8 given from the CPU 1. This drive signal is generated by each coil of the step motor 14. The motor 14 is driven to rotate by flowing through L A to L D.

【0032】電圧変動検出回路20は、特許請求の範囲
における電圧変動検出手段に相当すしており、CPU1
からステップモータの駆動信号が出力されてないとき
(すなわちステップモータ14の停止中)に、外的要因に
よってステップモータ14で発生する電圧変動を検出す
るものである。
The voltage fluctuation detecting circuit 20 corresponds to a voltage fluctuation detecting means in the claims.
When the drive signal of the step motor is not output from
During the stop of the step motor 14, a voltage fluctuation generated in the step motor 14 due to an external factor is detected.

【0033】すなわち、ステップモータ14の停止中
に、たとえばプリンタ9の紙送りが手動で行われると、
これに伴い、図外の紙送りローラに連係されたステップ
モータ14が回転する。そして、このステップモータ1
4が回転したときには、電磁誘導によって各コイルLA
〜LDには、図4(a)に示すように、各電圧が発生する。
これらの電圧は、本例のような2相励磁方式の4相ステ
ップモータの場合には、A相とC相、B相とD相の位相
が反転した状態で同期して出力される。
That is, for example, when the paper feed of the printer 9 is performed manually while the step motor 14 is stopped,
Along with this, a step motor 14 linked to a paper feed roller (not shown) rotates. And this step motor 1
4 rotates, each coil L A by electromagnetic induction.
The ~L D, as shown in FIG. 4 (a), each voltage is generated.
In the case of a two-phase excitation type four-phase step motor as in this example, these voltages are synchronously output with the phases of the A and C phases and the B and D phases reversed.

【0034】そこで、電圧変動検出回路20は、これら
の電圧変動に基づく各信号を、たとえば半波整流して、
図4(b)に示すような検出出力を発生するようになって
いる。
The voltage fluctuation detecting circuit 20 performs, for example, half-wave rectification of each signal based on these voltage fluctuations,
A detection output as shown in FIG. 4B is generated.

【0035】一方、電圧計測回路22は、特許請求の範
囲における駆動電圧計測手段に相当しており、ステップ
モータ14の駆動制御中の電圧を検出するものである。
On the other hand, the voltage measuring circuit 22 corresponds to a driving voltage measuring means in the claims, and detects a voltage during drive control of the step motor 14.

【0036】すなわち、プリンタ9が紙詰りのためにス
テップモータ14が回転できない状態にあるにもかかわ
らず、CPU1から各相の制御信号を出力した場合、ス
テップモータ14の内部のコイルLA〜LD部分に逆起電
力が働いて正常な電圧に比べて駆動電圧が低下する。つ
まり、図5に示すように、正常な場合は同図中の実線で
示す電圧レベルにあるものが、モータロックを起こした
場合には、同図中の破線で示すように電圧レベルに低下
する。
[0036] That is, the printer 9 despite the step motor 14 for paper jam is in a state that can not be rotated, when the output of each phase of the control signal from the CPU 1, the interior of the coil L A ~L step motor 14 The back electromotive force acts on the D portion, and the drive voltage is lower than the normal voltage. That is, as shown in FIG. 5, when the motor is locked, the voltage level shown in a solid line in FIG. 5 drops to the voltage level shown in a broken line in FIG. .

【0037】そこで、電圧計測回路22は、現在の駆動
電圧を計測し、その計測値を出力するようになってい
る。
The voltage measurement circuit 22 measures the current drive voltage and outputs the measured value.

【0038】切換回路24は、CPU1からの切換信号
に基づいて、ステップモータ14の停止中には電圧変動
検出回路20の出力を選択し、また、ステップモータ1
4の駆動中には電圧計測回路22の出力を選択して、C
PU1に送出するようになっている。
The switching circuit 24 selects the output of the voltage fluctuation detecting circuit 20 while the stepping motor 14 is stopped, based on the switching signal from the CPU 1.
4, the output of the voltage measurement circuit 22 is selected and C
It is sent to PU1.

【0039】そして、上述のCPU1、ROM2および
RAM3によって特許請求の範囲における初期化手段
が、また、CPU1およびROM2によって、特許請求
の範囲における、判断手段、相判定手段、相決定手段、
停止手段がいずれも構成されている。
The above-mentioned CPU1, ROM2 and RAM3 serve as initialization means in the claims, and the CPU1 and ROM2 serve as determination means, phase determination means and phase determination means in the claims.
All the stopping means are constituted.

【0040】次に、ステップモータ14をCPU1によ
って駆動制御する場合の動作について、図6に示すフロ
ーチャートおよび図7に示すタイミングチャートを参照
して説明する。
Next, an operation when the stepping motor 14 is driven and controlled by the CPU 1 will be described with reference to a flowchart shown in FIG. 6 and a timing chart shown in FIG.

【0041】まず、計測開始ルーチンに入ると(ステッ
プ1)、CPU1は、ステップモータドライブ回路18
に制御信号が出力されているか否かを調べ、ステップモ
ータ14が停止中か否かを判断する(ステップ2)。
First, when the measurement start routine is entered (step 1), the CPU 1 executes the step motor drive circuit 18
It is determined whether or not the control signal is output at step (2), and it is determined whether or not the step motor 14 is stopped (step 2).

【0042】ステップモータ14が停止中であれば、C
PU1は、切換回路24を切り換えて電圧変動検出回路
20の出力を選択し、電圧変動があるか否かを判断する
(ステップ3)。
If the step motor 14 is stopped, C
PU1 switches the switching circuit 24 to select the output of the voltage fluctuation detection circuit 20, and determines whether or not there is a voltage fluctuation.
(Step 3).

【0043】すなわち、ステップモータ14の停止中に
プリンタ9の紙送りが手動で行われるなどしてステップ
モータ14が回転すると、その各コイルLA〜LDには、
前述のように電圧変動が発生し(図4(a)参照)、この電
圧変動の信号が電圧変動検出回路20に入力されるの
で、同回路20は、これらの電圧変動に基づく各信号を
たとえば半波整流して検出出力を発生する(図4(b)参
照)。そして、この検出出力が切換回路24を介してC
PU1に取り込まれる。
That is, when the stepping motor 14 is rotated while the stepping motor 14 is stopped and the printer 9 is manually fed, for example, the coils L A to L D are applied to the respective coils L A to L D.
As described above, a voltage fluctuation occurs (see FIG. 4A), and a signal of this voltage fluctuation is input to the voltage fluctuation detection circuit 20, so that the circuit 20 outputs each signal based on these voltage fluctuations, for example. Half-wave rectification generates a detection output (see FIG. 4B). Then, this detection output is output to C
It is taken into PU1.

【0044】そこで、CPU1は、ステップモータ14
の停止中に電圧変動検出回路20の検出出力があれば、
電圧変動があったものと判断してそのフラグをたとえば
“1”にセットするとともに、電圧変動が発生した相の
データをRAM3の電圧変動データバッファ34に格納
する(ステップ4)。
Therefore, the CPU 1 controls the step motor 14
If there is a detection output of the voltage fluctuation detection circuit 20 during the stop of
It is determined that there is a voltage variation as to set the flag for example to "1", and stores the data of the phase in which the voltage variation occurs in the voltage variation data buffer 3 4 RAM 3 (Step 4).

【0045】たとえば、図7に示すように、ステップモ
ータ14が停止直後の時刻t1では永久磁石の磁極がC相
とD相のコイルLC,LDにあるとしたとき、モータ14
が機械的外力で回転されたために時刻t2においてC相の
コイルLCから電圧変動の信号が出力されたときには、
永久磁石の磁極がD相とA相のコイルLD,LAに移動し
たことを示す。さらに、モータ14が回転されて時刻t3
になったときにD相のコイルLDから電圧変動の信号が
出力されたときには、永久磁石の磁極がA相とB相のコ
イルLA,LBの位置に移動したことを示す。そこで、C
PU1は、ステップモータ14の停止状態での最終的な
相のデータ(図7ではA相とB相のコイルLA,LBに永
久磁石の磁極があることのデータ)をRAM3の電圧変
動データバッファ34に記憶した後、ステップ5に移行
する。
For example, as shown in FIG. 7, when it is assumed that the magnetic poles of the permanent magnet are in the C-phase and D-phase coils L C and L D at time t 1 immediately after the stop of the step motor 14,
When a signal of voltage fluctuation is output from the C-phase coil L C at time t 2 because
This indicates that the magnetic poles of the permanent magnet have moved to the D-phase and A-phase coils L D and L A. Further, the motor 14 is rotated and the time t 3
When the signal voltage variation from the coil L D of the D-phase is output when it becomes indicate that poles of the permanent magnet is moved to the position of the coil L A, L B of the A-phase and B-phase. So, C
PU1, the final phase of the data (Fig. 7, A-phase and B-phase coils L A, L B in the data that the magnetic poles of the permanent magnets) to RAM3 voltage variation data in the stopped state of the stepping motor 14 after stored in the buffer 3 4, the process proceeds to step 5.

【0046】また、ステップ3で、電圧変動がないと判
断されれば、ステップ5にそのまま移行する。
If it is determined in step 3 that there is no voltage fluctuation, the process directly proceeds to step 5.

【0047】ステップ5では、たとえばキーボード4か
ら紙送り命令などのデータが入力されか否かを調べてス
テップモータ14を起動するか否かを判断し、ステップ
モータ14を起動しないならばステップ3に戻る。ま
た、ステップモータ14を起動するのであれば、次に、
CPU1はRAM3のデータバッファ31の領域のデー
タを調べて、電圧変動のフラグが既に“1”にセットさ
れているか否かを判断する(ステップ6)。なお、CPU
1に初めて電源が投入されたとような初期状態の場合に
は、電圧変動のフラグは予め“1”にセットされてい
る。
In step 5, for example, it is determined whether or not data such as a paper feed command is input from the keyboard 4 to determine whether to start the step motor 14. If the step motor 14 is not started, the process proceeds to step 3. Return. If the step motor 14 is to be started,
CPU1 checks the data in the data buffer 3 1 region of RAM 3, it is determined whether the flag of the voltage variation is already set to "1" (Step 6). In addition, CPU
In an initial state in which the power is first turned on for the first time, the voltage fluctuation flag is set to "1" in advance.

【0048】ここで、電圧変動のフラグが“1”でなけ
れば、ステップモータ14は停止直後の状態から何ら回
転していないと判断できるため、初期化制御を省略して
直ちに加速制御を開始し、等速制御に移行する(ステッ
プ11)。たとえば、図7で停止直後の時刻t1以降に何
ら電圧変動がないときには、CPU1からは、D相とA
相のコイルLD,LAを励磁するためのハイレベルの制御
信号が出力される。
If the voltage fluctuation flag is not "1", it can be determined that the step motor 14 is not rotating at all from the state immediately after the stop, and thus the acceleration control is started immediately without the initialization control. Then, the process proceeds to the constant speed control (step 11). For example, when there is no any voltage fluctuation at time t 1 after the immediately stopped in Figure 7, from the CPU 1, D phase and A
A high-level control signal for exciting the phase coils L D and L A is output.

【0049】また、ステップ6で電圧変動のフラグが
“1”であれば、停止状態の途中で外的要因によってス
テップモータ14が回転したと判断できるので、引き続
いて、CPU1は、変動した相のデータがRAM3の電
圧変動データバッファ34に既に格納されているか否か
を判断する(ステップ8)。
If the voltage fluctuation flag is "1" in step 6, the CPU 1 can determine that the step motor 14 has rotated due to an external factor during the stop state. data to determine whether it is already stored in the voltage variation data buffer 3 4 RAM 3 (step 8).

【0050】電圧変動が発生した相のデータが既にバッ
ファ34に記憶されておれば、そのデータを読み出し、
このデータに基づいてステップモータ14の駆動開始位
置を設定し(ステップ9)、この相から加速制御を開始し
て等速制御に移行する(ステップ11)。たとえば、上記
のように、RAM3の電圧変動データバッファ34に時
刻t3でA相とB相のコイルLA,LBに永久磁石の磁極が
ある旨のデータが格納されているときには、CPU1か
らは、B相とC相のコイルLB,LCを励磁するためのハ
イレベルの制御信号が出力される。
[0050] In my data phase voltage fluctuation has occurred already stored in the buffer 3 4, it reads the data,
Based on this data, the drive start position of the step motor 14 is set (step 9), and the acceleration control is started from this phase to shift to the constant speed control (step 11). For example, as described above, when the effect of data that magnetic poles of the permanent magnets is stored in the coil L A, L B of the A-phase and B-phase at time t 3 the voltage variation data buffer 3 4 RAM3 is, CPU 1 Outputs a high-level control signal for exciting the B-phase and C-phase coils L B and L C.

【0051】また、ステップ8でRAM3の電圧変動デ
ータバッファ34に相のデータが記憶されていなけれ
ば、CPU1に対して初めて電源が投入されたような初
期状態であると判断し、図8に示した従来の場合と同様
にして、ステップモータ14の相の初期化制御を行った
後(ステップ10)、ステップモータ14の加速制御およ
び等速制御を行う(ステップ11)。
[0051] Further, if it is not the voltage variation data buffer 3 4 data phases stored in RAM3 in step 8, it is determined that the first initial state as the power is turned against the CPU 1, in FIG. 8 After the phase initialization control of the step motor 14 is performed (step 10), the acceleration control and the constant speed control of the step motor 14 are performed (step 11) in the same manner as in the conventional case shown above.

【0052】ステップ12では、たとえばキーボード4
から紙送り停止命令などのデータが入力されか否かを調
べてステップモータ14を停止するか否かを判断し、ス
テップモータ14の停止命令があれば、ステップモータ
の停止制御を行う(ステップ13)。そして、RAM3の
データバッファ31および電圧変動データバッファ34
それぞれ格納されているデータをクリアして(ステップ
14)、処理を終了する(ステップ15)。
In step 12, for example, the keyboard 4
It is determined whether or not data such as a paper feed stop command has been input from the controller 10 to determine whether or not to stop the step motor 14, and if there is a stop command for the step motor 14, stop control of the step motor is performed (step 13). ). Then, it clears the data stored respectively in the data buffer 3 1 and the voltage variation data buffer 3 4 RAM 3 (step 14), and ends the process (Step 15).

【0053】一方、ステップ2において、ステップモー
タ14が現在駆動状態にあると判断されたならば、CP
U1は、切換回路24を切り換えて電圧計測回路22の
出力を選択して、電圧計測回路22で計測された駆動電
圧の値を取り込む(ステップ17)。 そして、この駆動
電圧をROM2の駆動電圧データテーブル23に予め格
納されている基準値と比較して、正常な駆動電圧か否か
を判断する(ステップ18)。駆動電圧が正常であれば、
ステップ2に処理を移す一方、駆動電圧が異常であれば
モータロック処理に移行してステップモータを強制的に
停止させた後(ステップ19)、処理を終了する(ステッ
プ20)。
On the other hand, if it is determined in step 2 that the step motor 14 is currently in the driving state,
U1 switches the switching circuit 24 to select the output of the voltage measurement circuit 22, and captures the value of the drive voltage measured by the voltage measurement circuit 22 (Step 17). Then, as compared with the reference value previously stored driving voltage to the drive voltage data table 2 3 ROM 2, it is determined whether a normal drive voltage (step 18). If the drive voltage is normal,
While the process proceeds to step 2, if the drive voltage is abnormal, the process proceeds to the motor lock process to forcibly stop the step motor (step 19), and ends the process (step 20).

【0054】なお、上記の実施形態では、電圧変動検出
回路20、電圧計測回路22、および切換回路24を設
けているが、これらの代わりにA/D変換器を設け、ス
テップモータ14の停止中に発生した電圧変動の信号
(図4参照)や、ステップモータ駆動中の駆動電圧(図5
参照)をそれぞれデジタル化してCPU1に取り込み、
CPU1の内部でモータ停止中の電圧変動やモータ駆動
中の駆動電圧を判断するようにすることも可能である。
In the above embodiment, the voltage fluctuation detecting circuit 20, the voltage measuring circuit 22, and the switching circuit 24 are provided. However, an A / D converter is provided in place of these circuits, and the step motor 14 is stopped. Signal of voltage fluctuation generated in
(See FIG. 4) and the drive voltage during step motor drive (FIG. 5).
Digitized into the CPU 1 and loaded into the CPU 1.
It is also possible to determine the voltage fluctuation during the stop of the motor and the drive voltage during the drive of the motor inside the CPU 1.

【0055】[0055]

【発明の効果】本発明によれば、次の効果を奏する。According to the present invention, the following effects can be obtained.

【0056】(1) 請求項1記載に係る発明では、ステ
ップモータを制御してないときに外的要因によって相の
ずれが発生したか否かを検出できるので、相がずれてい
ない場合には初期化制御を省略することができ、起動時
間を短縮化することができる。
(1) In the invention according to the first aspect, it is possible to detect whether or not a phase shift has occurred due to an external factor when the step motor is not controlled. The initialization control can be omitted, and the startup time can be shortened.

【0057】(2) 請求項2記載に係る発明では、外的
要因によって相がずれても、相がずれた後のステップモ
ータの相の位置を特定できるため、初期化制御の行う頻
度が一層少なくなり、請求項1の場合よりも起動時間を
さらに短縮化することが可能となる。
(2) According to the second aspect of the present invention, even if the phase shifts due to an external factor, the phase position of the step motor after the phase shift can be specified, so that the frequency of the initialization control is further increased. And the start-up time can be further shortened as compared with the case of the first aspect.

【0058】(3) 請求項3記載に係る発明では、紙詰
りなどでステップモータがモータロックしていることを
検出できるため、別の専用のセンサーを設ける必要がな
く、コストダウンを図ることができる。
(3) According to the third aspect of the present invention, since it is possible to detect that the step motor is locked due to paper jam or the like, it is not necessary to provide another dedicated sensor, and the cost can be reduced. it can.

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

【図1】本発明のステップモータ制御装置を電子式金銭
登録機のプリンタの紙送り装置として使用した場合の実
施形態に係るブロック図である。
FIG. 1 is a block diagram according to an embodiment in which a step motor control device of the present invention is used as a paper feed device of a printer of an electronic cash register.

【図2】電子式金銭登録機に設けられているROMおよ
びRAMの内容を示す説明図である。
FIG. 2 is an explanatory diagram showing contents of a ROM and a RAM provided in the electronic cash register.

【図3】プリンタとその駆動制御装置の部分の構成を示
すブロック図である。
FIG. 3 is a block diagram illustrating a configuration of a printer and a drive control device thereof.

【図4】電圧変動の信号を示すタイミングチャートであ
る。
FIG. 4 is a timing chart showing signals of voltage fluctuation.

【図5】ステップモータが正常な場合とモータロック等
の異常を起こしている場合の電圧レベルの違いを説明す
るためのタイミングチャートである。
FIG. 5 is a timing chart for explaining a difference in voltage level between a case where a step motor is normal and a case where an abnormality such as motor lock occurs.

【図6】ステップモータを駆動制御する場合の動作説明
に供するフローチャートである。
FIG. 6 is a flowchart for explaining an operation when drive control of a step motor is performed.

【図7】ステップモータを駆動制御する場合の動作説明
に供するタイミングチャートである。
FIG. 7 is a timing chart for explaining an operation when drive control of a step motor is performed.

【図8】ステップモータを制御するための制御信号のタ
イミングチャートである。
FIG. 8 is a timing chart of a control signal for controlling a step motor.

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

1…CPU、2…ROM、3…RAM、4…キーボー
ド、7…ディスプレイ、8…通信I/F、9…プリン
タ、10…ドロワー、12…印字ヘッド、14…ステッ
プモータ、16…印字ヘッドドライブ回路、18…ステ
ップモータドライブ回路、20…電圧変動検出回路、2
2…電圧計測回路、24…切換回路。
DESCRIPTION OF SYMBOLS 1 ... CPU, 2 ... ROM, 3 ... RAM, 4 ... Keyboard, 7 ... Display, 8 ... Communication I / F, 9 ... Printer, 10 ... Drawer, 12 ... Print head, 14 ... Step motor, 16 ... Print head drive Circuit, 18: Step motor drive circuit, 20: Voltage fluctuation detection circuit, 2
2. Voltage measurement circuit, 24 switching circuit.

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 ステップモータの相を初期化する初期化
手段と、 ステップモータからの電圧変動を検出する電圧変動検出
手段と、 この電圧変動検出手段からの検出出力に応じて、ステッ
プモータ停止中に発生した相のずれの有無を判断し、相
のずれが発生した場合にのみ前記初期化手段を起動する
判断手段と、 を備えることを特徴とするステップモータ制御装置。
1. An initializing means for initializing a phase of a step motor, a voltage fluctuation detecting means for detecting a voltage fluctuation from the step motor, and a step motor being stopped according to a detection output from the voltage fluctuation detecting means. A step motor control device comprising: a determination unit configured to determine whether or not a phase shift has occurred and to activate the initialization unit only when a phase shift has occurred.
【請求項2】 請求項1記載のステップモータ制御装置
において、 前記電圧変動検出手段からの検出出力に基づいて、いず
れの相から電圧変動が発生したかを判定する相判定手段
と、 この相判定手段で判定された相のデータを記憶する相記
憶手段と、 この相記憶手段に記憶されている相のデータに基づい
て、ステップモータの駆動に際して起動すべき相を決定
する相決定手段と、 を備えることを特徴とするステップモータ制御装置。
2. The step motor control device according to claim 1, wherein: a phase determination unit that determines from which phase the voltage variation has occurred based on a detection output from the voltage variation detection unit; Phase storage means for storing data of the phase determined by the means, and phase determination means for determining a phase to be started when driving the step motor based on the phase data stored in the phase storage means. A step motor control device comprising:
【請求項3】 請求項1または請求項2記載のステップ
モータ制御装置において、 ステップモータ駆動中の駆動電圧を計測する駆動電圧計
測手段と、 この駆動電圧計測手段の出力を予め設定された基準値と
比較し、ステップモータの駆動電圧が基準値よりも低下
した場合には、モータ異常と判断してステップモータを
強制的に停止させる停止手段と、 を備えることを特徴とするステップモータ制御装置。
3. The stepping motor control device according to claim 1, wherein the driving voltage measuring means measures a driving voltage during driving of the stepping motor, and the output of the driving voltage measuring means is set to a predetermined reference value. A step motor for determining that the motor is abnormal and forcibly stopping the step motor when the drive voltage of the step motor is lower than a reference value.
JP9368097A 1997-04-11 1997-04-11 Stepping-motor controller Pending JPH10285995A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9368097A JPH10285995A (en) 1997-04-11 1997-04-11 Stepping-motor controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9368097A JPH10285995A (en) 1997-04-11 1997-04-11 Stepping-motor controller

Publications (1)

Publication Number Publication Date
JPH10285995A true JPH10285995A (en) 1998-10-23

Family

ID=14089130

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9368097A Pending JPH10285995A (en) 1997-04-11 1997-04-11 Stepping-motor controller

Country Status (1)

Country Link
JP (1) JPH10285995A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009213221A (en) * 2008-03-03 2009-09-17 Citizen Holdings Co Ltd Stepper motor
WO2021193335A1 (en) * 2020-03-27 2021-09-30 ローム株式会社 Driver device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009213221A (en) * 2008-03-03 2009-09-17 Citizen Holdings Co Ltd Stepper motor
WO2021193335A1 (en) * 2020-03-27 2021-09-30 ローム株式会社 Driver device

Similar Documents

Publication Publication Date Title
EP1696552B1 (en) Method and apparatus for controlling motor
KR950014129B1 (en) Method and apparatus for controlling brushless dc motor
JP2019103326A (en) Motor control device and image forming apparatus
JP2009124864A (en) Motor driving device
JPH10285995A (en) Stepping-motor controller
JPH0459267A (en) Recording device
JP2004138840A (en) Image forming apparatus
JP2003079184A (en) Sensorless motor control equipment, imaging equipment, control method of the imaging equipment, and control program of the imaging equipment
JP2000188891A (en) Method and device for driving brushless motor
JPH03145996A (en) Drive unit for step motor
JP2000102282A (en) Dc-motor controller and image-forming apparatus
JP2001275398A (en) Zero-point detection method and positioning device
JP3827889B2 (en) Stepping motor control method and control apparatus
JP2718812B2 (en) Sensorless spindle motor control circuit
JP3666319B2 (en) Motor control method
US11747759B2 (en) Image forming apparatus having a motor to drive a pickup roller
US11966184B2 (en) Image forming apparatus
US11362607B1 (en) Motor unit
JP2008220087A (en) Device and method for driving motor
JP3059118U (en) Stepping motor control device
JP2022123830A (en) Image forming apparatus
JP2001268991A (en) Stepping motor driver
JPH1014292A (en) Step out detector for stepper motor
JP3134663B2 (en) Step motor excitation coil disconnection diagnostic device
JPH07194195A (en) Controller for stepping motor