LM34 to A/D

OK, I've got a basic problem. I've got an LM34D (32 - 212 deg F) temp sensor 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

Reply to
CptDondo
Loading thread data ...

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.

John

Reply to
John Larkin

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...

Reply to
CptDondo

Pure luxury, at least in my field. We have to make do with diodes and thermistors. If we were extra good, we get to enjoy a reference chip alongside. As long as it doesn't cost more than 10c, that is.

--
Regards, Joerg

http://www.analogconsultants.com
Reply to
Joerg

OK, do this:

formatting link

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

Reply to
John Larkin

Hell, I buy gain-of-four amplifiers for $190 a pop, and single flip-flops for $32.

John

Reply to
John Larkin

$190? That's 30 six-packs of Porter. Toirrty of 'em!

(when they are on sale)

Sometimes it's amazing how little is inside "lab grade" amps. A few BJTs, some 0603 resistors, a milled case. Then it's all marked up by a few thousand percent. Just like us their mfgs only cook with water, they just use bigger pots.

--
Regards, Joerg

http://www.analogconsultants.com
Reply to
Joerg

Or by 30 if it contains tubes, says "Super High Fidelity" on there and comes with a guitar input.

--
Regards, Joerg

http://www.analogconsultants.com
Reply to
Joerg

Don't forget to multiply by 10:1 or 20:1 for the rad-hard versions..

Best regards, Spehro Pefhany

--
"it\'s the network..."                          "The Journey is the reward"
speff@interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Reply to
Spehro Pefhany

I wonder what's the most expensive IC you can buy. I've heard that some high-end FPGA's, not even rad-hard, run close to $10K.

John

Reply to
John Larkin

So, does that op-amp have a charge pump built in? ;-)

Reply to
Anthony Fremont

It's going to be a trick getting 10V out of that circuit, and you have no offset, wasting 40% of the range.

Reply to
Fred Bloggs

Oh, yeah, run the opamp from whatever higher supply you have, if you need to swing higher.

John

Reply to
John Larkin

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

Reply to
John Larkin

The $190 amp is a tiny IC, not a box.

formatting link

We use four of them in one of our products.

John

Reply to
John Larkin

Well, there you go then. LM34 is only good to 1 degree, does 10mV per degree, your A/D is 10/2^12 = 2.4mV.... plug it in and rock your shiftyware..

Seriously, accuracy and resolution and other stuff are relative things. If you only want the answer within +/-1.24 degrees (barp) or less then don't be bovverred.

If you want more then you will be calibrating. Shiver.

DNA

Reply to
Genome

The most expensive FPGA Digikey lists is $4,177.00 (6 million gates and 684 I/O). OTOH, the Fairchild CCD595 is reputed to cost around

100K (81 megapixels).

I guess the most expensive IC is one that has a lot of masks and doesn't work properly.

Best regards, Spehro Pefhany

--
"it\'s the network..."                          "The Journey is the reward"
speff@interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Reply to
Spehro Pefhany

The gain makes the difference between induced noise on the board amounting to several degrees or a fraction of a degree. The input range of interest is 50-120 oF or 0.7V so a gain to full range of the ADC is approximately x14. This means the ADC will see 140mV/oF versus 10mV/oF, making reasonable amounts of onboard noise equivalent to a fraction of a degree versus several whole degrees.

Reply to
Fred Bloggs

John, just for everyone's benefit, what have you seen the LM34 do at higher voltages?

(BTW, all that care that must be taken regarding this device's sensitivity to capacitive loading and the fact that you need to included a negative supply or other roundabout methods for reading temperatures below zero has made me try the LM50 if I need an analog type sensor.)

Gary Peek, Industrologic, Inc.

Reply to
Gary Peek

But you could oversample and average. Temperature changes slowly, and code is cheap.

John

Reply to
John Larkin

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.