Sunday, 3 March 2019

Post-op-amp

My previously mentioned battery warning circuit, using two 741 op-amps, is now working on the breadboard. Although the concept is sound, and it works almost as expected, it has thrown up an interesting problem.

One thing I proved to myself while prototyping this, was the effect of reversing the input pins on the op-amp. As built, with the zener diode on pin 2, the output goes low when the input voltage drops below the threshold. Reversing the inputs does what you'd expect, and reverses the output. The output is low so long as the input is above the threshold. I just wanted to prove that to myself!

This meant that I could then try both ways of powering the 2nd op-amp, either by pulling its GND pin low, or by using the 1st op-amp as source to feed its Vcc pin. Both work, but I think from convention pulling the GND pin low is preferable.


The above photo shows the two op-amps working together. In this mock-up ive reverted to the preset for the threshold setting, and the 2nd op-amp is directly driving the LED via a 3k3 series resistor.

So far, so froody. The problem becomes more apparent (it can be seen in the direct drive mock-up but its not as noticeable) when the opto-coupler is added, as can bee seen in this little video


Because the 741 cant get really close to its supply rails, this means that the output lows are always a volt or two above ground. The cumulative effect of this is that the opto-coupler never actually turns full off!

Clearly this is no good, as it means that whatever is controlled from the opto-coupler will not be switched cleanly. It might now make much difference in practice, but it isnt good practice!

Im hoping that this is something that will be cured by moving to the better specified LM358 dual op-amp. If ive read the datasheet correctly, this can get down to within a few mV of its ground, which should mean that the combined effect of perhaps a few dozen mV is not enough to turn the opto-coupler on.

No comments: