IoT Microcontrollers Have ADCs, but Know When to Choose and Apply an External ADC

作者:Bill Giovino

投稿人:DigiKey 北美编辑

Most microcontrollers have analog-to-digital converters (ADCs) on-chip. For IoT endpoints this provides additional functionality while saving critical board space. However, in cases where a designer has to opt for an external ADC for specific features or performance characteristics, vendors such as Texas Instruments have developed high-value ADCs that minimize the impact on board space.

The space/performance tradeoff is one of the hardest for designers to make, but an ADC is also one of the most critical peripherals for a microcontroller-based data acquisition system. This is particularly so for the Internet of things (IoT) with so many physical parameters being monitored. For these battery-powered IoT endpoints, size and power consumption are extremely important.

This article will discuss how to know when the limitations of an on-chip microcontroller ADC peripheral have been reached. It will then discuss ADC architectures and how to choose and implement an external ADC.

Microcontroller ADCs

Any peripheral on a microcontroller must cope with the advantages and limitations of the process technology the semiconductor is built upon. Peripherals such as timers, parallel I/O ports, and communication interfaces such as SPI, I2C, and UART interfaces are very compatible with a CMOS digital process technology.

However, an ADC is an analog peripheral. Internally, analog peripherals such as ADCs or comparators require a capacitor which is not available on a pure digital process. This means using a mixed-signal process technology. Since a microcontroller is primarily a digital semiconductor and speed is important, the mixed-signal technology used must not sacrifice digital speed for analog functionality or performance characteristics. While this balancing act is achievable for common applications, for high-end analog applications this can limit the performance of the analog peripherals. Devices that are mostly analog, such as single-chip ADCs, may only contain slow digital logic at less than 1 megahertz (MHz). This allows the device to be built using a mixed-signal process that primarily benefits the analog.

ADCs compare the voltage level of an analog input signal to a reference voltage. An input signal that is equal to the reference voltage measures as full scale. For example, if the input voltage is the same as the reference voltage on an ADC with 8-bit resolution, the ADC will register 0xFF.

On a microcontroller, the internal reference voltage is either derived from the main microcontroller power supply (usually VCC), or from a dedicated analog reference voltage pin. The accuracy of the ADC output is dependent upon an accurate and stable reference voltage. This requires keeping the internal reference voltage separate and isolated from the high-speed digital logic to minimize noise interference. While an external dedicated reference voltage pin can provide better isolation, compared to deriving it from the main microcontroller power supply, it is still subject to some small interference from the high-speed digital signals switching through the microcontroller. This can be significant when accurately measuring small voltages, as the small analog signal to be measured can get lost due to the internal reference voltage noise.

A higher reference voltage can be used to minimize the effect of noise, but to maintain the same accuracy when measuring low voltages the resolution would have to be increased. This would increase the area of the ADC on the microcontroller die, as well as increase the testing time of the ADC at production, both of which increase the cost of the microcontroller. This also reduces the accuracy of the ADC when measuring very small voltages near the bottom of the range, which can result in inaccurate values for the lower bit positions at inaccuracies of ±4 LSB or worse.

Another challenge for microcontroller ADCs is for applications that demand high accuracy over large resolutions. For example, applications using 24-bit ADCs that require accuracy better than ±2 LSBs require very accurate and stable reference voltages, and can share some of the same problems noted above.

ADC architectures

Successive approximation register (SAR) ADCs: Most microcontrollers use successive approximation register (SAR) ADCs. These are reliable for resolutions of up to 14 bits. An SAR converter compares the analog input signal to be measured in half-steps of the reference voltage. First, it compares the input voltage to half the reference voltage. If the input voltage is greater than half the reference voltage, the MSB of the output is set. The voltage value of the MSB is then subtracted from the input voltage and compared against one-quarter of the reference voltage to determine the MSB - 1 bit. This successive halving of the reference voltage and subtracting from the input voltage continues until the LSB is determined.

Internally, the reference voltage is successively halved using an internal resistor ladder, so the accuracy of the result is dependent upon the accuracy of the resistors and their tolerance over temperature. On single-chip ADCs and most microcontroller SAR ADCs, the resistors are laser trimmed during manufacturing.

SAR ADCs are commonly found on microcontrollers because they are easy to integrate into a mixed-signal process. However, they are again susceptible to interference from clock and signal noise from the rest of the microcontroller. Some of the noise can be minimized by semiconductor design techniques such as guard traces, but this adds to the size of the chip, increasing the cost.

Delta-sigma ADCs: Delta sigma (ΔƩ) ADCs, also called ƩΔ ADCs, provide higher resolutions and are accurate for ADC resolutions of 20 bits and higher. They are much more complicated than SAR ADCs, but in brief, ADCs send the signal to a ΔƩ modulator which converts the analog signal to be measured to a pulse stream, which is then encoded using pulse density modulation (PDM). With PDM, the frequency, or density, of the pulse stream is proportional to the amplitude of the input signal relative to the reference voltage.

Since there is no such thing as encoding a perfect square wave, the PDM signal will contain noise. A digital filter cleans up the noise, and then a decimator converts the PDM signal one bit at a time into a binary number that can be read and stored by the microcontroller core. As mentioned, ΔƩ ADCs provide high resolution with the tradeoff being that they are slower than SAR ADCs. Because of the time it takes to process the voltage into a PDM signal and then perform the serialization of the PDM, the higher the sampling rate, the lower the resolution.

Single-chip ADCs

While the ADCs on most microcontrollers can provide excellent performance for many IoT applications, in cases where an external ADC is required, there are single-chip ADCs that can provide enhanced accuracy and sensitivity with increased noise immunity, without sacrificing pc board space.

An excellent example of a high-end ADC for precision applications is the TLA2024 4-channel, 12-bit ΔƩ ADC from Texas Instruments. It has an integral nonlinearity (INL) of only ±1 LSB, and very high immunity to noise on the supply voltage. The accuracy is very stable over temperature, drifting only 0.01 LSB/°C.

The TLA2024 uses a standard I2C interface for the microcontroller to access the internal registers (Figure 1).

Diagram of Texas Instruments TLA2024 high-accuracy ADC

Figure 1: The Texas Instruments TLA2024 high-accuracy ADC requires a minimum of external components, and contains an on-chip 1 MHz oscillator and voltage reference. (Image source: Texas Instruments)

The TLA2024 has a built-in voltage reference that is derived from the supply voltage. By programming an internal register over the I2C interface, the designer can use the microcontroller to select the full-scale reference voltage from ±6.144, ±4.096, ±2.048, ±1.024, ±0.512, or ±0.256 volts. With a reference voltage as low as 0.256 volts, a designer can use the TLA2024 for high-accuracy current sensing and instrumentation applications that are beyond the capabilities of cost-effective microcontrollers with on-chip ADCs.

The TLA2024 can be configured to sample four single-ended signals or two differential signals. A programmable gain amplifier amplifies small input voltages to increase accuracy.

Output sample rates of 128, 250, 490, 920, 1600, 2400, or 3300 samples/sec can be selected, with both single-shot and continuous conversion modes supported.

The TLA2024 is in an extremely small X2QFN package at only 2.05 mm × 1.55 mm. This is a minimal use of board space while adding significant high-end analog functionality. While the TLA2024 has excellent noise immunity, like all ADCs it should be kept separate and well isolated from the digital components on the pc board, with the analog input pins AIN0 – AIN3 placed close to the signals being measured.

Both speed and accuracy

Sometimes the most demanding applications require both speed and accuracy. There are microcontrollers with on-chip ADCs that can grab data at a million or more samples per second, and others with high accuracy, but more often than not it is a tradeoff between these two performance criteria. For designers of systems where speed, performance, and space are to be optimized, there are microcontrollers with ADCs with few compromises or tradeoffs. However, for cost and space-driven designs, there are still single-chip ADCs that are extremely small yet pack a powerful performance punch.

For example, the Texas Instruments ADS7057 is a 14-bit differential input SAR ADC with a sampling rate of 2.5 megasamples/second (MSPS), tucked inside an X2QFN-8 package that measures 1.50 mm x 1.50 mm (Figure 2). This is about the size of a surface-mount resistor. An ADS7057 could easily be placed in an available area on a pc board with little or no effect on the overall board size, except for the most space-constrained of applications. A microcontroller accesses the device using the SPI interface.

Diagram of TI ADS7057 is a 14-bit differential SAR

Figure 2: The TI ADS7057 is a 14-bit differential SAR that is accessed by a microcontroller through an SPI interface. (Image source: Texas Instruments)

Optimized for accuracy, the typical integral nonlinearity (INL) at 25°C is ±0.9 LSB. The ADS7057 is rated over -40°C to +125°C, though it’s expected an ADC is going to start to lose some accuracy toward the extreme ends of these temperatures. In the case of the ADS7057, the accuracy can vary a significant ±3 LSB over these extremes of temperatures. However, the device also has an internal calibration feature that allows it to compensate for internal offset errors as high as ±6 LSB caused by temperature or supply voltage fluctuations.

This self-calibration feature helps the ADS7057 provide superior accuracy over temperature conditions that would be hostile to most microcontroller ADCs. This self-calibration is recommended at device power-up, or at any time a change in power supply or operating temperature is detected.

The ADS7057 requires a digital supply voltage DVDD between 1.65 to 3.60 volts to power the SPI logic. The decoupling capacitor CDVDD must be a 1 µF ceramic capacitor. An analog supply voltage AVDD between 2.35 to 3.6 volts powers the SAR converter and is also used as the reference voltage. The AVDD source must be stable over temperature and have a low output impedance. For this reason, a low-noise, low-dropout regulator (LDO) must be used. A 3.3 µF decoupling capacitor, shown as CAVDD, must be connected between AVDD and ground to maintain a stable analog voltage during the conversion processes.

This level of accuracy, speed, coupled with the stabilizing self-calibration feature, makes the ADS7057 suited to IoT endpoints that need to perform measurements for sonar, thermal imaging, and optical encoders in harsh environments.

Conclusion

Most microcontrollers have general purpose on-chip ADCs that are excellent for all but the most demanding conversion applications. For space-conscious IoT endpoints that demand high accuracy and high speed, high-performance small size external ADCs can be used without sacrificing any pc board space.

 

免责声明:各个作者和/或论坛参与者在本网站发表的观点、看法和意见不代表 DigiKey 的观点、看法和意见,也不代表 DigiKey 官方政策。

关于此作者

Bill Giovino

Bill Giovino 是一名电子工程师,拥有美国雪城大学的电气工程学士学位,是先后从设计工程师、现场应用工程师跨界到技术营销部门的少数成功人士之一。

25 年来,Bill 一直喜欢在技术和非技术用户面前为包括 STMicroelectronics、Intel 和 Maxim Integrated 在内的许多公司推广新技术。在 STMicroelectronics 工作期间,Bill 作为领头人帮助该公司在微控制器领域取得了早期成功。在 Infineon,经过 Bill 精心策划,该公司的首个微控制器设计便在美国汽车领域大获全胜。作为 CPU Technologies 公司的营销顾问,Bill 帮助了许多公司,让其表现不佳的产品大获成功。

Bill 是物联网的早期尝试者,包括将第一个完整的 TCP/IP 协议栈植入微控制器。Bill 秉持“教育式销售”信条,在通过在线促销产品时强调清晰明了的书面沟通的重要性。他是广受欢迎的 LinkedIn 半导体市场营销群的群主,精通 B2E。

关于此出版商

DigiKey 北美编辑