JP5414570B2 - AC signal generator - Google Patents

AC signal generator Download PDF

Info

Publication number
JP5414570B2
JP5414570B2 JP2010039744A JP2010039744A JP5414570B2 JP 5414570 B2 JP5414570 B2 JP 5414570B2 JP 2010039744 A JP2010039744 A JP 2010039744A JP 2010039744 A JP2010039744 A JP 2010039744A JP 5414570 B2 JP5414570 B2 JP 5414570B2
Authority
JP
Japan
Prior art keywords
wave
signal
rectangular
value
timer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2010039744A
Other languages
Japanese (ja)
Other versions
JP2011176662A (en
Inventor
國由 吉野
浩平 柴田
航 宮澤
康晴 舘野
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.)
Terada Electric Works Co Ltd
Original Assignee
Terada Electric Works 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 Terada Electric Works Co Ltd filed Critical Terada Electric Works Co Ltd
Priority to JP2010039744A priority Critical patent/JP5414570B2/en
Publication of JP2011176662A publication Critical patent/JP2011176662A/en
Application granted granted Critical
Publication of JP5414570B2 publication Critical patent/JP5414570B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Amplifiers (AREA)

Description

本発明は、交流信号発生装置に関するものであり、特に簡単な構成で減衰交流信号などの交流信号を発生させることが可能な交流信号発生装置に関するものである。   The present invention relates to an AC signal generator, and particularly to an AC signal generator capable of generating an AC signal such as an attenuated AC signal with a simple configuration.

従来、磁気比例方式直流電流センサー、磁気平衡方式直流電流センサー、CRT等においては、外部磁気による磁性体への着磁によって性能、機能に悪影響を及ぼすので、磁性体に巻かれたコイルに消磁電流を流して消磁することが一般的に行われている。   Conventionally, in a magnetic proportional type DC current sensor, a magnetic balance type DC current sensor, a CRT, etc., the magnetism of the magnetic material by external magnetism adversely affects the performance and function, so the demagnetizing current is applied to the coil wound around the magnetic material. It is common practice to demagnetize by flowing a current.

消磁電流としては交流信号を大きな電流から徐々に減じて振幅が0で終息する減衰交流信号を使用する。減衰交流信号の生成方法は、例えば下記特許文献1に記載されているような、ウィーンブリッジ発振回路を応用して減衰信号を作る方法がある。また、CRTの場合には商用交流電源を利用し、消磁コイルと直列にサーミスターを使用して消磁電流による発熱による抵抗値の増加で電流を減衰させる例などがある。   As the demagnetizing current, an attenuated AC signal is used in which the AC signal is gradually reduced from a large current and ends with an amplitude of zero. As a method of generating an attenuated AC signal, there is a method of creating an attenuated signal by applying a Wien bridge oscillation circuit as described in Patent Document 1, for example. In the case of a CRT, there is an example in which a commercial AC power supply is used and a thermistor is used in series with a demagnetizing coil to attenuate the current by increasing the resistance value due to heat generation due to the demagnetizing current.

実開昭51−108670号公報Japanese Utility Model Publication No. 51-108670

上記したような従来の減衰交流信号発生方法において、ウィーンブリッジ発振回路を用いた場合、アナログ発振回路のため、その発振条件や減衰特性を決める要素の部品が多く、部品の特性のばらつきや経年変化によって信号特性のずれや変化が発生する恐れがあるという問題点があった。また、サーミスターを使用する場合にはまず交流電流が必要であり、また発熱により電流を制限するので無駄な電力を消費するという問題点があった。   In the conventional method of generating a damped AC signal as described above, when a Wien bridge oscillation circuit is used, since it is an analog oscillation circuit, there are many components that determine its oscillation conditions and attenuation characteristics, and variations in component characteristics and aging There is a problem that the signal characteristics may be shifted or changed. In addition, when a thermistor is used, an alternating current is required first, and since the current is limited by heat generation, there is a problem that wasteful power is consumed.

本発明の目的は、上記した従来の問題点を解決し、簡単な構成で減衰交流信号を発生させることが可能な交流信号発生装置を提供することにある。   An object of the present invention is to solve the above-described conventional problems and to provide an AC signal generator capable of generating an attenuated AC signal with a simple configuration.

本発明の交流信号発生装置は、周波数が僅かに異なる2つの矩形波を発生させる矩形波発生手段と、前記2つの矩形波を入力し、一方の矩形波の電圧値から他方の矩形波の電圧値を減算した差を出力する両極性の差動増幅手段と、前記差動増幅手段の出力信号を入力し、交流信号を出力する低域通過型フィルター手段とを備えたことを主要な特徴とする。   The AC signal generator of the present invention receives a rectangular wave generating means for generating two rectangular waves having slightly different frequencies and the two rectangular waves, and the voltage of the other rectangular wave is obtained from the voltage value of one rectangular wave. A main feature is that it includes a bipolar differential amplifying means for outputting a difference obtained by subtracting a value, and a low-pass filter means for inputting an output signal of the differential amplifying means and outputting an AC signal. To do.

また、上記した交流信号発生装置において、前記矩形波発生手段は2つの単極性の矩形波信号を出力するマイクロコンピューターによって構成されている点にも特徴がある。
また、上記した交流信号発生装置において、前記マイクロコンピューターは、2つの矩形波の初期の位相差が180度であり、周波数が僅かに異なる2つの矩形波を発生させ、2つの矩形波の位相差が0になる時点で矩形波の発生を終了する点にも特徴がある。
また、上記した交流信号発生装置において、前記2つの矩形波は論理1の長さが等しい点にも特徴がある。
Further, the AC signal generator described above is characterized in that the rectangular wave generating means is constituted by a microcomputer that outputs two unipolar rectangular wave signals.
In the AC signal generator described above, the microcomputer generates two rectangular waves having an initial phase difference of 180 degrees and slightly different frequencies, and the phase difference between the two rectangular waves. Another feature is that the generation of the rectangular wave is terminated when the value becomes zero.
In the AC signal generator described above, the two rectangular waves are also characterized in that the length of logic 1 is equal.

本発明によれば、以下のような効果がある。
(1)波形生成にマイクロコンピューターを使用することによって特に減衰のための回路を必要とせず、外付け部品等による影響を殆ど受けずに安定した減衰信号が得られる。
(2)減衰交流信号の減衰特性等の変更はソフトウェアのみの変更で行なえるので、品質、拡張性、生産性を上げることができる。
(3)減衰交流信号の減衰特性については、二つの信号の周波数の差が重要であり、発振源としてクリスタル発振器等は必ずしも必要ではなく、マイクロコンピューターの内部発振器で十分であるため、小型化に適している。
The present invention has the following effects.
(1) By using a microcomputer for waveform generation, a circuit for attenuation is not particularly required, and a stable attenuation signal can be obtained without being affected by external parts.
(2) Since the attenuation characteristics of the attenuated AC signal can be changed only by software, the quality, expandability, and productivity can be improved.
(3) Regarding the attenuation characteristics of the damped AC signal, the difference between the frequencies of the two signals is important, and a crystal oscillator or the like is not necessarily required as the oscillation source. Is suitable.

図1は本発明の交流信号発生装置の構成を示すブロック図である。FIG. 1 is a block diagram showing a configuration of an AC signal generator of the present invention. 図2は本発明の交流信号発生装置の構成を示す回路図である。FIG. 2 is a circuit diagram showing the configuration of the AC signal generator of the present invention. 図3は本発明の実施例1のマイコンの処理内容を示すフローチャートである。FIG. 3 is a flowchart showing the processing contents of the microcomputer according to the first embodiment of the present invention. 図4は本発明の実施例1における各部の波形を示す波形図である。FIG. 4 is a waveform diagram showing waveforms at various parts in the first embodiment of the present invention. 図5は本発明の実施例2のマイコンの処理内容を示すフローチャートである。FIG. 5 is a flowchart showing the processing contents of the microcomputer according to the second embodiment of the present invention. 図6は本発明の実施例2における各部の波形を示す波形図である。FIG. 6 is a waveform diagram showing waveforms at various parts in the second embodiment of the present invention.

以下に図面を参照して実施例について説明する。   Embodiments will be described below with reference to the drawings.

図1は本発明の交流信号発生装置の構成を示すブロック図である。ワンチップマイコン10は、市販されている周知の1チップマイクロコンピューター回路である。マイコン10は、CPU、ROM、RAM、デジタル入出力回路、ハードウェアタイマ回路等を備えている。マイコン10としては、本発明の機能や処理速度を備えたものであれば、市販されている任意の1チップマイクロコンピューターを採用可能である。   FIG. 1 is a block diagram showing a configuration of an AC signal generator of the present invention. The one-chip microcomputer 10 is a known one-chip microcomputer circuit that is commercially available. The microcomputer 10 includes a CPU, a ROM, a RAM, a digital input / output circuit, a hardware timer circuit, and the like. As the microcomputer 10, any commercially available one-chip microcomputer can be adopted as long as it has the functions and processing speed of the present invention.

また、ROMには後述する処理を実行するためのプログラムが格納されており、マイコン10はこのプログラムの処理に基づき、A波およびB波の2つの単極性の矩形波を出力する矩形波発生手段として機能する。A波およびB波は周波数が僅かに異なる矩形波であり、2つの矩形波の初期の位相差が180度(半サイクル)であり、2つの矩形波の位相差が0になる時点で矩形波の発生を終了する。   The ROM stores a program for executing processing to be described later, and the microcomputer 10 generates rectangular wave generating means for outputting two unipolar rectangular waves of A wave and B wave based on the processing of this program. Function as. The A wave and the B wave are rectangular waves having slightly different frequencies, the initial phase difference between the two rectangular waves is 180 degrees (half cycle), and the rectangular wave when the phase difference between the two rectangular waves becomes zero. End the occurrence of.

差動増幅回路11は、A波およびB波の2つの矩形波を入力し、一方の矩形波の電圧値から他方の矩形波の電圧値を減算した差(B−A)を出力する両極性の差動増幅手段であり、周知の演算増幅器により実現できる。増幅率は例えば1であってもよい。   The differential amplifier circuit 11 receives two rectangular waves of A wave and B wave, and outputs a difference (B−A) obtained by subtracting the voltage value of the other rectangular wave from the voltage value of one rectangular wave. The differential amplifier means can be realized by a known operational amplifier. The amplification factor may be 1, for example.

ローパスフィルタ回路12は、差動増幅回路11の出力信号を入力し、交流信号を出力する低域通過型フィルター手段として機能する。ローパスフィルタ回路12は、実際には演算増幅器を使用した周知のアクティブフィルター回路により実現できる。   The low-pass filter circuit 12 functions as a low-pass filter unit that receives the output signal of the differential amplifier circuit 11 and outputs an AC signal. The low-pass filter circuit 12 can actually be realized by a known active filter circuit using an operational amplifier.

図2は本発明の交流信号発生装置の構成を示す回路図である。マイコン10は、前記したように、本発明に関するプログラムを内蔵した周知の1チップマイクロコンピューターである。マイコン10は単極性の電源(例えばVcc=3V)により動作し、外部からの起動信号に基づいてA波およびB波の2つの単極性の矩形波を出力する。なお、抵抗20およびコンデンサ21は電源オン時のリセット回路である。   FIG. 2 is a circuit diagram showing the configuration of the AC signal generator of the present invention. As described above, the microcomputer 10 is a known one-chip microcomputer incorporating a program related to the present invention. The microcomputer 10 is operated by a unipolar power supply (for example, Vcc = 3 V), and outputs two unipolar rectangular waves of A wave and B wave based on an activation signal from the outside. The resistor 20 and the capacitor 21 are a reset circuit when the power is turned on.

差動増幅回路11は、周知の演算増幅器により実現される両極性の差動増幅回路であり、全ての抵抗23〜26の値が等しく、増幅率が1であってもよい。電源としては両極の電源として例えば±12Vが供給される。   The differential amplifier circuit 11 is a bipolar differential amplifier circuit realized by a known operational amplifier, and all the resistors 23 to 26 may have the same value and an amplification factor of 1. As the power source, for example, ± 12 V is supplied as a bipolar power source.

ローパスフィルタ回路12としては演算増幅器を使用した3次のアクティブフィルター回路を採用している。電源としてはやはり両極の電源として例えば±12Vが供給される。周波数特性としては例えば遮断周波数が60Hz程度であってもよい。なお、信号の用途によりフィルター回路の種類や段数(次数)を敵選変更してもよい。また、消磁目的であれば信号の歪はさほど問題とならず、ほぼ上下対称波形であれば良い。   As the low-pass filter circuit 12, a third-order active filter circuit using an operational amplifier is employed. As a power source, for example, ± 12 V is supplied as a bipolar power source. As the frequency characteristics, for example, the cutoff frequency may be about 60 Hz. Note that the type and stage number (order) of the filter circuit may be changed by enemy selection depending on the application of the signal. For degaussing purposes, signal distortion does not matter so much, and the waveform may be a substantially symmetrical waveform.

図3は本発明の実施例1のマイコンの処理内容を示すフローチャートである。電源がオンされると、S10においては図示しない外部回路からの減衰交流信号発生の起動信号が入力されるまで待ち、入力された場合にはS11に移行する。S11においてはハードウェアタイマー回路に計数時間を設定し、起動する。計数時間としては例えば25μ秒であってもよい。このタイマー回路によって25μ秒毎にタイマー割り込みが発生する。   FIG. 3 is a flowchart showing the processing contents of the microcomputer according to the first embodiment of the present invention. When the power is turned on, the process waits until an activation signal for generating an attenuated AC signal from an external circuit (not shown) is input in S10, and if it is input, the process proceeds to S11. In S11, the counting time is set in the hardware timer circuit and started. The counting time may be 25 μs, for example. This timer circuit generates a timer interrupt every 25 μs.

S12においてはA波用およびB波用ソフトタイマーをリセットする。即ち、タイムアップ値を設定して計数値を初期化=0とする。また、波形カウンタも0にリセットする。ソフトタイマーはタイマー割り込みによってレジスタあるいはRAMに記憶されているカウント値をカウントアップ(+1)し、予め設定されたタイムアップ値になったか否かを判定するプログラムである。   In S12, the A-wave and B-wave soft timers are reset. That is, the time-up value is set and the count value is initialized = 0. The waveform counter is also reset to zero. The soft timer is a program that counts up (+1) the count value stored in the register or RAM by a timer interrupt and determines whether or not a preset time-up value has been reached.

実施例の場合には、A波用タイマーにtA=1/50×1/2=1/100=10msを計数するタイムアップ値として10ms/25μs=400を設定する。また、B波用タイマーに1/49.875×1/2=1/99.75=10.025msを計数するタイムアップ値として10.025ms/25μs=401を設定する。従って、A波は周波数50Hz、B波は周波数49.875Hzとなる。   In the embodiment, 10 ms / 25 μs = 400 is set as the time-up value for counting tA = 1/50 × 1/2 = 1/100 = 10 ms in the A wave timer. In addition, 10.025 ms / 25 μs = 401 is set as a time-up value for counting 1 / 49.875 × 1/2 = 1 / 99.75 = 10.025 ms in the B wave timer. Therefore, the A wave has a frequency of 50 Hz and the B wave has a frequency of 49.875 Hz.

S13においてはA波の初期値である論理1(+Vcc)およびB波の初期値である論理0(0V)をそれぞれのデジタル出力端子に出力する。初期値においてはA波とB波の位相のずれは180度ある。S14においてはハードウェアタイマー割込が有るまで待ち、割り込みが発生した場合にはS15に移行する。S15においてはA波およびB波のソフトタイマー計数値にそれぞれ1を加算する。   In S13, the logic 1 (+ Vcc) that is the initial value of the A wave and the logic 0 (0 V) that is the initial value of the B wave are output to the respective digital output terminals. In the initial value, the phase shift between the A wave and the B wave is 180 degrees. In S14, the process waits until there is a hardware timer interrupt. If an interrupt occurs, the process proceeds to S15. In S15, 1 is added to the A and B wave soft timer count values.

S16においてはA波タイマーがタイムアップしたか(起動から所定時間が経過したか=計数値が400になったか)否かが判定され、判定結果が否定の場合にはS20に移行するが、肯定の場合にはS17に移行する。S17においてはA波の出力値を反転させる(+Vccなら0Vに、0Vなら+Vccにする)と共にA波タイマーにtAに相当する400をセットして再びA波タイマーを起動(計数値を0に)する。   In S16, it is determined whether or not the A-wave timer has expired (whether a predetermined time has elapsed since activation = count value has reached 400). If the determination result is negative, the process proceeds to S20. In this case, the process proceeds to S17. In S17, the output value of the A wave is inverted (0V for + Vcc, + Vcc for 0V), and the A wave timer is set to 400 corresponding to tA, and the A wave timer is started again (count value is set to 0). To do.

S18においてはメモリあるいはレジスタ上にある波形カウンタの値に1を加算する。S19においては波形カウンタの値が所定値に達したか否かが判定され、判定結果が否定の場合にはS14に移行するが、肯定の場合には減衰交流信号の発生処理が終了したので、A波およびB波の出力値を共に0としてS10に移行する。   In S18, 1 is added to the value of the waveform counter on the memory or register. In S19, it is determined whether or not the value of the waveform counter has reached a predetermined value. If the determination result is negative, the process proceeds to S14, but if the determination is affirmative, the generation process of the attenuated AC signal is completed. Both the output values of the A wave and the B wave are set to 0, and the process proceeds to S10.

なお、波形カウンタの所定値は起動時に180度(半サイクル、50Hzで10ms)ずれていたA波およびB波の位相のずれが無くなる時間に相当する値であり、10ms毎に25μsづつずれが小さくなるので、波形カウンタの値が400のとき(10ms×10ms/25μs=10ms×400=4秒)に位相のずれが無くなる。   The predetermined value of the waveform counter is a value corresponding to the time when there is no phase shift between the A wave and the B wave which has been shifted by 180 degrees (half cycle, 10 ms at 50 Hz) at the start-up, and the shift is small by 25 μs every 10 ms. Therefore, when the value of the waveform counter is 400 (10 ms × 10 ms / 25 μs = 10 ms × 400 = 4 seconds), there is no phase shift.

S20においてはB波タイマーがタイムアップ(起動から所定時間が経過=計数値が401になったか)したか否かが判定され、判定結果が否定の場合にはS14に移行するが、肯定の場合にはS21に移行する。S21においてはB波の出力値を反転させる(0Vなら+Vccに、+Vccなら0Vにする)と共にB波タイマーにtBに相当する401をセットして再びB波タイマーを起動し、S14に移行する。   In S20, it is determined whether or not the B-wave timer has timed up (predetermined time has elapsed since activation = count value has become 401). If the determination result is negative, the process proceeds to S14. To S21. In S21, the output value of the B wave is inverted (+ Vcc if 0V, 0V if + Vcc), and 401 corresponding to tB is set in the B wave timer, the B wave timer is started again, and the process proceeds to S14.

図4は本発明の実施例1における各部の波形を示す波形図である。本発明においては、2つの周波数が僅かに異なる矩形波であるA波、B波の差信号を利用する。A波、B波は前記したようにマイコン10によって生成される。ここで、A波、B波は単極性(単電源+Vcc)である。   FIG. 4 is a waveform diagram showing waveforms at various parts in the first embodiment of the present invention. In the present invention, a difference signal between an A wave and a B wave, which are rectangular waves having slightly different frequencies, is used. The A wave and the B wave are generated by the microcomputer 10 as described above. Here, the A wave and the B wave are unipolar (single power supply + Vcc).

次に、差動増幅回路11の+入力、−入力にB波とA波をそれぞれ加える。差動増幅回路11は両極性(両電源(±))のものを使用する。増幅率が1の場合、−入力に加えられたA波が+Vcc(論理1)で、+入力に加えられたB波が0V(論理0)の時は差動増幅回路11の出力である差信号は−Vccとなる。   Next, a B wave and an A wave are respectively added to the + input and the − input of the differential amplifier circuit 11. The differential amplifier circuit 11 uses a bipolar circuit (both power supplies (±)). When the amplification factor is 1, the difference that is the output of the differential amplifier circuit 11 when the A wave applied to the − input is + Vcc (logic 1) and the B wave applied to the + input is 0 V (logic 0). The signal is -Vcc.

一方、−入力に加えられたA波が0Vで、+入力に加えられたB波が+Vccの時は差動増幅回路11の出力である差信号は+Vccとなる。また、A波およびB波が双方とも0Vあるいは+Vccの場合には差動増幅回路11の出力である差信号は0Vとなる。   On the other hand, when the A wave applied to the-input is 0 V and the B wave applied to the + input is + Vcc, the difference signal that is the output of the differential amplifier circuit 11 is + Vcc. When both the A wave and the B wave are 0V or + Vcc, the difference signal that is the output of the differential amplifier circuit 11 is 0V.

この結果、差動増幅回路11の出力である差信号は図示するような両極性のパルスとなり、時間の経過と共にパルス幅が狭くなっていく。この信号をローパスフィルター(LPF)回路12を通過させてサイン波に近い減衰交流波形にする。   As a result, the difference signal that is the output of the differential amplifier circuit 11 becomes a bipolar pulse as shown in the figure, and the pulse width becomes narrower as time passes. This signal is passed through a low-pass filter (LPF) circuit 12 to form an attenuated alternating current waveform close to a sine wave.

A波の周波数は希望する信号の周波数(例えばFa=50Hz)とする。信号の長さ(T)はA波の周期の整数倍とする(例えば4秒)。B波はT秒間で1/2周期位相がずれる、A波よりも周波数が低い信号とする。即ち、Fb=((T秒間のA波のサイクル数−1/2サイクル)÷T)=((T*Fa−0.5)/T)となる。従って、例えばTが4秒、A波の周波数が50Hzの場合、Fb=49.875Hzとなる。   The frequency of the A wave is a desired signal frequency (for example, Fa = 50 Hz). The signal length (T) is an integral multiple of the period of the A wave (for example, 4 seconds). The B wave is a signal whose frequency is lower than that of the A wave, whose phase is shifted by 1/2 period in T seconds. That is, Fb = ((the number of A wave cycles for T seconds−½ cycle) ÷ T) = ((T * Fa−0.5) / T). Therefore, for example, when T is 4 seconds and the frequency of the A wave is 50 Hz, Fb = 49.875 Hz.

実施例1においては周波数50Hz、信号時間4秒で振幅がVccから0になる減衰交流信号の発生について開示したが、本発明の信号発生装置においては、交流信号の周波数、信号継続時間、減衰速度、交流信号発生開始および終了時の振幅などをプログラムによって制御可能である。   In the first embodiment, the generation of an attenuated AC signal whose amplitude is Vcc to 0 at a frequency of 50 Hz and a signal time of 4 seconds has been disclosed. The amplitude at the start and end of AC signal generation can be controlled by a program.

実施例1においては交流信号の半サイクル毎に矩形波の幅が短くなるので、厳密には+側の波形と−側の波形は等しくない。実施例2は、実施例1よりも正負の波形がより等しい交流信号を発生するものである。実施例2において実施例1と異なる点はマイコン10のプログラムのみで、回路は実施例1と同一である。実施例2においては1サイクル毎に差信号のプラス側、マイナス側に同じ長さの波形がバランスして出力される。   In the first embodiment, since the width of the rectangular wave becomes shorter every half cycle of the AC signal, strictly speaking, the + side waveform and the − side waveform are not equal. The second embodiment generates an AC signal having a more equal positive and negative waveform than the first embodiment. The second embodiment is different from the first embodiment only in the program of the microcomputer 10, and the circuit is the same as the first embodiment. In the second embodiment, a waveform having the same length is balanced and output on the plus side and the minus side of the difference signal every cycle.

実施例2においては、A波は実施例1と同一である。B波については周期は実施例1と同一とするが、出力が論理1(Vcc)である時間をA波の出力が論理1(Vcc)である時間「tA」と同じにする。従って、デューティー比は50%より小さくなる。   In the second embodiment, the A wave is the same as the first embodiment. For the B wave, the period is the same as in the first embodiment, but the time when the output is logic 1 (Vcc) is the same as the time “tA” when the output of the A wave is logic 1 (Vcc). Therefore, the duty ratio is smaller than 50%.

B波の論理0(0V)時間tBは、下記計算式により求める。A波の周波数Faは希望する信号の周波数(例えばFa=50Hz、tA=10ms)とする。信号の長さ(T)はA波の周期の整数倍とする(例えば4秒)。tBは、T秒の合計でtAよりもtAだけ長くなる時間であるので、tB=tA+tA/(Fa*T)となり、周波数はFb=1/(tA+tB)となる。   The logical 0 (0 V) time tB of the B wave is obtained by the following formula. The frequency Fa of the A wave is a desired signal frequency (for example, Fa = 50 Hz, tA = 10 ms). The signal length (T) is an integral multiple of the period of the A wave (for example, 4 seconds). Since tB is a time that is longer than tA by tA in total for T seconds, tB = tA + tA / (Fa * T), and the frequency is Fb = 1 / (tA + tB).

従って、例えばTが4秒、A波の周波数が50Hzの場合、tA=10ms、tB=10ms+(10ms/(50×4))=10.05msとなり、Fb=1/20.05ms≒49.875Hzとなる。   Therefore, for example, when T is 4 seconds and the frequency of the A wave is 50 Hz, tA = 10 ms, tB = 10 ms + (10 ms / (50 × 4)) = 10.05 ms, and Fb = 1 / 20.05 ms≈49.875 Hz. It becomes.

図5は本発明の実施例2のマイコンの処理内容を示すフローチャートである。電源がオンされると、S30においては図示しない外部回路からの減衰交流信号発生の起動信号が入力されるまで待ち、入力された場合にはS31に移行する。S31においてはハードウェアタイマー回路に計数時間を設定し、起動する。計数時間としては例えば25μ秒であってもよい。このタイマー回路によって25μ秒毎にタイマー割り込みが発生する。   FIG. 5 is a flowchart showing the processing contents of the microcomputer according to the second embodiment of the present invention. When the power is turned on, the process waits until an activation signal for generating an attenuated AC signal from an external circuit (not shown) is input in S30, and if it is input, the process proceeds to S31. In S31, the counting time is set in the hardware timer circuit and started. The counting time may be 25 μs, for example. This timer circuit generates a timer interrupt every 25 μs.

S32においてはA波用ソフトタイマーをリセットする。即ち、タイムアップ値を設定して計数値を初期化=0とする。ソフトタイマーはタイマー割り込みによってレジスタあるいはRAMに記憶されているカウント値をカウントアップ(+1)し、予め設定されたタイムアップ値になったか否かを判定するプログラムである。実施例の場合には、A波用タイマーにtA=1/50×1/2=1/100=10msを計数するタイムアップ値として10ms/25μs=400を設定する。   In S32, the A-wave soft timer is reset. That is, the time-up value is set and the count value is initialized = 0. The soft timer is a program that counts up (+1) the count value stored in the register or RAM by a timer interrupt and determines whether or not a preset time-up value has been reached. In the embodiment, 10 ms / 25 μs = 400 is set as the time-up value for counting tA = 1/50 × 1/2 = 1/100 = 10 ms in the A wave timer.

S33においてはA波の初期値である論理1(+Vcc)およびB波の初期値である論理0(0V)をそれぞれのデジタル出力端子に出力する。初期値においてはA波とB波の位相のずれは180度ある。S34においてはハードウェアタイマー割込が有るまで待ち、割り込みが発生した場合にはS35に移行する。S35においてはA波のソフトタイマー計数値に1を加算する。   In S33, logic 1 (+ Vcc) which is the initial value of the A wave and logic 0 (0 V) which is the initial value of the B wave are output to the respective digital output terminals. In the initial value, the phase shift between the A wave and the B wave is 180 degrees. In S34, the process waits until there is a hardware timer interrupt. If an interrupt occurs, the process proceeds to S35. In S35, 1 is added to the A-wave soft timer count value.

S36においてはA波タイマーがタイムアップしたか(起動から所定時間が経過したか=計数値が400になったか)否かが判定され、判定結果が否定の場合にはS34に移行するが、肯定の場合にはS37に移行する。S37においてはA波およびB波の出力値をそれぞれ反転させる(+Vccなら0Vに、0Vなら+Vccにする)と共にA波タイマーおよびB波タイマーの双方にtAに相当する400をセットしてA波タイマーおよびB波タイマーの双方を起動(計数値を0に)する。また、波形カウンタを0にリセットする。   In S36, it is determined whether or not the A-wave timer has expired (whether a predetermined time has elapsed since activation = count value has become 400). If the determination result is negative, the process proceeds to S34, but affirmative In this case, the process proceeds to S37. In S37, the output values of A wave and B wave are inverted (+ Vcc is set to 0V, and 0V is set to + Vcc), and A wave timer is set by setting 400 corresponding to tA to both A wave timer and B wave timer. And both B wave timers are activated (count value is set to 0). In addition, the waveform counter is reset to zero.

S38においてはハードウェアタイマー割込が有るまで待ち、割り込みが発生した場合にはS39に移行する。S39においてはAおよびB波のソフトタイマー計数値に1を加算する。S40においては、A波タイマーがタイムアップしたか(起動から所定時間が経過したか=計数値が400になったか)否かが判定され、判定結果が否定の場合にはS44に移行するが、肯定の場合にはS41に移行する。   In S38, the process waits until there is a hardware timer interrupt. If an interrupt occurs, the process proceeds to S39. In S39, 1 is added to the soft timer count values of the A and B waves. In S40, it is determined whether or not the A-wave timer has expired (whether a predetermined time has elapsed since activation = a count value has reached 400). If the determination result is negative, the process proceeds to S44. If yes, the process proceeds to S41.

S41においてはA波の出力値を反転させる(+Vccなら0Vに、0Vなら+Vccにする)と共にA波タイマーにtAに相当する400をセットしてA波タイマーを起動(計数値を0に)する。S42においては波形カウンタの値に1を加算する。S43においては波形カウンタの値が所定値に達したか否かが判定され、判定結果が否定の場合にはS44に移行するが、肯定の場合には減衰交流信号の発生処理が終了したので、A波およびB波の出力値を共に0としてS30に移行する。   In S41, the A-wave output value is inverted (+ Vcc is set to 0V, and 0V is set to + Vcc), and the A-wave timer is set to 400 corresponding to tA to start the A-wave timer (count value is set to 0). . In S42, 1 is added to the value of the waveform counter. In S43, it is determined whether or not the value of the waveform counter has reached a predetermined value. If the determination result is negative, the process proceeds to S44, but if the determination is affirmative, the generation process of the attenuated AC signal is completed. Both the output values of the A wave and the B wave are set to 0, and the process proceeds to S30.

なお、波形カウンタの所定値は起動時に180度(半サイクル、50Hzで10ms)ずれていたA波およびB波の位相のずれが無くなる時間に相当する値であり、20ms毎に50μsづつずれが小さくなるので、波形カウンタの値が400のとき(10ms×20ms/50μs=10ms×400=4秒)に位相のずれが無くなる。   The predetermined value of the waveform counter is a value corresponding to the time when there is no phase shift between the A wave and the B wave, which is shifted by 180 degrees (half cycle, 10 ms at 50 Hz) at the start-up, and the shift is small by 50 μs every 20 ms. Therefore, when the value of the waveform counter is 400 (10 ms × 20 ms / 50 μs = 10 ms × 400 = 4 seconds), there is no phase shift.

S44においてはB波タイマーがタイムアップ(起動から所定時間が経過=計数値が400(出力0の時)あるいは402(出力1(Vcc)の時)になったか)したか否かが判定され、判定結果が否定の場合にはS38に移行するが、肯定の場合にはS45に移行する。   In S44, it is determined whether or not the B-wave timer has expired (predetermined time has elapsed since startup = count value has reached 400 (when output is 0) or 402 (when output is 1 (Vcc))). If the determination result is negative, the process proceeds to S38, but if the determination result is affirmative, the process proceeds to S45.

S45においてはB波の出力値を反転させる。(0Vなら+Vccに、+Vccなら0Vにする)S46においてはB波の出力値が0か否かが判定され、判定結果が否定の場合(出力値が1)にはS47に移行するが、肯定の場合にはS48に移行する。S47においてはB波タイマーにtAに相当する400をセットして再びB波タイマーを起動し、S38に移行する。S48においてはB波タイマーにtBに相当する402(=10.05ms/25μs)をセットして再びB波タイマーを起動し、S38に移行する。   In S45, the output value of the B wave is inverted. (If 0V, set to + Vcc, + Vcc, set to 0V) In S46, it is determined whether or not the output value of the B wave is 0. If the determination result is negative (output value is 1), the process proceeds to S47. In this case, the process proceeds to S48. In S47, 400 corresponding to tA is set in the B wave timer, the B wave timer is started again, and the process proceeds to S38. In S48, 402 (= 10.05 ms / 25 μs) corresponding to tB is set in the B wave timer, the B wave timer is started again, and the process proceeds to S38.

図6は本発明の実施例2における各部の波形を示す波形図である。実施例2においては、やはり2つの周波数が僅かに異なる単極性(単電源+Vcc)の矩形波であるA波、B波の差信号を利用する。但し、A波、B波の出力が論理1(Vcc)である時間は同一(=tA)であり、出力が論理0(0V)である時間のみが異なる。   FIG. 6 is a waveform diagram showing waveforms at various parts in the second embodiment of the present invention. In the second embodiment, a difference signal between the A wave and the B wave, which is a rectangular wave having a single polarity (single power supply + Vcc) slightly different in two frequencies, is used. However, the time when the output of the A wave and the B wave is logic 1 (Vcc) is the same (= tA), and only the time when the output is logic 0 (0 V) is different.

次に、差動増幅回路11の+入力、−入力にB波とA波をそれぞれ加える。これ以降の動作は実施例1と同一である。差信号は、最初の半サイクルを除き、各サイクル毎に+側の矩形波の長さと−側の矩形波の長さが等しくなり、かつ長さが段々と短くなる。   Next, a B wave and an A wave are respectively added to the + input and the − input of the differential amplifier circuit 11. The subsequent operation is the same as that of the first embodiment. In the difference signal, except for the first half cycle, the length of the + side rectangular wave is equal to the length of the − side rectangular wave for each cycle, and the length is gradually shortened.

以上、実施例について説明したが、以下のような変形例も考えられる。実施例においては、マイコンを用いてA波、B波を発生させる例を開示したが、例えばロジック回路によってA波、B波を発生させてもよい。また、フィルター回路としてはアクティブフィルターの他、インダクタやコンデンサからなるフィルター回路を用いてもよい。   Although the embodiments have been described above, the following modifications are also conceivable. In the embodiment, the example of generating the A wave and the B wave using a microcomputer is disclosed, but the A wave and the B wave may be generated by a logic circuit, for example. In addition to the active filter, a filter circuit including an inductor and a capacitor may be used as the filter circuit.

本発明は例えば磁性体の消磁回路など交流減衰信号を必要とする任意の装置に適用可能である。   The present invention is applicable to any device that requires an AC attenuation signal, such as a demagnetization circuit of a magnetic material.

10…ワンチップマイコン
11…差動増幅回路
12…ローパスフィルター回路
10 ... One-chip microcomputer 11 ... Differential amplifier circuit 12 ... Low-pass filter circuit

Claims (4)

周波数が僅かに異なる2つの矩形波を発生させる矩形波発生手段と、
前記2つの矩形波を入力し、一方の矩形波の電圧値から他方の矩形波の電圧値を減算した差を出力する両極性の差動増幅手段と、
前記差動増幅手段の出力信号を入力し、交流信号を出力する両極性の低域通過型フィルター手段と
を備えたことを特徴とする両極性の交流信号発生装置。
Rectangular wave generating means for generating two rectangular waves having slightly different frequencies;
Bipolar differential amplification means for inputting the two rectangular waves and outputting a difference obtained by subtracting the voltage value of the other rectangular wave from the voltage value of the one rectangular wave;
The differential output signal of the amplifying means to enter, bipolar alternating signal generating apparatus characterized by comprising a low-pass filter means bipolar that outputs an AC signal.
前記矩形波発生手段は、プログラムの処理に基づいて2つの単極性の矩形波信号を出力するマイクロコンピューターによって構成されていることを特徴とする請求項1に記載の交流信号発生装置。 2. The AC signal generating apparatus according to claim 1, wherein the rectangular wave generating means is constituted by a microcomputer that outputs two unipolar rectangular wave signals based on processing of a program . 前記マイクロコンピューターは、2つの矩形波の初期の位相差が180度であり、周波数が僅かに異なる2つの矩形波を発生させ、2つの矩形波の位相差が0になる時点で矩形波の発生を終了することを特徴とする請求項2に記載の交流信号発生装置。   The microcomputer generates two rectangular waves having an initial phase difference of 180 degrees and slightly different frequencies, and generates a rectangular wave when the phase difference between the two rectangular waves becomes zero. The AC signal generator according to claim 2, wherein the AC signal generator is terminated. 前記2つの矩形波は論理1の長さが等しいことを特徴とする請求項3に記載の交流信号発生装置。   The AC signal generator according to claim 3, wherein the two rectangular waves have the same logical 1 length.
JP2010039744A 2010-02-25 2010-02-25 AC signal generator Expired - Fee Related JP5414570B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010039744A JP5414570B2 (en) 2010-02-25 2010-02-25 AC signal generator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010039744A JP5414570B2 (en) 2010-02-25 2010-02-25 AC signal generator

Publications (2)

Publication Number Publication Date
JP2011176662A JP2011176662A (en) 2011-09-08
JP5414570B2 true JP5414570B2 (en) 2014-02-12

Family

ID=44689096

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010039744A Expired - Fee Related JP5414570B2 (en) 2010-02-25 2010-02-25 AC signal generator

Country Status (1)

Country Link
JP (1) JP5414570B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5970294B2 (en) * 2012-08-23 2016-08-17 山洋電気株式会社 Grid-connected inverter device
JP6401599B2 (en) * 2014-12-18 2018-10-10 カルソニックカンセイ株式会社 Ground fault detection device for vehicles
JP6859677B2 (en) * 2016-11-28 2021-04-14 株式会社明電舎 Terminal equipment
CN111030646A (en) * 2019-12-30 2020-04-17 桂林理工大学 Cathode heating square wave generator synchronous adjusting device of electron beam welding machine

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5494262A (en) * 1978-01-09 1979-07-25 Japan Radio Co Ltd Attenuated wave generation system
JP3855388B2 (en) * 1997-09-04 2006-12-06 ソニー株式会社 Operation sound generator
US20070125592A1 (en) * 2005-12-07 2007-06-07 Frank Michell Excitation of air directing valves and air handling surfaces in the cancellation of air handling system noise
TW200812240A (en) * 2006-08-30 2008-03-01 Delta Electronics Inc Level determining device and method of pulse width modulation signal
TWI354439B (en) * 2007-06-04 2011-12-11 Holtek Semiconductor Inc Ac signal producer and method thereof

Also Published As

Publication number Publication date
JP2011176662A (en) 2011-09-08

Similar Documents

Publication Publication Date Title
JP5414570B2 (en) AC signal generator
JP6101463B2 (en) Controller for DC / DC converter
JP2016171712A (en) Switching power supply control circuit, and switching power supply
JP2013238491A (en) Magnetic element control device, magnetic element control method, and magnetic detector
US4541288A (en) Operating circuit for magnetoelastic force/pressure sensors
JP2004320097A (en) Pulse width modulation circuit
JP2005323491A (en) Dc-dc converter
JP5306859B2 (en) Resistance measuring device
JP4889849B2 (en) Sine wave generator
JP2019211450A (en) Magnetic field sensor
JP2020127268A5 (en)
JP2019211450A5 (en)
JP2020118523A (en) Flux gate sensor
JP2015532049A (en) Sine-cosine modulator
JP5742943B2 (en) DC-DC converter, DC-DC conversion method, and information device
JP2015129671A (en) Current detection device
JP2570869Y2 (en) Lamp lighting device
JP2010011730A (en) Transformer drive system
JPH0922289A (en) Driving method and driving device for sounding body
JP2020118524A (en) Flux gate sensor and method for adjusting phase of flux gate sensor
JP5143515B2 (en) PWM DC voltage controller
JP2019062341A (en) Oscillation circuit
JP2016025608A (en) Oscillation circuit
JP2000228881A (en) Control of inverter apparatus
JP5396878B2 (en) Clock synchronization circuit

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130213

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130826

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20131021

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20131108

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20131112

R150 Certificate of patent or registration of utility model

Ref document number: 5414570

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313532

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees