Using small signals

Discussion in 'Homework Help' started by The Skeptic, Jan 9, 2006.

1. The Skeptic Thread Starter Well-Known Member

Dec 27, 2005
61
0
I have built 12VDC circuit that uses a comparator to make decisions based on the intensity of a certain voltage, whose variation is due a resistance change. The problem is that this resistance varies very little (a maximum maximorum of 1%, but most of the time much less).

The problem is that my comparator has a 3mV offset, which means that changes smaller than that do not trigger my comparator. Once 3mV is 0,025% of 12V and a Wheatstone bridge gives ∆V/V ≈ (∆R/R)/4, then the minimum resistance variation I can measure is 4*0,025%=0,1%, which is only 1/20 of the total variation. In other words, I have a 5% error measurement. What can I do to improve that number (even by a factor of 2) apart from using an amplifier? Are there comparators with smaller offsets (at erasonable prices)? A tension multiplier could do the trick?

Note: all I know about multipliers is that they take V1 and V2 as inputs and give k*V1*v2 as output. Can I use k=10? Then, if one of the voltages is the supply itself, I could increase the bridge signal 120 times.

Or maybe, and more simply, I could use a comparator with an even lower voltage offset, such as 0.35mV. Would I have too many problems with noise then?

2. hgmjr Moderator

Jan 28, 2005
9,030
214
What is the nominal resistance of your resistive sensor?

hgmjr

3. beenthere Retired Moderator

Apr 20, 2004
15,815
283
Hi,

Can you post the schematic? It is very hard to tell what to do without having a better idea of the circuit.

4. mozikluv AAC Fanatic!

Jan 22, 2004
1,437
1
hi

one solution is using a microvolt comparator, but again the price has to be considered.

another way is to increase the input signal to a certain level so you can also consider hysteresis.

moz

5. The Skeptic Thread Starter Well-Known Member

Dec 27, 2005
61
0
I'm sorry for the delay, hgmjr. It's 350, but it could be 120.

6. The Skeptic Thread Starter Well-Known Member

Dec 27, 2005
61
0
What is a microvolt comparator? I already found comparators with lower offset voltages (around 0.2mV). Is this what you're talking about?

And how would hysteresis help me?

7. The Skeptic Thread Starter Well-Known Member

Dec 27, 2005
61
0
The main point here is that everybody seems to use "fully loaded" amplifiers, which cost many tens or hundreds of dollars. Why can't I simply use an op-amp, for a few cents?

8. peajay Well-Known Member

Dec 10, 2005
67
0
> The main point here is that everybody seems to use "fully loaded" amplifiers, which cost many tens or hundreds of dollars. Why can't I simply use an op-amp, for a few cents?

I don't know. You're the one who said "What can I do to improve that number (even by a factor of 2) apart from using an amplifier?"

Look at the EEG image on my webpage at http://pj.nfshost.com/post/000000000026.html . The image is 3.3uV per pixel, so I can't imagine why you wouldn't be able to do better than 3mV. All I used was a TL084CN, which costs \$0.43 USD. It has an input offset of 3mV, but as you can see, that doesn't mean that it can't detect voltage differences smaller than 3mV.

It's like a calculator, that when you subtract two numbers, the answer it gives you is always 0.003 larger than the correct answer. This doesn't mean that you can't use the calculator to figure out what 0.000007 - 0.000003 is. The calculator will say 0.003004, and you just have to subtract the 0.003 offset to get the correct answer.

It's the same with op-amps, if you're amplifing by 50dB, and you've got a 0.003 volt offset, you subtract 0.003 from your input so that the output is correct. All you need is a variable resistor to create an offset voltage, and you adjust it until the circuit is working correctly.

The resperation sensor is quite similar I suppose, it's resistive, and doesn't change much just from a moment of warm air, so it's fed into a amplifier to amplify the signal 2000 times, which means that the waveform on my page is about 5mV in amplitude, and so the resolution is about 0.1mV per pixel. Again, that's with a TL084CN with a 3mV input offset.

Certainly a lot more details on what you're doing would help, in particular I have a few questions, or really, so many that I'm not even going to list them. Just explain what you're doing in good detail.

Anyway, here's a schematic.

[attachmentid=1145]

Since you can't imagine how hysteresis could help, I didn't bother with it, and since you gave no details for trigger points, I just made the amplifier have infinite gain. As such I imagine the circuit won't work at all, since an amplifier with infinite gain is rather useless, but eh...what else could I do with so little information?

There's two potentiometers in there, one's for coarse adjustments, the other for fine adjustments, just get your sensor into whatever condition you wish to detect and adjust those things until you've got a nice 60 Hz square wave and you're all set.

Of course, I didn't test the circuit...but it looks good to me, in fact I think I deserve some kind of award for that resistor divider there at the end. Or maybe not an award, but I think it's clever.

9. The Skeptic Thread Starter Well-Known Member

Dec 27, 2005
61
0

Yes, you're right. But when I wrote that all the amplifiers I knew were the complex, expensive ones.

Okay, apparently that op-amp would do! Now, I've been told an instrumentation amplifier would be the thing. And I've also been told that

- "A simple op-amp circuit MAY work but typically a strain-gauge amplifier needs a circuit for a (very stable) excitation voltage, and a true differential input. You probably want to add some analog filtering to avoid overdrive and aliasing of the ADC."
- "Yes, you can sometimes use a simple op-amp... However, more often you need 3 of them (instrument amp) and you need a PCB and housing"

There's a complete amplifier designed specifically for strain gages here. And I also found some very interesting apnotes at national.com which mention the strain gage case and even present a model circuit.

You'll probably remember this. You're the one who thought of the solution I used in my circuit. The device takes the input from two strain gages (Sa and Sb) and then decides whether or not to turn on some lights based on their values. When both Sa and Sb are below a certain level, nothing happens. If both are above a certain level, green is on. If one is high and the other is kinda low, yellow comes on. If one is high and the other is real low, red comes on. In order to do that, the circuit first decides which signal is the low one and then procedes to compare the high and low with pre-established values. I've built what you see on the schematic and it works fine (I ommitted the 10k resistors connecting the comparators to +12V). Now I'm trying figure how exactly the strain gages are going to provide Sa and Sb, which is what this thread is about. Usually, the gages are connected across Wheatstone bridges and the output is then amplified.

Ok, I'll have to study that carefully

<!--QuoteBegin-peajay
@Jan 27 2006, 09:57 PM
Of course, I didn't test the circuit...but it looks good to me, in fact I think I deserve some kind of award for that resistor divider there at the end.  Or maybe not an award, but I think it's clever.
[post=13575]Quoted post[/post]​
[/quote]

Deal. And thanks again.

10. peajay Well-Known Member

Dec 10, 2005
67
0
> You'll probably remember this. You're the one who thought of the solution I used in my circuit.

Oh wow, I'm being helpful? That always surprises me. I'm still in disbelief that my suggestion to someone that they build an icebox rather than attempt to power a refridgerator on solar panels was actually helpful. It makes sense I suppose, but I'm not used to people liking what makes sense to me.

> There's a complete amplifier designed specifically for strain gages here.

Why does the schematic have mounting holes? I'm going to assume that's a sign that it's not even worth looking at.

> I've been told an instrumentation amplifier would be the thing.

I've never heard of such a thing...

> And I've also been told that - "A simple op-amp circuit MAY work but typically a strain-gauge amplifier needs a circuit for a (very stable) excitation voltage, and a true differential input.

I'm not sure what there can't be done with an op-amp. My ECG and EEG sensors are differential amplifiers.

> You probably want to add some analog filtering to avoid overdrive and aliasing of the ADC."

Overdrive? Like too much voltage on the input? That's what that fun resistor divider at the end of my circuit is for. It's not too difficult, though I did spend half an hour figuring out the correct values.

> "Yes, you can sometimes use a simple op-amp... However, more often you need 3 of them (instrument amp) and you need a PCB and housing"

Who's telling you this? I've never built anything that used a single op-amp, and the things come four to a package, I assume because most applications need more than one of them. And of course you need a PCB and housing, what electronic circuit doesn't? It sounds to me like someone's just trying to discourage you. You aren't talking to sales people, are you?

> Ok, I'll have to study that carefully

Well, not too carefully, as I said, it's quite useless with that infinite gain. Plus whomever mentioned the requirement of a differential amplifier was somewhat right; any slight change on the supply voltages will mess it all up. However, I'd rather just use a super-precise voltage reference myself.

Anyhoo, the next question is, what resistances are considered normal, high, kinda low, and really low? What I've found on the net about strain gauges says that standard values are 120, 350 and 1000 ohms. I'll assume you end up with a 350 ohm one, as that's what I'd choose, simply because it fits into my circuit well.

What I'm looking at on the net right now gives me the impression that full scale should be a change in resistance of 1%, or 3.5 ohms, so I would think that an amplifier that outputs 0v for 350 ohms, 12v for 353 ohms, and -12 for 347 ohms would be appropriate, as I think the sensor will always be somewhere in that range, and a change of 3v / ohm means that a change of 0.01 ohms results in a voltage change of 30 mV, which is easy enough to detect. As for high, kinda low and really low, as long as they're in that range, you can set them with potentiometers.

So then we need a really accurate voltage reference. A really precice -6v would be nice to have. Things like a 7906 probably won't be accurate enough, and zener diodes blow. I've got a nice little circuit that I usually use, however, I'm sleepy now, so I'm going to sleep. I'll reply again later, but if you see this in the meantime, tell me if the 347/350/353 values seem appropriate.

11. The Skeptic Thread Starter Well-Known Member

Dec 27, 2005
61
0
> Oh wow, I'm being helpful? That always surprises me. I'm still in disbelief that my suggestion to someone that they build an icebox rather than attempt to power a refridgerator on solar panels was actually helpful. It makes sense I suppose, but I'm not used to people liking what makes sense to me.

Yeah, been there. But it was very helpful.

> I've never heard of instrumentation amplifiers

I suppose this is what they had in mind.

> I'm not sure what there can't be done with an op-amp. My ECG and EEG sensors are differential amplifiers.

It's good to know that.

>> "Yes, you can sometimes use a simple op-amp... However, more often you need 3 of them (instrument amp) and you need a PCB and housing"

> Who's telling you this?

The folks at the NI discussion forum.

> I've never built anything that used a single op-amp, and the things come four to a package, I assume because most applications need more than one of them. And of course you need a PCB and housing, what electronic circuit doesn't? It sounds to me like someone's just trying to discourage you. You aren't talking to sales people, are you?

I hope not!

>> Ok, I'll have to study that carefully

>Well, not too carefully, as I said, it's quite useless with that infinite gain. Plus whomever mentioned the requirement of a differential amplifier was somewhat right; any slight change on the supply voltages will mess it all up. However, I'd rather just use a super-precise voltage reference myself.

I figured that once the signal is proportional to the supply, and the same happens to the voltage thresholds (defined by a tension divisor), then I could work on a "flucuating scale", meaning that all tensions in the circuit will go up or down together, while the important facts (which one is higher than the other) are preserved. Or not?

> Anyhoo, the next question is, what resistances are considered normal, high, kinda low, and really low?

That depends on numbers I still do not possess. But they are all going to be within a quite narrow range around the gage nominal value. Right now I'd guess that it's less than 0,1%, probably very less. But the total range of possible values is a bit wider, maybe a few times as much as that.

> What I've found on the net about strain gauges says that standard values are 120, 350 and 1000 ohms. I'll assume you end up with a 350 ohm one, as that's what I'd choose, simply because it fits into my circuit well.

> What I'm looking at on the net right now gives me the impression that full scale should be a change in resistance of 1%, or 3.5 ohms, so I would think that an amplifier that outputs 0v for 350 ohms, 12v for 353 ohms, and -12 for 347 ohms would be appropriate, as I think the sensor will always be somewhere in that range, and a change of 3v / ohm means that a change of 0.01 ohms results in a voltage change of 30 mV, which is easy enough to detect. As for high, kinda low and really low, as long as they're in that range, you can set them with potentiometers.

Can we still do that if the numbers are 10 or 100 times smaller?

Daniel
BTW, what kind of op-amp would be more suitable for my porpuses? National lists High Speed > 50MHz, Legacy High Speed (3) , Low Power (74), Micropower (18), Low Voltage (63), General Purpose (29), Rail to Rail Input (30), Low Noise (14), Precision (35) and High Output Power > 100mA. And why the helll wouldn't a single piece do the trick?

BTW2: I see that Wheatstone bridges are usually balanced through potentiometers. Doesn't that make it imperative that the bridge be recalibrated from time to time? Some of these circuits are packed inside load cells and sold by the thousands... do they stick the knob to the equilibrium point somehow?

12. peajay Well-Known Member

Dec 10, 2005
67
0
>> I've never heard of instrumentation amplifiers
> I suppose this is what they had in mind.

That looks rather interesting, I'll have to give it a try sometime.

> I figured that once the signal is proportional to the supply, and the same happens to the voltage thresholds (defined by a tension divisor), then I could work on a "flucuating scale", meaning that all tensions in the circuit will go up or down together, while the important facts (which one is higher than the other) are preserved. Or not?

Yes, that's what that bridge thing will do, since you're just comparing two voltage dividers, it doesn't matter what voltage the bridge is supplied with, the two divided voltages will go up and down equally. That won't happen in the circuit I made. As an extreme example, if the -12v line becomes -6v, then the output of that first op-amp changes from 3.5v to 1.75v, which will affect everything else.

> Can we still do that if the numbers are 10 or 100 times smaller?

Should be able to. I'll aim for 24v / ohm, -12 = 349.5 and +12 = 350.5... If it turns out you need it more sensitive than that, all you'll have to do is change some resistors.

> I see that Wheatstone bridges are usually balanced through potentiometers. Doesn't that make it imperative that the bridge be recalibrated from time to time?

Not unless something about your resistive components changes over time. You just have to calibrate it because your 350 ohm resistors won't be exactly 350 ohms. Also, in our case, our op-amps will have that slight voltage offset, and that has to be calibrated for as well. Once all of the calibration is done, it should be fairly stable.

Anyway, let's see what I can build...

Playing with my "let's use a super accurate reference voltage" idea proves that it's a really stupid idea, so let's do this the conventional way.

http://zone.ni.com/devzone/conceptd.nsf/we...625686600704DB1

It corrects for changes in resistance due to temperature changes in an elegant way, while at the same time providing for a linear change in voltage due to resistance. It's nice in every way, so I'm going to use that idea. (although it's a bit unclear...you don't put the guages perpendicular like with the previous figures, but rather arrange them so that when one is compressed the other is stretched, so for example if you were measuring the strain on an I beam, you'd put one guage near the top and one near the bottom, so that one is stretched when the other is compressed)

So, first we need to make that bridge thingie... So I'll say connect the top to +12v, the bottom to -12v, make the left side out of two 330k resistors, and in the middle of those two resistors put a 1k potentiometer for fine adjustments. On the other side you'd just have the two sensors, however since I have no sensors, I'm going to make the other side exactly the same, as a 1k potentiometer between two 330k resistors provides about the same amount of variation as 1 ohm between two 350 ohm resistors, and so I can just turn that second potentiometer to simulate changes in tension, or stress, or whatever it is we're measuring, as I've forgotten already... Oh yeah, strain, that was it.

I suppose now's as good a time as any to try that instrumentation amplifier.

On our bridge thingie, that one ohm of resistance change is going to create a voltage change of 2 * (12 - 24 * 349.5 / 700) = 0.0343 volts. We want that to become 24 volts (the difference between -12 and +12), so we need a gain of 12 / 0.0343 = 350. Wow, that's kinda weird, I didn't see that coming...

Wikipedia doesn't mention if it's better to have the gain in one part of the circuit or the other, so we'll split it between the two. The square root of 350 is 18.7. This means that R3 / R2 needs to be about 19, and that 1 + 2 * R1 / Rg needs to be about 19.

I like to use 10k resistors with op-amps, so I'll choose these values:

Rg: 1k
R1: 10k
R2: 10k
R3: 180k

Plugging them into that nice little formula makes (1 + 2 * 10k / 1k) * 180k / 10k, which solves to 378, which is close enough to 350 as far as I'm concerned. However, since it's not 350, this means that the output won't change by 24 volts / ohm, but instead by 24 * 378 / 350 volts / ohm, or 25.92 volts / ohm.

So, I'll go build that and see what it does.

Hmm, it makes an 80 kHz semi-square waveform, who's duty cycle is controlled by the adjustment potentiometer. Damn interference... And 80 kHz, where is that coming from? (BTW, I hope you have an oscilloscope, otherwise it's a bit difficult to tell the difference between what I'm seeing and a normal DC voltage.)

Well, moving the wires around a bit seems to have reduced it to a mere 1v peak-to-peak in the output, so long as I don't touch anything, which is certainly more useful. It's probably one of those things that needs to be soldered together inside a nice shielded box or something. It would also probably help if I used a 1 ohm potentiometer between two 330 ohm resistors, but the smallest potentiometer I have is 1k. Oh, wait a minute...

Ah, I love 1 ohm resistors... And just the other day I was talking to a friend on the phone who was trying to tell me they are useless.

Ok, swap all the 330k resistors out for 330 ohm resistors, and then for the strain sensor simulator, place a 1 ohm resistor between the two sides of the potentiometer, and for the calibration potentiometer, place a 10 ohm resistor between the two sides of the potentiometer. Then forget that oscilloscope, because you no longer need it. I'm still using 1k potentiometers, but with that 1 ohm resistor in there, anything from 100 ohms to 10k should work just the same.

Oh hey, I guess we need a schematic now:

[attachmentid=1147]

It doesn't work quite as I expected, but it works well. Like I said, I don't have two strain guages, so for the right half of the bridge, I just duplicated the left half using a 1 ohm resistor instead of a 10 ohm.

To calibrate it, short the right potentiometer so that it's effectively as if it wern't in the circuit (or if you're using real strain guages, don't do anything). Then use a multimeter to measure the amplifier output, and adjust the calibration potentiometer until the output is 0 volts. Then remove the shorting of the strain guage simulating potentiometer. Turning that potentiometer will vary the resistance between about 330 and 331 ohms, which is quite similar to what you'll get with a real strain guage. (well, not exactly, what it's doing is varing the voltage between the voltages you would get with 330 and 331 ohms, but it should work the same none the less) On the one I built, this results in amplifier output that changes linearly and quite smoothly between about +6.5 volts and -6.5 volts, not exactly what I had planned, but I don't have time to figure out why at the moment.

As for that multiplexer deal to switch the minimum and maximum voltages, that's just not the right way to do that. I think what you're saying is that you want four detectable ranges, really low, low, normal, and high. So you'll need three reference voltages, which will define the lines between really low and low, low and normal, and normal and high. To create these references, just make three resistor voltage dividers.

Then take six op-amps, three for each strain gauge. (of course, each strain gauge is now two strain gauges, what I mean is three for each amplifier output) Connect each amplifier output to the non-inverting input of all three of it's op-amps, and connect each inverting input to one of those three reference voltages. You'll now have six logic levels to use. I'd really recommend some hystresis on them, which you get by giving the amplifier some positive feedback. For example, connect the amplifier output to a 1k resistor, that to the non-inverting input and also to a 100k resistor and the other end of that resistor to the op-amp's output.

Then use something like that resistor dividing network at the end of my last schematic to change the voltages to something suitable for a logic circuit. Then just use logic gates to determine when to turn lights on. (or you could probably just use some RTL logic, which would really simplify things) I'd help with that, but it's still unclear exactly when you want each light to come on.

Make a 4 x 4 grid, on the top write "high", "normal", "low" and "very low", and do the same on the left, then write in each box which light, if any, should be turned on in that case. Post that, and then I'm sure I'll understand and be able to help.

Anyway, I'm out of spare time today, so I'll wait to see how far you get with that.

13. The Skeptic Thread Starter Well-Known Member

Dec 27, 2005
61
0
Gee, you even tested the circuit! Thanks!

>I'll aim for 24v / ohm, -12 = 349.5 and +12 = 350.5... If it turns out you need it more sensitive than that, all you'll have to do is change some resistors.

Okay. My source is 12V, I'll adjust for that too.

>> I see that Wheatstone bridges are usually balanced through potentiometers. Doesn't that make it imperative that the bridge be recalibrated from time to time?

>Not unless something about your resistive components changes over time. You just have to calibrate it because your 350 ohm resistors won't be exactly 350 ohms. Also, in our case, our op-amps will have that slight voltage offset, and that has to be calibrated for as well. Once all of the calibration is done, it should be fairly stable.

I was thinking of mechanical vibration. These things are often mounted on machines, trucks... They'd have to glue the calibration knob, I guess. Which could make further recalibration impossible.

http://zone.ni.com/devzone/conceptd.nsf/we...625686600704DB1

That page was a major source of information when I began researching the subject. Unfortunately, I can't use that one because I don't have a gauge in tension and another in compression. I was planning to use a quarter bridge because the manufacturer claims that the gage is temperature self-correcting (because its alpha is approximately the same as the material whose strain I'm trying to measure), but anyway that doesn't change substantially the whole thing.

> Wikipedia doesn't mention if it's better to have the gain in one part of the circuit or the other, so we'll split it between the two.

What parts?

> Hmm, it makes an 80 kHz semi-square waveform, who's duty cycle is controlled by the adjustment potentiometer. Damn interference... And 80 kHz, where is that coming from? (BTW, I hope you have an oscilloscope, otherwise it's a bit difficult to tell the difference between what I'm seeing and a normal DC voltage.)

Unfortunately, I don't have an oscilloscope. Would a low-pass filter make things too complicated? Anything above, say, 50Hz is of no interest to me. And I wouldn't need an oscilloscope.

> Ok, swap all the 330k resistors out for 330 ohm resistors, and then for the strain sensor simulator, place a 1 ohm resistor between the two sides of the potentiometer, and for the calibration potentiometer, place a 10 ohm resistor between the two sides of the potentiometer. Then forget that oscilloscope, because you no longer need it.

How can you be sure you won't be picking up another frequency?

> On the one I built, this results in amplifier output that changes linearly and quite smoothly between about +6.5 volts and -6.5 volts, not exactly what I had planned, but I don't have time to figure out why at the moment.

Isn't it because you have half bridge? Did you take that into account?

> As for that multiplexer deal to switch the minimum and maximum voltages, that's just not the right way to do that. I think what you're saying is that you want four detectable ranges, really low, low, normal, and high. So you'll need three reference voltages, which will define the lines between really low and low, low and normal, and normal and high. To create these references, just make three resistor voltage dividers.

You're right. You'll see exactly that in my schematic.

> Then take six op-amps, three for each strain gauge. (of course, each strain gauge is now two strain gauges, what I mean is three for each amplifier output) Connect each amplifier output to the non-inverting input of all three of it's op-amps, and connect each inverting input to one of those three reference voltages. You'll now have six logic levels to use. I'd really recommend some hystresis on them, which you get by giving the amplifier some positive feedback. For example, connect the amplifier output to a 1k resistor, that to the non-inverting input and also to a 100k resistor and the other end of that resistor to the op-amp's output.

Ok.

> Then use something like that resistor dividing network at the end of my last schematic to change the voltages to something suitable for a logic circuit. Then just use logic gates to determine when to turn lights on. (or you could probably just use some RTL logic, which would really simplify things) I'd help with that, but it's still unclear exactly when you want each light to come on.

Make a 4 x 4 grid, on the top write "high", "normal", "low" and "very low", and do the same on the left, then write in each box which light, if any, should be turned on in that case. Post that, and then I'm sure I'll understand and be able to help.

Don't bother. The logic part is already assembled according to the schematic I posted earlier and it's working.

> Anyway, I'm out of spare time today, so I'll wait to see how far you get with that.

I'll have to shop for parts! So, what kind of op-amp should I be looking for?

14. chesart1 Senior Member

Jan 23, 2006
269
1
Hi,

I think most comparators have two pins for external compensation of offset voltage.

You might try searching the manufacturers web site for application notes on the specific comparator you are using.

John

15. peajay Well-Known Member

Dec 10, 2005
67
0
> Gee, you even tested the circuit! Thanks!

I was just in a good mood. It's a somewhat interesting problem too.

>I'll aim for 24v / ohm, -12 = 349.5 and +12 = 350.5... If it turns out you need it more sensitive than that, all you'll have to do is change some resistors.

Okay. My source is 12V, I'll adjust for that too.

Do you have a middle voltage to use as ground? When the op-amp circuits have something that connects to ground, it connects to ground because ground is at a voltage between the two supply voltages. If you've only got a single supply voltage, you'll need to make another voltage.

The correct way would be to make a true -12v, but I'm too lazy for that most of the time. Or all of the time, actually. It's such a hassle.

When using a car battery, I just make a resistor divider, say two 1k resistors, connect the middle of them to the non-inverting input of an op-amp, and connect the output of the op-amp to it's inverting input via a 10k resistor. Then I use that op-amp's output as ground, the battery's negative as -6, and the positive as +6. So long as you don't try to drain/source too much current to/from it, it'll work fine, if you need more current then there are ways to do that too.

It's screwed up to have your ground be 6 volts above the real ground, but as long as you take that into account when interfacing with other things, it's not a problem, it's sometimes even a real advangate. On my website there's a schematic for a computer audio amplifier, which runs on a single 12v supply and does that 6v is ground thing. Because it does that, it's rather simple to use polarized capacitors on the speaker ouputs without ever applying reverse voltage to them, because the circuit's ground is 6v above the real ground, and so the capacitors voltage varies from 5 to 7 volts instead of -1 to 1.

> I was thinking of mechanical vibration. These things are often mounted on machines, trucks... They'd have to glue the calibration knob, I guess. Which could make further recalibration impossible.

Well, the nice thing about little things like those tiny PCB potentiometers is that vibrating them usually isn't enough to overcome the friction that holds them in their place. If nothing else, dab a bit of hot glue on them, it will hold them in place, and can be physically removed later if necessary.

> That page was a major source of information when I began researching the subject. Unfortunately, I can't use that one because I don't have a gauge in tension and another in compression.

You can't just glue another one on there? (I suppose they do sound rather difficult to attach)

> I was planning to use a quarter bridge because the manufacturer claims that the gage is temperature self-correcting

Yes, but the other nice things about the two guage thing is that it corrects for resistance changes in the wire going to the sensor, and it creates a linear change in voltage, whereas a 1/4 bridge will create a logarithmic change in voltage. Of course, with a < 1% change in resistance, I suppose there really isn't much of a difference, and you can always attach the resistor that's filling in the other 1/4 of the bridge with an equal length of the same type of wire, perhaps even put the resistor right there next to the sensor so that the wire is in all the same places as well. (You'd need three conductors then, for the top, middle, and bottom of the bridge.)

I wouldn't discount the wire's effects. It doesn't take much wire to have a resistance of 1 ohm. I don't know how much the resistance changes with temperature, but I'd just put the resistor next to the sensor to be safe. It'd be a real pain to have the circuit malfunction one day because of it, and it isn't much effort to run that third wire.

>> Wikipedia doesn't mention if it's better to have the gain in one part of the circuit or the other, so we'll split it between the two.
> What parts?

If you seperate the circuit, so that you only have the op-amp on the right and the two R1s and two R2s, then you have an ordinary op-amp differential amplifier, whose gain is R3/R2, and whose non-inverting input is on the bottom.

So the rest of the circuit must be an inverting differential amplifier with differential outputs, whose gain is (1+2*R1/Rg).

The first two op-amps, if you removed the Rg, would function to do nothing but increase the impendance of the input signals. They certainly wouldn't correct for any offset voltage, both outputs would be offset by the offset voltage in the same polarity, so there would be no net effect. Rg just makes the two work against eachother, each op-amp's output has to be more unlike the other's in order to create the correct voltage on it's inverting input, thus creating gain. This won't reduce the offset voltage either, however, the effect of the offset won't increase with the gain, so it is quite similar to having no offset. The third op-amp will still have an offset, but if you do the amplification with the first two op-amps, then the offset of the third isn't amplified either.

So I guess the correct thing to do would be to have the first amplifier have a gain of 350, and the second have a gain of 1.

However, it's a moot point, since the same calibration that corrects for resistor variances, sensor variances, and wire resistance also corrects for the amplifier offset, and so it really makes no difference as far as I can tell.

> Unfortunately, I don't have an oscilloscope. Would a low-pass filter make things too complicated?

It wouldn't help, the interference could just as easily be picked up after the filter, and may well be a different and much lower frequency too. The problem was the high impendance of the circuit, which made it easy for it to pick up interference. The higher the impendance, the more important shielding, good connections, and all of that joy is.

> How can you be sure you won't be picking up another frequency?

I can't really, but the lower the impendance, the more difficult it is for it to pick things up.

That 80 kHz was certainly coming from something nearby, and having a good effect on the circuit because of it's 165k impendance. (165k being two 330k resistors in parallel) Reducing the impendance to 165 ohms means that that energy only has 1/1000th of the effect, so if it was creating 1 mV in the wiring before, now it will only create 1uV. So there's no guarantee that there won't be interference, but it's certainly much less likely now.

If you're concerned, just put it in a nice metal case, and wrap all the wires going outside the box around some of those magnetic cores to help filter out the higher frequencies. That's about all you can do, as far as I know.

> Isn't it because you have half bridge? Did you take that into account?

Yeah, I think you might be right... I did the math for 1 ohm out of 350, but the way it's wired up it's really 1 ohm out of 700, or actually 660. So I guess it's doing exactly what it should be doing, slightly more than 1/2 of what I planned for. So I just messed up the math.

> Don't bother. The logic part is already assembled according to the schematic I posted earlier and it's working.

It just seems so wrong to use an analog multiplexer to switch a signal that doesn't need to be switched. It's almost begging for something to go wrong. I'd definately change it, I just see it as something that can go wrong which doesn't even need to be done like that.

> I'll have to shop for parts! So, what kind of op-amp should I be looking for?

I built mine using a TL084CN, which is my favorite op-amp because it's nice and cheap and it's a pretty good one too. They're \$0.43 a piece at Jameco. Make sure to order a lot of them, they're quite nice to have lying around, and cheap enough to have extras.

16. The Skeptic Thread Starter Well-Known Member

Dec 27, 2005
61
0
So I was unlucky enough to buy a model that doesn't have those pins . Okay, I'll have a look then.

17. The Skeptic Thread Starter Well-Known Member

Dec 27, 2005
61
0
> Do you have a middle voltage to use as ground? When the op-amp circuits have something that connects to ground, it connects to ground because ground is at a voltage between the two supply voltages. If you've only got a single supply voltage, you'll need to make another voltage. The correct way would be to make a true -12v, but I'm too lazy for that most of the time. Or all of the time, actually. It's such a hassle.

Damn... I never knew that was necessary. I guess I'll have to create the -12, because the available - is connected to ground. But where is your 6V in the schematic?

> Well, the nice thing about little things like those tiny PCB potentiometers is that vibrating them usually isn't enough to overcome the friction that holds them in their place. If nothing else, dab a bit of hot glue on them, it will hold them in place, and can be physically removed later if necessary.

Okay.

> You can't just glue another one on there? (I suppose they do sound rather difficult to attach)

Yes I can, but since I don't have bending, both gages will have the same ∆R. Yes, I know I can still build a bridge like that, but the only reasons to use more than one gage are: decreasing the need of amplification (nah) or compensate for temperature. I'll start using only one to see if temperature really interferes with the mesure, despite the fact that the gage is "self-compensating".

> I was planning to use a quarter bridge because the manufacturer claims that the gage is temperature self-correcting

> Yes, but the other nice things about the two guage thing is that it corrects for resistance changes in the wire going to the sensor,

Really? Seems weird. I'll have to read again those notes.

> I wouldn't discount the wire's effects. It doesn't take much wire to have a resistance of 1 ohm. I don't know how much the resistance changes with temperature, but I'd just put the resistor next to the sensor to be safe. It'd be a real pain to have the circuit malfunction one day because of it, and it isn't much effort to run that third wire.

Definitely.

> It wouldn't help, the interference could just as easily be picked up after the filter, and may well be a different and much lower frequency too. The problem was the high impendance of the circuit, which made it easy for it to pick up interference. The higher the impendance, the more important shielding, good connections, and all of that joy is.

Okay.

> It just seems so wrong to use an analog multiplexer to switch a signal that doesn't need to be switched. It's almost begging for something to go wrong. I'd definately change it, I just see it as something that can go wrong which doesn't even need to be done like that.

But I only did it that way because you suggested it! hehehe
Nevermind, I'd love to see a better design. Actually, some folks here in the forum already showed me another design, but I'm too stupid to understand how it works, and since mine is already up and running...

> I built mine using a TL084CN, which is my favorite op-amp because it's nice and cheap and it's a pretty good one too. They're \$0.43 a piece at Jameco. Make sure to order a lot of them, they're quite nice to have lying around, and cheap enough to have extras.

Of course.

Oh, and I attached the graph that shows when each lightbulb should be on. The outer edge is fictitious because I can't color the plane indefinitely; so, there are only three thresholds. The axes mean signals from gage A and gage B. When they are both low, everything is off. My circuit lights yellow also when red is on, but it is only to have the added warning of two lights.[attachmentid=1150]

18. peajay Well-Known Member

Dec 10, 2005
67
0
> So I was unlucky enough to buy a model that doesn't have those pins . Okay, I'll have a look then.

I wouldn't worry about them, a zero offset isn't important. The TL084CN doesn't have those pins either.

> Damn... I never knew that was necessary. I guess I'll have to create the -12, because the available - is connected to ground. But where is your 6V in the schematic?

There isn't one, but if you were to do what I suggest, then you would use the battery negative as the -12, the battery positive as the +12, and the 6v output of the op-amp circuit as ground. So then it's running on 0v, 6v, and 12v, which is just as good as -6v, 0v, and +6v.

Since the whole circuit runs on resistor dividers, the change in supply voltage shouldn't matter.

> Yes I can, but since I don't have bending, both gages will have the same ∆R.

Well, that would be a problem.

> I'll start using only one to see if temperature really interferes with the mesure, despite the fact that the gage is "self-compensating".

If there is a temperature problem, then it might work to just loosly attach one next to the other, in such a way that it doesn't measure anything, except for the temperature.

> Really? Seems weird. I'll have to read again those notes.

Yeah, I'd never heard of wire changing resistance due to temperature either.

> But I only did it that way because you suggested it!

I wouldn't have suggested it if I had known what you were doing. I assumed that the exact value of the analog signal was important, but in this case it isn't, it's only important wether or not it's above or below certain levels. So it'd be better to figure out if it's above those levels first, then multiplex it digitally.

> Oh, and I attached the graph that shows when each lightbulb should be on.

Ok, so no light unless one is high, and as long as one is high, then green if the other is high or normal, yellow if the other is low, and red if the other is really low.

I think this will do it. (when connected to the outputs of the three op-amps comparing each signal to the three reference voltages I was talking about)

[attachmentid=1151]

The 0v in the schematic is the battery's negative terminal.

I didn't test it, but I can't see how it wouldn't work. Since the LEDs are supplied their positive voltage from the high line (the one that is high when each voltage is above the highest threshold), none will light unless one sensor is high. The red LED gets power if one is below the lowest threshold, so red comes on when one is high and one is really low. The yellow LED gets power when one is below the middle threshold, so yellow comes on when one is high and the other is low or really low. Green gets power when one is above the middle threshold, so green comes on when one is high and one is normal or above.

I've never used so many diodes in a single circuit before.

19. The Skeptic Thread Starter Well-Known Member

Dec 27, 2005
61
0
> There isn't one, but if you were to do what I suggest, then you would use the battery negative as the -12, the battery positive as the +12, and the 6v output of the op-amp circuit as ground. So then it's running on 0v, 6v, and 12v, which is just as good as -6v, 0v, and +6v.

Since the whole circuit runs on resistor dividers, the change in supply voltage shouldn't matter.

Okay.

> If there is a temperature problem, then it might work to just loosly attach one next to the other, in such a way that it doesn't measure anything, except for the temperature.

That's what I thought.

> Yeah, I'd never heard of wire changing resistance due to temperature either.

Apparently, it happens with all kinds of resistive materials.

> I wouldn't have suggested it if I had known what you were doing. I assumed that the exact value of the analog signal was important, but in this case it isn't, it's only important wether or not it's above or below certain levels. So it'd be better to figure out if it's above those levels first, then multiplex it digitally.

Why is this design better?

> I think this will do it. (when connected to the outputs of the three op-amps comparing each signal to the three reference voltages I was talking about)

I will look reeeealy stupid, but where exactly are those outputs connected in the circuit? Wouldn't it be 6 comparators (3 voltages times 2 signals to be compared)? I could use 3 comparators, but first I'd have to figure which signal is higher. ..

I suppose I'd have to connect the output of each of those 6 comparators to each of those high, middle and low boxes, then I guess I understand what would happen. But why are the middle boxes connected differently from the low ones?

I'd like to use lights of higher power than a LED (something around a few watts). Could I use relay+diode instead of a LED?

> I didn't test it, but I can't see how it wouldn't work. Since the LEDs are supplied their positive voltage from the high line (the one that is high when each voltage is above the highest threshold), none will light unless one sensor is high. The red LED gets power if one is below the lowest threshold, so red comes on when one is high and one is really low. The yellow LED gets power when one is below the middle threshold, so yellow comes on when one is high and the other is low or really low. Green gets power when one is above the middle threshold, so green comes on when one is high and one is normal or above.

Exactly. And thanks again.

Daniel

20. peajay Well-Known Member

Dec 10, 2005
67
0
> Why is this design better?

Hmm... Because I like it.

> Wouldn't it be 6 comparators (3 voltages times 2 signals to be compared)?

Yes.

> I could use 3 comparators, but first I'd have to figure which signal is higher.

Yes, you could. I try to do what I think will work best instead of what will use the fewest parts.

> why are the middle boxes connected differently from the low ones?

Because there's four ranges: below low, below medium, above medium, and above high.

> I'd like to use lights of higher power than a LED (something around a few watts). Could I use relay+diode instead of a LED?

Depending on the relay, the op-amps may not be able to do it. The datasheet for the TL084 says that the relay will need to have a resistance of at least 1000 ohms. I'm not so sure of that, I wouldn't be surprised if they could go as low as 300, in particular they won't even light those LEDs very well if they can't. (maybe they can't, I didn't test it...) I've seen datasheets that claim that the output current a TTL chip isn't enough to drive one of it's inputs, so I don't take datasheets too seriously. I think they just muck up the numbers in them so that if they sell you a broken chip they can say "we never said it would work that well" or something like that. The datasheet also says that you can short the outputs to ground continuously, so it won't break the chips at least, but what's important I suppose is wether or not the lights come on.

You could probably swap the LEDs out for transistors (and change those 330 ohm resistors to 10k), then have those transistors switch some other transistors (otherwise the relay current still goes through the op-amps) and then have those transistors switch the relays, which would be the safe way to do it.