Author Topic: Opamp Offset voltage question.  (Read 4422 times)

0 Members and 1 Guest are viewing this topic.

Offline Ginettag20

  • Regular Contributor
  • *
  • Posts: 54
Opamp Offset voltage question.
« on: January 11, 2015, 05:52:33 pm »
Hello to everyone on the forum I'm a new member. I have been interested in electronics for many years, but normally work with micro-controllers or alternatively repair and restore valve (tube) gear.  So Op amps are new to me.

 I was inspired by Dave's DC load and the blog on PWM and decided to roll my own version. I also wanted to have ago at designing my own circuit board at the same time and needed a practice project. I am  using a PIC to produce a PWM output for control of the set current.  I have the PIC interfaced to a PC via A USB FTDI serial interface and this can display the set current and also measured terminal voltage of the source.  I also have a mechanical encoder that can be used to set the current between 0-1000mA in 1 mA steps.

I have the circuit up and running and it all appeared to work very accurately apart from I am unable to get 0 mA. Depending on the Opamp fitted I get between 2 am 4 mA even when my programming voltage is grounded. 

So my very basic question is this an opamp offset voltage problem, I think that its is.  I have also checked for any oscillation in the circuit and found none. The problem appears unrelated to my crude low pass filtering of the MOSFET drive.  I found this low pass filter  to be most affective over a large range of source voltages and set current, but I guess is not ideal. 

I guess the easiest way to confirm  if this caused by the 3mV quoted offset voltage of the LM324 would be to buy a better specification quad op amp with a lower offset voltage. However looking at RS and Farnell my choice looks very limited, based on rail to rail devices with low offset voltage and my preference for DIP packages.  There are a couple of choices around £8.00 per device cost but don't want to spend the money on none jelly bean parts if this can be avoided by a simple circuit tweak.   I have tried nulling out the voltage, but its faffy and normally end in the opamp saturating at one end or the other.  I have included my circuit diagram and the measurements marked in red. Any tips or advice on  an alternative to the 324 or bias adjustment would be really helpful.  The measurement were made referenced to 0V rail and the the source voltage was 5V. With the Iset control grounded 2mA were drawn from my voltage source.

Many thanks  - Regards Chris
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 14061
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Opamp Offset voltage question.
« Reply #1 on: January 11, 2015, 05:57:07 pm »
You can confirm if the -input measures something, and the +input measures 3mV more than something.  This is the definition of input voltage offset: an apparent voltage error between the inputs.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8229
  • Country: 00
Re: Opamp Offset voltage question.
« Reply #2 on: January 11, 2015, 06:02:51 pm »
Quote
is this an opamp offset voltage problem

Unlikely.

It sounds like the opamp isn't a r2r (input) type: the gain relationship doesn't hold anymore as the input is pushed very close to the negative rail (ground in this case).

One way to solve it is to use a r2r (input) type. Or to provide a negative rail for the opamps.
================================
https://dannyelectronics.wordpress.com/
 

Offline Ginettag20

  • Regular Contributor
  • *
  • Posts: 54
Re: Opamp Offset voltage question.
« Reply #3 on: January 11, 2015, 06:13:11 pm »
The 324 is not a true rail to rail, but should get close enough to 0V to switch off a logic level mosfet (I would think).  I dont want to use a split supply as Im deriving this from an isolated  DC-DC converter via the USB bus.  Based on what Tim said my op amp inputs are within the 3mv quoted fro a 324.  The Fet is being turned on slightly if I ground the gat the load drops to 0 Ma

Thanks

Regards Chris

 

Offline Ginettag20

  • Regular Contributor
  • *
  • Posts: 54
Re: Opamp Offset voltage question.
« Reply #4 on: January 11, 2015, 06:16:52 pm »
Thanks Tim

Hi danny I think I understand now about you said the rule not holding true.

Thanks Mate - looks like its the £8.00 rail to rail device then
« Last Edit: January 11, 2015, 06:21:00 pm by Ginettag20 »
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8229
  • Country: 00
Re: Opamp Offset voltage question.
« Reply #5 on: January 11, 2015, 07:55:23 pm »
The general solution is to use a r2r opamp - it doesn't solve the problem but just alleviates it to a point, hopefully, that it doesn't matter as much to you.

You did good in this case in that you picked LM324 - with its pnp stage, it could go to a fairly low level before failing. Had you used an opamp with a NPN (or worse yet, jfet) input stage, the failure would have shown much earlier.

A side note: a r2r (input) opamp is really two opamps in one, one with pnp input (going to the negative rail) and another with npn input stage (going to the positive rail).

But you should not expect to much, as long as you are in a single rail setup - 10mv to the rails is fairly decent performance, even for r2r opamps.

================================
https://dannyelectronics.wordpress.com/
 

Offline jimmc

  • Frequent Contributor
  • **
  • Posts: 277
  • Country: gb
Re: Opamp Offset voltage question.
« Reply #6 on: January 11, 2015, 08:49:48 pm »
The LM324 is a single supply Op-Amp which means that the common mode input range includes the -ve supply (0v in this case).
The upper common voltage limit is Vcc -1.5v (10.5v in this case). So it's working well within its limits.
The output can swing to within 50mV of the -ve supply (when not sinking current) so this is OK.

The problem is caused by the input offset voltage of the Op-Amp (up to +3mV) and the input bias current (up to 250nA) flowing out of the Op-Amp inputs (PNP input stage) causing a voltage drop across the input resistors of U2C & D. To reduce the effects of input bias currents the + and - inputs should 'see' the same resistance. With balanced resistances the error is reduced to that caused by bias current mismatch (= Input offset current).

A better Op-Amp is needed to minimise these effects, but it does not need to be rail to rail since the input voltage range is 0 to 1v for 1A max load current and the '+ve rail' is 12v.
The output only has to swing (well) below the threshold voltage of the FET (IRL530N Vgsth 1-2v for Id 250uA)
Single Op-Amps usually have offset adjust pins, quads don't (not enough pins).

(Quick and dirty solution would be to add a 2k7 +4k7 pot from +12v supply to top of 1 Ohm current sense resistor to provide 2-4mA when load current is zero.)

Jim
« Last Edit: January 11, 2015, 08:57:16 pm by jimmc »
 

Offline Ginettag20

  • Regular Contributor
  • *
  • Posts: 54
Re: Opamp Offset voltage question.
« Reply #7 on: January 12, 2015, 11:17:37 am »
Thanks Jim and other for the replies.

Before I read you post this morning I ordered a true rail to rail device last night LMC660 . So this should arrive today and its an easy plugin. Its a true rail to rail but the input offset voltage is also 3mV like the current 324. I will give this ago and I may learn something by seeing how the new part behaves.

Rightly or wrongly I did have ago at balancing the input offset currents on the other op amp stages but not the one feeding my Mosfet. So I believe I need to put a resistor in series with pin 13 that has similar resistance to R16//R19.  This should be easy to do as I have a vero board prototype.


I may have to try feeding in some offset current from my 12v rail but the has a 30mA limit set by my DC to DC converter isolating my USB bus.    Anyway  I will have a go and report back.

Its funny that nobody else has reported this problem given the number of dc loads that have been implement using the 324.  Im really glad its not work first time as I have had the opportunity to learn a bit more about the opamp traps.

Regards Chris
 

Offline Kevin.D

  • Frequent Contributor
  • **
  • Posts: 278
  • Country: england
Re: Opamp Offset voltage question.
« Reply #8 on: January 12, 2015, 11:45:17 am »
Hi . Before you go spending money on something you dont have to . OOps too late sorry .!!  :)
The input offset V is partially responsible for your output not going to 0 . But also note that non of your other opamp output's can go to -Vs . either, LM324(like most all opamps) output's are unable to go to fully down to -Vs rail (goes down to -Vs +20mV at most  ).

 The Vos (Vos for LM324 = +- 5mV Max) causes the Fet to be slightly on even if the non inv input =0V because the Input Offset Voltage will be the actual input voltage difference required to make the inputs equil (or make opamp output = zero as it's usually put).  So lets say the opamp has an V offset of 1mv then the inv input now needs to be 1mV above the non inv input (which is at 0V ) before the opamp has it's two inputs balanced ,so it turns on the mosfet (no matter how high Vgs(th) is) until it's gets an output of 1mV across your Rsense (which for 1 ohm would corresponds to 1 mA through it) to achieve that extra 1mV at it's inv input.

There's a few possible fixes for both the above problems. One fix is to create a small neg supply for your opamps (the neg rail only needs be large  enough to allow your opamp output's to go gnd) so you can use a say a couple of diode drops  to split the 12V rail into a -1.2 -Vs for your opamps and + 10.8 Vs (so the diode anode becomes your virtual gnd point (your ref and output gnd). This fixes both probs because now all your opamps can now go to this gnd and your input setting can potentially now go a few mV below 0 V to cancel any Vos and achieve 0 output .

.your slow Digital output monitoring and feedback loop should be automatically correcting for any analogue loop fixed offset's so they wont even be noticed . 

(you have few other probs to fix aswell .try a search the forum and read and copy )

Regards
« Last Edit: January 12, 2015, 11:47:11 am by Kevin.D »
 

Offline Ginettag20

  • Regular Contributor
  • *
  • Posts: 54
Re: Opamp Offset voltage question.
« Reply #9 on: January 12, 2015, 12:04:32 pm »
Thanks Kevin.

The diodes is a good idea. I was think of using my last spare PIC pin to implement a charge pump for the - rail. However diodes sound easier and less electrically noisy.

Chris

 

Offline jimmc

  • Frequent Contributor
  • **
  • Posts: 277
  • Country: gb
Re: Opamp Offset voltage question.
« Reply #10 on: January 12, 2015, 05:14:01 pm »
A negative rail is certainly the way to go but, unless the 12v supply is floating wrt the PWM, loosing one or two diode drops off of the 5v? O/P from the PIC is not ideal.

With a load to the -ve supply (0v in this case) most LM324s will swing very close to it  (you show 1.6mV for U2:C) so there is a work around...

Add a resistor (Rx) in series with the -ve input of U2:D, then connect a high value resistor (Ry = 1000 * Rx) from that input to the wiper of a pot across the 12v supply.
This will give you an offset adjustment range of 0 to 12mV. (Relies on low output saturation voltage)

Alternatively omit the pot and reduce Ry to give a fixed offset of (say) 100mV and you can now null out the offset with the digital input since the maximum output saturation voltage of U2:C plus the maximum offset voltage of U2:D is less than this.

Jim

With the LMC660 bias current is negligible (<10pA even at 125o C) and the max offset is 1/2 the bias current so balancing the input resistors gives no advantage.
 

Offline Ginettag20

  • Regular Contributor
  • *
  • Posts: 54
Re: Opamp Offset voltage question.
« Reply #11 on: January 13, 2015, 08:46:33 pm »
Just a quick update. I have not yet tried to implement the split rail power supply,  but  I have swapped out the 324 opamp  for a  true rail to rail  device. This is a CMOS device with an input offset voltage of 1mV and input bias current of 2fA.  LMC660. This has now dropped my minimum current setting  from 2mA to 0-1mA.  This is better but looks like the split rail is the next step.  :-+ 

Thanks ALL

Chris
 

Offline Ginettag20

  • Regular Contributor
  • *
  • Posts: 54
Re: Opamp Offset voltage question.
« Reply #12 on: January 17, 2015, 07:46:38 pm »
Just some feed back.

I have implemented the split rail supply for the opamp and Im  using a lower input offset device over the 324. This now means I can achieve the 0mA set current. The Opamp I using is nothing really supper and now I have the split rail supply I can probabley go for a device will a still lower offset.   Found a few more problems with teh circuit and my output filter is far to slow to for dynamic inoputr changes, but hopefully the additional stability afforded by the split rail should allow me to use a more coventional feedback / damping circuit.

I have shown the new measurements in Blue and old measurements in red

Thanks for the help.

Chris
« Last Edit: January 17, 2015, 07:50:25 pm by Ginettag20 »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf