Está en la página 1de 42

Introducción a Sistemas Embebidos

EL6004

Periféricos
Conversores
Analógico-Digitales

Prof. Jimmy Tarrillo


2020-1
1
Analog to Digital Converter
Mundo digital: Representación del mundo
“real”
ANALÓGICO DIGITAL
v dec

2
Conversor Analógico Digital
Analog to Digital Converter
Mundo digital: Representación del mundo
“real”
ANALÓGICO DIGITAL
v dec

fs=1/t
Frecuencia de muestreo
(sampling): relacionado a Nyquist

3
Conversor Analógico Digital
Analog to Digital Converter
Mundo digital: Representación del mundo
“real”
ANALÓGICO DIGITAL
v dec

fs=1/t
Resolución
Frecuencia de muestreo de bits
(sampling): relacionado a Nyquist

4
Conversor Analógico Digital
Analog to Digital Converter
Mundo digital: Representación del mundo
“real”
ANALÓGICO DIGITAL
v dec

Algunos tipos de ADCs:


Flash (simultáneo), aproximaciones sucesivas,
Sigma-Delta, pipeline
5
Criterios de selección
• Resolución de bits. Indica la precisión
• Precisión
• Velocidad de conversion

6
ADC tipo Flash
Basado en divisor de voltaje.
El voltaje de referencia (Vref)
es dividido por resistencias
idénticas.
El encoder de prioridad
selecciona el mayor valor.
Ejemplo: Vref = 7 V

7
ADC tipo Flash
Basado en divisor de voltaje.
El voltaje de referencia (Vref)
es dividido por resistencias
idénticas.
El encoder de prioridad
selecciona el mayor valor.
Ejemplo: Vref = 7 V

Rápido
Muchos recursos
8
ADC tipo dual slope

Vref Control
1
clk
2
_
_
Vin +
+ Counter

Buffer

1 2
T const T depende de Vin

HW + simple, mejor ante ruido


Más lento

9
ADC tipo Aproximaciones sucesivas
(SAR)
Comienza con el MSB=1
Realiza la comparación con el
valor de entrada
Si es necesario, MSB=0 y
evalúa el siguiente bit
Tiempo de conversión
constante

Gráficos de http://huarpe.com/ 10
ADC tipo Sigma Delta (Σ-Δ)

Usa integrador
Mayor número de ‘1’ indica número más positivo
Mayor número de ‘0’ indica más negativo

Gráficos de http://www.embedded.co 11
ADC tipo Sigma Delta (Σ-Δ)

Gráficos de http://www.embedded.co 12
ADC tipo pipeline

Convierte en etapas, usando ADC tipo flash para conversiones


parciales, las cuales son restadas del Vin para medir la siguiente
etapa.
El ejemplo muestra ADC de 12 bits en 4 etapas 13
Selección: ¿cuál seleccionar?

Ej: digikey.com
https://www.digikey.com/products/en/integrated-circuits-ics/data-acquisition-analog-to-
digital-converters-adc/700?k=adc
14
Comparación de tecnologías ADC

15
Choose the right A/D converter for your application, Texas Instrument
Comparación de tecnologías ADC

16
Choose the right A/D converter for your application, Texas Instrument
Comparación de tecnologías ADC

17
Choose the right A/D converter for your application, Texas Instrument
Mundo Real y ancho de banda

18
Choose the right A/D converter for your application, Texas Instrument
Implementación con etapa digital

19
Choose the right A/D converter for your application, Texas Instrument
Aplicaciones
Dominio del tiempo Dominio de la frecuencia
• Imaging (CCD) • Comunicaciones
– Camcorder – Set-top box
– Cámaras digitales – Modem
– Scanners – Estación base
– GPS
– RGB, video
– Sintetizador de frecuencia
– Test intrumentation – IF Digitizer
– Medica
• Aspectos importantes
• Aspectos importantes – SFDR
– SNR – ENOB
– Slew Rate/tset – Ancho de banda de
– DNL entrada analógica
– DC-Accuracy/drift – Jitter

20
Choose the right A/D converter for your application, Texas Instrument
Solución de interfaces

21
Choose the right A/D converter for your application, Texas Instrument
SE vs DE
• Single-ended Inputs (SE)
– Degraded dynamic performance (larger FSR)
– Common-mode voltage and op amp headroom may limit use for
dc-coupling
– Best suited for Time Domain applications

• Differential (DE)
– Optimized performance due to lower FSR, Reduction of even-
order and common-mode components
– Best for higher input frequencies (IFs)
– More complex driver circuitry (consider Diff – Amps)
– Best suited for Frequency Domain applications
22
Choose the right A/D converter for your application, Texas Instrument
ADC en Atmega328
• 10-bit Resolution
• 0.5 LSB Integral Non-linearity
• ± 2 LSB Absolute Accuracy
• 13 - 260µs Conversion Time
• Up to 76.9kSPS (Up to 15kSPS at Maximum Resolution)
• 6 Multiplexed Single Ended Input Channels
• 2 Additional Multiplexed Single Ended Input Channels (TQFP and
QFN/MLF Package only)
• Temperature Sensor Input Channel
• Optional Left Adjustment for ADC Result Readout
• 0 - VCC ADC Input Voltage Range
• Selectable 1.1V ADC Reference Voltage
• Free Running or Single Conversion Mode
• Interrupt on ADC Conversion Complete
• Sleep Mode Noise Canceler

23
ADC en
Atmega328

24
ADC en Atmega328

25
ADC en Atmega328

26
ADC en Atmega328

By default, the successive approximation


circuitry requires an input clock frequency
between 50kHz and 200kHz to get maximum
resolution. If a lower resolution than 10 bits is
needed, the input clock frequency to the ADC
can be higher than 200kHz to get a higher
sample rate.
The ADC module contains a prescaler, which
generates an acceptable ADC clock frequency
from any CPU frequency above 100kHz. The
prescaling is set by the ADPS bits in ADCSRA.
The prescaler starts counting from the moment
the ADC is switched on by setting the ADEN bit
in ADCSRA. The prescaler keeps running for
as long as the ADEN bit is set, and is
continuously reset when ADEN is low.
27
ADC en Atmega328

28
ADC en Atmega328

29
ADC en Atmega328

30
ADC en Atmega328

31
ADC en PSoC
ADC Successive Approximation Register
(ADC_SAR)

 12-bit resolution at up to 1 msps


maximum
 Single-ended or differential input
 Aplicaciones:
 LED lighting control
 Motor control
 Magnetic card reader
 High-speed data collection
 Power meter
 Pulse oximeter
32
ADC en PSoC
Sequencing Successive Approximation ADC
(ADC_SAR_Seq)
 Selectable resolution (8, 10 or 12
bit) and sample rate (up to 1 Msps)
 Scans up to 64 single ended or 32
differential channels automatically,
or just a single input
 Aplicaciones:
 Uso de múltiples canales

33
ADC en PSoC
Delta Sigma Analog to Digital Converter
(ADC_DelSig)
 Selectable resolutions, 8 to 20 bits
 Sample rate 8 sps to 384 ksps
 High input impedance input buffer
 Selectable input buffer gain (1, 2, 4, 8)
or input buffer bypass

34
Tipos de DAC
• Uso de amplificador operacional: sumador
Ejemplo: 4 bits

Nota: tolerancia de resistencias


35
Tipos de DAC
• Uso de amplificador operacional: sumador

Otra opción para evitar resistencias variadas

36
DAC en PSoC 5LP
• 8 bits, configurado como salida de corriente o
voltaje
• Calibración para tener 25% de error
• Salida en corriente (IDAC output): 8 Msps
• Salida en voltaje (VDAC voltage output): 1 Msps

37
DAC en PSoC 5LP
Modo corriente (IDAC)
• La salida es corriente
• Selección poniendo en 1 el bit DACx_CR0[4]
• La señal de referencia por IREF(DAC)
• Tres rangos seleccionables por los bits DACx_CR0[3:2]
– 0 to 2.048 mA, 8 μA/bit
– 0 to 256 μA, 1 μA/bit
– 0 to 32 μA, 0.125 μA/bit

Modo voltaje (VDAC)


• La salida es voltaje
• La señal de referencia por VREF(DAC)
• Tres rangos seleccionables por los bits DACx_CR0[3:2]
– 0 V to 1.024V
– 0 V to 4.096
38
DAC en PSoC 5LP
Modo voltaje (VDAC)

39
DAC en PSoC 5LP
Mejora de resolución

40
Ejercicio
En una cámara temperada de pruebas, se usan 2 sensores de temperatura
analógicos (termocuplas) para medir la temperatura y su distribución. El
monitoreo de temperaturas se realiza mediante un PSoC-5LP, para lo cual se
utilizan dos canales analógicos y una pantalla de cristal líquido LCD de 16x2
caracteres. La señal de cada sensor es tratada por un circuito analógico que
convierte la temperatura a un voltaje que es linealmente proporcional entre 0°C
a 500 °dC en un rango de 0V a 2.5V. Con ello, si la tempera es 23.5°C, el
conversor lo representará por 235. El LCD debe mostrar el valor en grados
decimales tomados por cada sensor (S1 y S2), con un decimal de
aproximación. Además, deberá mostrar un mensaje de estado en el que si el
promedio de temperatura es menor a 30°C, el sistema es catalogado de
“Optimo”; en caso contrario se mostrará el mensaje “PELIGRO”. La Figura 1
muestra el esquema de conexiones de los equipos.

AdaptaS1
S1 PSoC

S1 AdaptaS2

S 1 : . E s t a d o :
S 2 : . P E L I G R O 41
Referencias
1. ATMEL 8-Bit microcontroller with 4/8/16/32KBytes in-System
programmablr flash datasheet
2. PSoC® Creator™ Component Datasheet. Timer 2.70
3. Microcontrollers for Beginners on the basis of practical
examples with ATMEL AVR controllers in Assembler
4. Understanding Pipelined ADCs.
https://www.maximintegrated.com/en/app-
notes/index.mvp/id/1023
5. Choose the right A/D converter for your application. Texas
Instrument

42

También podría gustarte