Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8621

General discussion • Re: How to analyze if the output of adc is right or wrong

$
0
0
Connect a fixed, stable and known voltage to the ADC input and measure it. Change that voltage to another fixed, stable and knows voltage and measure again. Do this enough times that you know if it's accurate or not.

Now why would you expect 16 distinct values? It's a 16 bit ADC. Values should [theoretically] range from 0 to 65536 because 2 ^ 16 = 65536.

If your ADC max allowed input is 5v then:

If 0 volts = 0
2.5v = 32767
5v = 65535

The adc tgives you a number representing an analog number. You need to convert that number to the corresponding analog value.

Between minimum voltage and maximum voltage you're going to get 65536 values. Each bit = ADC's max input voltage / 65536.

Statistics: Posted by memjr — Thu Jul 25, 2024 3:11 pm



Viewing all articles
Browse latest Browse all 8621

Trending Articles