Shop OBEX P1 Docs P2 Docs Learn Events
Accurate way of measuring a voltage?? — Parallax Forums

Accurate way of measuring a voltage??

laser-vectorlaser-vector Posts: 118
edited 2010-12-29 11:56 in Propeller 1
hi,

i was experimenting around with some analog to digital converters and some temperature to voltage sensors.

the problem i have is that the reading i get is not scaled correctly, for example
1 volt reads ~ 1.3v
2 volts reads ~ 2.5v
and so on..

so its not a linear relationship and is causing a little grief.

is there anything out there that anybody has already done that addresses these issues?? like example code for building and calibrating a propeller volt meter. or even a better A to D converter? im using the mcp3208 currently.

Thanks!

Comments

  • andrewsiandrewsi Posts: 59
    edited 2010-12-29 11:56
    I took a look at the linearity and accuracy specs in the datasheet of the 3208, and I don't see anything to make me think it shouldn't be able to handle your situation just fine.

    How are you determining that a 1 volt input from the Temp sensor is being read as "1.3" volts? What's the raw digital output of the ADC in both of those cases? The digital output from the ADC will be entirely dependent on what you give it as an analog reference voltage. In other words, if the temp sensor thinks that full scale voltage is, say, ground to 3.3 volts, and the ADC has some different idea of what full scale is, then they will not match the values you might expect. The values you describe are roughly linear, in other words 2.5 is fairly close to twice 1.3, which would make sense for readings from 1v and 2v respectively, but what I'm wondering is how are you determining the interpreted voltage from the ADC's raw output, which I believe is in a range from 0 to 4095?

    Another thing to look at is the circuit design and stability of the ADC ref voltage and the grounding - is there a decoupling cap close to the ref voltage input? This will help keep the reference voltage stable for the chip, otherwise outputs may wander if the ref voltage is fluctuating. See the "layout considerations" section in the datasheet.
Sign In or Register to comment.