【導讀】AD5272是Analog公司的電子可變電阻器。它可以被應用在各種電子線路中,進行自動參數(shù)設置和調(diào)節(jié)。AD5272是一個變阻器(rheostat)兩端器件,而不是電位器(Potentiometer:三端器件)。相對于美國Xicor公司的高精度數(shù)字電位器(X9C102,103,104等),它具有變阻級數(shù)高(1024級),工作頻帶等特點。
AD5272數(shù)字變阻器
為了對比在博文“寄生電容[1]”對X9C104的討論,購買了三片樣品進行實驗驗證。
AD5272簡介
1. 內(nèi)部結構
AD5272是一款MSOP 10管腳封裝的芯片。包括有工作電源、地線,與MCU連接的I2C接口,以及可變電阻的兩端(A-W)。此外還有一些輔助設置管腳。詳細介紹可以參見他的數(shù)據(jù)手冊。下面是AD5272的外部管腳以及內(nèi)部結構功能圖。
AD5272內(nèi)部功能圖
從上圖可以看出AD5272對外的應用端口只有兩個(A,W),它是一個變阻器(Varistor:兩端器件)。
2. 產(chǎn)品特性
● 單通道、1024/256位分辨率
● 標稱電阻:20 kΩ、50 kΩ、100 kΩ
● 標稱電阻容差誤差:±1%(最大值)
● 50次可編程(50-TP)游標存儲器
● 可變電阻器模式下的溫度系數(shù):5 ppm/℃
● 2.7 V至5.5 V單電源供電
● 雙電源供電:±2.5 V至±2.75 V(交流或雙極性工作模式)
3. 測試電路板
為了測試AD5272的性能,快速制作一塊電路板,將其封裝在電路板上,通過100mil的外部引線在面包板上與其它測試電路連接進行相關的測試。
下面是設計的測試電路板的原理圖和PCB版圖。
實驗電路板
測試方案
由于AD5272的控制是通過I2C總線完成的,所以需要借助于一塊MCU完成對AD5272的數(shù)字控制。下面介紹實驗MCU板以及相應的軟件開發(fā)。
1. 實驗MCU板
實驗電路板MCU采用STC8G1K08對AD5272進行控制。該電路板的詳細介紹在“基于STC8G1K08的實驗電路板[2]”中展示。
使用PK3端口的pin6(SCL)和pin7(SDA)[I2C總線第四個輸出備選端口],與 AD5275的PK3的pin4(SCL),pin5(SDA)相連,組成實驗電路。
8G1K08-SOP16 實驗電路板
實際連接線路如下圖所示:
實驗電路引線連接情況
2. 測試軟件
(1) I2C 地址:AD5272的7位地址組成包括兩部分:
1. 前5位位 :01011
2. 最后兩位是由ADDR管腳的電壓確定,具體可以參見下面表格:
(2)相關子程序:AD5272的功能設置,可以參見其數(shù)據(jù)手冊中的說明。在CSDN中給出了AD5272接口程序。這些程序上層依賴于STC8G1K08的I2C操作的函數(shù)支持。
測試結果
將實驗電路板在面包板上連接,進行相關的性能測試。
通電后,測試面包板電路
1. 測量A-W電阻與設置參數(shù)之間的關系
通過軟件設置AD5272中RDAC的參數(shù)0~1023,每次遞增10,所測量得到的102個數(shù)據(jù),測量A-W兩端的電阻。實驗數(shù)據(jù)如下:
res=[31.06,195.83,389.87,582.86,786.78,979.69,1173.92,1370.54,1564.31,1756.72,1959.14,2150.80,2342.31,2537.69,2731.21,2923.23,3115.95,3316.69,3506.39,3697.96,3895.03,4088.38,4279.93,4482.23,4672.36,4864.04,5057.67,5251.33,5443.37,5645.82,5836.31,6028.02,6217.46,6411.77,6604.22,6796.99,6997.55,7189.65,7378.69,7569.33,7762.46,7955.59,8156.52,8346.48,8537.97,8723.09,8917.34,9109.66,9302.17,9501.89,9693.09,9871.78,10066.15,10258.58,10450.60,10649.98,10840.70,11027.89,11207.98,11400.64,11592.36,11792.14,11982.23,12169.72,12343.51,12536.54,12726.77,12916.79,13114.53,13303.92,13470.17,13664.16,13855.01,14045.89,14243.87,14432.99,14619.03,14786.59,14978.64,15169.90,15358.20,15556.71,15742.90,15902.01,16094.12,16285.19,16473.98,16670.93,16856.67,17043.42,17202.99,17394.30,17585.01,17773.71,17968.68,18150.75,18303.86,18497.14,18686.51,18873.12,19071.08,19254.32,19397.46]
當RDAC=0時,AW電阻為31.06Ω。當RDAC=1020時,AW電阻為19397.46Ω。當RDAC= 1023時,AW電阻最大,為:19516Ω。
設置RDAC值與AW電阻之間的曲線為:
AD5272的電阻與設置RDAC之間的關系
2. 電阻誤差
分別對設置為0,511,1023三種情況測量100次電阻。統(tǒng)計相應的均值,標準差。
res0=[30.87,30.86,30.86,30.86,30.85,30.85,30.85,30.85,30.86,30.85,30.86,30.84,30.85,30.84,30.85,30.85,30.85,30.85,30.84,30.85,30.84,30.85,30.84,30.84,30.83,30.84,30.83,30.84,30.83,30.83,30.83,30.84,30.83,30.83,30.83,30.83,30.83,30.83,30.83,30.83,30.83,30.82,30.83,30.83,30.84,30.85,30.83,30.82,30.83,30.83,30.83,30.83,30.84,30.83,30.84,30.83,30.84,30.83,30.84,30.85,30.85,30.85,30.81,30.85,30.85,30.86,30.84,30.84,30.84,30.84,30.83,30.82,30.82,30.82,30.86,30.85,30.82,30.82,30.82,30.82,30.83,30.83,30.82,30.83,30.82,30.82,30.81,30.82,30.81,30.81,30.82,30.81,30.82,30.82,30.82,30.82,30.82,30.82,30.82,30.82]
res511=[9886.59,9885.49,9884.89,9884.65,9884.25,9884.04,9883.44,9883.81,9883.81,9883.98,9883.22,9883.04,9882.73,9882.89,9882.43,9882.25,9882.13,9882.05,9882.12,9882.11,9881.86,9881.92,9881.59,9881.33,9881.01,9881.19,9880.85,9880.63,9880.58,9880.03,9880.37,9880.09,9879.74,9879.86,9879.55,9879.51,9879.57,9879.38,9879.17,9879.23,9879.08,9879.14,9878.99,9879.87,9880.95,9879.46,9879.07,9878.87,9879.52,9879.63,9879.74,9880.59,9878.89,9878.78,9879.26,9879.67,9878.96,9880.50,9879.96,9881.97,9883.24,9880.49,9878.37,9882.40,9878.21,9879.98,9878.29,9881.24,9878.03,9878.41,9877.99,9877.88,9877.75,9882.34,9882.86,9877.51,9877.60,9877.83,9877.64,9877.52,9877.77,9877.57,9877.61,9877.55,9877.38,9877.39,9877.44,9877.50,9877.51,9877.75,9877.60,9877.58,9877.58,9877.56,9877.51,9877.48,9877.47,9877.58,9877.63,9877.56]
res1023=[19474.35,19472.00,19471.12,19468.77,19468.94,19468.57,19469.00,19469.81,19468.81,19470.02,19469.29,19468.49,19467.52,19467.61,19467.82,19466.50,19466.88,19467.17,19467.97,19467.12,19467.38,19467.07,19466.89,19466.63,19466.12,19466.01,19466.00,19465.62,19465.20,19464.87,19465.59,19464.10,19464.87,19464.26,19464.67,19463.29,19464.00,19463.85,19463.87,19464.63,19464.01,19463.51,19464.70,19465.08,19470.97,19464.57,19464.65,19465.02,19466.95,19465.71,19467.71,19471.63,19464.97,19465.42,19468.00,19473.37,19465.89,19470.16,19471.82,19476.47,19480.91,19465.24,19464.30,19472.95,19464.66,19466.91,19464.90,19472.64,19471.20,19466.71,19463.60,19464.15,19463.56,19469.07,19482.30,19463.76,19464.53,19464.39,19464.61,19465.06,19464.63,19464.50,19464.89,19464.03,19464.41,19464.80,19465.25,19464.87,19465.06,19465.52,19465.92,19466.03,19465.40,19466.14,19466.05,19466.48,19466.45,19466.98,19466.42,19466.69]
統(tǒng)計值如下表所示:
將三個測量曲線,減去他們的均值之后,繪制出測量誤差波動曲線:
3. 電阻的頻率響應
(1)測量原理:
使用AD9833模塊產(chǎn)生頻率可變的正弦信號,施加在R1與AD5272的串聯(lián)電路上。測量輸入電壓與分壓電壓之間的比值隨著頻率的改變和變化的情況,反映了AD5272電阻的頻率響應特性。
測量示意圖
(2)交流信號源:信號源使用AD9833 DDS信號源。通過ZIGBEE無線命令設置它所產(chǎn)生的信號頻率。該模塊的詳細內(nèi)容參見博文“AD9833數(shù)字信號發(fā)生器模塊[3]”
AD9833數(shù)字合成信號發(fā)生模塊
設置頻率所使用的命令為:
ad9833setfrequency xxxx
其中xxxx 設置頻率數(shù)值。
組裝后的測試電路
(3)測量結果
在AD5272設置為511時,測量信號頻率從100Hz到200kHz變化時,輸入信號,輸出信號以及它們的比值隨著頻率的變化的情況。
AD5272設置為511時,分壓電阻的增益頻率曲線
測量如下:其中包括輸出電壓vout,輸入電壓vin,vout/vin=ratio,以及信號的頻率四組數(shù)據(jù)。
vout=[0.07,0.07,0.07,0.07,0.07,0.07,0.07,0.07,0.07,0.07,0.07,0.07,0.07,0.07,0.07,0.07,0.07,0.07,0.06,0.06,0.06,0.06,0.06,0.06,0.06,0.06,0.06,0.06,0.06,0.06,0.06,0.06,0.06,0.06,0.06,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.03,0.03,0.03,0.03,0.03,0.03,0.03,0.03,0.03,0.03,0.03,0.03,0.03,0.03,0.03,0.03,0.03,0.03,0.03,0.03]
vin=[0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20]
ratio=[0.34,0.34,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.32,0.32,0.32,0.32,0.32,0.31,0.31,0.31,0.31,0.31,0.30,0.30,0.30,0.29,0.29,0.29,0.29,0.28,0.28,0.28,0.28,0.27,0.27,0.27,0.26,0.26,0.26,0.26,0.25,0.25,0.25,0.25,0.24,0.24,0.24,0.24,0.23,0.23,0.23,0.23,0.22,0.22,0.22,0.22,0.22,0.21,0.21,0.21,0.21,0.21,0.20,0.20,0.20,0.20,0.20,0.20,0.19,0.19,0.19,0.19,0.19,0.19,0.18,0.18,0.18,0.18,0.18,0.18,0.18,0.17,0.17,0.17,0.17,0.17,0.17,0.17,0.17,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.15,0.15,0.15]
f=[100.00,2119.19,4138.38,6157.58,8176.77,10195.96,12215.15,14234.34,16253.54,18272.73,20291.92,22311.11,24330.30,26349.49,28368.69,30387.88,32407.07,34426.26,36445.45,38464.65,40483.84,42503.03,44522.22,46541.41,48560.61,50579.80,52598.99,54618.18,56637.37,58656.57,60675.76,62694.95,64714.14,66733.33,68752.53,70771.72,72790.91,74810.10,76829.29,78848.48,80867.68,82886.87,84906.06,86925.25,88944.44,90963.64,92982.83,95002.02,97021.21,99040.40,101059.60,103078.79,105097.98,107117.17,109136.36,111155.56,113174.75,115193.94,117213.13,119232.32,121251.52,123270.71,125289.90,127309.09,129328.28,131347.47,133366.67,135385.86,137405.05,139424.24,141443.43,143462.63,145481.82,147501.01,149520.20,151539.39,153558.59,155577.78,157596.97,159616.16,161635.35,163654.55,165673.74,167692.93,169712.12,171731.31,173750.51,175769.70,177788.89,179808.08,181827.27,183846.46,185865.66,187884.85,189904.04,191923.23,193942.42,195961.62,197980.81,200000.00]
在AD5272設置為1023時,測量信號頻率從100Hz到200kHz變化時,輸入信號,輸出信號以及它們的比值隨著頻率的變化的情況。
AD5272設置為1023時,分壓電阻的增益頻率曲線
測量數(shù)據(jù)為:
vout=[0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02]
vin=[0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20]
ratio=[0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09]
f=[100.00,2119.19,4138.38,6157.58,8176.77,10195.96,12215.15,14234.34,16253.54,18272.73,20291.92,22311.11,24330.30,26349.49,28368.69,30387.88,32407.07,34426.26,36445.45,38464.65,40483.84,42503.03,44522.22,46541.41,48560.61,50579.80,52598.99,54618.18,56637.37,58656.57,60675.76,62694.95,64714.14,66733.33,68752.53,70771.72,72790.91,74810.10,76829.29,78848.48,80867.68,82886.87,84906.06,86925.25,88944.44,90963.64,92982.83,95002.02,97021.21,99040.40,101059.60,103078.79,105097.98,107117.17,109136.36,111155.56,113174.75,115193.94,117213.13,119232.32,121251.52,123270.71,125289.90,127309.09,129328.28,131347.47,133366.67,135385.86,137405.05,139424.24,141443.43,143462.63,145481.82,147501.01,149520.20,151539.39,153558.59,155577.78,157596.97,159616.16,161635.35,163654.55,165673.74,167692.93,169712.12,171731.31,173750.51,175769.70,177788.89,179808.08,181827.27,183846.46,185865.66,187884.85,189904.04,191923.23,193942.42,195961.62,197980.81,200000.00]
在AD5272設置為100時,測量信號頻率從100Hz到200kHz變化時,輸入信號,輸出信號以及它們的比值隨著頻率的變化的情況。
AD5272設置為100時,分壓電阻的增益頻率曲線
測量數(shù)據(jù)為:
vout=[0.11,0.11,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.10,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.08,0.08,0.08,0.08,0.08,0.08,0.08,0.08,0.07,0.07,0.07,0.07,0.07,0.07,0.07,0.07,0.06,0.06,0.06,0.06,0.06,0.06,0.06,0.06,0.06,0.06,0.06,0.06,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.03,0.03,0.03,0.03,0.03,0.03,0.03,0.03,0.03,0.03]
vin=[0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20,0.20]
ratio=[0.50,0.50,0.50,0.50,0.49,0.49,0.49,0.48,0.48,0.48,0.47,0.47,0.46,0.46,0.45,0.44,0.44,0.43,0.43,0.42,0.41,0.41,0.40,0.40,0.39,0.38,0.38,0.37,0.37,0.36,0.35,0.35,0.34,0.34,0.33,0.33,0.32,0.32,0.31,0.31,0.30,0.30,0.30,0.29,0.29,0.28,0.28,0.28,0.27,0.27,0.27,0.26,0.26,0.26,0.25,0.25,0.25,0.24,0.24,0.24,0.23,0.23,0.23,0.23,0.22,0.22,0.22,0.22,0.22,0.21,0.21,0.21,0.21,0.20,0.20,0.20,0.20,0.20,0.20,0.19,0.19,0.19,0.19,0.19,0.19,0.18,0.18,0.18,0.18,0.18,0.18,0.18,0.17,0.17,0.17,0.17,0.17,0.17,0.17,0.17]
f=[100.00,2119.19,4138.38,6157.58,8176.77,10195.96,12215.15,14234.34,16253.54,18272.73,20291.92,22311.11,24330.30,26349.49,28368.69,30387.88,32407.07,34426.26,36445.45,38464.65,40483.84,42503.03,44522.22,46541.41,48560.61,50579.80,52598.99,54618.18,56637.37,58656.57,60675.76,62694.95,64714.14,66733.33,68752.53,70771.72,72790.91,74810.10,76829.29,78848.48,80867.68,82886.87,84906.06,86925.25,88944.44,90963.64,92982.83,95002.02,97021.21,99040.40,101059.60,103078.79,105097.98,107117.17,109136.36,111155.56,113174.75,115193.94,117213.13,119232.32,121251.52,123270.71,125289.90,127309.09,129328.28,131347.47,133366.67,135385.86,137405.05,139424.24,141443.43,143462.63,145481.82,147501.01,149520.20,151539.39,153558.59,155577.78,157596.97,159616.16,161635.35,163654.55,165673.74,167692.93,169712.12,171731.31,173750.51,175769.70,177788.89,179808.08,181827.27,183846.46,185865.66,187884.85,189904.04,191923.23,193942.42,195961.62,197980.81,200000.00]
將上面三組增益曲線繪制在同一張圖中:
增益隨著頻率變化曲線
結論
通過對AD5272的檢測測試,驗證了它作為可變電阻的基本特性。特別是動態(tài)特性,可以滿足一般音頻信號的放大與調(diào)節(jié)。
參考資料
[1] 寄生電容: https://zhuoqing.blog.csdn.net/article/details/104134132
[2] 基于STC8G1K08的實驗電路板: https://zhuoqing.blog.csdn.net/article/details/105612710
[3] AD9833數(shù)字信號發(fā)生器模塊: https://zhuoqing.blog.csdn.net/article/details/104112884
免責聲明:本文為轉載文章,轉載此文目的在于傳遞更多信息,版權歸原作者所有。本文所用視頻、圖片、文字如涉及作品版權問題,請聯(lián)系小編進行處理。
推薦閱讀: