Author Topic: Differential amplifier operation  (Read 6052 times)

0 Members and 1 Guest are viewing this topic.

Offline MandelbrotTopic starter

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Differential amplifier operation
« on: June 14, 2013, 03:49:36 am »
Hello again,

I am using a potentiometer to set the current limit and then measuring the voltage difference across a series resistor to actually figure out the real current. To do this I am using a unity gain differential amplifier where all the resistors are 2 MOhm (is this too high?) and the normal differential amp configuration.  It does what I think it should do in SPICE but my actual circuit doesn't work. It works fine when the voltage difference is large enough, but when the voltage difference is too small the output is always 1.245V. Is there some fundamental thing about differential amplifiers I'm missing? I'm using a UA741 Op amp if that matters with both offset null pins grounded.

Thanks, and sorry for asking so many questions!
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Differential amplifier operation
« Reply #1 on: June 14, 2013, 03:54:18 am »
There's an important part left out here - how are you supplying power?
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline MandelbrotTopic starter

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Re: Differential amplifier operation
« Reply #2 on: June 14, 2013, 03:58:50 am »
Good point! I'm using 5V on the positive rail and 0V on the negative rail. I don't care if it can't go negative and the difference should never be more than 1.25 in the final circuit.
 

Offline awallin

  • Frequent Contributor
  • **
  • Posts: 694
Re: Differential amplifier operation
« Reply #3 on: June 14, 2013, 07:15:56 am »
Your image above has the op-amp inputs flipped!
-input should have the feedback from the output
+input should have voltage divider to ground

but maybe you built your actual circuit correctly anyway since it seems to work...
« Last Edit: June 14, 2013, 07:17:33 am by awallin »
 

Online Andy Watson

  • Super Contributor
  • ***
  • Posts: 2084
Re: Differential amplifier operation
« Reply #4 on: June 14, 2013, 08:41:08 am »
Ah, the 741, my first encounter with a real op-amp. Unity gain stable, freedom from latch-up - luxury! But that was nearly four decades ago.

Taking off the rose tinted glasses: The 741 is, by today's standards, pretty cruddy. It''s a bi-polar design, it needs bias current for the input transistors. TI's data sheet says it has 1M ohm input impedance - that's probably a worst case figure, but you need to keeps the input impedances down if you want to see sensible results - I would say 100k maximum. Also, it's not a rail to rail op-amp. 1.245V probably indicates the lowest voltage (w.r.t. the -ve rail) that the output can achieve - it's saturated. And, if TI's data is to be believed, the minimum operating supply voltage is 10V, or +/- 5V.
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8517
  • Country: us
    • SiliconValleyGarage
Re: Differential amplifier operation
« Reply #5 on: June 14, 2013, 01:50:53 pm »
It should be considered a crime to let beginners have their hands on SPICE.
One should only get access to that program once he/her fully understands the lies that tool is capable of producing...

The 741 output can't go that low....
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Differential amplifier operation
« Reply #6 on: June 14, 2013, 01:54:24 pm »
Whoops! Forgot to hit "notify". Yep, the LM741 can't go anywhere near its power rails. Why the hell are you simulating using an ideal op amp? LM741 is about as far as you can get from that without a time machine...
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline steve30

  • Frequent Contributor
  • **
  • Posts: 733
  • Country: england
    • Stephen Coates' Homepage
Re: Differential amplifier operation
« Reply #7 on: June 14, 2013, 03:26:18 pm »
I often tend to run into problems with differential amps. Though I have had some that work correctly.

Personally, I'd try smaller resistors. 2M seems too high. Try 100k, and if that's no good, try even lower, like maybe 10k or 4k7.

The fact that it only goes to 1.25V is not surprising with a 0V supply. A 741's output can only go to about negative supply +1.25V, and positive supply -1.25.

If you want the output to go down to 0V with a 0V-5V supply, I can highly recommend the LM358/LM324. Otherwise you'll need a negative supply.

Hope that helps.

Edit: Is it worthwhile grounding the offset null pins? Normally I just leave them floating if I'm not using them.
« Last Edit: June 14, 2013, 03:27:50 pm by steve30 »
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16276
  • Country: za
Re: Differential amplifier operation
« Reply #8 on: June 14, 2013, 04:03:35 pm »
Never ground offset null pins, either connect as the datasheet says or leave as pads only, no traces.

Some are meant to be connected to one rail or the other, either positive or negative rail, never ground. Internally they are either a set of low value resistors or a set of resistors and transistors and diodes between the pins and one of the supply rails. You are meant to use them to zero out offsets on the input with both input pins shorted together, and only to remove the offset from the IC itself.

Using them to remove system offsets will degrade performance. If you have an input offset use a set of precision rails ( or the supply rails if they are stable enough) and a variable potentiometer across them with a high value resistor to provide the needed offset current. It seems convenient if you only have a few mV of input offset to remove, but driving the opamp to do this with those pins will make it long term unstable, as the offset is now deliberately driven to an imbalance in the input circuits.
 

Offline MandelbrotTopic starter

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Re: Differential amplifier operation
« Reply #9 on: June 14, 2013, 05:09:32 pm »
Thanks for the feedback!

I've barely used op-amps before and in school so far we only covered basic ideal op-amps.

Time to go rethink my design, thanks for the valuable information!
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Differential amplifier operation
« Reply #10 on: June 14, 2013, 05:16:24 pm »
Sounds just like my school. Op amps are just about the least ideal component you'll ever use - if you're going to play around with them in a simulator try to find a model of the one you're using. But even better, you should consider a simulator a tool for those who already understand how both the simulator and the real circuit work. If you know what you're doing, you can get very accurate results, and if you don't, you can get very silly results. They're very useful, but you should stick to the breadboard for now, until you've been screwed by every trap for young players and screwed them right back.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8517
  • Country: us
    • SiliconValleyGarage
Re: Differential amplifier operation
« Reply #11 on: June 14, 2013, 05:20:33 pm »
and with those kind of values in the megaohms the input bias current starts playing a biiiig role...
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Differential amplifier operation
« Reply #12 on: June 14, 2013, 05:23:50 pm »
That's an important thing to remember about diff amps, actually. Damned if you do, damned if you don't - if the resistors are large, you get screwed by the bias current, and if they are small, you get screwed by the low impedance of your amplifier input. If you can't find a happy medium, you might consider looking into an instrumentation amplifier - it buffers the inputs so you can have both high input impedance and small resistors.
No longer active here - try the IRC channel if you just can't be without me :)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf