element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Experts, Learning and Guidance
  • Technologies
  • More
Experts, Learning and Guidance
Ask an Expert Forum Differential amplifier problem
  • Blog
  • Forum
  • Documents
  • Leaderboard
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Experts, Learning and Guidance to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 38 replies
  • Answers 15 answers
  • Subscribers 288 subscribers
  • Views 8916 views
  • Users 0 members are here
Related
See a helpful answer?

Be sure to click 'more' and select 'suggest as answer'!

If you're the thread creator, be sure to click 'more' then 'Verify as Answer'!

Differential amplifier problem

Andrew J
Andrew J over 5 years ago

I'm working with a DAC and experimenting with removing the zero scale error - the actual output at a zero input code.  I'm on a breadboard so it isn't particularly accurate but the ZSE is 5mV to 11mV.

 

I set up a differential amplifier as follows - image is copied from a website, but I've confirmed and re-confirmed that my setup matches:

image

So, I have the following inputs:

V1 = 0.005mV

V2 = DACoutput

R = 100K.  All of them.

Opamp is an LM741 which is all I have on-hand, V+ = 5V, V- = ground .  It has a max offset voltage of 6mV.

 

Given that, I would expect Vout = V2 - V1.  Vout is connected to a 1K resistor to ground.

 

So the reality is that the R values are not perfectly 100K but are within the 10% spec.  Thus I wouldn't expect Vout to be an exact difference, but 'more-or-less'.

 

This is what I'm measuring:

DACout (V2) = 4.06V, Vout = 4.04V

DACout (V2) = 0.011V, Vout = 3.6V

 

I've tried working out why with a low DACout I'm still getting a large Vout.  Measuring the resistors and plugging them into the gain formula:

 

Vout = -0.005 * (99.03/99.5) + 0.011 * (99.21/(99.05+99.21)) * ((99.5+99.03)/99.5)

Vout = (-0.005 * 0.995) + (0.011 * 0.500 * 1.995)

Vout = -0.005 + 0.011 = 0.006

 

So, essentially, my calculation confirms what I would expect the amplifier to do with a -0.005mV and 0.011mV input.

 

I can't figure out where I've gone wrong, can anyone give me some pointers?

Attachments:
2477.LM741.asc.zip
  • Sign in to reply
  • Cancel

Top Replies

  • michaelkellett
    michaelkellett over 5 years ago +5 verified
    What power do you have connected to the 741 - it's not rail to rail capable it needs positive and negative supplies, +/- 10V is the minimum recommended. The input common mode range is +/- 12V when running…
  • michaelkellett
    michaelkellett over 5 years ago in reply to Andrew J +5 suggested
    If you want to sink any current at 0V you need a negative supply. You could consider using +/- 5V supplies (+/- 10 if you stick with the 741 ) You can do a lot of this without spending money by using a…
  • Jan Cumps
    Jan Cumps over 5 years ago in reply to Andrew J +4 suggested
    Yes, we're doing it the naive way. That's why I hope that analog / DAC experts chime in and show the shining path to real world solutions. In the eLoad we made, things like OpAmp offset, quiescent current…
Parents
  • Jan Cumps
    0 Jan Cumps over 5 years ago

    calling in jc2048 - opamp expert.

     

    Vout is connected to a 1K resistor to ground.

    This should not have impact - the output of an opamp is low impedance and as long as it can drive the 1K load, this is fine...

    So we should focus on the input and feedback resistors ...

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • Andrew J
    0 Andrew J over 5 years ago in reply to Jan Cumps

    Yep, I confirmed early on that with or without the 1K resistor it makes no difference.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • Jan Cumps
    0 Jan Cumps over 5 years ago in reply to Andrew J

    This is the offset circuit I designed:

    image

     

    It uses a decicated OpAmp and an available programmable DAC to "offset the offset" of another DAC, by injecting the voltage in an OpAmp subtract configuration.

     

    It didn't correct the 0 point errors I have in my DC load, but it fixes the DAC offset.

    A potentiometer and manual trimming would fix that too, but this solution allows to use calibration firmware to offset the offset.

     

    My advise here is of a generic OpAmp user. It would be great to see comments from designers hat used precision DACs and precision OpAmps in a measurement design ...

    That's the secret sauce.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • Andrew J
    0 Andrew J over 5 years ago in reply to Jan Cumps

    I'd followed that bit of your implementation and was trying to do something without an extra DAC - in theory it ought to work. 

     

    Interestingly (to me at least), I'd realised that with 5 DACs one could output a linear scale from 0V to Full Scale:

    One to output the linear region with software compensated offset and gain

    One to output the pre-linear region (0 to start-of-linear, say 12mV) compensated by the output of a second DAC to limit to 0V to 12mV.

    One to output the post-linear region (say, 4V to 4.096V) compensated by the output of a second DAC.

    Software directs the required code to the right DAC and you'd only need 20 DACs to output 4 accurate DAC channels image

     

    Using an Op Amp, at least in theory, should allow me to drive from 0mV to full scale - zero scale error.  That, of course, widens the full scale error so it's not perfect and I guess you decide which end of the scale is most important. 

     

    What I'd really like is an OpAmp configuration that would stretch zero scale error to 0V whilst also stretch full scale error to full scale whilst keeping it all monotonic.  But I'll settle for understanding what I'm doing wrong here first!

     

    It might help with a photo of the breadboard (without the 1K load):

     

    image

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Reply
  • Andrew J
    0 Andrew J over 5 years ago in reply to Jan Cumps

    I'd followed that bit of your implementation and was trying to do something without an extra DAC - in theory it ought to work. 

     

    Interestingly (to me at least), I'd realised that with 5 DACs one could output a linear scale from 0V to Full Scale:

    One to output the linear region with software compensated offset and gain

    One to output the pre-linear region (0 to start-of-linear, say 12mV) compensated by the output of a second DAC to limit to 0V to 12mV.

    One to output the post-linear region (say, 4V to 4.096V) compensated by the output of a second DAC.

    Software directs the required code to the right DAC and you'd only need 20 DACs to output 4 accurate DAC channels image

     

    Using an Op Amp, at least in theory, should allow me to drive from 0mV to full scale - zero scale error.  That, of course, widens the full scale error so it's not perfect and I guess you decide which end of the scale is most important. 

     

    What I'd really like is an OpAmp configuration that would stretch zero scale error to 0V whilst also stretch full scale error to full scale whilst keeping it all monotonic.  But I'll settle for understanding what I'm doing wrong here first!

     

    It might help with a photo of the breadboard (without the 1K load):

     

    image

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Children
  • Jan Cumps
    0 Jan Cumps over 5 years ago in reply to Andrew J

    Yes, we're doing it the naive way. That's why I hope that analog / DAC experts chime in and show the shining path to real world solutions.

     

    In the eLoad we made, things like OpAmp offset, quiescent current and other attributes played a significant role. Particular at the near 0 current point....

    The 741 is not the best in class for input current specs. More modern OpAmps dealt with that problem. But as you've noticed, there's more to solve.

     

    I kind of like that these things don't solve easily in firmware with calibration and corrections. They are real electronics problems. That's what I'm here for ...

    • Cancel
    • Vote Up +4 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • Andrew J
    0 Andrew J over 5 years ago in reply to Jan Cumps

    Agreed, that's why I'm making my control board a little more complex by looking at a variety of potential issues.  I'm limited to a LM471 right now because that's all I have and it fits a breadboard - I had thought of an OP388 for actual use.  So I'm testing the theory right now before committing to a PCB for better prototyping.  Good job too it seems image

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • Jan Cumps
    0 Jan Cumps over 5 years ago in reply to Andrew J

    Using a non-ideal OpAmp is the best way to learn.

    Solving it by using a better OpAmp (as I did image ) is a cop-out. You learn nothing. And the problems are still there when you care about the full "close to 0 range".

     

    I think that if you can solve the apparent OpAmp pitfalls with a 741, you've upped your OpAmp understanding in a way that will never be achieved by just replacing it with a newer one ...

    That said, I'd never use a 741 in a design anymore. The newer ones are vastly better...

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube