Analog-to-digital Converter (ADC) Calculator

Analog to digital conversion (ADC)

Analog to digital (ADC) conversion formula

(ex: enter bits to get converted by calculator to total bits such as 8 bits or 10 bits, or enter the total amount of bits already converted, such as 256 bits or 1024 bits)

The Analog-to-Digital Converter (ADC) calculator calculates the digital conversion value of an analog input.

The digital value is in decimal form.

This calculator is very useful when dealing with microcontroller chips in general. This is because microcontroller chips can only handle digital data. Microcontrollers chip can only read and interpret digital values. Therefore, if you are using an analog device with a microcontroller, the only way the microcontroller will be able to interpret data from the analog device is to convert it to a digital value. After this digital value is obtained, the microcontroller can then interpret it, since it can only read 2 types of values, 1s and 0s. This is why all microcontrollers, to be able to handle analog devices and data, must have a analog-to-digital converter chip. Without this ADC chip, a microcontroller would not be able to work with analog devices. This chip can either be internally built into the microcontroller or an external ADC chip can be interfaced with the microcontroller to be able to read and interpret analog values. Being that analog devices are so plentiful, most microcontroller systems and boards have ADC chips or they can be connected to allow for analog usage.

Being that analog devices are so plentiful today, most chips can be used with ADCs. These analog devices include components such as microphones, speakers, temperature sensors, etc.

So this calculator is very useful being that you'll be able to know the digital value needed for an analog value.

This calculator calculates the digital value based the total supplied voltage to the circuit, the voltage drop across the component you are measuring or the voltage output by this component, and the number of bits of of the analog-to-digital converter.

The total supplied voltage is the complete voltage is supplied to the circuit. This is normally the voltage fed into the circuit from the power supply. If we have a circuit with 4 'AA' batteries in series, the total supplied voltage will be 6 volts, since each 'AA' battery is 1.5V. 1.5V * 4= 6V.

The voltage drop across a component is the amount of voltage that falls across a particular component or the amount of voltage that an analog device outputs. For example, a temperature sensor's voltage output may be in proportion to the temperature output. Therefore, we need to convert the analog voltage which is output to a digital value, which can be read by a microcontroller and interpreted. The voltage output must be lower than the total supplied voltage.

The number of analog-to-digital converter bits is the amount of bits that make up an ADC reading. For example, a particular ADC may hold 10 bits. That means that when it converts an analog value to a digital value, it stores it in 10 bits. Each bit can either be a 1 or a 0. Therefore, with 10 bits, there are a possible 210, or 1024 values, ranging from 0 to 1023. If another ADC is a 12-bit ADc, it can hold a possible 212, or 4096 values. Therefore the range of analog to digital values can be 0 to 4095. So the smaller the ADC, the smaller the range. The larger the ADC, the wider the range.

This calculator converts the number of bits entered into it up to a value of 31. 231 =2147483647, so the value can range from 0 to 2147483646. After this value of 31, the calculator assumes that all other numbers entered in are already converted to the total number of bits. So if any value from 1 to 31 is entered in, the calculator converts this to the total number of bits. If any value 32 or greater is entered in, the calculator assumes that this is the total number of bits already converted.

Based on these variables, the digital value can be obtained based on the formula, digital value= (voltage output/drop * Maximum ADC value)/total voltage.

This formula is important for working with analog devices. Analog devices output an voltage proportional to whatever they are designed to measure. For example, as stated before, temperature sensors output a voltage proportional to temperature. Therefore, knowing its digital equivalent is necessary for a microcontroller to be able to read it and make use of the data, to give out the temperature reading.

This, in turn, is very important when using analog devices with any microcontroller circuit.

Related Resources

PIC Analog-to-digital Conversion