Page 1 of 1

Converting raw acquire results into a voltage

Posted: Mon Oct 13, 2014 6:04 pm
by codinghead
Hi All,

I'm using the 2 analog inputs in HV mode and capturing the results using the acquire application.

Am I correct in understanding that the voltage per bit of the ADC is calculated as follows:

HV mode - input is max +/- 20V == 40V

40V / 16384 = 2.44mV per bit

Therefore, an average voltage captured by acquire of 291 is:

291 x 2.44mV = 710mV

The problem I'm having is that the voltage I am measuring is actually 1.729V, not 710mV, so I must be making a calculation error or misunderstand the conversion the RP is making on my analog input.

Thanks in advance for any help, Stuart

Re: Converting raw acquire results into a voltage

Posted: Tue Oct 14, 2014 11:34 am
by Zumi
Hi,

You have correct calculation, so for HV setting

u = (ADC * 40 ) / 16384 [ V ]

and for LV setting

u = (ADC * 2 ) / 16384 [ V ]

I am not sure what you mean with “ acquire of 291 “


Regards, Zumy

Re: Converting raw acquire results into a voltage

Posted: Tue Oct 14, 2014 8:12 pm
by codinghead
Hi Zumy,

Thanks for your reply. Unfortunately, your calculations don't seem to work correctly.

For example, the acquire application gives me an output of "3650", which I know to be about 0.48V because my multimeter says it is 0.48V and the RP Scope application gives me an average output voltage of 0.48V. This is for a LV input on the AFE.

So, according to the calculation, for a raw ADC value of "3650":

(3650 x 2) / 16384 = 0.446V - which is not 0.48V

OK, perhaps I didn't factor in calibration - my ch1 calibration factor value is 78:

((3650 + 78) x 2) / 16384 = 0.455V - which is still not 0.48V

So why are my calculations consistently ~5% less than the real voltage being applied to the AFE?

Something simply doesn't make any sense.

Thanks, Stuart

Re: Converting raw acquire results into a voltage

Posted: Tue Oct 14, 2014 8:27 pm
by Nils Roos
Have you had a look at this thread from the old forum ? It contains some info on the conversion, as well as some pointers to code that does the conversion in the apps.