Sounds like you've calibrated your ADC.
The usual formula is:
Vread = Vin/Vref * ADCrange
where:
Vread is the ADC reading,
Vin is the input signal,
Vref is the ADC reference voltage,
ADCrange is the full scale ADC value...
1024 for 10 bits and 4096 for 12 bits
So using an MSP device (telos) with a 1/2VCC
reference gets you pretty close to your calculation.
Actually, do you know if you are running with a 5v
power supply? That makes a little more sense with
your values than 3v which is the usual supply level.
MS
Areej Khaddaj wrote:
> Hello..
>
> I'm trying to read an external voltage connected to an ADC pin. What I'm
> reading from the Mote, is different from the input voltage. I have made
> loooots of measurements, plotted them, and concluded that my input
> voltage and the "read" value are related perfectly linearly by the
> following equation: [V(read) = 2.722*V(in) - 76](in mV). What is the
> problem, and how can I retrieve the actual voltage level?
>
> Thank you!
> regards
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help