비디오 시리즈
Precision labs 시리즈: 데이터 변환기 마이크로컨트롤러
마이크로컨트롤러용 데이터 변환기에 대해 자세히 알아보세요.
Introduction to integrated ADCs
발표자
리소스
[AUDIO LOGO]
Hello, and welcome to the TI Precision Lab Introducing Integrated ADCs and MCUs. In this video, we will look at the features of the integrated ADCs and MCUs and how they are different than external ADCs. We will also discuss the input signal options, the reference voltage configuration, resolution settings, and the trigger sources. At the end of this presentation, you will have an understanding of integrated ADCs and how to adapt them for different applications.
In this video, we will be focused on learning about integrated ADCs, but first, let's begin with a quick review of what an ADC is and why it is important. ADC stands for Analog to Digital Converter. Its job is to sample an analog signal at a specific point in time and convert it into a digital representation, which can be processed by a digital system, such as a microprocessor. Any system that responds to a stimulus in the physical world, would likely use an ADC as an interface between the analog and digital domains. Examples include detecting ambient light levels, recording audio, and receiving wireless communications.
Before we discuss integrated ADCs, let's talk about the alternative, external ADCs. An external ADC is a separate device from the MCU. With an external ADC, you can choose the right resolution and sampling speed for your design requirement. Usually, it's easier to find a high-resolution, high-sampling rate external ADC than an integrated one.
An external ADC often requires an external reference voltage. In general, you will also need an MCU to configure the ADC and read out the conversion data through a SPI or I2C interface. Because of the additional circuitry, using an external ADC is generally more expensive than using an MCU with an integrated ADC. Now that we understand the trade-offs between external and integrated ADCs, we will spend the rest of the video focusing on integrated ADCs.
Let's first look at this integrated ADC block diagram. An integrated ADC is contained within the MCU. In general, an integrated ADC will have multiple input channels. Some of the signals come from outside the MCU while others are internal. For example, many MCUs will have an internal temperature sensor, which can be connected to the integrated ADC for easy temperature sensing.
The integrated ADC also needs to configure the clock system, reference voltage, and trigger source before it is ready to perform a data conversion. Configuring an MCU's internal ADC can be accomplished by writing to the correct configuration registers. Generally, it will be only a couple of lines of code. This process is much simpler compared to configuring an external ADC, which would require sending configuration data across a protocol like I2C or SPI.
When a data conversion is done, DMA or another internal-data transfer controller mechanism is often used in the MCU to get the conversion data out of the ADC without CPU intervention. An interrupt will be generated when the data is ready for follow-up processing. The whole system is a highly integrated solution. An MCU with an integrated ADC can accomplish many analog sensing tasks.
Since the system is highly integrated, the hardware will be simple, and all the configurations can be done by software, making it easy to meet different application requirements. Additionally, integrated ADCs will typically have lower power consumption and be more cost effective than using an external ADC with an MCU to achieve the same functionality.
Let's begin with the input channel options. The most common way to use an integrated ADC is to sample an external signal, as shown here. Some ADCs will also feature a programmable gain amplifier, labeled as a PGA in this diagram. A PGA can help increase the amplitude of incoming signals without the need of an external amplifier.
Often MCUs will provide internal signal inputs like the integrated temperature sensor and battery-monitor sensor, which can be used without any additional circuitry. Some integrated ADCs also support differential inputs. This allows true differential mode support 0 to vref common mode when needed to simplify onboard signal-conditioning circuit, thus reducing cost and system power.
The ability to select differential input for one required input channel and single-ended for the rest, maximize the pin usage and flexibility of this device. Some systems will have many different analog signals that need to be constantly monitored. Using channel sequencing, a single integrated ADC can automatically switch between different input channels.
Next, let's discuss referenced voltage configuration. An MCU with a selectable reference allows you to have the flexibility to choose the best reference voltage for different applications. The ideal reference voltage is slightly larger than the maximum input-signal voltage. If the reference voltage is smaller than the input-signal voltage, the samples will be clipped, and you will lose data. If the reference voltage is much larger than the input signal, you will have poor sampling resolution because the step size will be unnecessarily large.
In this example, the internal reference can be selected as 1.2, 1.5, 2 or 2.5 volts. The internal reference can even be outputted externally to power the sensor for ratiometric measurements or vice versa by using the MCU supply to source the ADC reference voltage and the sensor. If the internal reference and vcc supply don't offer the required voltage, then pins for the external reference voltage can be selected.
In this example, let's assume the integrated ADC has 14 bits of resolution. A 14-bit ADC will have 16,384 codes. A code represents a unique ADC value, which corresponds to a specific voltage level. Selecting 2.5 volts as our reference voltage, results in around 153 microvolts per code. Selecting 1.2 volts as our reference voltage, results in around 73 microvolts per code. When the input signal is around 1 volt, using a 1.2 volt reference gives us the best resolution.
The resolution of the integrated ADC can be changed easily by software configuration for different applications. An integrated ADC usually offers a programmable number of bits with software configuration. Less clock cycles are required to complete a conversion as you reduce the number of bits, so selecting the minimum number of bits required both maximizes the sample rate, as well as minimizing the energy.
This allows applications which prioritize speed, such as fall detection, to select a lower number of bits, and applications where speed is not critical, such as temperature measurements, to prioritize resolution. Since the number of bits is programmable, it can even be changed between conversions, depending on the requirements of the application.
A trigger is the event that starts an ADC conversion. Timers offer a convenient way to trigger an ADC conversion on a periodic interval. Signal-processing applications that require a uniform sampling rate can use timer-based triggering to ensure the sampling interval is periodic. When using the internal timers to trigger the ADC, the MCU core can stay in low-power mode, which can save its power, or alternatively, the CPU can remain active and perform other application tasks.
The ADC can be triggered by software as well. For example, in a thermometer application, a user may initiate a sampling event by pressing a button. The MCU can detect the button press and trigger an ADC conversion. Software triggering is also used in applications that sample signals on irregular intervals.
An external trigger option allows the ADC to respond to trigger events from external devices. This can be useful in systems where multiple devices need to align to a synchronization signal. In addition to the triggering options shown here, some devices offer more sophisticated trigger sources as well.
Some microcontrollers offer a feature known as DMA. DMA, short for Direct Memory Access is a mechanism to move data from the ADC conversion memory to RAM without CPU intervention. Without it, the CPU would spend more time moving data between the ADC memory and RAM, which would increase power consumption and reduce the amount of compute cycles available to the application.
When an ADC conversion is finished, the DMA reads out the conversion data from the ADC memory buffer and moves it to RAM. When the next conversion is finished, the DMA reads out the conversion data, and the destination address will be automatically incremented, and the data will be saved to a new address. This process will repeat until the DMA reaches a predefined endpoint. Once a block of data has been completely transformed by the DMA, an interrupt will be generated to inform the application that this data is ready for batch processing.
In summary, integrated ADCs offer a lot of flexibility that can meet the requirements of many applications. Compared to external ADCs, integrated ADCs are small and can save valuable space on printed circuit boards. The combination of software configuration and flexible input-channel routing, allows an integrated ADC to sample many different signals in a system.
All of these features enable cost savings while offering great performance. To find more TI microcontroller technical resources and search products, visit ti.com/microcontrollers and check out the links below. Thanks for watching.