Electronic – arduino – A/D conversion improvement through Arduino

adcarduinomicrocontrollerquantizationresolution

I have a certain analog signal v(t) which varies from 0 to 2V, which I want to be read by Arduino.

I know that Arduino can read it through the function AnalogRead, and the result will be a sequence of numbers from 0 to 1023. Now, I have some doubts:

  1. The input range 0 – 5V is mapped to 0 – 1023. Therefore, if I get the result X and I want to find the original input voltage V, I have to apply the formula: V = X * 5 V /1023. Correct?

  2. The output range is 0 – 1023: this means that Arduino uses 10 bit for the A/D conversion. If I am correct, this means that the Arduino resolution is equal to 5V/1024 = 4.88 mV. But my signal varies from 0 to 2V, so there is a waste of bits. I think the conversion might be better. For instance, if all 10 bits were used for the range 0 – 2V, we would get a resolution of 2V/1024 = 2mV. Any solution? Moreover, what does it happen if I decide to amplify my voltage with a gain = 2.5? Is there a benefit?

Best Answer

  1. As Tom Carpenter has already pointed out, you must divide by 2^N = 1024.

  2. You are correct with your second assumption. You always want to fit the ADC full scale voltage (the maximum voltage it can measure) with your maximum input amplitude. Typically there are two ways to do that:

    • You can use an input amplifier to amplify/attenuate your signal to exactly match the FS voltage.
    • You can set the reference voltage of the ADC to the desired value.

While the controller used on the Arduino Uno (Atmega) offers in general the option to connect an analog reference voltage differing from general Vcc, this does not work for you, because the analog reference input is hardwired on the Arduino to 5V. So you are stuck with a reference voltage of 5V, which means your FS (full scale voltage) will always be 5V on the Arduino.
What you CAN do, is to use an operational amplifier to increase your signal's amplitude by factor of 2.5 from 2V to 5V. That way, you get the full resolution of the 10 bit ADC.