Re: LM34 to A/D
- From: John Larkin <jjlarkin@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 30 Aug 2007 20:27:13 -0700
On Thu, 30 Aug 2007 20:33:25 -0400, Fred Bloggs <nospam@xxxxxxxxxx>
wrote:
John Larkin wrote:
On Thu, 30 Aug 2007 12:36:15 -0700, CptDondo <yan@xxxxxxxxxxxxxxxx>
wrote:
John Larkin wrote:
On Thu, 30 Aug 2007 11:45:25 -0700, CptDondo <yan@xxxxxxxxxxxxxxxx>
wrote:
OK, I've got a basic problem. I've got an LM34D (32 - 212 deg F) temp
sensor <http://www.national.com/ds/LM/LM34.pdf> and I need to connect it
to a 0-10V A/D.
To make things more interesting, I am only looking for a relatively
narrow range - say from 50 deg. F to 120 deg. F.
I've got 12 bits of A/D, which, in theory, gives me lots of resolution,
but the LN34 is only good to about a degree. It outputs 10 mV/degree.
The way I read the LM34 spec, the range I am interested in is about
500mV to 1.2V, so I figure I need to amplify that by, say, 8 to get good
use of my A/D accuracy.
I'm mostly a software guy, although once in a while I can solder
something without serious injury.
I've been told I need an op-amp to make the above work, but I have no
idea how to get an op-amp to work in the above scenario.
Could someone please clue me in? Thanks,
--Yan
Why not use an LM71, digital serial SPI temp sensor? By the time you
buy an LM34, and an opamp, and a couple of precision resistors, the
LM71 starts to look like a bargain, and a number of analog gotchas
disappear.
I have only 1 SPI bus, non-selectable. (I'm out of GPIO; I'm already
muxing and doing double duty....) I need at least 2 sensors,
preferrably 3. I have 5 A/D channels.... So it's more of a do with
what I have rather than do the best thing...
OK, do this:
http://s2.supload.com/free/LM34_amp.JPG/view/
Gain is 1 + (15K/2K) = 8.5, and the resistors need to be 1% or better
to keep up the accuracy.
Don't run the LM34 from more than +5... they misbehave if you do.
Any decent "single supply" or "rail/rail input" opamp should work.
The output RC keeps ADC mux spikes from freaking out the opamp, and
reduces adc noise as well.
It's prudent to oversample and average to reduce residual noise.
John
It's going to be a trick getting 10V out of that circuit, and you have
no offset, wasting 40% of the range.
Yup, the opamp needs a higher supply if the adc needs more swing. But
since the LM34 is only good to +-1 deg F, there's not a lot of
advantage to a gain above a few, and, actually, not any real advantage
of gain at all. The ADC lsb is 2 mV, and the 1 deg F error corresponds
to 5 LSBs.
Actually, unless you want to spring for 0.1% resistors, the gain stage
will probably make accuracy worse.
If the LM34 is connected directly to the ADC, inserting an R-C lowpass
is still a good idea. ADC mux's commonly kick out spikes, and the LM34
series has a weak pulldown and lots of quirks.
John
.
- Follow-Ups:
- Re: LM34 to A/D
- From: Fred Bloggs
- Re: LM34 to A/D
- References:
- LM34 to A/D
- From: CptDondo
- Re: LM34 to A/D
- From: John Larkin
- Re: LM34 to A/D
- From: CptDondo
- Re: LM34 to A/D
- From: John Larkin
- Re: LM34 to A/D
- From: Fred Bloggs
- LM34 to A/D
- Prev by Date: Re: LM34 to A/D
- Next by Date: Re: LM34 to A/D
- Previous by thread: Re: LM34 to A/D
- Next by thread: Re: LM34 to A/D
- Index(es):
Relevant Pages
|
Loading