JP2014014054A - A/d conversion device - Google Patents

A/d conversion device Download PDF

Info

Publication number
JP2014014054A
JP2014014054A JP2012151497A JP2012151497A JP2014014054A JP 2014014054 A JP2014014054 A JP 2014014054A JP 2012151497 A JP2012151497 A JP 2012151497A JP 2012151497 A JP2012151497 A JP 2012151497A JP 2014014054 A JP2014014054 A JP 2014014054A
Authority
JP
Japan
Prior art keywords
value
digital value
analog
comparator
unit
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
JP2012151497A
Other languages
Japanese (ja)
Inventor
Katsunori Tanaka
克典 田中
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.)
Toyota Industries Corp
Original Assignee
Toyota Industries 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 Toyota Industries Corp filed Critical Toyota Industries Corp
Priority to JP2012151497A priority Critical patent/JP2014014054A/en
Publication of JP2014014054A publication Critical patent/JP2014014054A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide an A/D conversion device that improves A/D conversion accuracy.SOLUTION: At every control timing, a correction value VDh is added to a digital value VDs to produce a corrected digital value VDt. If a comparator 2 determines that a voltage Vref is higher than a voltage Vc at the control timing, a constant value is consecutively added to a digital value VD_0 until the determination that the voltage Vref is higher than the voltage Vc is denied, and the digital value VDs is subtracted from the result of addition to produce the correction value VDh. If the comparator 2 does not determine that the voltage Vref is higher than the voltage Vc at the control timing, a constant value is consecutively subtracted from the digital value VD_0 until the determination that the voltage Vref is higher than the voltage Vc is asserted, and the digital value VDs is subtracted from the result of subtraction to produce the correction value VDh.

Description

本発明は、アナログ値をデジタル値に変換するA/D変換装置に関する。   The present invention relates to an A / D converter that converts an analog value into a digital value.

一般に、A/D変換装置の出力値には、絶対誤差、微分非直線性誤差、積分非直線性誤差などのA/D変換装置の特性により生じる誤差が含まれてしまう。   In general, the output value of the A / D converter includes errors caused by the characteristics of the A / D converter, such as absolute error, differential nonlinearity error, and integral nonlinearity error.

そこで、例えば、A/D変換装置内に予め記憶される補正値を用いて出力値を補正しA/D変換精度を向上させることが考えられる。   Thus, for example, it is conceivable to improve the A / D conversion accuracy by correcting the output value using a correction value stored in advance in the A / D converter.

しかしながら、A/D変換装置内に予め記憶される補正値が固定であると、環境変化(例えば、周囲温度の変化)の影響により発生する誤差を抑えることができないため、A/D変換精度の向上を妨げてしまうおそれがある。   However, if the correction value stored in advance in the A / D conversion device is fixed, an error caused by the influence of environmental changes (for example, changes in ambient temperature) cannot be suppressed. There is a risk of hindering improvement.

そこで、例えば、第1のアナログ値をデジタル値に変換するA/D変換部と、そのデジタル値と補正値とを加算する加算器と、デジタル値を第2のアナログ値に変換するD/A変換部とを備えるA/D変換装置において、第1及び第2のアナログ値が互いに一致するまで、すなわち、第1及び第2のアナログ値の差分がゼロになるまで、第1のアナログ値が第2のアナログ値よりも大きいとき補正値を増加させ、第2のアナログ値が第1のアナログ値よりも大きいとき補正値を減少させることが考えられる(例えば、特許文献1参照)。このように、第1及び第2のアナログ値の差分がゼロになるように補正値を変動させることにより、環境変化の影響により生じる誤差を抑えることができる。   Therefore, for example, an A / D converter that converts the first analog value into a digital value, an adder that adds the digital value and the correction value, and a D / A that converts the digital value into a second analog value. In the A / D conversion device including the conversion unit, the first analog value is changed until the first and second analog values coincide with each other, that is, until the difference between the first and second analog values becomes zero. It is conceivable to increase the correction value when it is larger than the second analog value and decrease the correction value when the second analog value is larger than the first analog value (for example, see Patent Document 1). In this way, by changing the correction value so that the difference between the first and second analog values becomes zero, errors caused by the influence of environmental changes can be suppressed.

実開平1−171133号公報Japanese Utility Model Publication No. 1-171133

しかしながら、上述のように、第1及び第2のアナログ値の差分がゼロになるように補正値を変動させる場合では、その差分がゼロになったか否かをマイコンなどで判断するために、その差分をデジタル値に変換するためのA/D変換部をさらに追加する必要がある。そのため、その追加されるA/D変換部で発生する誤差が出力値に含まれてしまい、A/D変換精度の向上を妨げてしまうおそれがある。   However, as described above, when the correction value is varied so that the difference between the first and second analog values becomes zero, in order to determine whether or not the difference has become zero, It is necessary to add an A / D converter for converting the difference into a digital value. For this reason, an error generated in the added A / D conversion unit is included in the output value, which may hinder improvement in A / D conversion accuracy.

そこで、本発明は、A/D変換精度を向上させることが可能なA/D変換装置を提供することを目的とする。   Therefore, an object of the present invention is to provide an A / D conversion device capable of improving A / D conversion accuracy.

本発明のA/D変換装置は、A/D変換部と、D/A変換部と、ラッチ部と、コンパレータと、制御部とを備える。   An A / D conversion device according to the present invention includes an A / D conversion unit, a D / A conversion unit, a latch unit, a comparator, and a control unit.

前記A/D変換部は、入力される第1のアナログ値をデジタル値に変換する。   The A / D converter converts the input first analog value into a digital value.

前記D/A変換部は、前記デジタル値を第2のアナログ値に変換する。   The D / A conversion unit converts the digital value into a second analog value.

前記ラッチ部は、制御タイミング毎に前記第1のアナログ値をラッチする。   The latch unit latches the first analog value at each control timing.

前記コンパレータは、前記ラッチ部でラッチされている第1のアナログ値が前記第2のアナログ値よりも大きいか否かを判断する。   The comparator determines whether the first analog value latched by the latch unit is greater than the second analog value.

前記制御部は、前記制御タイミング毎に前記デジタル値に補正値を加算して補正後のデジタル値とする。   The control unit adds a correction value to the digital value at each control timing to obtain a corrected digital value.

また、前記制御部は、前記制御タイミングにおいて前記コンパレータにより前記ラッチ部でラッチされている第1のアナログ値が前記第2のアナログ値よりも大きいと判断される場合、前記コンパレータにより前記ラッチ部でラッチされている第1のアナログ値が前記第2のアナログ値よりも大きいと判断されなくなるまで前記デジタル値に一定値を加算し続けて、その加算結果から前記デジタル値を減算した結果を前記補正値とする。   In addition, when the control unit determines that the first analog value latched by the latch unit by the comparator at the control timing is larger than the second analog value, the comparator causes the latch unit to A constant value is continuously added to the digital value until it is determined that the latched first analog value is not larger than the second analog value, and the result obtained by subtracting the digital value from the addition result is corrected. Value.

また、前記制御部は、前記コンパレータにより前記ラッチ部でラッチされている第1のアナログ値が前記第2のアナログ値よりも大きいと判断されない場合、前記コンパレータにより前記ラッチ部でラッチされている第1のアナログ値が前記第2のアナログ値よりも大きいと判断されるまで前記デジタル値から前記一定値を減算し続けて、その減算結果から前記デジタル値を減算した結果を前記補正値とする。   In addition, when it is not determined that the first analog value latched by the latch unit by the comparator is larger than the second analog value, the control unit latches the first analog value latched by the comparator by the latch unit. The constant value is continuously subtracted from the digital value until it is determined that the analog value of 1 is larger than the second analog value, and the result obtained by subtracting the digital value from the subtraction result is used as the correction value.

これにより、A/D変換部の出力値の変動に応じて補正値を変動させることができるため、環境変化の影響により発生する誤差を抑えることができる。また、コンパレータによる第1及び第2のアナログ値の大小関係判断結果をそのまま用いて補正値を変動させているため、その大小関係判断結果をデジタル値に変換する必要がなく、A/D変換部をさらに追加する必要がないので、そのAD変換部で発生する誤差がA/D変換部の出力値に含まれることがない。従って、A/D変換精度を向上させることができる。   As a result, the correction value can be varied in accordance with the variation in the output value of the A / D conversion unit, so that an error caused by an environmental change can be suppressed. Further, since the correction value is changed using the first and second analog value magnitude determination results of the first and second analog values as they are, it is not necessary to convert the magnitude relation judgment result into a digital value, and the A / D converter Therefore, an error generated in the AD conversion unit is not included in the output value of the A / D conversion unit. Therefore, A / D conversion accuracy can be improved.

また、前記制御部は、前記補正値が閾値以上であると判断すると、前記A/D変換部が故障であると判断してもよい。   Further, when the control unit determines that the correction value is equal to or greater than a threshold value, the control unit may determine that the A / D conversion unit is faulty.

これにより、A/D変換部が故障しているか否かを判断することができる。   Thereby, it can be determined whether or not the A / D converter is out of order.

本発明によれば、A/D変換装置のA/D変換精度を向上させることができる。   According to the present invention, the A / D conversion accuracy of the A / D conversion device can be improved.

本発明の実施形態のA/D変換装置を示す図である。It is a figure which shows the A / D converter of embodiment of this invention. 制御部の動作の一例を示すフローチャートである。It is a flowchart which shows an example of operation | movement of a control part. アナログ値VA、制御信号SR、制御信号SDC、電圧Vref、方形波SDA、信号Comp、及び電圧Vcの一例を示すタイミングチャートである。5 is a timing chart illustrating an example of an analog value VA, a control signal SR, a control signal SDC, a voltage Vref, a square wave SDA, a signal Comp, and a voltage Vc. 初期処理の一例を示すフローチャートである。It is a flowchart which shows an example of an initial process. 補正値テーブルの一例を示す図である。It is a figure which shows an example of a correction value table.

図1は、本発明の実施形態のA/D変換装置を示す図である。   FIG. 1 is a diagram illustrating an A / D conversion apparatus according to an embodiment of the present invention.

図1に示すA/D変換装置1は、コンパレータ2と、npnバイポーラトランジスタ3〜5と、コンデンサ6、7と、抵抗8、9と、ダイオード10と、制御回路11とを備える。なお、npnバイポーラトランジスタ3〜5は、MOSFET(Metal Oxide Semiconductor Field Effect Transistor)や機械式リレーなどにより構成されてもよい。   The A / D conversion device 1 shown in FIG. 1 includes a comparator 2, npn bipolar transistors 3 to 5, capacitors 6 and 7, resistors 8 and 9, a diode 10, and a control circuit 11. The npn bipolar transistors 3 to 5 may be configured by a MOSFET (Metal Oxide Semiconductor Field Effect Transistor), a mechanical relay, or the like.

コンパレータ2のプラス入力端子はコンデンサ6の一方端及びダイオード10のカソード端子に接続されている。また、ダイオード10のアノード端子はnpnバイポーラトランジスタ3のエミッタ端子に接続され、npnバイポーラトランジスタ3のコレクタ端子はセンサ12(例えば、電流センサ、電圧センサ、又は温度センサなど)の出力端子に接続されている。また、npnバイポーラトランジスタ4のコレクタ端子はコンデンサ6の一方端に接続され、npnバイポーラトランジスタ4のエミッタ端子は抵抗8の一方端に接続されている。また、抵抗8の他方端はコンデンサ6の他方端及びグランドに接続されている。また、コンパレータ2のマイナス入力端子は抵抗9の一方端、コンデンサ7の一方端、及びnpnバイポーラトランジスタ5のエミッタ端子に接続されている。また、npnバイポーラトランジスタ5のコレクタ端子は電源Vddに接続され、抵抗9の他方端及びコンデンサ7の他方端はグランドに接続されている。   The positive input terminal of the comparator 2 is connected to one end of the capacitor 6 and the cathode terminal of the diode 10. The anode terminal of the diode 10 is connected to the emitter terminal of the npn bipolar transistor 3, and the collector terminal of the npn bipolar transistor 3 is connected to the output terminal of the sensor 12 (for example, a current sensor, a voltage sensor, or a temperature sensor). Yes. The collector terminal of npn bipolar transistor 4 is connected to one end of capacitor 6, and the emitter terminal of npn bipolar transistor 4 is connected to one end of resistor 8. The other end of the resistor 8 is connected to the other end of the capacitor 6 and the ground. The negative input terminal of the comparator 2 is connected to one end of the resistor 9, one end of the capacitor 7, and the emitter terminal of the npn bipolar transistor 5. The collector terminal of the npn bipolar transistor 5 is connected to the power supply Vdd, and the other end of the resistor 9 and the other end of the capacitor 7 are connected to the ground.

また、制御回路11は、A/D変換部13と、記憶部14と、方形波出力部15と、制御部16とを備える。   The control circuit 11 includes an A / D conversion unit 13, a storage unit 14, a square wave output unit 15, and a control unit 16.

なお、制御部16は、例えば、CPU(Central Processing Unit)又はプログラマブルなデバイス(FPGA(Field Programmable Gate Array)やPLD(Programmable Logic Device))などにより構成され、記憶部14に記憶されているプログラムを実行することにより、A/D変換部13の出力値の補正や補正値の記憶又は更新を行う。また、記憶部14は、RAM(Random Access Memory)やROM(Read Only Memory)などにより構成される。また、A/D変換部13や方形波出力部15は、例えば、CPUの一部の機能として制御部16と一体に構成されてもよい。また、特許請求の範囲に記載されるラッチ部は、例えば、npnバイポーラトランジスタ3、コンデンサ6、及びダイオード10などにより構成されてもよい。また、特許請求の範囲に記載されるD/A変換部は、例えば、npnバイポーラトランジスタ5、コンデンサ7、抵抗9、及び方形波出力部15などにより構成されてもよい。   The control unit 16 is configured by, for example, a CPU (Central Processing Unit) or a programmable device (FPGA (Field Programmable Gate Array) or PLD (Programmable Logic Device)), and the program stored in the storage unit 14 is stored. By executing this, the output value of the A / D converter 13 is corrected and the correction value is stored or updated. The storage unit 14 includes a RAM (Random Access Memory), a ROM (Read Only Memory), and the like. Further, the A / D conversion unit 13 and the square wave output unit 15 may be configured integrally with the control unit 16 as, for example, a partial function of the CPU. Further, the latch portion described in the claims may be configured by, for example, an npn bipolar transistor 3, a capacitor 6, a diode 10, and the like. The D / A converter described in the claims may be configured by, for example, an npn bipolar transistor 5, a capacitor 7, a resistor 9, a square wave output unit 15, and the like.

A/D変換部13は、制御タイミングになると、制御部16による動作制御によって、センサ12から出力されるアナログの電圧値(以下、アナログ値VA)(第1のアナログ値)をデジタル値VDtに変換し、そのデジタル値VDtをデジタル値VDsとデジタル値VD_0として記憶部14に記憶する。   At the control timing, the A / D conversion unit 13 converts an analog voltage value (hereinafter, analog value VA) (first analog value) (first analog value) output from the sensor 12 into a digital value VDt by operation control by the control unit 16. The digital value VDt is converted and stored in the storage unit 14 as the digital value VDs and the digital value VD_0.

方形波出力部15は、制御タイミングになると、制御部16による動作制御によって、記憶部14に記憶されるデジタル値VD_0に対応するデューティの方形波SDAを出力する。例えば、方形波出力部15が10[bit]のデジタル値(0〜1024[LSB])を処理することが可能なCPUであり、デジタル値VD_0が512[LSB]の場合、その方形波出力部15は、デューティが50[%]の方形波SDAを出力する。また、方形波SDAがローレベルからハイレベルになりnpnバイポーラトランジスタ5がオンすると、電源Vddからnpnバイポーラトランジスタ5を介してコンデンサ7に流れる電流によりコンデンサ7が充電され、方形波SDAがハイレベルからローレベルになりnpnバイポーラトランジスタ5がオフすると、抵抗9によりコンデンサ7が放電する。これにより、コンデンサ7の電圧が方形波SDAのデューティに対応する電圧Vcとなる。すなわち、デジタル値VD_0がアナログ値(第2のアナログ値)に変換されてコンパレータ2のマイナス入力端子に入力される。   At the control timing, the square wave output unit 15 outputs a square wave SDA having a duty corresponding to the digital value VD_0 stored in the storage unit 14 through operation control by the control unit 16. For example, the square wave output unit 15 is a CPU capable of processing a digital value of 10 [bit] (0 to 1024 [LSB]), and when the digital value VD_0 is 512 [LSB], the square wave output unit 15 outputs a square wave SDA having a duty of 50 [%]. Further, when the square wave SDA changes from the low level to the high level and the npn bipolar transistor 5 is turned on, the capacitor 7 is charged by the current flowing from the power source Vdd to the capacitor 7 via the npn bipolar transistor 5, and the square wave SDA is changed from the high level. When the level becomes low and the npn bipolar transistor 5 is turned off, the capacitor 7 is discharged by the resistor 9. Thereby, the voltage of the capacitor 7 becomes the voltage Vc corresponding to the duty of the square wave SDA. That is, the digital value VD_0 is converted into an analog value (second analog value) and input to the negative input terminal of the comparator 2.

制御部16は、A/D変換部13及び方形波出力部15の動作制御を行うとともに、npnバイポーラトランジスタ3、4のそれぞれのオン、オフを制御する。   The control unit 16 controls the operation of the A / D conversion unit 13 and the square wave output unit 15 and controls the on / off of the npn bipolar transistors 3 and 4.

例えば、制御部16は、npnバイポーラトランジスタ3のベース端子に入力される制御信号SRをローレベルからハイレベルにすることによりnpnバイポーラトランジスタ3をオンさせ、制御信号SRをハイレベルからローレベルにすることによりnpnバイポーラトランジスタ3をオフさせる。npnバイポーラトランジスタ3がオンすると、センサ12からnpnバイポーラトランジスタ3及びダイオード10を介してコンデンサ6へ流れる電流によりコンデンサ6が充電される。これにより、充電後のコンデンサ6の電圧Vrefが、アナログ値VAと等しい又はほぼ等しい電圧(第1のアナログ値)としてコンパレータ2のプラス入力端子に入力される。   For example, the control unit 16 turns on the npn bipolar transistor 3 by changing the control signal SR input to the base terminal of the npn bipolar transistor 3 from the low level to the high level, and changes the control signal SR from the high level to the low level. As a result, the npn bipolar transistor 3 is turned off. When npn bipolar transistor 3 is turned on, capacitor 6 is charged by the current flowing from sensor 12 to capacitor 6 through npn bipolar transistor 3 and diode 10. As a result, the voltage Vref of the capacitor 6 after charging is input to the plus input terminal of the comparator 2 as a voltage (first analog value) equal to or substantially equal to the analog value VA.

また、例えば、制御部16は、npnバイポーラトランジスタ4のベース端子に入力される制御信号SDCをローレベルからハイレベルにすることによりnpnバイポーラトランジスタ4をオンさせ、制御信号SDCをハイレベルからローレベルにすることによりnpnバイポーラトランジスタ4をオフさせる。npnバイポーラトランジスタ4がオンすると、コンデンサ6からnpnバイポーラトランジスタ4及び抵抗8を介してグランドへ電流が流れてコンデンサ6が放電される。   For example, the control unit 16 turns on the npn bipolar transistor 4 by changing the control signal SDC input to the base terminal of the npn bipolar transistor 4 from low level to high level, and changes the control signal SDC from high level to low level. Thus, the npn bipolar transistor 4 is turned off. When the npn bipolar transistor 4 is turned on, a current flows from the capacitor 6 to the ground via the npn bipolar transistor 4 and the resistor 8, and the capacitor 6 is discharged.

図2は、制御部16の動作の一例を示すフローチャートである。また、図3は、アナログ値VA、制御信号SR、制御信号SDC、電圧Vref、方形波SDA、信号Comp、及び電圧Vcの一例を示すタイミングチャートである。   FIG. 2 is a flowchart illustrating an example of the operation of the control unit 16. FIG. 3 is a timing chart showing an example of the analog value VA, the control signal SR, the control signal SDC, the voltage Vref, the square wave SDA, the signal Comp, and the voltage Vc.

まず、制御部16は、制御タイミングになると、初期処理を行う(S21)。   First, the control unit 16 performs initial processing at the control timing (S21).

図4は、初期処理の一例を示すフローチャートである。   FIG. 4 is a flowchart illustrating an example of the initial process.

まず、制御部16は、A/D変換部13によるAD変換動作を開始させるとともに、制御信号SRをローレベルからハイレベルにする(S41)。例えば、制御部16は、図3に示すように、制御タイミングt1又は制御タイミングt2になると、A/D変換部13においてAD変換動作を開始させるとともに、一定期間、制御信号SRをハイレベルにする。このとき、制御部16は、A/D変換部13から出力されるデジタル値VDtをデジタル値VDsとデジタル値VD_0として記憶部14に記憶する。また、コンパレータ2のプラス入力端子に電圧Vrefが入力される。   First, the control unit 16 starts an AD conversion operation by the A / D conversion unit 13 and changes the control signal SR from a low level to a high level (S41). For example, as shown in FIG. 3, when the control timing t1 or control timing t2 is reached, the control unit 16 starts the AD conversion operation in the A / D conversion unit 13 and sets the control signal SR to a high level for a certain period. . At this time, the control unit 16 stores the digital value VDt output from the A / D conversion unit 13 in the storage unit 14 as the digital value VDs and the digital value VD_0. Further, the voltage Vref is input to the plus input terminal of the comparator 2.

次に、制御部16は、方形波出力部15よる方形波SDAの出力動作を開始させる(S42)。このとき、コンパレータ2のマイナス入力端子に電圧Vcが入力される。   Next, the control unit 16 starts the output operation of the square wave SDA by the square wave output unit 15 (S42). At this time, the voltage Vc is input to the negative input terminal of the comparator 2.

そして、制御部16は、コンパレータ2から出力される電圧Compがハイレベルかローレベルかを判断して、その大小関係判断結果を初期値として記憶部14に記憶し(S43)、初期処理を終了する。例えば、図3に示す制御タイミングt1では、コンパレータ2のプラス入力端子に入力される電圧Vrefがコンパレータ2のマイナス入力端子に入力される電圧Vcよりも大きいため、コンパレータ2から出力される信号Compはハイレベルになり、初期値の大小関係判断結果として「ハイレベル」が記憶部14に記憶される。また、図3に示す制御タイミングt2では、コンパレータ2のプラス入力端子に入力される電圧Vrefがコンパレータ2のマイナス入力端子に入力される電圧Vcよりも小さいため、コンパレータ2から出力される信号Compはローレベルになり、初期値の大小関係判断結果として「ローレベル」が記憶部14に記憶される。   Then, the control unit 16 determines whether the voltage Comp output from the comparator 2 is high level or low level, stores the magnitude relation determination result in the storage unit 14 as an initial value (S43), and ends the initial processing. To do. For example, at the control timing t1 shown in FIG. 3, since the voltage Vref input to the positive input terminal of the comparator 2 is larger than the voltage Vc input to the negative input terminal of the comparator 2, the signal Comp output from the comparator 2 is The high level is set, and “high level” is stored in the storage unit 14 as the initial value magnitude relation determination result. Further, at the control timing t2 shown in FIG. 3, the voltage Vref input to the positive input terminal of the comparator 2 is smaller than the voltage Vc input to the negative input terminal of the comparator 2, so that the signal Comp output from the comparator 2 is The low level is set, and “low level” is stored in the storage unit 14 as the initial value magnitude determination result.

次に、図2に示すように、制御部16は、初期処理が終了した後、デジタル値VDsに対応する補正値VDhが記憶部14にすでに記憶されていると判断すると(S22がYes)、デジタル値VDsに補正値VDhを加算して補正後のデジタル値VDtとする(S23)。例えば、図5に示すように、補正値VDhがデジタル値VDsと対応付けられて格納される補正値テーブルが記憶部14に記憶されている場合、制御部16は、デジタル値VDsとして「512[LSB]」が入力されると、補正値VDhとして「+1」を補正値テーブルから取り出し、「512[LSB]」+「+1[LSB]」=「513[LSB]」を計算することにより補正後のデジタル値VDtとして「513[LSB]」を求める。   Next, as illustrated in FIG. 2, when the control unit 16 determines that the correction value VDh corresponding to the digital value VDs is already stored in the storage unit 14 after the initial process is completed (Yes in S22), The correction value VDh is added to the digital value VDs to obtain a corrected digital value VDt (S23). For example, as illustrated in FIG. 5, when a correction value table in which the correction value VDh is stored in association with the digital value VDs is stored in the storage unit 14, the control unit 16 sets the digital value VDs as “512 [ When “LSB]” is input, “+1” is extracted from the correction value table as the correction value VDh, and after correction by calculating “512 [LSB]” + “+ 1 [LSB]” = “513 [LSB]” "513 [LSB]" is obtained as the digital value VDt.

次に、制御部16は、記憶部14に記憶されている初期値の大小関係判断結果が「ハイレベル」であるか否かを判断する(S24)。   Next, the control unit 16 determines whether or not the magnitude relation determination result of the initial value stored in the storage unit 14 is “high level” (S24).

制御部16は、初期値の大小関係判断結果が「ハイレベル」であると判断すると(S24がYes)、信号Compのレベル(大小関係判断結果)が「ハイレベル」でないと判断されるまで(S25がNo)、記憶部14に記憶されているデジタル値VD_0に一定値(例えば、最小デジタル値である1[LSB])を加算した後(S26)、その加算結果であるデジタル値VD´をデジタル値VD_0として記憶部14に記憶されているデジタル値VD_0に上書きするとともに、その上書きしたデジタル値VD_0に対応するデューティの方形波SDAを方形波出力部15から出力させる(S27)。例えば、図3に示す制御タイミングt1後の補正値VDh更新周期では、初期値の大小関係判断結果が「ハイレベル」であり、デジタル値VD_0に1[LSB]が1回加算されると、大小関係判断結果が「ローレベル」になる。これにより、このときA/D変換部13で発生した誤差(絶対誤差、微分非直線性誤差、積分非直線性誤差など)を+1[LSB]と認識することができる。なお、大小関係判断結果が「ハイレベル」から「ローレベル」に変化したとき、前回の加算結果であるデジタル値VD´をデジタル値VD_0として記憶部14に記憶されているデジタル値VD_0に上書きしてもよい。また、S26において、デジタル値VD_0に加算される一定値は、1[LSB]に限定されない。   If the control unit 16 determines that the magnitude relationship determination result of the initial value is “high level” (S24 is Yes), the control unit 16 determines that the level of the signal Comp (size relationship determination result) is not “high level” ( After S25 is No), after adding a certain value (for example, 1 [LSB] which is the minimum digital value) to the digital value VD_0 stored in the storage unit 14 (S26), the digital value VD ′ which is the addition result is added. The digital value VD_0 stored in the storage unit 14 as the digital value VD_0 is overwritten, and a square wave SDA having a duty corresponding to the overwritten digital value VD_0 is output from the square wave output unit 15 (S27). For example, in the correction value VDh update cycle after the control timing t1 shown in FIG. 3, the magnitude relationship determination result of the initial value is “high level”, and when 1 [LSB] is added once to the digital value VD_0, The relationship judgment result becomes “low level”. Thereby, an error (absolute error, differential nonlinearity error, integral nonlinearity error, etc.) generated in the A / D conversion unit 13 at this time can be recognized as +1 [LSB]. When the magnitude relation determination result changes from “high level” to “low level”, the digital value VD ′ as the previous addition result is overwritten on the digital value VD_0 stored in the storage unit 14 as the digital value VD_0. May be. In S26, the constant value added to the digital value VD_0 is not limited to 1 [LSB].

一方、制御部16は、初期値としての大小関係判断結果が「ローレベル」であると判断すると(S24がNo)、信号Compのレベル(大小関係判断結果)が「ローレベル」でないと判断されるまで(S28がNo)、記憶部14に記憶されているデジタル値VD_0から一定値(例えば、最小デジタル値VDである1[LSB])を減算した後(S29)、その減算結果であるデジタル値VD´をデジタル値VD_0として記憶部14に記憶されているデジタル値VD_0に上書きするとともに、その上書きしたデジタル値VD_0に対応するデューティの方形波SDAを方形波出力部15から出力させる(S30)。例えば、図3に示す制御タイミングt2後の補正値VDh更新周期では、初期値の大小関係判断結果が「ローレベル」であり、デジタル値VD_0から1[LSB]が2回減算されると、大小関係判断結果が「ハイレベル」になる。これにより、このときA/D変換部13で発生した誤差(絶対誤差、微分非直線性誤差、積分非直線性誤差など)を−2[LSB]と認識することができる。なお、大小関係判断結果が「ローレベル」から「ハイレベル」に変化したとき、前回の減算結果であるデジタル値VD´をデジタル値VD_0として記憶部14に記憶されているデジタル値VD_0に上書きしてもよい。また、S29において、デジタル値VD_0から減算される一定値は、1[LSB]に限定されない。   On the other hand, when the control unit 16 determines that the magnitude relation determination result as the initial value is “low level” (No in S24), it is determined that the level of the signal Comp (magnitude relation determination result) is not “low level”. (S28 is No), a certain value (for example, 1 [LSB] which is the minimum digital value VD) is subtracted from the digital value VD_0 stored in the storage unit 14 (S29), and then the subtraction result is digital. The value VD ′ is overwritten on the digital value VD_0 stored in the storage unit 14 as the digital value VD_0, and a square wave SDA having a duty corresponding to the overwritten digital value VD_0 is output from the square wave output unit 15 (S30). . For example, in the correction value VDh update cycle after the control timing t2 shown in FIG. 3, when the initial value magnitude relation determination result is “low level” and 1 [LSB] is subtracted twice from the digital value VD_0, The relationship judgment result becomes “high level”. Thereby, an error (absolute error, differential nonlinearity error, integral nonlinearity error, etc.) generated in the A / D conversion unit 13 at this time can be recognized as -2 [LSB]. When the magnitude relation determination result changes from “low level” to “high level”, the digital value VD ′ as the previous subtraction result is overwritten on the digital value VD_0 stored in the storage unit 14 as the digital value VD_0. May be. In S29, the constant value subtracted from the digital value VD_0 is not limited to 1 [LSB].

次に、制御部16は、記憶部14に記憶されているデジタル値VD_0から記憶部14に記憶されているデジタル値VDsを減算することにより補正値VDhを求め、その補正値VDhをデジタル値VDsと対応付けて記憶部14に記憶する、又は、すでに記憶部14に記憶される補正値VDhに上書きする(S31)。すなわち、制御部16は、制御タイミングにおいてコンパレータ2により電圧Vrefが電圧Vcよりも大きいと判断される場合、コンパレータ2により電圧Vrefが電圧Vcよりも大きいと判断されなくなるまでデジタル値VD_0に一定値を加算し続けて、その加算結果からデジタル値VDsを減算した結果を補正値VDhとする。また、制御部16は、制御タイミングにおいてコンパレータ2により電圧Vrefが電圧Vcよりも大きいと判断されない場合、コンパレータ2により電圧Vrefが電圧Vcよりも大きいと判断されるまでデジタル値VD_0から一定値を減算し続けて、その減算結果からデジタル値VDsを減算した結果を補正値VDhとする。   Next, the control unit 16 obtains a correction value VDh by subtracting the digital value VDs stored in the storage unit 14 from the digital value VD_0 stored in the storage unit 14, and calculates the correction value VDh as the digital value VDs. Are stored in the storage unit 14 in association with each other or overwritten on the correction value VDh already stored in the storage unit 14 (S31). That is, if the comparator 2 determines that the voltage Vref is greater than the voltage Vc at the control timing, the control unit 16 sets the digital value VD_0 to a constant value until the comparator 2 does not determine that the voltage Vref is greater than the voltage Vc. The result of subtracting the digital value VDs from the addition result is used as the correction value VDh. If the comparator 2 does not determine that the voltage Vref is greater than the voltage Vc at the control timing, the control unit 16 subtracts a constant value from the digital value VD_0 until the comparator 2 determines that the voltage Vref is greater than the voltage Vc. Subsequently, a result obtained by subtracting the digital value VDs from the subtraction result is set as a correction value VDh.

次に、制御部16は、S31で求めた補正値VDhが閾値VDth以上であると判断すると(S32がYes)、A/D変換部13が故障していると判断する(S33)。これにより、A/D変換部13が故障しているか否かを判断することができる。   Next, when the control unit 16 determines that the correction value VDh obtained in S31 is greater than or equal to the threshold value VDth (S32 is Yes), it determines that the A / D conversion unit 13 is out of order (S33). Thereby, it is possible to determine whether or not the A / D converter 13 is out of order.

次に、制御部16は、制御信号SDCをローレベルからハイレベルにして(S34)、デジタル値VDsに補正値VDhを加算して補正後のデジタル値VDtとし(S35)、制御信号SDCをハイレベルからローレベルにして(S36)、A/D変換部3から出力されるデジタル値VDtの補正処理及び補正値VDhの更新処理を終了する。   Next, the control unit 16 changes the control signal SDC from the low level to the high level (S34), adds the correction value VDh to the digital value VDs to obtain the corrected digital value VDt (S35), and sets the control signal SDC to high. From the level to the low level (S36), the correction process of the digital value VDt output from the A / D conversion unit 3 and the update process of the correction value VDh are terminated.

そして、制御部16は、次の制御タイミングになると、初期処理(S21)を開始する。なお、制御信号SDCのハイレベル期間は、コンデンサ6が十分に放電されるまでにかかる時間と等しい又はほぼ等しいものとする。   Then, the control unit 16 starts the initial process (S21) at the next control timing. It is assumed that the high level period of the control signal SDC is equal to or substantially equal to the time required until the capacitor 6 is sufficiently discharged.

このように、本実施形態のA/D変換装置1によれば、コンパレータ2の最小関係判断結果を用いてA/D変換部13に発生する誤差を求め、その誤差がA/D変換部13の出力値に+1[LSB]又は−1[LSB]の範囲内で含まれなくなるように補正値を求めているため、A/D変換部13の出力値に含まれる誤差を平均±0.5[LSB]に抑えることができる。   As described above, according to the A / D conversion device 1 of the present embodiment, the error generated in the A / D conversion unit 13 is obtained using the minimum relationship determination result of the comparator 2, and the error is calculated as the A / D conversion unit 13. Since the correction value is obtained so that it is not included in the output value of +1 [LSB] or -1 [LSB], the error included in the output value of the A / D converter 13 is averaged ± 0.5 [LSB] can be suppressed.

また、本実施形態のA/D変換装置1によれば、A/D変換部13の出力値の変動に応じて補正値VDhを変動させることができるため、環境変化(例えば、周囲温度の変化)の影響により生じる誤差を抑えることができる。   Further, according to the A / D conversion device 1 of the present embodiment, the correction value VDh can be changed in accordance with the change in the output value of the A / D conversion unit 13, so that an environmental change (for example, a change in ambient temperature) ) Can be suppressed.

また、本実施形態のA/D変換装置1によれば、コンパレータ2による電圧Vrefと電圧Vcの大小関係判断結果をそのまま用いて補正値VDhを変動させているため、その大小関係判断結果をデジタル値に変換する必要がなく、A/D変換部をさらに追加する必要がないので、そのA/D変換部13に生じる誤差がA/D変換部13の出力値に含まれることがない。   Further, according to the A / D conversion device 1 of the present embodiment, the correction value VDh is changed using the magnitude relationship determination result between the voltage Vref and the voltage Vc by the comparator 2 as it is. Since it is not necessary to convert the value into a value and it is not necessary to add an A / D converter, an error generated in the A / D converter 13 is not included in the output value of the A / D converter 13.

従って、本実施形態のA/D変換装置1によれば、A/D変換精度を向上させることができる。   Therefore, according to the A / D conversion device 1 of the present embodiment, the A / D conversion accuracy can be improved.

1 A/D変換装置
2 コンパレータ
3〜5 npnバイポーラトランジスタ
6、7 コンデンサ
8、9 抵抗
10 ダイオード
11 制御回路
12 センサ
13 A/D変換部
14 記憶部
15 方形波出力部
16 制御部
DESCRIPTION OF SYMBOLS 1 A / D converter 2 Comparator 3-5 npn bipolar transistor 6, 7 Capacitor 8, 9 Resistor 10 Diode 11 Control circuit 12 Sensor 13 A / D converter 14 Memory | storage part 15 Square wave output part 16 Control part

Claims (2)

入力される第1のアナログ値をデジタル値に変換するA/D変換部と、
前記デジタル値を第2のアナログ値に変換するD/A変換部と、
制御タイミング毎に前記第1のアナログ値をラッチするラッチ部と、
前記ラッチ部によりラッチされている第1のアナログ値が前記第2のアナログ値よりも大きいか否かを判断するコンパレータと、
前記制御タイミング毎に前記デジタル値に補正値を加算して補正後のデジタル値とするとともに、前記制御タイミングにおいて前記コンパレータにより前記ラッチ部でラッチされている第1のアナログ値が前記第2のアナログ値よりも大きいと判断される場合、前記コンパレータにより前記ラッチ部でラッチされている第1のアナログ値が前記第2のアナログ値よりも大きいと判断されなくなるまで前記デジタル値に一定値を加算し続けて、その加算結果から前記デジタル値を減算した結果を前記補正値とし、前記制御タイミングにおいて前記コンパレータにより前記ラッチ部でラッチされている第1のアナログ値が前記第2のアナログ値よりも大きいと判断されない場合、前記コンパレータにより前記ラッチ部でラッチされている第1のアナログ値が前記第2のアナログ値よりも大きいと判断されるまで前記デジタル値から前記一定値を減算し続けて、その減算結果から前記デジタル値を減算した結果を前記補正値とする制御部と、
を備えるA/D変換装置。
An A / D converter that converts the input first analog value into a digital value;
A D / A converter for converting the digital value into a second analog value;
A latch unit that latches the first analog value at each control timing;
A comparator for determining whether a first analog value latched by the latch unit is larger than the second analog value;
A correction value is added to the digital value at each control timing to obtain a corrected digital value, and the first analog value latched by the latch unit by the comparator at the control timing is the second analog value. If it is determined that the value is greater than the value, a constant value is added to the digital value until it is determined that the first analog value latched by the latch unit by the comparator is not greater than the second analog value. Subsequently, a result obtained by subtracting the digital value from the addition result is used as the correction value, and the first analog value latched by the latch unit by the comparator at the control timing is larger than the second analog value. If it is not determined, the first latch latched in the latch unit by the comparator. A control unit that continuously subtracts the constant value from the digital value until it is determined that a log value is greater than the second analog value, and uses the result of subtracting the digital value from the subtraction result as the correction value; ,
An A / D conversion device.
請求項1に記載のA/D変換装置であって、
前記制御部は、前記補正値が閾値以上であると判断すると、前記A/D変換部が故障であると判断する
ことを特徴とするA/D変換装置。
The A / D converter according to claim 1,
When the control unit determines that the correction value is equal to or greater than a threshold value, the control unit determines that the A / D conversion unit is faulty.
JP2012151497A 2012-07-05 2012-07-05 A/d conversion device Pending JP2014014054A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012151497A JP2014014054A (en) 2012-07-05 2012-07-05 A/d conversion device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012151497A JP2014014054A (en) 2012-07-05 2012-07-05 A/d conversion device

Publications (1)

Publication Number Publication Date
JP2014014054A true JP2014014054A (en) 2014-01-23

Family

ID=50109483

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012151497A Pending JP2014014054A (en) 2012-07-05 2012-07-05 A/d conversion device

Country Status (1)

Country Link
JP (1) JP2014014054A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017038200A (en) * 2015-08-10 2017-02-16 ルネサスエレクトロニクス株式会社 Semiconductor device and failure detection method
KR101750699B1 (en) * 2016-01-12 2017-06-28 한밭대학교 산학협력단 A method for ADC(analog-digital converter) circuit monitoring using DAC(digital-analog converter) circuit

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017038200A (en) * 2015-08-10 2017-02-16 ルネサスエレクトロニクス株式会社 Semiconductor device and failure detection method
US10310049B2 (en) 2015-08-10 2019-06-04 Renesas Electronics Corporation Semiconductor device and failure detection method
KR101750699B1 (en) * 2016-01-12 2017-06-28 한밭대학교 산학협력단 A method for ADC(analog-digital converter) circuit monitoring using DAC(digital-analog converter) circuit

Similar Documents

Publication Publication Date Title
JP5657783B2 (en) Data processing system
US9680492B1 (en) Threshold detection with digital correction in analog to digital converters
JP2012090499A (en) Current detection circuit for power semiconductor device
US20140145868A1 (en) Analog-digital converter and analog-digital conversion method
JP2012147183A (en) Photoelectric converter
JP2015190799A (en) Temperature measurement device, integrated circuit, and temperature measurement method
JP2012191821A (en) Current direction detection circuit and dc-dc converter
JPWO2010137088A1 (en) Interface circuit
US9716398B2 (en) Auto correction driving device and wireless charger driving system using the same
CN109632118B (en) CMOS temperature sensing circuit and MEMS temperature sensor system
JP2014014054A (en) A/d conversion device
JP2009033638A (en) Amplifier circuit
TWI522601B (en) Analog - to - digital conversion circuit with temperature sensing and its electronic device
JP6842412B2 (en) System, analog-to-digital converter, and system control method
US10126773B2 (en) Circuit and method for providing a secondary reference voltage from an initial reference voltage
US8587465B2 (en) Successive approximation analog to digital converter with comparator input toggling
US7541954B2 (en) Touch control apparatus and analog-to-digital converting apparatus and method thereof
JP2014165649A (en) Analog-digital conversion device
JP2009188696A (en) Analog/digital conversion apparatus
JP2006173721A (en) Current source cell and d-a converter using the same
US20120068871A1 (en) Ad converter-equipped temperature sensor circuit and semiconductor integrated circuit
JP6576666B2 (en) Correction arithmetic circuit, signal processing device
CN209946245U (en) Voltage maximum value comparison circuit
JP2006135655A (en) Semiconductor integrated circuit
JP2020003296A (en) Signal processor of exhaust gas sensor