This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Calculate ADC value for 3.3V as max input

Hi,

I want to measure ADC for 3.3V

Using formula

RESULT = [V(P) – V(N) ] * GAIN/REFERENCE * 2(RESOLUTION - m)

Rearranging eqn:

Vin = (RESULT*REFERENCE)/(2(RESOLUTION - m)*GAIN)

Considering
Result = Resolution (Received max value on ADC)
REFERENCE = 0.6
Gain = 1/6 or 1/5

Vin = 3.6 or 3

What I get is the result for input as either 3.6V or 3V. How do I measure adc for 3.3V?

Regards

  • I would suggestion using a voltage divider on the signal coming into your ADC pin. 3.3V is really close to max input voltage for the adc pin. 3.6V would actually be 3.3V meaning the input is at or over the max adc input voltage. Dividing the voltage down gives you head room on the max input as well as you will not saturate the input reading. Now you can get 3.3V or even higher depending on the divider.

  • Hello, 

    Vin = (RESULT*REFERENCE)/(2(RESOLUTION - m)*GAIN)

    Can you give me an example of the numbers you are using, in this formula?

     According to the Product Specification, the resolution is "output resolution in bits, as configured in register RESOLUTION". See this case for more information about measuring SAADC. 

    RESULT = (V(P) – V(N)) * (GAIN/REFERENCE) * 2(RESOLUTION - m)

    where

    V(P)
    is the voltage at input P
    V(N)
    is the voltage at input N
    GAIN
    is the selected gain
    REFERENCE
    is the selected reference voltage
    RESOLUTION
    is output resolution in bits, as configured in register RESOLUTION
    m
    is 0 for single-ended channels
    is 1 for differential channels

    Results are sign extended to 16 bits and stored as little-endian byte order in RAM.

     

    What I get is the result for input as either 3.6V or 3V. How do I measure adc for 3.3V?


    Input range = (0.6 V)/(1/6) = 3.6 V
    or 
    Input range = (0.6 V)/(1/5) = 3.0 V

     The voltage range tells you what the largest number you can measure i.e. if you want to measure 3.3, then you need to have an input range of 3.6V.

    Kind regards,
    Oeyvind

  • Hey,

    Thank you for your nice explanation.

     The voltage range tells you what the largest number you can measure i.e. if you want to measure 3.3, then you need to have an input range of 3.6V.

    What I understand is we can't get 4095(for 12bit ADC) as max value for 3.3V input and the value received will lie somewhere around 90% so I have make calculations accordingly.

    Please do let me know in case I am wrong.

    Regards

Related