+15,00,000 products in offer
7,000 packages per day
+3,00,000 clients from 150 countries
Date of publication: 18-09-2026 🕒 9 min read
Microcontrollers have built-in ADC converters with various applications: from simple ones, like measuring voltage on a potentiometer slider, to very demanding ones, such as measuring the unbalance voltage of a bridge with multi-bit resolution. More advanced tasks, such as building a radar sensor, will likely require the use of an external integrated circuit converter with appropriate parameters. This text is the second in a series of three articles dedicated to this topic.
Usually, the ADC converter built into the microcontroller requires configuration by writing bits to the appropriate registers of the microcontroller. Depending on the type of microcontroller and the type of built-in converter, these bits can determine the operating mode of the converter, sampling frequency, signaling data availability after processing, etc. In addition, settings for other registers unrelated to the ADC itself may also be required, such as configuring inputs as "floating," open-collector, or configuring clocks and timers.
Depending on the type of microcontroller, the ADC converter may have the ability to operate in several modes, which determine how and how often the conversion of the analog signal to digital form is performed.
The single-shot mode involves performing a single conversion after it is triggered. The microcontroller starts the ADC programmatically, the converter performs one conversion of the selected channel, stores the conversion result in a register, and stops operation, signaling the end of the conversion by setting the appropriate bit in the control register. Usually, this bit can have an additional function, for example, it can trigger an interrupt handler from the ADC converter. To take another measurement, it is necessary to trigger the conversion again. This mode is energy-efficient (additionally, between measurements, the converter can be put into sleep mode) and is often used when measurements are performed sporadically, e.g., on program request or in response to an event.
In continuous mode, the ADC converter automatically starts the next conversion after completing one, without the need for re-triggering via software. The converter operates in a loop, generating successive results at the same frequency, dependent on clock settings and sampling time, and the measurement is triggered using a hardware timer. Continuous mode is useful in applications requiring regular signal sampling, such as measuring voltage, current, audio applications, or analyzing time-varying signals. A disadvantage may be higher energy consumption and the need for efficient data reception handling, often using interrupts or DMA.
The scan mode allows for sequential conversion of multiple ADC channels in a predefined order. After triggering, the ADC performs the conversion of the first channel, then automatically moves to the next ones until the entire sequence is completed. The scanning mode can operate as a single sequence (similar to single-shot, but for multiple channels) or in conjunction with continuous mode, where the entire sequence of channels is repeated cyclically. This solution is particularly useful in systems where several analog signals need to be measured, such as various sensors, without the need for manual channel switching in the program.
The way to set the operating mode of the converter, configure peripheral blocks, and receive the final measurement result depends on the type of microcontroller and the application requirements.
After deciding on the type of microcontroller or selecting an external ADC converter, one can usually start drawing the schematic considering the required components, and then design the printed circuit board. The design of the board is a crucial stage of the project, as its execution will largely determine the level of the device's own noise, and consequently, the effective bit resolution of the converter. A poorly designed board, incorrectly routed grounds, and poor filtering of the power supply voltage in the presence of strong disturbance sources, such as CMOS circuits, can lead to a drastic reduction in measurement capabilities. It may turn out that despite using a 16-bit converter, the application will be able to measure voltage with a resolution of, for example, 11 bits, because the state of the 5 least significant bits will be completely random, resulting from the instantaneous value of the board's own noise.
Minimizing the level of own noise in systems with a microcontroller equipped with an ADC converter begins at the stage of designing the printed circuit board and requires a conscious approach to the placement of components in the designed device, routing grounds and power paths, placement of capacitors (with a conscious choice of type and capacitance), and inductive chokes filtering the power supply. The ADC is a component very sensitive to disturbances, therefore even if correctly configured in the program, it may not meet expectations regarding the resolution of the measured voltage if the hardware layer has been improperly designed. In this context, particular attention is also required for circuits processing and conditioning the input voltage of the ADC, e.g., current/voltage converter when measuring current, position/voltage when determining displacement, light/voltage when measuring light intensity, etc.
For a correct board design, the separation of the analog and digital parts is of great importance. Analog circuits, such as ADC inputs, signal sources, or RC filters, should be physically separated from rapidly switching digital parts, such as clock lines, data buses, or communication interfaces. The goal is to prevent current pulses and fast edges generated by digital logic from capacitively or inductively coupling with analog paths. A basic level of separation is provided by the distance on the board (strictly: the arrangement and orientation of components). More demanding solutions may require other methods, such as shielding, using separate boards, galvanic separation via optical interface, and others.
A key influence on minimizing the level of own noise is routing ground paths. The best solution is to use a full, uninterrupted ground, preferably on a separate layer of the board. If the microcontroller has separate analog and digital ground pins, they should be connected at one point, as close to the circuit as possible. This helps avoid the formation of ground loops and voltage drops, which directly translate into ADC measurement errors.
If the microcontroller has separate power supply connections for the digital part and the ADC converter, the power pins should be separated, e.g., using an inductor, and filtering capacitors should be connected as close as possible to the pins. In any case, the power supply should be as "clean" and stable as possible, and the voltage stabilization circuit should have low output impedance. When using a switching power supply, it is worth ensuring physical separation (sufficient distance) and using a battery of capacitors filtering the power supply, connecting capacitors of different capacitances in parallel. Additionally, filtering capacitors should have the lowest possible inductance and should be mounted as close as possible to the power pins of the microcontroller.
It is also very important to route signal paths to the ADC inputs. They should be as short as possible, without unnecessary vias, routed away from sources of disturbances. Avoid routing them parallel to clock lines or high-frequency buses, as this promotes disruptive coupling. In many cases, a simple low-pass RC filter is used directly at the ADC pin, which attenuates high-frequency noise and improves sampling stability.
An important aspect is also the reference voltage source of the ADC. It should be stable and free from noise, as any fluctuations directly affect the conversion result. If an internal reference source is used, the manufacturer's recommendations for filtering the reference voltage should be strictly followed. When using an external integrated circuit generating the reference voltage, proper filtering and short, symmetrical connections to the microcontroller are particularly important.
At the board design level, it is also advisable to avoid abrupt changes in trace widths, sharp angles, and unnecessary cutouts in ground planes under analog paths. Each such place can become a source of additional disturbances or unwanted impedances. It is also good practice to maintain continuity of the ground plane under the ADC inputs, which limits emission and susceptibility to noise.
As a result, effectively reducing the level of own noise of the ADC does not stem from one specific action, but from consistently applying many small design principles that together create an environment conducive to accurate and repeatable analog measurements.
Temperature has a significant and multidimensional impact on the operation of the analog-to-digital converter built into the microcontroller, and its changes directly translate into the quality and reliability of measurement results. Since the ADC is an analog circuit implemented within a semiconductor structure, its electrical parameters are not perfectly stable and change with the thermal conditions of operation.
One of the most important temperature effects is offset and gain drift of the ADC converter. As the temperature increases, the parameters of MOS transistors, such as threshold voltage or carrier mobility, change, causing a shift in the processing characteristic. In practice, this means that for the same input voltage, the conversion result may vary depending on the temperature of the circuit. The measurement error at low temperature may be small, but at higher temperatures, it will increase to noticeable values, especially in applications requiring measurement precision.
Temperature also affects the reference voltage of the ADC, which is one of the key elements determining the accuracy of conversion. Both internal reference sources and external voltage regulators exhibit some temperature coefficient. Fluctuations in the reference voltage cause scaling of the processing results, which manifests as an error across the entire measurement range. This effect can be particularly significant in microcontrollers where the reference is implemented internally and shares power with other blocks of the circuit.
As the temperature increases, the level of own noise of the converter also increases. The main source here is thermal noise from resistive elements and transistors, which is directly dependent on absolute temperature. A higher noise level causes greater variability in successive results for the same input voltage, which reduces the effective resolution of the ADC. In practice, this may mean that a nominally 12-bit converter behaves like a device with fewer effective bits, especially with slowly varying or low-level analog signals.
Temperature also affects the sampling circuits and the sample capacitor in SAR-type converters prevalent in microcontrollers. Changes in leakage of semiconductor structures and resistance of analog switches cause the sample capacitor to discharge faster at high temperatures. If the sampling time is short or the signal source has high impedance, this leads to additional conversion errors that increase with rising temperature.
The impact of temperature on the temporal stability of the entire conversion process is also significant. Temperature-dependent changes in the parameters of the oscillator or clock circuits of the ADC can cause slight fluctuations in the sampling frequency. Although this usually does not affect the value of a single result, in systems utilizing precise timing sampling, such as in signal analysis, it can lead to additional distortions.
It is also worth noting that microcontroller manufacturers provide temperature characteristics of the ADC in documentation, such as offset drift or change in reference voltage as a function of temperature. These parameters are usually specified for a certain operating temperature range, for example from -40°C to +85°C or +105°C. Once outside these ranges, the degradation of processing quality can be significantly greater and less predictable.
In practical applications, the impact of temperature is often compensated programmatically by performing ADC calibration at several temperature points or using the built-in temperature sensor of the microcontroller. This allows for correction of conversion results depending on the current operating conditions. Nevertheless, it should be remembered that the more demanding the measurement application, the more important it is to select a microcontroller with appropriate temperature parameters, as well as to consciously design hardware and algorithms that take into account the impact of temperature on processing quality.
Designing the analog-to-digital path, that is, the entire route from the source of the analog signal to the processing result in digital form, requires a coherent approach encompassing both hardware and configuration of the converter, as well as software processing. The main goal is to ensure that the signal reaching the ADC is stable, clean, and within the conditions under which the converter operates with declared accuracy.
The first fundamental principle is matching the range of the analog signal to the input range of the ADC. Care should be taken to ensure that the measured signal utilizes as wide a range of voltages as possible between the analog ground and the reference voltage of the converter, but at the same time never exceeds it. A too small range results in a loss of effective resolution, while exceeding allowable voltages leads to non-linearity or even damage to the input. In practice, voltage dividers, operational amplifiers, or level-shifting circuits are often used.
Controlling the impedance of the signal source is very important. The ADC input, especially in SAR-type converters, is not high-impedance, as an internal capacitor is charged during sampling. If the source impedance is too high, the voltage on this capacitor will not stabilize in time during sampling, leading to conversion errors. For this reason, high-impedance signals are often buffered with an operational amplifier or the sampling time is increased in the ADC configuration.
Another key principle is filtering the analog signal before processing. The analog path should almost always include a low-pass filter that limits the signal bandwidth to frequencies consistent with the assumed sampling frequency. Such a filter serves as an anti-aliasing filter and reduces the amount of high-frequency noise that does not carry useful information and degrades the stability of ADC results. Even a simple RC filter placed close to the converter pin can significantly improve measurement quality.
It is extremely important to ensure power supply and reference voltage for the analog path. The reference voltage of the ADC should be stable, low-noise, and well-filtered, as any fluctuations directly translate into measurement error. The same applies to the power supply of the analog part of the microcontroller. Using decoupling capacitors close to the power pins, ferrites, and, where possible, separating the analog and digital power supplies is one of the basic principles of a correct design.
Equally important is the organization of ground. The analog path should refer to a clean analog ground, free from impulsive currents generated by digital logic. The best results are achieved by using a continuous ground plane and connecting the analog and digital grounds at one controlled point, usually under the microcontroller. This helps avoid ground loops and uncontrolled voltage drops that directly distort conversion results.
When designing the analog-to-digital path, one cannot overlook the aspect of component placement and routing on the PCB. ADC inputs, filters, and analog components should be placed as close as possible to the microcontroller, and signal paths should be short, straightforward, and routed away from clock lines and fast digital interfaces. Any unnecessary crossing or long parallel routing of paths increases the risk of disruptive coupling.
The last, but very important principle is to consider calibration and software processing. Even the best-designed analog path does not eliminate all ADC errors. Self-calibration of the converter, averaging samples, digital filtering, and temperature compensation can significantly improve effective resolution and measurement stability. Therefore, the design of the analog-to-digital path should be treated as a whole, where hardware and software complement each other.
Transfer Multisort Elektronik (TME) is one of the world’s largest global distributors of electronic components, electrotechnical parts, workshop equipment, and industrial automation. The catalog includes over 1,500,000 products from 1,300 leading manufacturers. TME’s modern logistics centers in Łódź and Rzgów (Poland), with a combined area of over 40,000 m², ship nearly 6,000 packages daily to customers in more than 150 countries.
TME also invests in the development of knowledge and skills of young engineers and electronics enthusiasts through the TME Education project, and supports the tech community by organizing the TechMasterEvent series, promoting innovation and experience exchange.