加入星计划,您可以享受以下权益:

  • 创作内容快速变现
  • 行业影响力扩散
  • 作品版权保护
  • 300W+ 专业用户
  • 1.5W+ 优质创作者
  • 5000+ 长期合作伙伴
立即加入
  • 正文
    • 前言
    • AD5272 简介
    • 测试方案
    • 测试结果
    • 结论
  • 相关推荐
  • 电子产业图谱
申请入驻 产业图谱

AD5272数字变阻器

2020/04/21
144
阅读需 44 分钟
加入交流群
扫码加入
获取工程师必备礼包
参与热点资讯讨论

前言

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 最后两位是由 ADDR 管脚的电压确定,具体可以参见下面表格:
ADDR A1 A0 7-Bit
GND 1 1 0101111
VDD 0 0 0101100
NC 1 0 0101110

(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]

统计值如下表所示:

统计值 设置 0 设置 511 设置 1023
平均值 30.83 9880.06 19466.99
标准差 0.012977570 2.2714 3.3832

 

将三个测量曲线,减去他们的均值之后,绘制出测量误差波动曲线:

 

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

相关推荐

电子产业图谱

公众号TsinghuaJoking主笔。清华大学自动化系教师,研究兴趣范围包括自动控制、智能信息处理、嵌入式电子系统等。全国大学生智能汽车竞赛秘书处主任,技术组组长,网称“卓大大”。