Author Topic: Difference Amplifier Circuit Won't Read 0  (Read 5792 times)

0 Members and 1 Guest are viewing this topic.

Offline TravisTopic starter

  • Contributor
  • Posts: 13
Difference Amplifier Circuit Won't Read 0
« on: January 23, 2014, 04:58:57 pm »
This is my first post and I'm learning as I go.  I'm still a n00b at all this.  I have been watching Dave's videos and trying to teach myself as I go along.

I have been messing with an op amp in differential mode.

I am using an OP177 ultra precision op amp. http://www.analog.com/static/imported-files/data_sheets/OP177.pdf

My issue is that for whatever reason I cannot get the circuit to output 0 volts like it does in the simulator.  I get a minimum reading of 0.689 volts.  Am I doing something stupid?? I have noticed that this isn't advertised as a rail to rail op-amp is that the reason for this?

I have tried the trim feature of the chip, however it only trims a tiny range.  No where near 0.

I'm trying to make a circuit that can read battery voltage 8-16 volts. If the battery is below 8 volts its garbage so I want to maximize the ADC by only measuring the voltage over 8 volts.  I'm trying to keep the cost of the project down by using the atmega ADC.

EDIT:  I should note that it the circuit does work.  It just isn't work as I expected.  I'm losing a significant portion of my ADC range with that 0.689 offset

EDIT2:  I also tried matching resistors thinking it could be an issue there.  Went through a bunch and found matching resistors.. No joy


« Last Edit: January 23, 2014, 06:36:00 pm by Travis »
 

Offline ConKbot

  • Super Contributor
  • ***
  • Posts: 1385
Re: Differential Op Amp Won't Read 0
« Reply #1 on: January 23, 2014, 05:37:22 pm »
The input voltage range per the datasheet is +/- 13v(min) +/- 14v (typical)  but that is with a +/- 15V supply, so it looks like you cant go within 1-2v of the supply rail on the input. How do you have your amp set up? Inputs shorted and floating? shorted to ground? what supply voltages are you giving it?

If the input is shorted but floating, then unequal leakage currents could be floating the input against one rail or the other, but it could be so high impedance, that you cant measure it with a DMM ;)
 

Offline fcb

  • Super Contributor
  • ***
  • Posts: 2117
  • Country: gb
  • Test instrument designer/G1YWC
    • Electron Plus
Re: Differential Op Amp Won't Read 0
« Reply #2 on: January 23, 2014, 05:38:35 pm »
What are your supply rails doing?
https://electron.plus Power Analysers, VI Signature Testers, Voltage References, Picoammeters, Curve Tracers.
 

Offline robrenz

  • Super Contributor
  • ***
  • Posts: 3035
  • Country: us
  • Real Machinist, Wannabe EE
Re: Differential Op Amp Won't Read 0
« Reply #3 on: January 23, 2014, 05:51:20 pm »
AFIK in a differential amplifier arrangement the matchin tolerance of those 100k resistors is very important. My guess is that is 99% of your problem.

Offline TravisTopic starter

  • Contributor
  • Posts: 13
Re: Differential Op Amp Won't Read 0
« Reply #4 on: January 23, 2014, 05:54:32 pm »
fcb:
Supply rails are supplied by a Rigol DP832.  I'm just bench testing the circuit


ConKbot: 
I'm powering the chip with +10 volts.   
The - on the Op-Amp is being fed 4.096 volts (through the resistors)
The + on the Op-Amp is being fed 0 Volts (through the resistors)

If I feed anything higher than 4.76 volts into the + pin then it works as expected.
Anything under 4.76 volts on the + pin outputs 0.689

It does work as expected however I'm missing the 4.096 - 4.76 range.

I've tried different voltages on the power supply however it doesn't seem to make a difference. 

The inputs are floating.
 

Offline TravisTopic starter

  • Contributor
  • Posts: 13
Re: Differential Op Amp Won't Read 0
« Reply #5 on: January 23, 2014, 06:00:41 pm »
AFIK in a differential amplifier arrangement the matchin tolerance of those 100k resistors is very important. My guess is that is 99% of your problem.

I tried matching resistors.  I picked them using my Extech EX330 multimeter.  They should be a fairly close match.

Honestly I noticed very little difference between matched and unmatched resistors.
 

Offline TravisTopic starter

  • Contributor
  • Posts: 13
Re: Differential Op Amp Won't Read 0
« Reply #6 on: January 23, 2014, 06:06:48 pm »
I guess its not a huge deal.  It just changes the range I can measure to ~9.5 Volts to ~16 volts.  I was just shooting for perfection.  It has to be because its not a rail to rail device :(

If someone has a solution though I'm VERY interested!
« Last Edit: January 23, 2014, 06:20:10 pm by Travis »
 

Offline tszaboo

  • Super Contributor
  • ***
  • Posts: 7388
  • Country: nl
  • Current job: ATEX product design
Re: Differential Op Amp Won't Read 0
« Reply #7 on: January 23, 2014, 06:29:32 pm »
If I feed anything higher than 4.76 volts into the + pin then it works as expected.
Anything under 4.76 volts on the + pin outputs 0.689
As they already said. The opamp is not rail to rail. You need a negative supply to make your circuit work.
Also, please correct the title. This is not a differential opamp, this is a difference amplifier circuit. The two are very different.
 

Offline TravisTopic starter

  • Contributor
  • Posts: 13
Re: Differential Op Amp Won't Read 0
« Reply #8 on: January 23, 2014, 06:35:13 pm »
If I feed anything higher than 4.76 volts into the + pin then it works as expected.
Anything under 4.76 volts on the + pin outputs 0.689
As they already said. The opamp is not rail to rail. You need a negative supply to make your circuit work.
Also, please correct the title. This is not a differential opamp, this is a difference amplifier circuit. The two are very different.

Thanks for the additional information.  I will try adding a negative supply.

Thanks for the correction :)  I am still learning.
 

Offline granz

  • Regular Contributor
  • *
  • Posts: 136
  • Country: us
  • 6.62606957
Re: Difference Amplifier Circuit Won't Read 0
« Reply #9 on: January 23, 2014, 06:48:22 pm »
I think you've already figured out that you can't get as close to the supply rail (0V) as you'd like without using a rail-to-rail opamp.  On a different note: by your schematic, I'd guess you are using the "EveryCircuit" Android app for simulation.  You might want to take some time and learn how to use a better simulator, such as LTspice (which is also free).  That Android app is really only good for basic concepts, it's not really an engineering simulator.  Once you learn something like LTspice you'll also be in a better place to learn to use professional (expensive) simulation tools down the line.

 

Offline TravisTopic starter

  • Contributor
  • Posts: 13
Re: Difference Amplifier Circuit Won't Read 0
« Reply #10 on: January 23, 2014, 06:58:22 pm »
On a different note: by your schematic, I'd guess you are using the "EveryCircuit" Android app for simulation.  You might want to take some time and learn how to use a better simulator, such as LTspice (which is also free).  That Android app is really only good for basic concepts, it's not really an engineering simulator.

You are correct that is EveryCircuit.  I have learned a lot from it however I smack up against its limits constantly.  As you say its good for basic concepts.

Thanks for the tip.  I will download LTspice and give that a shot.
 

Offline filip_cro

  • Regular Contributor
  • *
  • Posts: 71
  • Country: hr
Re: Difference Amplifier Circuit Won't Read 0
« Reply #11 on: January 23, 2014, 07:00:24 pm »
You can't put voltage divider before Dif Amp.  Use low impedance source like op-amp.
 

Offline TravisTopic starter

  • Contributor
  • Posts: 13
Re: Difference Amplifier Circuit Won't Read 0
« Reply #12 on: January 23, 2014, 07:44:31 pm »
You can't put voltage divider before Dif Amp.  Use low impedance source like op-amp.

Thanks for the tip.  I wondered if that would require an op-amp of its own.  Currently I don't have that voltage divider in the circuit because I was just trying to see if the chip itself would work.

I made a split power supply using 2 - 9 volt batteries.  It works perfectly with a split power supply (except that it gives negative voltages). 

Unfortunately that won't work in my final design so I've gotta get a rail to rail op-amp or just live with the range I have with this one.  9.5 volts is still WAY dead for a 12 volt lead acid battery.
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4694
  • Country: au
  • Question Everything... Except This Statement
Re: Difference Amplifier Circuit Won't Read 0
« Reply #13 on: January 23, 2014, 07:55:16 pm »
try adding a 3.3-10K load to ground on your output, you can overcome its rail to rail output issues a little by helping it get closer to the rail, (single supply)
 

Offline TravisTopic starter

  • Contributor
  • Posts: 13
Re: Difference Amplifier Circuit Won't Read 0
« Reply #14 on: January 23, 2014, 08:05:08 pm »
try adding a 3.3-10K load to ground on your output, you can overcome its rail to rail output issues a little by helping it get closer to the rail, (single supply)

That helped get it a little closer.  However it still seems to behave the same.  4.76 volts required before it reacts.

 

Offline TravisTopic starter

  • Contributor
  • Posts: 13
Re: Difference Amplifier Circuit Won't Read 0
« Reply #15 on: January 23, 2014, 08:28:29 pm »
http://www.digikey.com/product-detail/en/MCP6004-I%2FP/MCP6004-I%2FP-ND/523060

Would a cheap part like that work? 

My goal is to measure the voltage with little error.  My first attempt was just a voltage divider driving the atmega.  It worked however there was not enough resolution in the ADC and it hopped all over the place.  I am shooting for less than 0.01 volt accuracy.

The reason I went with 4.096 in the difference amplifier is because I'm already using that in the design for the aref voltage.  I'm trying to keep the part count down.

This is part of a bigger project that also measures current using a hall effect sensor
« Last Edit: January 23, 2014, 08:31:08 pm by Travis »
 

Offline fcb

  • Super Contributor
  • ***
  • Posts: 2117
  • Country: gb
  • Test instrument designer/G1YWC
    • Electron Plus
Re: Difference Amplifier Circuit Won't Read 0
« Reply #16 on: January 23, 2014, 09:54:57 pm »
It's the rails.  The circuit should do what it's laid out to do (whatever that is) - but only if you supply enough volts to the opamp, and read the datasheet, most opamps won't go to the rails.

DP832 - I was interested in the voltages, not what generates it!

NB: The MCP600x is great little opamp - but only rated to 6v.
https://electron.plus Power Analysers, VI Signature Testers, Voltage References, Picoammeters, Curve Tracers.
 

Offline TravisTopic starter

  • Contributor
  • Posts: 13
Re: Difference Amplifier Circuit Won't Read 0
« Reply #17 on: January 23, 2014, 10:30:14 pm »
NB: The MCP600x is great little opamp - but only rated to 6v.

I've gotta get better at reading the data sheets.  I didn't realize it was only rated to 6 volts.  Back to the searches with another thing to keep in mind.

Thank you very much to everyone who has given info.
 

Offline Odysseus

  • Regular Contributor
  • *
  • Posts: 147
  • Country: us
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf