08-11-2012, 07:21 PM
(08-11-2012, 04:40 PM)Joe Wrote: I didn't deliberatly ignore your previous advise, Mark - just didn't understand it. The power requirements are confusing as I thought op-amps needed split-rail supplies but there's no ground terminal - just a Vcc+ and Vcc-.
No worries, Joe. I was a bit busy when I dashed out the previous replies - allow me to elaborate...
Firstly, people often get confused about the power supply requirements for op-amps, and that's understandable. Most text books gloss over this, starting with the business about dual rails, and quickly moving on to other topics.
The truth of the matter is that an op-amp doesn't have an earth pin, so has no knowledge of earth. Earth is just a relative concept after all.
In a typical audio application, audio signals will swing fairly symmetrically either side of 0V. So it's convenient to use split supplies and reference everything to 0V. But that's by no means the only way to do it.
Anyway, given that an op-amp doesn't know about earth, we need to consider what it is capable of doing. There are 2 golden rules to use when understanding op-amps:
1. The inputs should be at the same voltage.
2. The inputs draw no current.
Bear in mind that the input stage responds to the difference between the two input pins. And, the op-amp has an open-loop gain of a million or more. So, if you have a millivolt of difference between the two inputs, in theory the output pin would want to swing up to 1000 volts! Clearly, it won't be able to do that, so in practice it will sit against one of the rails. Well, very close to the rail - most op-amps can only get to within a volt or so of the supply rail.
Similarly, the inputs of the op-amp work over most of the range, but don't work reliably when the two inputs get close to the supply rails. The datasheet for the device in question will clarify this, but it's likely to be within a volt or two. So this is why your op-amp needs to be powered from a supply rail that is higher than the output from your PSU. I'd suggest powering it from the unregulated supply, straight off the rectifier...
In most circuits where we are trying to make a sensible amplifier, we need to reduce the gain of the op-amp. We do that using negative feedback.
In this application, we aren't doing that. We are trying to detect a small voltage across the series "sense" resistor, and send the output of the op-amp hard against the rail. So, the output from the op-amp will either be close to the negative supply rail (ground) or close to the positive supply to the op-amp (+UNREG) - and we'd prefer that it didn't "linger" in the in-between areas. In other words, you are using the op-amp as a comparator, not a linear amplifier.
Sometimes, comparators can misbehave, especially when they are on the "edge" of triggering. A small amount of noise can be amplified and cause "false positives". So, a common trick is to use positive feedback to provide a small degree of hysteresis, hence my suggestion of the 1M resistor. But, suck it and see; you might not need it. If you do try it, you should find that the current needed to turn on the LED is higher than the current needed to turn it off.
Quote:I've put a resistor in series with the LED and if I shot the output terminals it lights up but stays lit when the short is removed. Putting a rechargeable PP3 across doesn't trigger it.
I've tried different values of hysteresis resistor and the ones going to the input to no useful effect.
Not surprised - you'll find it's better when the op-amp is powered from the higher supply rail...
BTW, the two resistors on the inputs to the op-amp are to protect the op-amp should a higher voltage appear on the inputs. By higher, I mean higher than the supply to the op-amp. It's really good practice with ICs, for all sorts of reasons.
You might have already seen it, but for some more general information about op-amps, some anorak has written a reasonably good article. It has a bit of an audio bias and doesn't say much about the power supplies, but it might be helpful anyway..
http://www.markhennessy.co.uk/articles/op-amps.htm
Hope this helps, and sorry it's a bit of a ramble!
Mark







