AD5272数字变阻器
品慧电子讯AD5272是Analog公司的电子可变电阻器。它可以被应用在各种电子线路中,进行自动参数设置和调节。AD5272是一个变阻器(rheostat)两端器件,而不是电位器(Potentiometer:三端器件)。相对于美国Xicor公司的高精度数字电位器(X9C102,103,104等),它具有变阻级数高(1024级),工作频带等特点。
AD5272数字变阻器
为了对比在博文“寄生电容[1]”对X9C104的讨论,购买了三片样品进行实验验证。
AD5272简介
1. 内部结构
AD5272是一款MSOP 10管脚封装的芯片。包括有工作电源、地线,与MCU连接的I2C接口,以及可变电阻的两端(A-W)。此外还有一些辅助设置管脚。详细介绍可以参见他的数据手册。下面是AD5272的外部管脚以及内部结构功能图。
AD5272内部功能图
从上图可以看出AD5272对外的应用端口只有两个(A,W),它是一个变阻器(Varistor:两端器件)。
2. 产品特性
● 单通道、1024/256位分辨率
● 标称电阻:20 kΩ、50 kΩ、100 kΩ
● 标称电阻容差误差:±1%(最大值)
● 50次可编程(50-TP)游标存储器
● 可变电阻器模式下的温度系数:5 ppm/℃
● 2.7 V至5.5 V单电源供电
● 双电源供电:±2.5 V至±2.75 V(交流或双极性工作模式)
3. 测试电路板
为了测试AD5272的性能,快速制作一块电路板,将其封装在电路板上,通过100mil的外部引线在面包板上与其它测试电路连接进行相关的测试。
下面是设计的测试电路板的原理图和PCB版图。
实验电路板
测试方案
由于AD5272的控制是通过I2C总线完成的,所以需要借助于一块MCU完成对AD5272的数字控制。下面介绍实验MCU板以及相应的软件开发。
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的功能设置,可以参见其数据手册中的说明。在CSDN中给出了AD5272接口程序。这些程序上层依赖于STC8G1K08的I2C操作的函数支持。
测试结果
将实验电路板在面包板上连接,进行相关的性能测试。
通电后,测试面包板电路
1. 测量A-W电阻与设置参数之间的关系
通过软件设置AD5272中RDAC的参数0~1023,每次递增10,所测量得到的102个数据,测量A-W两端的电阻。实验数据如下:
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次电阻。统计相应的均值,标准差。
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]
统计值如下表所示:
将三个测量曲线,减去他们的均值之后,绘制出测量误差波动曲线:
3. 电阻的频率响应
(1)测量原理:
使用AD9833模块产生频率可变的正弦信号,施加在R1与AD5272的串联电路上。测量输入电压与分压电压之间的比值随着频率的改变和变化的情况,反映了AD5272电阻的频率响应特性。
测量示意图
(2)交流信号源:信号源使用AD9833 DDS信号源。通过ZIGBEE无线命令设置它所产生的信号频率。该模块的详细内容参见博文“AD9833数字信号发生器模块[3]”
AD9833数字合成信号发生模块
设置频率所使用的命令为:
ad9833setfrequency xxxx
其中xxxx 设置频率数值。
组装后的测试电路
(3)测量结果
在AD5272设置为511时,测量信号频率从100Hz到200kHz变化时,输入信号,输出信号以及它们的比值随着频率的变化的情况。
AD5272设置为511时,分压电阻的增益频率曲线
测量如下:其中包括输出电压vout,输入电压vin,vout/vin=ratio,以及信号的频率四组数据。
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时,分压电阻的增益频率曲线
测量数据为:
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时,分压电阻的增益频率曲线
测量数据为:
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的检测测试,验证了它作为可变电阻的基本特性。特别是动态特性,可以满足一般音频信号的放大与调节。
参考资料
[1] 寄生电容: https://zhuoqing.blog.csdn.net/article/details/104134132
[2] 基于STC8G1K08的实验电路板: https://zhuoqing.blog.csdn.net/article/details/105612710
[3] AD9833数字信号发生器模块: https://zhuoqing.blog.csdn.net/article/details/104112884
免责声明:本文为转载文章,转载此文目的在于传递更多信息,版权归原作者所有。本文所用视频、图片、文字如涉及作品版权问题,请联系小编进行处理。
推荐阅读:
迷你特斯拉线圈工作特性
智能功率模块电机控制用于工业应用
宽禁带为电动汽车提供更快充电的能力
碳化硅在下一代工业电机驱动器中的作用
在视频监控应用中利用单线对以太网