ADC Voltage Divider Calculator

Introduction

When a voltage is input to an Analog-to-Digital Converter, care must be taken that the max voltage spec of the ADC is not exceeded.

This page provides a voltage divider calculator. This configuration of resistors reduces the input voltage to a range that doesn’t exceed the ADC spec. For example it drops an input value as high as 5 Volt to 3.6 Volt

Calculator

This tool provides resistor values that reduce the max input voltage to the input voltage range of the ADC.

Enter:

  • Input voltage (Vin)
  • Desired output voltage Vout (this is the maximum allowed voltage into the ADC)
  • Either R1 or R2. Use the dropdown menu to select the units

	

		

Example Calculation for STM32 ADC

The STM32 has a 12-bit ADC with a conversion range* of 0 Volt to 3.6 Volt. This means that the max input voltage is 3.6 Volt.

If the input analog signal varies between 0V and 5V, using the calculator above, Vin is 5V, Vout is 3.6V. Choose R1 = 10 kohm. R2 is calculated to be 25.7 kohm.

*The conversion range of the ADC often referred to as the “input range” or “voltage range,” defines the range of input voltages that the ADC can effectively convert into digital values. It specifies the minimum and maximum voltages that can be applied to the ADC’s input without causing saturation or clipping of the digital output.

In the case of the STM32, any input voltage between 0 V and 3.6 V can be accurately digitized. If a voltage of 5V is applied, the ADC’s output will be clipped at its maximum value (e.g., the output will be all ones for a binary ADC), and information about the actual input voltage will be lost.

???? Convert the analog input to digital output when it’s within the operating range of the ADC.

Max Source Impedance

ADC datasheets will usually specify a maximum source impedance. The STM32 for instance, there is a requirement that the input impedance be lower than 50 kΩ (RAIN in the table below)

Higher values of input impedance will increase the sampling time and result in errors as the input signal won’t settle to a stable value fast enough. See this post to understand the impact of impedance on settling time.

In this case with R1 = 10 kΩ and R2 = 25.7 kΩ. The effective impedance is 7.2 kΩ (using this calculator) which is less than the max value of 50 kΩ

Related Posts and Calculators