JPH02141671A - Meter driving apparatus - Google Patents

Meter driving apparatus

Info

Publication number
JPH02141671A
JPH02141671A JP29660588A JP29660588A JPH02141671A JP H02141671 A JPH02141671 A JP H02141671A JP 29660588 A JP29660588 A JP 29660588A JP 29660588 A JP29660588 A JP 29660588A JP H02141671 A JPH02141671 A JP H02141671A
Authority
JP
Japan
Prior art keywords
value
difference value
frequency
time
output
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
JP29660588A
Other languages
Japanese (ja)
Inventor
Kazuyuki Fukuda
和幸 福田
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.)
Rohm Co Ltd
Original Assignee
Rohm Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Rohm Co Ltd filed Critical Rohm Co Ltd
Priority to JP29660588A priority Critical patent/JPH02141671A/en
Publication of JPH02141671A publication Critical patent/JPH02141671A/en
Pending legal-status Critical Current

Links

Landscapes

  • Measuring Frequencies, Analyzing Spectra (AREA)

Abstract

PURPOSE:To make it possible to approach a set point sequentially and to converge into a true value by multiplying a difference value by 1/n, adding the product and the value of the lowest 1 bit to the frequency digital value at the previous time, and determining the digital value at this time. CONSTITUTION:The frequency at this time is computed in a frequency operating part 27 and inputted into a subtracting part 28. In the subtracting part 28, the frequency at the previous time stored in a memory 34 is subtracted from the frequency at this time, and the difference value is outputted. In a multiplying part, the difference value is multiplied by 1/n. In adding part 32, the value of the lowest 1 bit is added to the product value. In adding part 33, the frequency at the previous time is added to the value. The result is made to be the output frequency at this time. In this way, the value approaches a set point by every 1/n + 1 bit of the difference value at the present time when the difference value is large. Even if the difference value is small and the value obtained by the multiplication with 1/n becomes '0' in binary number, a true value can be obtained after several output cycles.

Description

【発明の詳細な説明】 (イー)産業上の利用分野 この発明は、自動車用等のタコメータ、スピードメータ
等に使用されるメータ駆動装置に関する。
DETAILED DESCRIPTION OF THE INVENTION (A) Field of Industrial Application This invention relates to a meter drive device used in tachometers, speedometers, etc. for automobiles.

(ロ)従来の技術 一般に、自動車用のスピードメータには、第3図に示す
ように、直交する2個のコイルL、、Lcで形成される
磁界内に針を振らせるための磁石Mを配置し、コイルL
、、Lcには、スピード等の入力量に応じた電流を流し
、磁石Mを回動させて、針を振らせている。この種のス
ピードメータにおけるメータ駆動装置は、入力量、つま
りスピードに応じて、周期の変化するパルス信号を入力
し、一方、基本クロック発生器で発生されるクロック信
号も入力し、パルス信号の1周期に亘り、カウンタのク
ロック信号をカウントし、先ずパルス信号の周期Tを求
め、この周期Tより、f=1/Tの演算を行い、周波数
fを算出していた。このデジタルデータfは、入力量に
比例するものであるから、このデジタル値fに応じた電
流をコイル上工、Lcに流し、コイルL、、Lcによっ
て発生する磁界によって、磁石である針を、前記デジタ
ル値によって決まる角度方位まで振らせるものであった
(B) Conventional technology Generally, as shown in Fig. 3, a speedometer for an automobile is equipped with a magnet M for swinging the needle in a magnetic field formed by two orthogonal coils L, , Lc. Place the coil L
, , Lc, a current corresponding to an input amount such as speed is passed, and the magnet M is rotated to cause the needle to swing. The meter drive device in this type of speedometer inputs a pulse signal whose period changes depending on the input amount, that is, the speed, and also inputs a clock signal generated by a basic clock generator, The clock signal of the counter is counted over the period, first the period T of the pulse signal is determined, and from this period T, the calculation of f=1/T is performed to calculate the frequency f. Since this digital data f is proportional to the input amount, a current corresponding to this digital value f is passed through the coil, Lc, and the magnetic needle, which is a magnet, is moved by the magnetic field generated by the coils L, Lc. It was made to swing to an angular direction determined by the digital value.

この従来のメータ駆動装置は、周波数、つまりデジタル
データに応じ、sin演算、cos演算を行い、直交す
るコイルに入力量に応じた電流を流して、針を振らせる
ものであるから、例えば第4図に例示する速度145k
m/Hから、25km/Hに象、激に指示を変化させる
場合、針は経路Aを通り、20 km / Hに向かお
うとせず、経路Bを通ろうとし、低速に変化しているに
もかかわらず、指示が振り切れる方向に向かうという不
都合があった。
This conventional meter drive device performs sine and cosine calculations according to the frequency, that is, digital data, and causes the needle to swing by passing current in orthogonal coils according to the input amount. Speed 145k illustrated in the figure
If you change the instruction drastically from m/h to 25 km/h, the needle will follow path A and will not go to 20 km/h, but will take path B and change to a slow speed. Despite this, there was the inconvenience that the instructions were heading in a direction that could be ignored.

そこで、本願発明者は、上記不都合を解消するために、
針の指示を大きく変化させる場合は、前回値と今回の目
標値との差値を求め、前回値に差値xi/n(n:2.
4.8、・・・)を加算し、これを出力値として針を振
らせ、以後、これを繰り返し、指示の動きが自然なもの
となるものを創出し、すでに別に出願した。
Therefore, in order to eliminate the above-mentioned inconvenience, the inventor of the present application,
When changing the needle indication significantly, calculate the difference value between the previous value and the current target value, and add the difference value xi/n (n: 2.
4.8,...), used this as an output value to cause the needle to swing, and then repeated this process to create a system with natural pointing movements, and has already filed a separate application.

(ハ)発明が解決しようとする課題 上記出願に係るメータ駆動装置において、今nを8とす
ると、今回の出力値は前回値と目標値の差値に1/8を
乗算したものを前回値に加算したものとなる。ところで
、2進数の場合、l/8倍、つまり0.125倍するこ
とは3桁分の桁を下げることを意味する。例えば、1.
5 Xo、125は1.1000XO,001=0.0
011となる。よって、下位3ビットで表される値はす
べて0.125倍すると、答えは「0」となり、この「
0」を前回の値に何回プラスしても真値に近づかない。
(C) Problems to be Solved by the Invention In the meter drive device according to the above application, if n is now 8, the current output value is the previous value obtained by multiplying the difference value between the previous value and the target value by 1/8. It will be added to. By the way, in the case of binary numbers, multiplying by 1/8, that is, 0.125, means lowering three digits. For example, 1.
5 Xo, 125 is 1.1000XO,001=0.0
It becomes 011. Therefore, if all values represented by the lower 3 bits are multiplied by 0.125, the answer will be "0", and this "
No matter how many times you add "0" to the previous value, it will never get close to the true value.

それゆえ、上記方式では差値が3ビットで表される程に
小さくなると、以後は真値に近づかず誤差が残るという
問題が残された。
Therefore, in the above method, once the difference value becomes small enough to be represented by 3 bits, the problem remains that it does not approach the true value and an error remains.

この発明は、上記問題点に着目してなされたものであっ
て、差値が小さくなり、l / nを乗算した値が「0
」となる場合でも、何回かの出力サイクルで真値に達し
得るメータ駆動装置を提供することを目的としている。
This invention was made by focusing on the above problem, and the difference value becomes small, and the value multiplied by l/n becomes "0".
The object of the present invention is to provide a meter drive device that can reach the true value in several output cycles even when the output voltage is ”.

(ニ)課題を解決するための手段及び作用この発明のメ
ータ駆動装置は、互いに直交する第1、第2のコイルと
、入力量に応じた周波数のパルス信号を入力する手段と
、クロック信号発生手段と、このクロック信号発生手段
からのクロック信号をカウントし、このカウント値に基
づいて前記入力量に比例したデジタル値を算出する演算
部と、この演算部から出力されるデジタル値に応じた電
流を前記第1、第2のコイルに流す駆動回路と、前記第
1と第2のコイルに電流が流れることにより発生する磁
界によって角度方位が決定される針とを有し、前記入力
量の大きさに比例した値を指示するものにおいて、前記
演算部は所定の時間経過毎にカウントアツプする時間カ
ウンタと、前記パルス信号の各周期の切換りを検出する
切換り検出手段と、前記切換りの検出あるいは時間カウ
ンタのカウントアツプに応答して前記カウント手段の内
容を取込み記憶する記憶手段と、前記時間カウンタのカ
ウントアツプ毎に前記記憶手段の内容に基づいて前記入
力量に比例したデジタル値を演算する演算手段と、この
演算手段による今回のデジタル値と前回出力のデジタル
値の差値を算出する差値演算手段と、前記デジタル値が
切換り検出における記憶データに基づいて演算されたも
のであるか否か判別する手段と、この判別手段による判
別がNOである場合に応答し、前記差値の正負を判別し
、差値が正なら処理を終了させる差値正負判別手段と、
前記判別手段のYES判別あるいは前記差値正負判別手
段の差値が負である場合に前記差値に1 / nを乗算
する手段と、この乗算手段により得られた積及び最下位
1ビット値を前回のデジタル値に加算して今回の出力デ
ジタル値を決定する出力値決定手段とを備えている。
(d) Means and Effects for Solving the Problems The meter driving device of the present invention includes first and second coils that are perpendicular to each other, means for inputting a pulse signal of a frequency corresponding to the input amount, and a clock signal generator. a calculation unit that counts the clock signal from the clock signal generation unit and calculates a digital value proportional to the input amount based on the count value; and a current corresponding to the digital value output from the calculation unit. a drive circuit that causes a current to flow through the first and second coils, and a needle whose angular orientation is determined by a magnetic field generated by the current flowing through the first and second coils, In the device that indicates a value proportional to storage means for capturing and storing the contents of the counting means in response to detection or count-up of the time counter; and calculating a digital value proportional to the input amount based on the contents of the storage means every time the time counter counts up. a calculation means for calculating a difference value between a current digital value and a previous output digital value by the calculation means; and a difference value calculation means for calculating a difference value between a current digital value and a previous output digital value, and the digital value is calculated based on stored data in switching detection. a means for determining whether or not the difference value is positive; and a difference value positive/negative determining means that responds when the determination by the determining means is NO, determines whether the difference value is positive or negative, and terminates the process if the difference value is positive.
means for multiplying the difference value by 1/n when the determination means makes a YES determination or the difference value of the difference value positive/negative determination means is negative; and a product obtained by the multiplication means and the least significant 1-bit value. and output value determining means for determining the current output digital value by adding it to the previous digital value.

このメータ駆動装置では、入力されるパルス信号の周期
が切換り、この切換りが検出されるか、あるいは切換り
が検出される以前に時間カウンタの2回目以降のカウン
トアツプでカウンタのカウント値が記憶手段に記憶され
る。そして、時間カウンタのカウントアツプ毎に記憶手
段に記憶されるカウントデータに基づいて、入力量に比
例したデジタル値が演算手段で算出される。そして、今
回算出のデジタル値と前回算出のデジタル値の差値が差
値算出手段で算出され、また、上記デジタル演算が切換
り検出における記憶データに基づいて演算されたものか
否か判別される。
In this meter drive device, the cycle of the input pulse signal switches, and the count value of the counter changes when the time counter counts up from the second time onward, or when this switching is detected, or before the switching is detected. It is stored in the storage means. Then, each time the time counter counts up, a digital value proportional to the input amount is calculated by the calculation means based on the count data stored in the storage means. Then, a difference value between the digital value calculated this time and the digital value calculated last time is calculated by the difference value calculation means, and it is determined whether the digital calculation described above was calculated based on the stored data in switching detection. .

入力量が比較的大なる場合、つまり高速の場合は、所定
の時間が経過する前に、入力パルス信号の一周期が到来
するので、この場合の判別結果はNoである。一方、入
力量が所定値よりも小の場合、つまり低速の場合は入力
パルス信号の一周期が到来する前に、所定の時間が経過
するので、この場合は、差値正負判別手段で差値が正か
負かを判別する。今回のデジタル値はまだ1周期分をカ
ウントしていないカウント手段のカウント値に基づいて
算出するので、真の周波数より高い目のデジタル値とな
る。それゆえ、差値が正の場合は、これを無視し、処理
を終了させる。しかし、差値が負の場合は、前記よりも
小さく出力するものであるから、あるいは上記判別結果
がNOの場合には、差値に1/nを乗算するとともに、
この乗算値と最下位1ビット分を前回値に加算して出力
する。その結果、差値が大なる間は、現時点における差
値の1/n分+1ビット(LSB”1”)ずつ目標値に
接近し、そして差値の1/nが「0」となっても、LS
Bの1ピント値は毎回加算されるので針の振れは順次目
標値に近づく。
If the input amount is relatively large, that is, if it is high speed, one cycle of the input pulse signal will arrive before the predetermined time elapses, so the determination result in this case is No. On the other hand, if the input amount is smaller than the predetermined value, that is, if the input speed is low, the predetermined time will elapse before one cycle of the input pulse signal arrives. Determine whether is positive or negative. Since the current digital value is calculated based on the count value of the counting means that has not yet counted one cycle, it is a digital value higher than the true frequency. Therefore, if the difference value is positive, it is ignored and the process is terminated. However, if the difference value is negative, the output is smaller than the above, or if the above determination result is NO, the difference value is multiplied by 1/n and
This multiplied value and the least significant 1 bit are added to the previous value and output. As a result, while the difference value is large, it approaches the target value by 1/n of the current difference value + 1 bit (LSB "1"), and even if 1/n of the difference value becomes "0", , L.S.
Since the 1 focus value of B is added each time, the needle deflection gradually approaches the target value.

(ホ)実施例 以下、実施例により、この発明をさらに詳細に説明する
(E) Examples The present invention will be explained in more detail with reference to Examples below.

第2図は、この発明の一実施例を示すメータ駆動装置の
ブロック図である。同図において、入力信号回路1は、
車輪の回転に同期して発生するパルス信号をデータ演算
部2に入力している。一方、基準クロック信号発生器3
からのクロック信号もデータ演算部2に入力されている
FIG. 2 is a block diagram of a meter driving device showing one embodiment of the present invention. In the figure, the input signal circuit 1 is
A pulse signal generated in synchronization with the rotation of the wheels is input to the data calculation section 2. On the other hand, the reference clock signal generator 3
A clock signal from the data processing unit 2 is also input to the data calculation unit 2.

データ演算部2は、第1図に示すように、クロック信号
をカウントするカウンタ20、入力されるパルス信号の
立上り(周期切換り)を検出し、転送信号及びリセット
信号を発生する立上り検出回路21.2011Isec
経過する毎にカウントアツプするカウンタ22、このカ
ウンタ22のカウントアツプ信号でセットされ、上記リ
セット信号でリセ・ントされるフリップフロップ プフロップ23がセット状態でカウンタ22よりカウン
トアンプ信号を受けると、転送信号を出力するAND回
路24、このAND回路24の出力、あるいは立上り検
出回路21よりの転送信号をカウンタ20に与えるOR
回路25、転送信号を受ける度にカウンタ20のカウン
ト値を取込み記憶するメモリ26、カウンタ22のカウ
ントアツプ毎にメモリ26の記憶するカウント値Tに基
づき、1/Tの演算、つまり周波数演算を行う周波数演
算部27、今回算出の周波数f.から前回算出の周波数
f8−1を減算し、その差値f6を算出する減算部28
、差値f4を算出した時点でフリップフロップ23のセ
ット/リセット状態を判別する判別部29、この判別部
29でフリップフロップ23のセット状態が判別される
と、前記差値f6が0以上か否かを判別する判別部30
を備えている。判別部29でフリップフロップ23のリ
セット状態が判別されると、判別部30による判別処理
がスキップされるようになっている。
As shown in FIG. 1, the data calculation unit 2 includes a counter 20 that counts clock signals, and a rising detection circuit 21 that detects the rising edge (cycle switching) of an input pulse signal and generates a transfer signal and a reset signal. .2011Isec
A counter 22 that counts up each time a count-up signal elapses, and a flip-flop 23 that is set by the count-up signal of this counter 22 and reset by the reset signal, receives a count amplifier signal from the counter 22 in a set state, and then outputs a transfer signal. An AND circuit 24 that outputs the output of the AND circuit 24, or an OR that gives the transfer signal from the rising edge detection circuit 21 to the counter 20.
A circuit 25, a memory 26 that captures and stores the count value of the counter 20 every time it receives a transfer signal, and performs a 1/T calculation, that is, a frequency calculation, based on the count value T stored in the memory 26 each time the counter 22 counts up. The frequency calculation unit 27 calculates the currently calculated frequency f. A subtraction unit 28 that subtracts the previously calculated frequency f8-1 from and calculates the difference value f6.
, a determination unit 29 that determines the set/reset state of the flip-flop 23 at the time when the difference value f4 is calculated; when the determination unit 29 determines the set state of the flip-flop 23, it determines whether the difference value f6 is 0 or more. A determining unit 30 that determines whether
It is equipped with When the determination unit 29 determines the reset state of the flip-flop 23, the determination processing by the determination unit 30 is skipped.

また、データ演算部2は、判別部30でf,>0でない
と判別されると、つまりr、<r、−、であると判別さ
れ、また判別部29でQ=0(リセット状態)であると
判別されると、差値f4を1 / 8 f dに更新す
る差値更新部(乗算部)31、この更新された差値にL
SBの1ビットを加算する加算部32、さらに加算され
たf4と、前回の周波数rt−tを加算する加算部33
、この加算値f、を記憶し、今回の周波数f、として出
力するメモリ34を備えている。
Furthermore, when the discriminator 30 determines that f, is not >0, the data calculation section 2 determines that r,<r,-, and the discriminator 29 determines that Q=0 (reset state). If it is determined that there is, a difference value updating unit (multiplication unit) 31 updates the difference value f4 to 1/8 f d,
An adder 32 that adds one bit of SB, and an adder 33 that adds the added f4 and the previous frequency rt-t.
, this added value f, is stored and outputted as the current frequency f.

データ演算部2のメモリ34より出力される周波数デー
タf!は、10ビットのデジタルデータであり、このう
ち上位2ビットは、1周分を4分割したいずれの象限か
を決定するものであり、この2ビットにより象限決定部
10で振らせるべき針の属する象限が決定され、象限決
定部lOは、決定された象限により決まる方向信号を出
力する。
Frequency data f! output from the memory 34 of the data calculation section 2! is 10-bit digital data, of which the upper 2 bits determine which quadrant of the four divisions of one revolution it belongs to, and the quadrant determination unit 10 uses these 2 bits to determine which quadrant the hand to swing belongs to. A quadrant is determined, and the quadrant determination unit 10 outputs a direction signal determined by the determined quadrant.

下位8ビット分は、各象限におけるO@〜90”に対応
するデータであり、これらがsin演算部4とcos演
算部5に入力され、それぞれsin演算、cos演算が
なされ、それぞれパルス幅変調回路6.7を介してドラ
イバ(駆動回路)8.9に入力されている。ドライバ8
はsin演算部4からの信号に応じた値と、方向信号に
応じた極性の電極をコイルL1に流し、ドライバ9はc
os演算部5からの信号に応じた値と方向信号に応じた
極性の電流をコイルし、に流すようになっている。コイ
ルし。
The lower 8 bits are data corresponding to O@~90'' in each quadrant, and these are input to the sine operation unit 4 and the cosine operation unit 5, where sine and cos operation are performed, respectively, and the pulse width modulation circuit It is input to the driver (drive circuit) 8.9 via 6.7.Driver 8
The value corresponding to the signal from the sine calculation unit 4 and the electrode with the polarity corresponding to the direction signal are passed through the coil L1, and the driver 9
A current having a value corresponding to the signal from the os calculation unit 5 and a polarity corresponding to the direction signal is passed through the coil. Coil it.

とり、に電流が流れることにより、合成磁界が発生し、
この合成磁界によって針が振れ、入力量に応じた角度方
位の指示を示す。
When a current flows through the handle, a composite magnetic field is generated,
This composite magnetic field causes the needle to swing, indicating the angular direction according to the amount of input.

次に、上記実施例メータ駆動装置の動作について説明す
る。
Next, the operation of the meter driving device of the above embodiment will be explained.

入力信号回路1より、車輪の回転に応じたパルス信号が
入力されると、立上り検出部21でパルス信号の立上り
が検出され、先ず、転送信号をカウンタ20に供給する
とともに、続いてリセット信号をカウンタ20とフリッ
プフロップ23に入力する。カウンタ20は、転送信号
によりそれまでカウントしていたカウント値をメモリ2
6に転送するとともに、リセット信号によりリセットさ
れ、以後衣のリセット信号が来るまで、基準クロック発
生器3からのクロック信号をカウントする。
When a pulse signal corresponding to the rotation of the wheel is input from the input signal circuit 1, the rise detection section 21 detects the rise of the pulse signal, and first supplies a transfer signal to the counter 20, and then sends a reset signal. It is input to the counter 20 and flip-flop 23. The counter 20 transfers the count value that has been counted until then to the memory 2 by the transfer signal.
6, the clock signal from the reference clock generator 3 is reset by the reset signal, and thereafter the clock signal from the reference clock generator 3 is counted until the next reset signal is received.

また、カウンタ22は、入力パルスとは非同期で、時間
カウントを行い2Qmsec毎にカウントアツプ出力を
出し、フリップフロップ23をセットするとともに、フ
リップフロップ23がセット状態で、カウントアツプ出
力が出ると、これによりカウンタ20のカウント内容が
メモリ26に転送される。また、カウンタ22のカウン
トアツプに応じ、周波数演算部27が今回の周波数f、
を演算する。
Further, the counter 22 performs time counting asynchronously with the input pulse and outputs a count-up output every 2Qmsec, setting the flip-flop 23. When the flip-flop 23 is set and the count-up output is output, this The count contents of the counter 20 are transferred to the memory 26. In addition, in response to the count up of the counter 22, the frequency calculation section 27 calculates the current frequency f,
Calculate.

入力パルス信号の周波数が非常に高い状態、つまり1周
期の小さい状態では、立上り検出部21で立上りを検出
し、カウンタ20の内容を転送しリセットした状態から
次のリセット信号が入るまでの期間の方が、2Qmse
cカウンタ23をカウントアツプする時間よりも短いの
で、カウンタ20からの出力は、常にカウンタ20のリ
セット前の転送指令によるものであり、したがって、パ
ルス信号の1周期間に相当するクロック信号のカウント
値、つまり1周期分のデータTがメモリ26に記憶され
る。
When the frequency of the input pulse signal is very high, that is, when one cycle is small, the rising edge detection unit 21 detects the rising edge, transfers the contents of the counter 20, and calculates the period from the reset state until the next reset signal is input. Better, 2Qmse
c Since the time to count up the counter 23 is shorter, the output from the counter 20 is always based on the transfer command before the counter 20 is reset, and therefore the count value of the clock signal corresponding to one period of the pulse signal That is, data T for one cycle is stored in the memory 26.

周波数演算部27では、1/Tの演算を行い、今回の周
波数riを算出し、減算部28に入力する。減算部28
は、メモリ34に記憶されている前回の周波数r、−6
を他方の入力に受け、今回の周波数f、から前回の周波
数f、=1を減算し、その差値f6を算出する。
The frequency calculation unit 27 performs a calculation of 1/T to calculate the current frequency ri, and inputs it to the subtraction unit 28. Subtraction section 28
is the previous frequency r, -6 stored in the memory 34
is received as the other input, the previous frequency f,=1 is subtracted from the current frequency f, and the difference value f6 is calculated.

次に、判別部29でフリップフロップ23のQ出力が0
であるか否かを判定する。通常、入力パルスの周波数が
高い場合に、フリップフロップ23は、リセット状態に
あり、したがって、この場合にQ=0の出力により、判
別部30をスキップして、乗算部31で差値r4に1/
8を乗じ、積を新たなf6とする。そして、加算部32
でこのfdにLSB“1°゛を加算して、さらに加算部
33で前回の周波数f、−1に前回と目標値の差値の1
/8にLSB“lo”を加算したものを加算して、今回
の出力周波数f、とする。つまり、前回の周波数を目的
とする周波数にわずか近づけた周波数r工をメモリ34
に記憶し、この周波数fzをsin演算部4、cos演
算部5及び象限決定部10にそれぞれ出力する。そして
、sin演算部4、cos演算部5及び象限決定部10
の出力に応じ、ドライバ8及びドライバ9に電流が流れ
、コイルL1及びLeに流れる電流により、所定方向の
磁界が発生し、これにより針が、前回の振れと次に目標
とする振れの差の1/8+LSB“1゛分、目標とする
振れに近づいた値に相当するところまで振れることにな
る。
Next, the determination unit 29 determines that the Q output of the flip-flop 23 is 0.
Determine whether or not. Normally, when the frequency of the input pulse is high, the flip-flop 23 is in a reset state. Therefore, in this case, the output of Q=0 causes the discriminator 30 to be skipped and the multiplier 31 to set the difference value r4 to 1. /
Multiply by 8 and make the product a new f6. Then, the adding section 32
The LSB "1°" is added to this fd, and the adder 33 adds 1 of the difference between the previous frequency and the target value to the previous frequency f, -1.
/8 plus LSB "lo" is added to obtain the current output frequency f. In other words, the memory 34 stores a frequency r that is slightly closer to the target frequency than the previous frequency.
and outputs this frequency fz to the sine calculation section 4, the cosine calculation section 5, and the quadrant determination section 10, respectively. Then, a sin calculation section 4, a cos calculation section 5, and a quadrant determination section 10
In response to the output of The swing will reach a value that is 1/8+LSB "1" closer to the target swing.

次に再び20m5ecカウンタ22がカウントアツプす
ると、応じて周波数演算部27における周波数f!の演
算、減算部28における差値演算が行われ、再び差値f
6が導出され、同じく判別部29でQ=Oかの判別がな
され、乗算部31で今回の差値fdに1/8が乗ぜられ
る。そして、加算部32.33で前回の周波数f!−+
 に1/8 raと、LSB“°l°゛が加算され、新
たなrlとし、これをメモリ34に記憶して、前回と同
様sin演算部4、cos演算部5及び象限決定部lO
にそれぞれ出力する。
Next, when the 20m5ec counter 22 counts up again, the frequency f! The calculation and the difference value calculation in the subtraction unit 28 are performed, and the difference value f
6 is derived, the determining unit 29 similarly determines whether Q=O, and the multiplying unit 31 multiplies the current difference value fd by 1/8. Then, in the adders 32 and 33, the previous frequency f! −+
1/8 ra and the LSB "°l°" are added to create a new rl, which is stored in the memory 34 and then processed by the sin calculation unit 4, cos calculation unit 5, and quadrant determination unit lO as before.
Output each.

以上の処理を201Isec毎に繰返し、差値の1/8
+LSB“I IIずつ指示目標に対し近づけ、針を目
標とする変化値にスムーズに近づけて行く。
Repeat the above process every 201 Isec, and 1/8 of the difference value
Move the needle closer to the indicated target by +LSB"I II, and smoothly bring the needle closer to the target change value.

やがて、差値f4が小さくなり、l/8 fdが[0」
となっても、LSB“1”″が加算されるので、目標値
までLSB“1゛°に相当する分、順次接近してゆき、
最終的に目標値の振れが得られる。
Eventually, the difference value f4 becomes small and l/8 fd becomes [0''
Even if it becomes, LSB "1"" is added, so it gradually approaches the target value by the amount corresponding to LSB "1゛°,
Finally, the deviation of the target value is obtained.

次に、今回人力されるパルス信号の周期が非常に大とな
り、つまり周波数が低くなると、立上り検出部21によ
る立上り検出、つまり1周期の検出よりも、リセット後
の20m5ecカウンタ22のカウントアツプの方が速
くなり、20m5ecカウンタ22がカウントアツプす
るとフリップフロップ23がセットされ、Q=1となり
、この状態でカウンタ22が再度カウントアツプし、転
送信号がAND回路24、OR回路25を経て出力され
るので、カウンタ20はまだ1周期分のクロック信号を
カウントしていなくても、それまでのカウント値を一応
1周期のカウント値であると擬制し、メモリ26に記憶
し、さらに周波数演算部27で周波数演算を行い、擬制
の今回周波数r1を算出し、減算部28で前回の周波数
と今回の周波数の差値f、を算出する。そして、フリッ
プフロップ23のQ出力がOであるか否か判別部29で
判別するが、今回はフリップフロップ23がセットされ
ているので、Q=1の出力が出され、判別部30でr、
が0以上であるか否か判別する。差値faが0以上であ
る場合は、今回の周波数の方が前回の周波数より大きい
場合であり、この時は、針がOから大なる振れ方向に移
動しているものであり、この場合にカウント値20がま
だ1周期を数えていないカウント値をもって、周波数演
算を行う時は、目標とする周波数よりもより見掛は上、
周波数の大なるf五が求められるため、周波数r4の処
理を無視し、処理を終了する。
Next, when the cycle of the pulse signal manually input this time becomes very large, that is, the frequency becomes low, the count up of the 20m5ec counter 22 after reset is more likely than the rise detection by the rise detection section 21, that is, the detection of one cycle. becomes faster and when the 20m5ec counter 22 counts up, the flip-flop 23 is set and Q=1. In this state, the counter 22 counts up again and the transfer signal is outputted via the AND circuit 24 and the OR circuit 25. , even if the counter 20 has not yet counted one cycle of clock signals, it temporarily assumes that the count value up to that point is the count value for one cycle, stores it in the memory 26, and then calculates the frequency in the frequency calculation unit 27. The calculation is performed to calculate the virtual current frequency r1, and the subtraction unit 28 calculates the difference value f between the previous frequency and the current frequency. Then, the determining unit 29 determines whether the Q output of the flip-flop 23 is O or not, but since the flip-flop 23 is set this time, an output of Q=1 is output, and the determining unit 30 determines that r,
It is determined whether or not is greater than or equal to 0. If the difference value fa is 0 or more, this means that the current frequency is greater than the previous frequency, and in this case, the needle is moving from O in the direction of large deflection. When frequency calculation is performed using a count value of 20, which has not yet counted one cycle, the frequency will appear higher than the target frequency.
Since f5, which has a large frequency, is desired, the processing for frequency r4 is ignored and the processing is terminated.

しかし、例えばそれまでの周波数が大であり、入力信号
の周波数が低くなったがために、フリップフロップ23
がセットされた場合には、今回の周波数ftと前回の周
波数rt−tの差値f6は−となる。そのため、判別部
30における判定はNOとなり、次に、乗算部31で差
値f6に1/8を乗算する。そして、差値f6の1/8
を新たなf4とし、加算部32でこのfdにさらにLS
Bo“1°゛を加算して、続いて加算部33でこのfd
を前回の周波数f!−1に加算し、新たな今回周波数f
、とじて、メモリ34に記憶する。なお、この場合はr
4は−であるので、新たな周波数rtは前回の周波数r
、−1よりも周波数が低く、目標とする周波数と前回の
周波数との間の値の周波数がメモリ34に記憶され、や
はり、sin演算部4、cos演算部5及び象限決定部
lOに出力される。
However, for example, because the previous frequency was high and the input signal frequency became low, the flip-flop 23
is set, the difference value f6 between the current frequency ft and the previous frequency rt-t becomes -. Therefore, the judgment in the discrimination section 30 is NO, and then the multiplication section 31 multiplies the difference value f6 by 1/8. Then, 1/8 of the difference value f6
is set as a new f4, and the adder 32 further adds LS to this fd.
Bo "1°" is added, and then the addition section 33 adds this fd
The previous frequency f! -1 and new current frequency f
, and stored in the memory 34. In this case, r
4 is -, so the new frequency rt is the previous frequency r
, -1, the frequency having a value between the target frequency and the previous frequency is stored in the memory 34, and is also output to the sine calculation section 4, the cosine calculation section 5, and the quadrant determination section IO. Ru.

そして、それぞれ間の値に相当する電流がドライバ8及
び9により、コイルL、 、L、に流れ、針が前回の高
い周波数に対応する振れと、目標とする低い周波数指示
との間の値を指示するように磁界が発生する。1/8ず
つなので、順次スムーズに移動してゆくことになる。
Then, current corresponding to the value between them flows through the coils L, , L by the drivers 8 and 9, and the needle detects the value between the deflection corresponding to the previous high frequency and the target low frequency indication. A magnetic field is generated as directed. Since it is 1/8 at a time, it will move smoothly one by one.

このメモリ34の出力がなされるとともに、やはり以後
、20m5ec間隔であるいは1周期毎に差値f4を導
出し、判別部29、判別部30、乗算部31、加算部3
2.33の処理を行い、差値f4に1/8の乗算処理を
施し、さらにLSB“1゛を加算して、順次1/8+L
SB“1”ずつ目標とする振れ角に近づけていき、1/
8×差値が「0」となると、LSB“1°゛ずつ目標値
に近づけることになる。
At the same time as this memory 34 outputs, the difference value f4 is derived at intervals of 20 m5ec or every cycle, and the determining unit 29, the determining unit 30, the multiplying unit 31, and the adding unit 3
2.33 is performed, the difference value f4 is multiplied by 1/8, and the LSB "1" is added, sequentially 1/8+L
SB "1" at a time, approach the target deflection angle, 1/
When the 8× difference value becomes “0”, the LSB is brought closer to the target value by “1°”.

(へ)発明の効果 この発明によれば、前回値と今回の差値に1/nを乗じ
たものと、LSB ’“1゛°を前回値に加算して、今
回の出力値とし、順次目標値に近づけてゆくものである
から、差値が小さくなり、1/n×差値が「0」となっ
ても、LSB ”“1゛°の加算で、真価に収束するこ
とができるので、振れ誤差が生じない。また、1/n×
差値とLSB”1”を前回値に加算することを基本とす
るので、プログラム構成を簡単となる利点がある。
(f) Effects of the Invention According to this invention, the difference value between the previous value and this time is multiplied by 1/n, and LSB '"1゛° is added to the previous value to obtain the current output value, and Since it is intended to move closer to the target value, even if the difference value becomes small and 1/n × difference value becomes "0", it can be converged to the true value by adding LSB ""1゛°. , no runout error occurs. Also, 1/n×
Since the difference value and the LSB "1" are basically added to the previous value, there is an advantage that the program configuration is simple.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は、この発明の実施例メータ駆動装置のデータ演
算部の機能構成を示すブロック図、第2図は、この発明
の一実施例を示すメータ駆動装置の概略ブロック図、第
3図は、このメータ装置の2つのコイルと針との関係を
示す図、第4図は、従来のメータ駆動装置の不具合を説
明するための説明図である。 l:入力信号回路、   2:データ演算部、3:基準
クロック発生器、8・9:ドライバ、20:カウンタ、
    21:立上り検出部、22:時間カウンタ、 
  28:減算部、30:差値正負判別部、 31:乗
算部32・33:加算部、  Li  ・Lc:コイル
。 特許出願人      ローム株式会社代理人  弁理
士   中 村 茂 信第 図 第 図 第 図
FIG. 1 is a block diagram showing the functional configuration of a data calculation section of a meter driving device according to an embodiment of the present invention, FIG. 2 is a schematic block diagram of a meter driving device according to an embodiment of the present invention, and FIG. , a diagram showing the relationship between the two coils and the needle of this meter device, and FIG. 4 are explanatory diagrams for explaining the problems of the conventional meter drive device. l: input signal circuit, 2: data calculation section, 3: reference clock generator, 8/9: driver, 20: counter,
21: Rising detection section, 22: Time counter,
28: Subtraction unit, 30: Difference value positive/negative determination unit, 31: Multiplication unit 32 and 33: Addition unit, Li and Lc: Coil. Patent Applicant ROHM Co., Ltd. Agent Patent Attorney Shigeru Nakamura

Claims (1)

【特許請求の範囲】[Claims] (1)互いに直交する第1、第2のコイルと、入力量に
応じた周波数のパルス信号を入力する手段と、クロック
信号発生手段と、このクロック信号発生手段からのクロ
ック信号をカウントし、このカウント値に基づいて前記
入力量に比例したデジタル値を算出する演算部と、この
演算部から出力されるデジタル値に応じた電流を前記第
1、第2のコイルに流す駆動回路と、前記第1と第2の
コイルに電流が流れることにより発生する磁界によって
角度方位が決定される針とを有し、前記入力量の大きさ
に比例した値を指示するためのメータ駆動装置において
、 前記演算部は、所定の時間経過毎にカウントアップする
時間カウンタと、前記パルス信号の各周期の切換りを検
出する切換り検出手段と、前記切換りの検出あるいは時
間カウンタのカウントアップに応答して前記カウント手
段の内容を取込み記憶する記憶手段と、前記時間カウン
タのカウントアップ毎に前記記憶手段の内容に基づいて
前記入力量に比例したデジタル値を演算する演算手段と
、この演算手段による今回のデジタル値と前回出力のデ
ジタル値の差値を算出する差値演算手段と、前記デジタ
ル値が切換り検出における記憶データに基づいて演算さ
れたものであるか否か判別する手段と、この判別手段に
よる判別がNOである場合に応答し、前記差値の正負を
判別し、差値が正なら処理を終了させる差値正負判別手
段と、前記判別手段のYES判別あるいは前記差値正負
判別手段の差値が負である場合に前記差値に1/nを乗
算する手段と、この乗算手段により得られた積及び最下
位1ビット値を前回のデジタル値に加算して今回の出力
デジタル値を決定する出力値決定手段とを備えたことを
特徴とするメータ駆動装置。
(1) First and second coils orthogonal to each other, means for inputting a pulse signal of a frequency corresponding to the input amount, a clock signal generating means, and counting the clock signal from the clock signal generating means. an arithmetic unit that calculates a digital value proportional to the input amount based on a count value; a drive circuit that causes a current to flow through the first and second coils in accordance with the digital value output from the arithmetic unit; 1 and a needle whose angular direction is determined by a magnetic field generated by a current flowing through a second coil, the meter driving device for indicating a value proportional to the magnitude of the input amount, The section includes a time counter that counts up every predetermined period of time, a switching detection means that detects switching of each period of the pulse signal, and a switching detection means that detects switching of each period of the pulse signal, and detects the switching in response to the detection of the switching or the counting up of the time counter. storage means for capturing and storing the contents of the counting means; calculation means for calculating a digital value proportional to the input amount based on the contents of the storage means each time the time counter counts up; difference value calculation means for calculating the difference value between the value and the digital value of the previous output; means for determining whether the digital value is calculated based on stored data in switching detection; difference value positive/negative determining means that responds when the determination is NO, determines whether the difference value is positive or negative, and ends the process if the difference value is positive; and YES determination by the determining means or difference between the difference value positive/negative determining means; means for multiplying the difference value by 1/n when the value is negative; and determining the current output digital value by adding the product obtained by the multiplication means and the least significant 1-bit value to the previous digital value. What is claimed is: 1. A meter drive device comprising: output value determining means.
JP29660588A 1988-11-24 1988-11-24 Meter driving apparatus Pending JPH02141671A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP29660588A JPH02141671A (en) 1988-11-24 1988-11-24 Meter driving apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP29660588A JPH02141671A (en) 1988-11-24 1988-11-24 Meter driving apparatus

Publications (1)

Publication Number Publication Date
JPH02141671A true JPH02141671A (en) 1990-05-31

Family

ID=17835716

Family Applications (1)

Application Number Title Priority Date Filing Date
JP29660588A Pending JPH02141671A (en) 1988-11-24 1988-11-24 Meter driving apparatus

Country Status (1)

Country Link
JP (1) JPH02141671A (en)

Similar Documents

Publication Publication Date Title
JPH02141670A (en) Meter driving apparatus
US3909688A (en) Method and apparatus for determining the initial rotor angle in a rotating field machine
US4358723A (en) Method and apparatus for measuring the rotation of a work table
CN106197484A (en) A kind of sine and cosine encoder high-precision signal processing system and method thereof
US3952187A (en) Circuit for transforming rectangular coordinates to polar coordinates
CN105978570A (en) High-precision signal processing system of sine and cosine encoder
CN102394639A (en) Method to realize arbitrary-number frequency dividing of servo driver and arbitrary-number frequency divider based on field programmable gate array (FPGA)
CN104793568A (en) Multi-axle interpolation method
WO1995016302A1 (en) Digital sine wave generator and motor controller
JPH02141671A (en) Meter driving apparatus
WO2019223108A1 (en) Method and apparatus for measuring movement distance, and storage medium
CN204730763U (en) A kind of laser-beam riding guidance guided missile photoelectricity decoded digital circuit
JPH0641172Y2 (en) Meter drive
US4586124A (en) Device for regulating linear motion
CN112157651A (en) Pose determination method and device and robot
KR101865325B1 (en) Method for detecting rotor position of BLDC motor
JPH0285764A (en) Meter drive device
JPS6228872A (en) Trigonometric function generating processor
SU602918A1 (en) Circular interpolator
US7873493B2 (en) Method and device for determining angular position
JPS60167030A (en) System and circuit for shift flag generation
SU1589292A1 (en) Device for computing position of vehicle
JPH0743566B2 (en) Angle calculator
SU1282082A1 (en) Device for correcting equidistant value
SU1068933A1 (en) Device for computing elementary functions by volder algorithm