ADCDAC

模拟电路Analogue与数字电路Digital

[[模拟电路]]与[[数字电路]]

在现实世界中,常见的信号大都是模拟量,像温度、声音、气压等,但在信号的处理与传输中,为了减少噪声的干扰,较多使用的是数字量。因此我们经常会将现实中的模拟信号,通过 ADC 转换为数字信号进行运算、传输、储存,再通过 DAC 转换为模拟信号,呈现出来。

数字电路与模拟电路

数字电路

  • 用数字信号完成对数字量进行算术运算和逻辑运算的电路称为数字电路。现代的数字电路由半导体工艺制成的若干数字集成器件构造而成。逻辑门是数字逻辑电路的基本单元。存储器是用来存储二进值数据的数字电路。
  • 电路结构简单,稳定可靠。数字电路只要能区分高电平和低电平即可, 对元件的精度要求不高,因此有利于实现数字电路集成化。
  • 数字信号在传递时采用高、低电平两个值,因此数字电路抗干扰能力强,不易受外界干扰。数字电路不仅能完成数值运算,还可以进行逻辑运算和判断,因此数字电路又称为数字逻辑电路。
  • 数字电路中元件处于开关状态,功耗较少。
    由于数字电路具有以上特点,故发展十分迅速,在计算机、数字通信、数字仪器及家用电器等技术领域中得到广泛的应用。

模拟电路

  • 模拟电路是处理模拟信号的电路;数字电路是处理数字信号的电路。模拟信号是关于时间的函数,是一个连续变化的量。数字信号则是离散的量。

ADC(Analogue to digital converters)

基本原理

采样~保持~量化~编码

采样

输入的模拟信号是连续的,而将要输出的数字信号是离散的,所以只能进行瞬时采样,再将采样值转换为输出的数字量,再重新开始下一轮的采样。

为了能准确无误用信号 v_svs 表示出模拟输入信号 v_1v1,至少需要满足采样定理(Nyquist-Shannon theorem),即采样频率 f_sfs 在模拟输入信号最高频率分量fi(max) 的 2 倍以上(通常会取 3~5 倍,但太高的频率需要更快的工作速度,需要综合成本考虑)

The number of samples per second is called sample rate.

Basically, the sampler converts the continuous-time-continuous amplitude signal into a continuous amplitude- discrete time signal.

保持

保持电路能够采样结束后,让信号保持一段时间,使 ADC 有充分时间进行转换。一般采样脉冲频率越高、采样越密,采样值就越多,采样保持电路的输出信号就越接近输入信号的波形。

It holds the first sample until the next sample comes from the sampler.

Once the new sample comes from the sampler to the holding circuit it releases the old sample to its next block.

量化

采样得到的数字量,必须为某个规定的最小数值单位的整数倍,这个转换过程称为量化,所取的最小数量单位称为量化单位 Δ。数字信号最低有效位 LSB 的 1 所代表的数量大小就等于 Δ。

因为模拟电压是连续的,不一定能被 Δ 整除,因此会出现量化误差。量化级越细,量化误差就越小,所用二进制代码的位数就越多,电路也越复杂。

编码

  • 将量化的结果用二进制(或其他进制)表示出来,称为编码。
  • The output from the encoder is fed to the next circuitry. Here, is the end of the analog to a digital circuit.For n bit ADC, the number of 2^n divisions are available.
  • If “Vref” the reference input voltage, then an analog division (level) for Va can be obtained by D(out)=2^n*Va/Vref (n是bit位,Va是输出

主要参数

Bit depth (resolution) is how much accuracy can an analog to digital converter can convert the signal from analog to digital.

The sample rate of an ADC is how fast an ADC can convert the signal from analog to digital.

5种ADC packages

  • Sigma-delta
  • Succesive approximation(SAR)
  • Pipelined
  • Dual-slope
  • Flash

DAC(Digital to Analog Converter)

DAC is used to change digital signals to continuous analogue signals that are then used by the peripherals attached to the microcontroller/microprocessor.

Digital signal is discrete in time and amplitude or mostly available in the form of binary such as 0 or 1. A DAC converts usually a fixed-point binary number into a physical quantity (e.g., a voltage). In particular, DACs are often used to convert discrete time series data to a continually varying physical signal.

Features

  • Generally, the digital to analog converter or DAC allows multiple inputs and a single output.
  • converts the discrete time-discrete amplitude signal into a continuous time-continuous amplitude signal.
  • In the analog to digital conversion (ADC) process signal cutting or power removal happens whereas in the digital to analog conversion (DAC) signal or power addition happens.

基本原理

二进制信号(以八位为例)

00001010=2^3+2^1

Weighted Resistors Method

R_2RMethod

特点是简单粗暴,从低位到高位用电阻让电流呈2的幂数改变。但是这个电路很难做到高的位数,若是一个8位的dac,最大的电阻达到了最小电阻的128倍,如果最小的电阻有10k,最大就有1MΩ多,这个电阻可不好做准确,而且尽管只用几个电阻,但是每个电阻阻值都不一样,在使用这种方法的时候有一种叫做双权电阻的方法,减少了电阻种类和大电阻,但是仍然无法避免最大电阻的需求。

img

基本结构

  • Input Circuit
  • Voltage Switching Circuit
  • Resistive Network
  • Amplifier

input Circuit(输入电路)

It receives the binary digital inputs safely and does some filtration if required. It does not have any vital role in the whole circuit.

Voltage Switching Circuit(电压切换电路)

It switches voltages between input digital signals and reference voltage sources and passes to the main resistive circuit. It also makes connection or isolation with the ground.

Resistive Network(电阻网络)

It is the main part of the DAC circuit.

It basically helps to multiple digital input processing before the amplifier circuit. There are two types of DAC available according to the resistive network

  • weighted resistor network
  • R-2R network.

Amplifier(放大器)

Generally, a differential or operational amplifier is used in the DAC system. That not only amplifies the signal even it process signal such as summation.


ADCDAC
http://mavericreate.top/Blogs/2025/08/28/ADCDAC/
作者
唐浩天
发布于
2025年8月28日
许可协议