2
\$\begingroup\$

I have a 9V power supply. I split it in half using a voltage divider buffered through a TL071 op amp. I use the +4.5V rail to power an ATmega328P. The microcontroller has one pin attached to an LED through a 330-ohm resistor.

The problem that I'm having is that whenever the LED is on, the voltage available to the microcontroller on the positive rail drops by about 570mV. The voltage on the negative rail also becomes more negative by 570mV. The voltage across the positive and negative rail remains 9V. It's the virtual ground that's shifting.

I think the reason may be that when the LED is on, the microcontroller+LED draw more current than the op amp can sink (any current drawn from the positive rail must be sunk through the op amp right? no where else for it to go) and so that causes the potential of the virtual ground to rise. Is that what's going on?

The microcontroller draws 17mA by itself when the LED is off. It outputs about 3.5V (the circuit isn't entirely accurate since it shows the LED being driven from the positive rail; it's actually driven from a microcontroller pin), and the LED requires 1.7V, so that's 1.8V dropped across the 330-ohm resistor, for an additional 5mA or so. I looked at the data sheet for the TL071 but was unable to find any information about how much current it can sink.

Is my understanding correct? How much current can the TL071 virtual ground handle? If the TL071 is the limiting factor, is there another op amp that would do a better job?

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
  • 1
    \$\begingroup\$ Skip to pg13 of the datasheet and look at the 'Functional Block Diagram' of the TL07xx. See those resistors between the output stage transistors and the output pin ...? That's what's causing your trouble. TL07xx's just can't source or sink much current. \$\endgroup\$ – brhans Mar 1 '16 at 3:32
5
\$\begingroup\$

You certainly have the right idea about your problem. A TL071 is completely inadequate for your purposes. Start with a datasheet. Look at figures 2 and 3, which show how much voltage the chip can put out. Notice that with a load resistor of 10k, you can get about +/- 4.5 volts for a +/- 5 volt supply, but if you drop the load to 2k, you can only get about +/- 3 volts. Your load is the equivalent of about 250 ohms at 4.5 volts, so you'll be in real trouble.

The quickest way around your problem, assuming your schematic is correct, is to boost the op amp current with a transistor, like

schematic

simulate this circuit – Schematic created using CircuitLab EDIT - And a version of the circuit which will handle either type of load is a bit more complicated, but this

schematic

simulate this circuit should work.

\$\endgroup\$
  • \$\begingroup\$ Thanks. I find thinking about the virtual ground confusing because the "output" is 0V. Does the transistor help by providing a lower-impedance path to the negative rail? Does it work the other way or would I need another transistor to handle load on the negative side? \$\endgroup\$ – Willis Blackburn Feb 29 '16 at 12:50
  • \$\begingroup\$ Also could you explain your choice of PNP for the transistor instead of NPN? \$\endgroup\$ – Willis Blackburn Feb 29 '16 at 13:14
  • 1
    \$\begingroup\$ @WillisBlackburn - Yes, the transistor provides a lower impedance, which is the same thing as higher current. And the "lower rail" is not useful when thinking about this, since the power supply has + and -, and that is what the circuit is dealing with. And yes, you'd need another if the load could draw from the - rail. Although keep in mind that the virtual ground only has to handle the difference in the two currents. \$\endgroup\$ – WhatRoughBeast Feb 29 '16 at 15:39
  • 1
    \$\begingroup\$ @WillisBlackburn - Yes, you could use an NPN, but that would be a bad idea. First, you'd need a base resistor, and also possibly an emitter resistor. Second, you'd wind up with a transistor gain of more than 1, and this increased total gain of the op amp/transistor combination would run the risk of instability/oscillation. With the PNP configured as a voltage follower, none of this matters. \$\endgroup\$ – WhatRoughBeast Feb 29 '16 at 15:43
  • 1
    \$\begingroup\$ I hooked this up tonight and it worked perfectly! Thank you! \$\endgroup\$ – Willis Blackburn Mar 1 '16 at 3:49

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.