雙DAC保存系統(tǒng)偏置電壓,在電源校準(zhǔn)程序中決定了該電壓。
設(shè)計(jì)電阻橋式傳感器與5V單電源供電的ADC接口是一個(gè)新的挑戰(zhàn)。有些應(yīng)用需要輸出電壓在0V到滿量程電壓(如4.096V)之間以高精度波動(dòng)。用大多數(shù)單電源儀表放大器,當(dāng)輸出信號(hào)接近0V,接近單電源最低輸出擺幅限制時(shí),會(huì)出現(xiàn)問題。一個(gè)好的單電源儀表放大器可在接近于單電源地的范圍內(nèi)擺動(dòng), 即使有真正的軌對(duì)軌輸出,也不能達(dá)到地。
在這個(gè)應(yīng)用中,傳感器是一個(gè)精密的測(cè)壓元件,其額定負(fù)載5kg,即約11磅。在鋁盤上測(cè)重大約150g的物體,即大約5盎司。由于鋁盤自重,即使沒有任何物體稱重,儀表放大器的輸出信號(hào)也不能低到0V?,F(xiàn)在,問題是如何補(bǔ)償儀表放大器的輸出偏置電壓和鋁盤本身產(chǎn)生的電壓值。
軟件彌補(bǔ)系統(tǒng)偏置是最簡(jiǎn)單的方法。電源啟動(dòng)期間,鋁盤上沒有稱重物體,系統(tǒng)可以獲取偏移電壓,并將數(shù)據(jù)記錄在單片機(jī)內(nèi)存中。隨后,當(dāng)有物體稱重時(shí),從獲得的數(shù)據(jù)中減去它即可。但是,這種做法不能達(dá)到5kg滿量程,僅能達(dá)到5-0.15kg或4.85kg。
本設(shè)計(jì)方案說明如何利用單片機(jī)實(shí)現(xiàn)硬件補(bǔ)償。當(dāng)電源啟動(dòng)后,運(yùn)行軟件程序復(fù)位系統(tǒng)偏移。解
決方案如圖1所示,基于四個(gè)來(lái)自于Linear公司IC的簡(jiǎn)單電路。精密參考電壓源IC1,有高達(dá)50mA的最小輸出電流。它提供4.096V輸出電壓驅(qū)動(dòng)測(cè)壓元件,并設(shè)置12位ADC(IC3)的滿量程范圍。高精確儀表放大器LT1789-1(IC2)的特點(diǎn)是在0到70°C溫度范圍內(nèi),最大輸入失調(diào)電壓為150 µV,軌對(duì)軌輸出電壓相對(duì)地110mV范圍內(nèi)擺動(dòng)時(shí),最大輸入失調(diào)偏置電壓是 0.5µV/°C。通過精密電阻R2(阻值為500Ω)設(shè)定增益,當(dāng)稱重是5kg時(shí),輸出范圍為4.096V,其最大輸入信號(hào)是VCC×S=4.096V×2 mV/V=8.192 mV,這里S是該傳感器的靈敏度。
雙通道DAC(IC4)的DAC_A輸出在儀表放大器參考引腳處,提供200mV的參考電壓,避免放大器本身近地飽和,但傳輸特性不是線性關(guān)系。放大器最壞情況下輸出偏移是:VREF+VPAN±VOFFSET=200 mV+125 mV±500×150 µV=325 mV±75 mV="250" mV/400 mV,這里VPAN=125 mV,是鋁盤自重產(chǎn)生的電壓值。
電路補(bǔ)償基于測(cè)壓元件平衡的系統(tǒng)偏置圖示" border="0" height="220" hspace="0" src="http://files.chinaaet.com/images/20100811/a778bc16-8f86-4100-b136-bf7f7f43fbc8.jpg" vspace="0" width="500" />
因此系統(tǒng)輸出偏移是250到400mV。電源啟動(dòng),微控制器運(yùn)行程序設(shè)置DAC_A輸出為200mV,同時(shí),增加雙通道DAC(IC4)的DAC_B輸出直到等于ADC(IC3)管腳2的系統(tǒng)偏置,轉(zhuǎn)換結(jié)果就是000h。這一結(jié)果是可能的,因?yàn)镮C4包含兩個(gè)12位2.5V滿量程電壓的DAC,最低有效位(LSB)等于0.61mV,小于IC3為1mV的分辨率。這個(gè)數(shù)字相當(dāng)于該天平的分辨率:5000g/4096=1.22g。當(dāng)最大負(fù)載5kg時(shí),儀表放大器的最大輸出電壓是4.096V+VOUT_TOTAL_OFFSET_INA=4.346V/4.496V,低于4.62V高飽和溫度的最壞情況。
IC3有一個(gè)單極差分輸入,所以可以從+IN輸入電壓中減去一個(gè)恒定電壓值等于IC4的DAC_B提供的系統(tǒng)偏置。在第一個(gè)半時(shí)鐘周期內(nèi),ADC采樣和保持正向輸入電壓。這階段結(jié)束后,或在獲取時(shí)間內(nèi),輸入電容切換到負(fù)輸入并開始轉(zhuǎn)換。在IC3輸入處的RC輸入濾波器的時(shí)間常數(shù)為0.5µs,允許在正負(fù)輸入電壓利用最高為200kHz時(shí)鐘頻率在轉(zhuǎn)換時(shí)間的第一時(shí)鐘周期內(nèi)達(dá)到12位精度。如果想增加時(shí)間常數(shù),必須降低時(shí)鐘頻率。
此外,DAC和ADC有三線串行接口,可方便地將數(shù)據(jù)傳輸?shù)阶罡卟蓸勇蕿?2.5kS/s的普通微控制器。當(dāng)ADC處于沒有轉(zhuǎn)換的時(shí)候,它會(huì)自動(dòng)把功率降至1nA的電源電流,而且如果單片機(jī)通過其引腳3來(lái)關(guān)閉IC1,電路限制電源電流在最壞情況下僅為1mA,因?yàn)樗械腎C集成電路都是微功耗的。
英文原文:
Circuit compensates system offset of a load-cell-based balance
A dual DAC stores the system-offset voltage, which gets determined during a power-on calibration sequence.
Luca Bruno, ITIS Hensemberger, Monza, Italy; Edited by Charles H Small and Fran Granville -- EDN, 8/16/2007
It’s a challenge to interface a resistive bridge sensor with an ADC receiving its power from a 5V single-supply power source. Some applications require output-voltage swings from 0V to a full-scale voltage, such as 4.096V, with excellent accuracy. With most single-supply instrumentation amplifiers, problems arise when the output signal approaches 0V, near the lower output-swing limit of a single-supply instrumentation amp. A good single-supply instrumentation amp may swing close to single-supply ground but does not reach ground even if it has a true rail-to-rail output.
In this application, the sensor is a precision load cell with a nominal load of 5 kg, or about 11 lbs, to weigh objects on an aluminum pan weighing approximately 150g, or approximately 5 oz. Because of the pan’s weight, the instrumentation amplifier’s output signal can never go down to 0V, even if there are no objects to weigh. Now, the problem arises of how to compensate the instrumentation amp’s output-offset voltage and the voltage that the pan itself produces.
A software approach is the simplest way to compensate the system offset. During power-up, there are no objects to weigh on the pan, and the system can thus acquire the offset voltage and hold the data in the microcontroller’s memory, subsequently subtracting it from the data it acquired when there was an object to weigh. This approach, however, does not reach the 5-kg full-scale of the balance, reaching only 5–0.15 kg, or 4.85 kg.
This Design Idea shows how to achieve hardware compensation using a microcontroller that, on power-up, starts a software routine to reset the system offset. The solution is a simple circuit based on four ICs from Linear Technology in Figure 1. A precision voltage reference, IC1, has a high minimum output current of 50 mA. It provides an output voltage of 4.096V to power the load cell and to set the full-scale of the 12-bit ADC, IC3. The highly accurate LT1789-1 instrumentation amplifier, IC2, features maximum input-offset voltage of 150 µV over the temperature range of 0 to 70°C and maximum input-drift-offset voltage of 0.5 µV/°C over the temperature range of 0 to 70°C with rail-to-rail output that swings within 110 mV of ground. You set the gain through precision resistor R2 to a nominal value of 500Ω to give an output span of 4.096V when the load is 5 kg and its maximum input signal is VCC×S=4.096V×2 mV/V=8.192 mV, where S is the sensor’s sensitivity.
The output of DAC_A of dual-DAC IC4 provides a reference voltage of 200 mV at the refer
ence pin of the instrumentation amp to avoid saturation near ground of the amplifier itself, where its transfer characteristic is not quite linear. The amplifier’s total worst-case output offset is: VREF+VPAN±VOFFSET=200 mV+125 mV±500×150 µV=325 mV±75 mV="250" mV/400 mV, where VPAN="125" mV and is the voltage that the pan’s weight produces.
The system-output offset is thus 250 to 400 mV. On power-up, the microcontroller starts a routine that sets the output of the DAC_A equal to 200 mV, while it increases the output of the DAC_B of dual-DAC IC4 until it is equal to the system offset on Pin 2 of ADC IC3, and the result of the conversion is 000h. This result is possible because IC4 contains two 12-bit DACs with the same full-scale voltage of 2.5V, making 1 LSB equal to 0.61 mV, which is smaller than IC3’s resolution of 1 mV. This figure corresponds to the resolution of the balance: 5000g/4096=1.22g. The maximum output voltage of the instrumentation amp with a maximum load of 5 kg is 4.096V+VOUT_TOTAL_OFFSET_INA=4.346V/4.496V, which is less than the minimum worst case over temperature of 4.62V high saturation.
IC3 has a single unipolar differential input, so you can subtract from the +IN input voltage a constant voltage of value equal to the system offset that that DAC_B of IC4 provides. During the first one and a half clock cycles, the ADC samples and holds the positive input. At the end of this phase, or acquisition time, the input capacitor switches to the negative input, and the conversion starts. The RC-input filters on the inputs of IC3 have a time constant of 0.5 µsec to permit the negative and positive input voltages to settle to a 12-bit accuracy during the first clock cycle of the conversion time, using the maximum clock frequency, which is 200 kHz. If you want to increase the time constant, then you must use a lower clock frequency.
Furthermore, the DAC and ADC have a three-wire serial interface that easily permits transferring data to a wide range of microcontrollers with a maximum sampling rate of 12.5k samples/sec. When the ADC performs no conversions, it automatically powers down to 1 nA of supply current, and, if the microcontroller shuts down IC1 through its Pin 3, the circuit draws a worst-case supply current of just 1 mA, because all the ICs are micropower.