• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Differential Amplifier

Status
Not open for further replies.

ljcox

Well-Known Member
The other reason for making the Thevenin resistance equal on the + & - inputs is to minimise the common mode gain.

Oh, I meant to add that you should use 1% resistors.
 

Chris_P

New Member
ljcox said:
R4 is necessary in order to make it a diff amp with minimal thermal drift.

R6 could be eliminated by choosing R1, R2 & R3 such that their Thevenin resistance is = 10k.

This leads to my next point. The circuit posted by Sig239 overlooked the need to make the Thevenin resistances on the + and - inputs equal. And I missed it also.

So I've drawn the attachment to do this and to use a 100k feedback resistor rather than 50k as I suggested.

The reason the Thevenin resistances on the + and - inputs must be equal is to minimise the thermal drift that would otherwise occur due to changes in the input bias currents when the IC temperature changes. However, this is less of an issue if the op amp has FET inputs.
I got a bit sidetracked and I have only just now managed to build and test the circuit Len kindly designed for me. A couple of things are confusing me. Originally I planned on using a voltage divider to give me the reference voltage of 2.532V for the inverting input. My voltage divider had 5V - 9.75K - 10K - Gnd which should give 2.532V. But on Len's design the voltage divider is 5V - 10K - 9.75K - GND with an extra variable 200 in series with the 9.75K, but this only gives me 2.468V - 2.494V. Is there a particular reason for this?

While testing the circuit I am finding that the temp readings are 7 - 8 degrees C too high. Even swapping the resistors in the voltage divider around doesn't change this much. I am trying to get my brain around the circuit and how it works but I am struggling. Would varying the reference voltage to the inverting input be a way of calibrating the circuit? Are the resistances used for the voltage divider (10K and 9.75K) important to making the Thevenin resistances on the + and - inputs equal? Can I replace that part of the circuit with a multiturn trimpot and if so, what value would I need? I have a 10K one, would I need a 20K one instead?

Any advice will be a huge help.
 

eng1

New Member
Chris_P said:
I got a bit sidetracked and I have only just now managed to build and test the circuit Len kindly designed for me. A couple of things are confusing me. Originally I planned on using a voltage divider to give me the reference voltage of 2.532V for the inverting input. My voltage divider had 5V - 9.75K - 10K - Gnd which should give 2.532V. But on Len's design the voltage divider is 5V - 10K - 9.75K - GND with an extra variable 200 in series with the 9.75K, but this only gives me 2.468V - 2.494V. Is there a particular reason for this?
The supply voltage might not be 5 V exactly. You can add another resistor between the trimmer and ground.

Chris_P said:
While testing the circuit I am finding that the temp readings are 7 - 8 degrees C too high. Even swapping the resistors in the voltage divider around doesn't change this much. I am trying to get my brain around the circuit and how it works but I am struggling. Would varying the reference voltage to the inverting input be a way of calibrating the circuit? Are the resistances used for the voltage divider (10K and 9.75K) important to making the Thevenin resistances on the + and - inputs equal? Can I replace that part of the circuit with a multiturn trimpot and if so, what value would I need? I have a 10K one, would I need a 20K one instead?
You can use the multiturn trimmer to calibrate the LM335 instead. That's what I usually do.
 

Attachments

Chris_P

New Member
eng1 said:
The supply voltage might not be 5 V exactly. You can add another resistor between the trimmer and ground.
Yes, you are right, it is approx 4.98V.
eng1 said:
You can use the multiturn trimmer to calibrate the LM335 instead. That's what I usually do.
I was hoping to get away with just 2 wires to the sensor. The sensor is going to be external and I was thinking of using an RCA socket and mount the LM335 on one end of an audio cable. I'll have to do some experimenting, thanks.
 

Chris_P

New Member
I think I have it sorted. I put in a bigger trimmer and adjusted the voltage divider to create a more accurate 2.532V reference and now it is pretty close to correct. Once I make a waterproof sensor I can play with some liquids at different temps and compare it to an accurate thermometer and see how close it gets.
 

Leftyretro

New Member
It's common in instrumentation measurement applications to design in more gain then your calculated amount, say X10 instead of X5. Then have the amplifier output go to a 20 turn trim pot and adjust and take the desired output from the wiper. That way you have two calibration adjustments, a 'zero' adjustment pot that drives the inverted input and a 'span' adjustment to set the range. That way your circuitry will not be so dependent on having 'perfect value' feedback resistors. Anyway that's the way the process control industry does it frequently....

Good luck
 

Chris_P

New Member
Leftyretro said:
It's common in instrumentation measurement applications to design in more gain then your calculated amount, say X10 instead of X5. Then have the amplifier output go to a 20 turn trim pot and adjust and take the desired output from the wiper. That way you have two calibration adjustments, a 'zero' adjustment pot that drives the inverted input and a 'span' adjustment to set the range. That way your circuitry will not be so dependent on having 'perfect value' feedback resistors. Anyway that's the way the process control industry does it frequently....

Good luck
Me again, its taken me a while to make a waterproof LM335 sensor and get another digital thermometer to make some comparisons. Readings are pretty close but I think I would like to try these recommendations above. I have modified the drawing Len did for me and attached it to show what I have and what I think Leftyretro is suggesting.

What I am not sure on, (more stupid questions) what resistors do I need to change to change the gain from 5X to 10X? And what would be a suggested value for the 20 turn trimpot on the output?

If this circuit is correct how would I calibrate it properly? ie how would I set the "zero adjustment" pot and the "range pot"?
 

Attachments

gootee

New Member
Chris_P said:
Me again, its taken me a while to make a waterproof LM335 sensor and get another digital thermometer to make some comparisons. Readings are pretty close but I think I would like to try these recommendations above. I have modified the drawing Len did for me and attached it to show what I have and what I think Leftyretro is suggesting.

What I am not sure on, (more stupid questions) what resistors do I need to change to change the gain from 5X to 10X? And what would be a suggested value for the 20 turn trimpot on the output?

If this circuit is correct how would I calibrate it properly? ie how would I set the "zero adjustment" pot and the "range pot"?
To double the gain, you could double the values of the two 100k resistors.

If you connect one end of your output pot to the opamp output and the other end to ground and take your output from the center "wiper" of the pot, any relatively-high value pot should work. With the wiper centered, you would get half the opamp's output voltage swing. Higher resistances generate more noise. So you probably won't want to go overboard; probably something between 10k and 50k would be OK for the pot. Also, your opamp's datasheet might have information about what resistance is best, on its output.

For calibration, someone else will probably have the answer. But conceptually, if you had a signal generator that could produce a waveform with your 1V p-p amplitude, and also provide a DC offset so that the signal generator's output was covering the same range that your temperature sensor would cover, then you could just connect the signal generator in place of your sensor, connect your circuit's output to an oscilloscope, and adjust the pots until the output was covering 0 to 5 Volts. Actually, such a signal generator could be easily and cheaply built, with another opamp or two (and in many other ways).

By the way, there is some very good basic information about the common opamp topologies in http://www.electro-tech-online.com/custompdfs/2007/06/AN-20.pdf and http://www.electro-tech-online.com/custompdfs/2007/06/AN-31.pdf .

You might also want to go to http://www.analog.com and search for AN-273, if you think you might need to use a long cable run, and/or might need to combat the effects of RF noise.

In your circuit, I think I would at least consider placing a 0.1uF (or so) capacitor from the junction of the two 10K resistors to ground. You might also want a few pF in parallel with the 100K (or 200k) feedback resistor, and 0.1uF or so in parallel with the 100K (or 200k) that goes from the opamp's + input to ground. And, naturally, you probably already have 0.1uF and maybe also 10 uF from your opamp's power pin to ground.

If you need high precision and good noise rejection, you should probably consider using a pure differential amp, with 0.1% matched resistor ratios, and a separate opamp for the scaling. Or, maybe better, use an instrumentation amp and the separate scaling opamp. The better topologies are discussed in some of the IC manufacturers' application notes.

Also, it seems like you are at the mercy of the 5V supply level's accuracy and precision. If needed, you might want to consider finding a way to get a better voltage reference.

There are some very good application notes about temperature measurement to be found, by going to national.com, linear.com, and analog.com, et al, and searching for "thermometer", for example.

Good luck.

- Tom Gootee

http://www.fullnet.com/~tomg/index.html

-
 
Last edited:

Chris_P

New Member
gootee said:
For calibration, someone else will probably have the answer. But conceptually, if you had a signal generator that could produce a waveform with your 1V p-p amplitude, and also provide a DC offset so that the signal generator's output was covering the same range that your temperature sensor would cover, then you could just connect the signal generator in place of your sensor, connect your circuit's output to an oscilloscope, and adjust the pots until the output was covering 0 to 5 Volts. Actually, such a signal generator could be easily and cheaply built, with another opamp or two (and in many other ways).
Just wondering if anyone has an idea how I do what gootee has suggested. I need to generate a DC voltage from 2.532 to 3.532V to calibrate my thermometer.
 

gootee

New Member
Chris,

There are probably better ways to do what you want, but, something like this might work:

http://www.fullnet.com/~tomg/cal_osc.gif

That circuit should be able to take 5V IN and give you a squarewave out that has high and low values of 2.532V and 3.532V.

You should be able to use almost any dual opamp. I just used something that was available in the LTspice library.

R7 and R8 are 10K trimmer potentiometers with the center wiper shorted to one side or the other, so you can adjust the amplitude and the offset of the output. You might have to use multi-turn trimpots, for easier fine adjustment, or else use a fixed resistor in series with a smaller trimpot.

The first opamp and its surrounding components form a free-running multivibrator, producing a squarewave with a low-ish frequency (about 170 Hz). You can get a higher frequency by lowering the value of C1, and/or by lowering the value of R3.

The second opamp and its surrounding components just change the amplitude and the voltage offset of the squarewave.

Some tweaking may be required. I have not built this circuit, but did simulate it with LTspice.

Possible improvements might include using a real voltage reference circuit in place of R8 and R9, and changing R4 and R5 to minimize variations due to changes of opamp input bias currents versus temperature. Perhaps R5 could be replaced with something like a TL431 2.5V voltage reference IC (short TL431 pins 1 and 3 and connect them to bottom of R4, with pin 2 connected to Gnd, and change R4 to 1K). Something similar could be done for R8/R9, but you'd need to use a trimmer to adjust the TL431's voltage to around 2.8V. You could also add a capacitor in parallel with R9 (or the TL431 if used there), to low-pass filter the offset voltage.

Good luck.

- Tom Gootee

http://www.fullnet.com/~tomg/index.html
 
Last edited:

seveprim

New Member
Instead of trying to get the LM335 to do the task why not search for a better temp IC !!!!

Note you cant get 0.1 c accuracy from a device that is not that accuarate ie +-3 degrees if you want the accuaracy got to go a K type thermocouple probe and something like AD595 then you can get what ya want ( i have code and schematics but I was measuring 600 c and higher !
 

Leftyretro

New Member
seveprim said:
Instead of trying to get the LM335 to do the task why not search for a better temp IC !!!!

Note you cant get 0.1 c accuracy from a device that is not that accuarate ie +-3 degrees if you want the accuaracy got to go a K type thermocouple probe and something like AD595 then you can get what ya want ( i have code and schematics but I was measuring 600 c and higher !
Well actually thermocouples are not all that accurate either. Purity of metals used and quality of construction make only the higher cost lab quality TCs capable of decent accuracy but no where near +/- .01C. TCs strengths are in their wide temp range, ruggedness and lower costs.

RTD sensors are considered much more accurate then TCs but even then +/- 0.1C is probably not obtainable except for selected high cost lab types. In many practical applications good repeatability in a sensor is all that is required and doesn't carry the costs of extreme accuracy specifications.

Lefty


Lefty
 

seveprim

New Member
Leftyretro said:
Well actually thermocouples are not all that accurate either. Purity of metals used and quality of construction make only the higher cost lab quality TCs capable of decent accuracy but no where near +/- .01C. TCs strengths are in their wide temp range, ruggedness and lower costs.

RTD sensors are considered much more accurate then TCs but even then +/- 0.1C is probably not obtainable except for selected high cost lab types. In many practical applications good repeatability in a sensor is all that is required and doesn't carry the costs of extreme accuracy specifications.

Lefty


Lefty
I am afraid you are wrong on the thermocouple they produce a known voltage per degree the typical value for a K type is 40.44 micro volts/°C if they use impure metals that voltage would not match the specification for a K type as such metal purity is very consistant I have used these devices along with AD595 and can very easily get 0.1 c reading and yes I have had it checked with calibrated meters.

The AD595 converts the 40.44micro volts per degree to a 10millivolt/°C depending on the analog to digital type you will be able to read fractional values of a degree. The errors come into play are caused by chips(AD595 and the ADC) itself not the K type probe( two well specified metal types welded together under controled enviorments) but I conceede there could be manufacturers who make bad ones!

Any chip errors can usually be sorted with a lookup table to correct it.
 

mcs51mc

Member
All thermocouples have a certain error that needs to be compensated in the temperature controller.
There's no way to remove that error from the thermocouple.
Thermocouples are not calibrated against "calibrated meters" like you wrote but needs calibration in a furnace with a reference thermocouple.
That last one has to be calibrated in thermal labs with so called ice bath or fluidized beds.

If you need accurate temperature reading use RTD not thermocouple.
 

Chris_P

New Member
I tried the LM335 because it was easy for me to get, it is cheap, it outputs 10mV/K and it has a linear output making it easy for me to work with.

I have it all working well now, as close as I can anyway. I really just want it to display temperatures in a resolution of 0.1C but the accuracy is still going to be +- 1 or 2 C and that is OK for my application. Once I calibrate it using voltages, then compare it's reading with a couple of other digital thermometers, mine is very close over a wide range so I am happy.
 

ntege

New Member
temperature measurement circuit

hi guys i have a thermocouple that i want to use to measure temperature i have a 741 op amp which i want to use amplify the voltage so that it can vary between o-5v. i got the thermocouple from a digital meter that measures temperature.i need a schematic that can help me achieve this. from here i will use a pic16f88 to convert the varying voltage to temperature readings on seven segment display.how can i use this opamp to amplify the small voltage generated by the thermocouple to get a voltage range of 0-5v
 

Leftyretro

New Member
seveprim said:
I am afraid you are wrong on the thermocouple they produce a known voltage per degree the typical value for a K type is 40.44 micro volts/°C if they use impure metals that voltage would not match the specification for a K type as such metal purity is very consistant I have used these devices along with AD595 and can very easily get 0.1 c reading and yes I have had it checked with calibrated meters.

The AD595 converts the 40.44micro volts per degree to a 10millivolt/°C depending on the analog to digital type you will be able to read fractional values of a degree. The errors come into play are caused by chips(AD595 and the ADC) itself not the K type probe( two well specified metal types welded together under controled enviorments) but I conceede there could be manufacturers who make bad ones!

Any chip errors can usually be sorted with a lookup table to correct it.
Well your response to my posting borders on being a little rude as well as pretty uninformed. You most likely don't have much real world experience with TCs. I've worked with them for 30 years. Attached is excerpt from Omega Engineering, a leading supplier of TC sensors, cable and supporting equipment. Their site has tons of free publication information that can maybe help better educate you on the subject.

http://www.omega.com/

Lefty
 

Attachments

Last edited:
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top