Noise in LM35 temperature circuit

Hi, I'm building a temperature control circuit, and am having some weird noise issues. The basic idea is that I have LM35s (eventually 24, currently 3 of them) reading the temperature of water baths. These are switched by a 4052 multiplexer, run through an instrumentation amp and then read by a computer DAQ system. The circuit has a simple low-pass filter, and I am reading each channel at about 0.4 Hz. The computer calculates the output needed to keep the temp at the desired level, and switches a relay to control a heater. (Lots of thanks to the people who helped me get this circuit working earlier in the week).

In theory, everything works. The LM35s are encased in 2 layers of adhesive-lined heat shrink and submerged in the water baths. When they are dry, they work fine. When they are submerged, they work fine. At some point, however, they eventually start picking up some noise. It could be from the relays, although I've noticed that dumping ice into the bath can sometimes trigger it. From that point, on, the output is a mess, even when I unplug the relays from the AC and stop switching them. The only thing I can do is pull the probes out, dry them out (nothing fancy, just dab them on my shirt), turn the circuit off and then on again and start over. When I do this, everything is fine.

My first thought was that the probes are getting wet, but they aren't drifting and they work fine when they are just sitting in water.

My other thoughts were that the relays were putting noise into the circuit somehow, but it persists even when they are no longer operating.

Does anyone have thoughts of things I might try to understand this?

The circuit diagram is here:

formatting link

Thanks! mike

Reply to
mooseo
Loading thread data ...

LM35's are very quirky:

  1. They oscillate if capacitively loaded. Cable capacitance can do it.

  1. They latch up if exposed to noise spikes, especially if Vcc is above 5 volts.

  2. They latch up if you pull their outputs below ground, as the datasheet suggests for measuring temps below 0C. Supply sequencing matters here.

Bob Pease promised me he'd fix them, but so far he hasn't.

But your circuit is, um, a tad unconventional. Why are you muxing the LM35 grounds? The grounds should be grounded!

John

Reply to
John Larkin

Don't switch the grounds, switch the hots instead. Or not. they only draw about 150uA each just leave them power on and switch the singals returning from the sensors.

That might be the source of your noise. Have you left them running overnight dry with no problems. If so, that eleminates electrical problems. next put them in the oven at the temperatures they are seeing in the bath. If that passes, put them in water over night and see if it happens.

by process of elimiation you'll be abot to setup a situation that can repordice the problem and you'll have a narrower range of things to look at.

good luck

Reply to
mook Johnson

Maybe not, considering the way the inamp is connected.

Where's Genome when you need him?

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

Well, the guy is a biologist, diver, and brewer, so we should take pity and help him out. One of us should post a cleaned-up circuit to abse.

John

Reply to
John Larkin

Hi All and thanks for all the replies:

As noted, I don't boast of electronics at the top of my skillset, so it's entirely possible that my circuit is a bad idea...

I am muxing the signal from each of the LM35s and leaving them V+ plugged in. Switching the grounds was suggested in response to a different post: (Multiplex Sensors: How to ground )

formatting link

from a few days ago, and it really cleaned up my signals. The grounds are tied to ground after the mux, just before the amp. In the first iteration, I was only switching the signals, and it was much noisier.

I had thought about the cable length, but didn't know how long was too long. Currently, there is about 1 m of cable... Does that seem like enough to cause capacitance problems? I'll start cutting them shorter and see what happens. At one point, I had about 3 m of cable, and it definitely caused problems. That might explain why there is variation between different probes.

I'll try a really long run tomorrow... up 'til now, it has only been about 2 hours.

Thanks for the thoughts.

mike

Reply to
mooseo

Sounds like the wires are getting wet.

Hows about you just hook an ohmmeter to the vout lead of an LM35 other lead to ground (or the water bath), submerge the sensor and watch what happens? Heat-shrink is a wonderful thing, but water is awfully good at sneaking into tiny gaps.

Reply to
Ancient_Hacker

Ah, Bill S. was suggesting you read the signal from the grounds, not

*switch* the grounds. With a massive 10mV/°C output and
Reply to
Spehro Pefhany

Indeed. When we needed to have immersible probes, we wound up filling the (in out case, metal) sleeve with silicone sealant. Now THAT keeps water at bay.

Reply to
budgie

I prefer a TIG-welded closed-end seamless 300-series stainless-steel tube. Now THAT keeps water (and other stuff) at bay, at least at halfway reasonable temperatures and pressures.

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

Hi All, Some good suggestions. I will definitely check the resistance tomorrow to see if the probes are damp.

In the meantime, however, I tested it by a kluge version of the stainless-steel thermowell. I stuck the LM35 inside a clear centrifuge tube and heat-shrunk around the wire at the top. In this way, the IC is hanging in air (which doesn't do wonders for the response time, obviously) so I can see if any water leaks in. If this solves the problem, I'll find some little tubes the right size and pot the chips in (I hear a vote for silicon... anyone else have a favorite thermally conductive potting compound?). But, as a first blush, it didn't work. I swapped it into the circuit and it was oscillating the same as the one it replaced.

Spehro, the circuit you showed was almost the same as my original design. However, when I switched to the differential circuit that I'm using now, I also learned a lot about how to hook up an instrumentation amp (for instance, using anti-bias resistors), so it's entirely possible that it might work fine now. I'll give it a go.

Thanks for giving me things to try.

cheers, mike

Reply to
mooseo

If each LM35 had its own local 47k resistor, then cable capacitance wouldn't push them to oscillate. But I'd go for something less, 2k maybe, to reduce errors if things get damp.

John

Reply to
John Larkin

Here is another possibility:

5V -o-------. | | |.1uF .----. | | | .-----. --- |LM35|---o----. .----| |--Amp + --- | | | \\ / | | | '----' | | MUX | | | | / \\ | | | o------)----' '----| |--Amp - | | | '-----' | [1k] [47k] | | | 0V--o-------o------'

With this, almost no current passes through the MUX, so the error from its 'on' resistance is smaller. Use twisted pair for the signal wires to prevent inductive pickup. Your noise before was probably due to a big ground loop which picked up ambient radiation. Grounding near the amp helps, because it makes the loops smaller. Using a twisted signal pair will help even more, and you can ground elsewhere... the pickup is now in the common mode.

-- Regards, Bob Monsen

"I cannot persuade myself that a beneficent and omnipotent God would have designedly created parasitic wasps with the express intention of their feeding within the living bodies of Caterpillars." -- Charles Darwin

Reply to
Bob Monsen

If you are getting condensation inside your cable, this might be raising the cable capacitance above the magic capacitative load. Water has a high dielectric constant - around 80 times that of air/vacuum - at the frequencies of interest here, and a bit if condensation might be enough to push your circuit over the edge. Elsewhee in this thread, John Larkin has suggested using 2k resistors close to the LM35's to isolate them from any cable capacitance, and this would work - it appears at Fig. 3 on page 7 of the LM35 data sheet

formatting link

Fig. 4 shows another way of tackling the problem.

John Larkin is correct here - as he almost always is on matters of electronics. The LM35 negative power pin should be connected to "ground". This ground won't be at exactly the same potential as the "ground" point at the A/D converter, which is why I suggested that you treat the local "ground" as a second signal, and route it back to the multiplexer on a separate wire, and used an instrumentation amplfier to present the amplified difference of the two voltages to the A/D converter.

I'm sorry that my original suggestion in the earlier thread didn't make this clear.

--
Bill Sloman, Nijmegen
Reply to
bill.sloman

Yes, that's good idea. 1K or 2K maybe in series with the output of each LM35 RIGHT AT THE LM35. A local bypass cap of at least 0.01uF (GND to +5V) directly at each LM35 chip wouldn't hurt either. The 47K can stay.

Like this:

Probe head .----------------------------------. | | +5 | +--------------------------|--------------------------o | | | | | | | | | | | .---------. | | | | | 2K0 | | | | | ___ | Out | +-----| LM35 |-|___|----|--------------------------o | | | | | | | | | | |0.1uF --- '---------' | | --- | | | | | | GND | +----------+---------------|--------------------------o | | '----------------------------------'

Sticking a short slice off a rod of Delrin or whatever into the open end of the adhesive-lined heatshrink will help it seal off. If he can turn it down to size on a lathe, all the better.

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 think you're going to need a negative supply for the inamp to work properly, so I thought it was easier just to leave it out, at least until you get things working. Either that or you could bias the LM35s grounds above inamp ground with a diode or something, but checking that the internal nodes of the inamp won't saturate was starting to sound like real work, and dinner was ready. ;-)

You're welcome.

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 LM34 is neat: 10 mV per degree F. More output and more offset.

John

Reply to
John Larkin

Don't forget, more resolution. ;-)

Reply to
Anthony Fremont

I haven't been a user of these semi-chip sensors, but as a big user (thousands of sensors) of YSI's 0.1C-accurate thermistors, I noted the rather poor absolute accuracy of these parts. But, knowing the painful story of temperature calibration in a production environment first hand, I can sympathize with these uncalibrated sensor ICs. My contribution to this scene would be to note that most of the error is offset error, which means a simple (but slightly time-consuming) step of single-point room-temperature comparison calibration can be used to back out most of the specified error, producing a high-quality IC sensor, at least within say 50C of room temperature.

--
 Thanks,
    - Win
Reply to
Winfield Hill

Hi All, An update on my circuit. Many thanks to everyone. Things are working unusually (for me) well.

I played around with shortening the cables, but that didn't seem to make much difference -- they are currently about 1 m long. Then I noticed that the individual channels seemed to be influencing each other (i.e., if I heated one, the one immediately following it in the poll would rise as well). I wondered if something was holding a charge and sending it to the DAQ between samples. I eventually removed the filter capacitor, and ran straight from the amp to the DAQ. This solved the cross-talk issue and also cleared up the underlying oscillation. The original 60Hz noise that inspired the filter seems to have disappeared, presumably because I am now using a differential amp and also remembered to ground the cable shielding. The system was regulating temperature on 3 channels all day with no noise problems.

I'd like to clarify a few of the suggestions that people have made, to make sure I am doing things correctly. It seems like the idea of switching both the signal and the ground through a 2-channel MUX is not generally supported. Instead, I will go back to using an 8:1 mux (probably a 4051?) and just switch the signal. The grounds from each LM35 will be connected together right at the -in to the differential amp and the A/D board will ground at the same place.

The 2K resistor at the sensor seems like a good idea, although I haven't tried it because I had other things to try first. It would be nice to extend my leads by a little bit.

On Spehro's suggestion of needing a negative supply, I forgot to mention that I need this to work in the fairly narrow range of about

8-25 C, so I don' think that will be an issue.

On using the LM34 instead, that seems interesting. I didn't try it at first because I liked the idea of having it give me celcius out of the box. Now, having used them, and in agreement with Win's suggestion, I'm going to have to calibrate them anyway. This means I have to code looking up the calibration number so it doesn't really matter which scale the sensor is outputting. I'll order some LM34s to try.

Again, many thanks to everyone. I've learned a bunch and seem close to getting this up and running.

cheers, mike

Reply to
mooseo

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.