rc time vs a/d converter
Archiver
Posts: 46,084
I just read with interest an article that was posted on ways to use the RC
time command to measure voltage (see below). I had only used it measure
resistance and I was very impressed, and now I wonder, what are the
situations where it would be better to use an a/d converter ic?
>This seems to come up a lot. Tracy Allan has already done the work for us,
>and generously posted how to get it done, along with a few other hints and
>tricks......
>
>See http://www.emesystems.com/BS2rct.htm#B_voltage
time command to measure voltage (see below). I had only used it measure
resistance and I was very impressed, and now I wonder, what are the
situations where it would be better to use an a/d converter ic?
>This seems to come up a lot. Tracy Allan has already done the work for us,
>and generously posted how to get it done, along with a few other hints and
>tricks......
>
>See http://www.emesystems.com/BS2rct.htm#B_voltage
Comments
RCtime is good for around 8 to 10 bits of resolution and 8 bits of
accuracy once you account for temperature drifts etc. ADCs are
easily available at 12 bits of accuracy and better.
RCtime is best for small ranges of voltages, such as the battery
monitoring question that brought this up. A battery might vary from
only 14 down to 10 volts in the course of its useful span. An ADC
can measure voltages evenly throughout its range.
RCtime in its simple form is not useful for voltages around one
volt (the threshold of the Stamp inputs), nor is it useful for very
small small voltages as from a pH electrode or thermocouple. There
are tricks with op-amps, but at that point you might be better off
with the ADC.
RCtime is not linear for measuring voltages. The result is
inversely proportional to voltage, so you have to use stamp math to
invert it, which involves an approximation to the exponential curve.
ADCs are very linear by design and give a result that is directly
proportional to voltage.
RCtime takes time, that is, it might take 50 milliseconds to make a
measurement. An ADC will usually be much quicker, a fraction of a
millisecond. That will be important in some applications.
RCtime is one pin per channel. If you need lots of channels, it is
better to get an ADC with a multiplexer.
All that said, there are still occasions where RCtime is appropriate.
It is cheap and quick where you do not want to add an ADC to a
project. The battery monitor is a good example of that. When I wrote
the Earth Measurements text, one of the constraints was _not_ to use
an ADC, so I had to explore the RCtime command for the analog
measurements. Note that RCtime is quite nice for sensors that
produce a current (e.g. photodiode).
-- regards,
Tracy Allen
electronically monitored ecosystems
mailto:tracy@e...
http://www.emesystems.com
>I just read with interest an article that was posted on ways to use the RC
>time command to measure voltage (see below). I had only used it measure
>resistance and I was very impressed, and now I wonder, what are the
>situations where it would be better to use an a/d converter ic?
>
>
>
> >This seems to come up a lot. Tracy Allan has already done the work for us,
> >and generously posted how to get it done, along with a few other hints and
> >tricks......
> >
> >See http://www.emesystems.com/BS2rct.htm#B_voltage