Weird LM324A behaviour - Page 1
Forum section: electronics / projects

author: Electr0nicus
author_rank: Regular Contributor
timestamp: July 29, 2012, 03:33:44 pm
content: Hi @ allI'm currently testing my electronic fuse with auto restart function.The circuit is nothing special. Only a sense resistor a differential amp to amplify the voltage drop over the resistor, a additional 11 times amplifier, a comparator and a schmitt trigger. And of course a highside P- Channel Mosfet for switching the load off and on. The current limit can be controlled via a µC Pin using PWM. This PWM gets converted to a analog voltage by a 2nd order passive lowpass filter. A timebase using a cap and a few resistors in conjunction with the schmitt trigger cares for the auto restart function. If a overload condition is detected, the P- channel mosfet gets switched off, thus the timebase cap C1 can be discharged trough the bleeder resistor R7. If the voltage reaches the lower threshold of the schmitt trigger, the mosfet gets switched on. Now if more current as allowed flows, the output of the comparator IC1B goes high and charges the timebase cap via the resistor R6. To prevent that the timebase cap gets discharged trough the output of IC1B a series diode D1 is added.So now to my problem:Actually the whole circuit works just fine, but one thing just gets me quite a headache. It's the differential amp IC1A.http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00001046.pdfUsually the circuit is designed for a maximum current of 1A.So the maximum voltage drop across RSENSE is 100mV at full load.The differential amp amplifies that by 1 giving at it's output 100mV with low impedance. Of course with a bit of offset error.The problem is that the offset error in my circuit is way too large to correlate with the offset voltage specified in the datasheet.So here are my measurements atno loadand with a supply voltage of 10.6V* Voltage on non inverting input of IC1A: 5.35V* Voltage on inverting input of IC1A 5.315V* calculated voltage differential: 35mV.Datasheet value for maximum offset voltage of the LM324: 3mVSo as a worst case scenario I'll get a output voltage of a bit over 40mV. (Output can swing to ground => minimal output voltage 20mV max. )But I'm getting nothing near that: On the output I can measure over 90mV. This voltage increases if the supply voltage of the opamp is increased. At 22V the output is at 500mV. If I incease the voltage further until I reach 30V, the voltage on the output doesn't increase any more. From 3V to 22V it increased nearly linear to it's 500mV maximum. I've precisely matched the input differential voltage to nearly zero (5-7mV) using a 150k trimmpot instead of R5, but no effect.Then I tested the whole thing with a load resistor which lets 2A of current flow. I was surprised, now the output of IC1A was spot on at around 215mV. So it seems the output can't go lower than approx. 100mV, though it's specified in the datasheet.I'm completely stumped what causes this and why this is happening.Maybe someone in this forum has a clue.Thanks in advance!

author: SeanB
author_rank: Super Contributor
timestamp: July 29, 2012, 03:47:34 pm
content: I would guess the resistors are not perfectly matched. Try swapping R2 and R3 physically and measuring again. The differential voltage at zero load should be the same on both inputs. If you do not get that then the IC will amplify it faithfully ( unless it is trying to go negative internally whereupon it will saturate and give the positive output) and give the offset.

author: Electr0nicus
author_rank: Regular Contributor
timestamp: July 29, 2012, 04:08:05 pm
content: I don't think so. I'm using 1% thin film 0805 SMD resistors. Even with the worst tolerance, this doesn't explain more than twice as much output voltage as expected. I've tried it with a other brand new LM324 - the same result.

author: blackdog
author_rank: Frequent Contributor
timestamp: July 29, 2012, 04:43:36 pm
content: Hi Electr0nicus,The amount of error voltage is not only the offset voltage..."Datasheet value for maximum offset voltage of the LM324: 3mV"<= Not True, @ 25C = 7mV, full Range = 9mVYou have to look also at the "bias" current and the bias offset current.Input offset current max = 50nA!The first thing you will have to do is, decrease the resistance values.Use 1% 4K75 resistors for ic1a.ic1dR15 = 1KR12 = 10KAnd test is again..And use this tool from Analog Deviceshttp://designtools.analog.com/dt/opamp/opamp.htmlRead this paper of Bob Pease about "Error Budget"http://electronicdesign.com/article/power/what-s-all-this-error-budget-stuff-anyhow-12629Welcome in the world of analog designKind regarts,Blackdog

author: DRT
author_rank: Regular Contributor
timestamp: July 29, 2012, 05:13:46 pm
content: With no current flowing across your shunt, the op-amp will be trying to output zero volts. Since this is in a single-supply configuration, it can't do this (the nearest it can get is the drop-out voltage across the fully-on lower output transistor in the op-amp).

author: Electr0nicus
author_rank: Regular Contributor
timestamp: July 29, 2012, 08:29:48 pm
content: Quote from: DRT on July 29, 2012, 05:13:46 pmThat makes sense, but would also surprise me. The LM324 is intended for single supply use. In the datasheet on page 6, where the lowest output voltage Vol is specified with 20mV, it is also stated above the table that V+ = 5V and V- = GND.Quote from: blackdog on July 29, 2012, 04:43:36 pmUsing 4.7K resistors made it even worse. I got about 650mV on the output with no load. Maybe due to the higher output current and thus more voltage drop across the output stage lower transistor.

author: DRT
author_rank: Regular Contributor
timestamp: July 29, 2012, 09:34:57 pm
content: The specification you refer to is for a 10k load to ground. You have a 200k load to Vin, so to reach a true output zero it needs to sink about 50uA. Looking at the current sinking graph for this current shows that you will get ~100mV on the output.

author: Electr0nicus
author_rank: Regular Contributor
timestamp: July 29, 2012, 10:50:14 pm
content: I see!So if I use 1MOhm Resistors for the whole differential amp the output will have to sink 5µA so I would get ~10mV on the Output, which would be quite acceptable?Quote from: blackdog on July 29, 2012, 04:43:36 pmAs long as the offset is below 20mV it's ok. It shouldn't be a precision current meter, but a simple electronic fuse with lowest possible BOM cost 1€/1.2AUD max. Your standard fuse neither blows at exactly 1A. The main goal is to built a very fast acting fuse, compared to a standard fuse.

author: Electr0nicus
author_rank: Regular Contributor
timestamp: July 29, 2012, 11:31:04 pm
content: It works!I've replaced the 100k resistors with 910k ones, because I hadn't 1MOhm ones at home. Measured the differential amp output and with no load = no voltage drop over the sense resistor, i get a output voltage of ~12mV which is better than I expected.Attached are some oscilloscope screenshots of the voltage on the output of the diff amp.Thank you for your help so far, especially DRT!