[Tinyos-2.0wg] Concerns about ADC in 0.1mV

Gilman Tolle gilman.tolle at gmail.com
Wed Jul 26 12:43:45 PDT 2006


Upon first read, the proposal to return ADC HIL values in 0.1mV
sounded great. After thinking it through a bit more, I have a few
concerns.

We're going to lose information during the conversion and rounding to
the nearest 0.1mV, simply because we don't have enough decimal places
to maintain the actual voltage. The uV proposal would certainly help
with this problem, at the cost of engaging 32-bit math and doubling
the size of the samples. Even with uV, we'll still hide information
about the precision of the ADC.

This proposal assumes people are going to want to translate from
voltage into engineering units on the mote. So far we haven't seen
much of a demand for this, likely resulting from the heavy math needed
to do these conversions. The closest need we've seen so far is
converting the output of the battery voltage sensor from ADC units to
voltage, to be used in a check before performing flash memory
operations. For that purpose, TinyOS 1.x only performed the conversion
when reading from a battery-voltage HIL called VoltageC, not for every
ADC operation.

For high rate sampling, performing the conversion for every sample
when using ReadStream will impose some non-trivial CPU performance
penalty. This feels analogous to the earlier discussion about
left-shifting the read results. For something like audio data, the
processing algorithms may not even need true voltage, if fractions of
full-scale is enough and full-scale is known.

At least no information is lost with left-shifted ADC readings, and
the differences in ADC precision are still abstracted away. Although,
we still pay the cost of the left-shift, and actual precision must be
exposed through another interface to support the processing steps that
care.

We should check with some sensing domain experts to see whether the
rounding error, information hiding, and conversion costs would be
acceptable.

Gil


More information about the Tinyos-2.0wg mailing list