5
\$\begingroup\$

I have 2 op-amps in series, one is configured as an inverting AC amplifier and one as a voltage comparator.

The purpose of this circuit is to detect a 4mV AC signal and trigger a transistor at the other end to switch a logic level on/off at an mcu pin. 4mV is the trigger threshold (in theory).

chained op amps

The amplifier is run from a single 5V supply, and this side of the circuit works fine and I am seeing a DC bias of 2.5V with a 4mV*(200/10 + 1) AC component at point B.

The second op-amp is being used as a comparator, and this is where I'm having trouble. I'm not 100% on using a single supply design for this. I've set my reference voltage on the positive input of U1A using a pot. divider, to give the DC reference voltage 2.672 V. The comparator is then being triggered by the AC signal seen at B, but is only switching between 3.4V and 1.6V (at point C) rather than the rails, which ideally will then be used in turn to switch a transistor.

I think this is where I'm tripping up, but I'm not sure why. Any help greatly appreciated!

RAIL net = 5V SPLIT net = 2.5V

\$\endgroup\$
  • 2
    \$\begingroup\$ The TL072 is not a rail-to-rail opamp. Also, what on earth is C9 supposed to be doing? \$\endgroup\$ – Dave Tweed Oct 31 '12 at 12:17
  • \$\begingroup\$ stray, from an old iteration! accidentally left in this schem... \$\endgroup\$ – njt Oct 31 '12 at 12:42
  • \$\begingroup\$ There is no reason to use the TL072 for anything. \$\endgroup\$ – Kaz Oct 31 '12 at 15:52
4
\$\begingroup\$

One major thing they forget to mention in op-amp class is that although theory tells you it operates in a certain way many things aren't attainable in practice. Most op amps can't hit either the power or ground rails, they may come fairly close but won't be spot on. Rail to Rail op amps come in two varieties, input and output. The Input types means your input signals can be close to the power rails while the output type means your outputs can be close. The TL072 doesn't have this feature, the voltages you are seeing are these max and min values (for the TL072) when running the op-amp from 5V, increasing the supply voltage will increase the range but you're not going to get closer to the rails.

If you're working with a low frequency signal, say a couple of khz then I'd recommend the MCP6001(2,4) from Microchip, it works great from 5V and is both Input and Output Rail to Rail compatible. The cap C9 is presumably there to stabilize your output, this creates a problem though, your op amp now has to fight with the cap to get the voltage to the level you want it. You don't have to worry about stabilizing this point, the op amp will do this for you, remove C9.

In addition I'd say there's no reason for the transistor you mention, the op-amp is capable of driving an input pin to a micro just fine. If you're paranoid about software pulling the pin low and popping the op-amp by accident just insert a 5k resistor between the output and the micro and you'll be safe. This shouldn't be needed however, most op-amps have output current limiting.


You could also try the LM358, it's fairly easy to get and the voltage can go to 0V if you don't sink more than a mA or so. The max output is still not going to be 5V but it'll be enough to trigger the micro pin.

\$\endgroup\$
  • \$\begingroup\$ I switched both opamps to an LM358D and it works like a charm. The comparator is now switching between 0V and 3.5V and so will work great with an mcu input. Thanks! \$\endgroup\$ – njt Oct 31 '12 at 13:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.