Bad Circuits - Test Your Knowledge

In summary, each of the "Bad Circuits" in Chapter 9 of "The Art of Electronics" by Horowitz and Hill has either a resistor or capacitor connected in series with the LED, making the LED too bright, or no resistor or capacitor is connected, causing the LED to turn on even when the voltage is not high enough.
  • #36
How about a transistor to drive the LED? It'll cost a little board space however.
 
Engineering news on Phys.org
  • #37
dlgoff said:
How about a transistor to drive the LED? It'll cost a little board space however.

Yeah, that is one solution, but I was asking more about when you really do just want to use a TTL gate to drive the LED and maybe something else.

BTW, good point about being able to see the LED. But, I can think of other LED applications where you would be pulsing it at speed. Think IR remote controls, or IR/visible signal transmission (using modulation codes to improve SNR), etc.
 
  • #38
Okay, I think I'll tie off the two bad circuits in Post #7 -- page 440 (1st edition), circuits (a) and (b) in the Digital Meets Analog chapter.

(a) The main problem illustrated is that you should not present a TTL input with a slowly increasing or decreasing signal. A standard TTL (or CMOS) input has very little or no hysteresis, so as the signal slowly goes through the input transition region, noise on the input (or output switching noise conducted back into the input circuitry) can cause the gate to switch back and forth several times while the input signal is in the transition region. This causes output buzz during the switching interval, which usually causes further problems downstream (like if it feeds a counter, then the number of real input pulses will be greatly over-counted. And as chroot points out for CMOS inputs, you get a *big* increase in Idd current for the gate if you hold the input in the middle of the transition region for any length of time.

But this circuit is used a lot, as long as the 2nd gate is a Schmidtt trigger gate, which means it has an explicit input hysteresis voltage, and that voltage is usually large enough to prevent noise from causing extra output transitions while the slow input signal goes through the transition region. See the datasheet for the 74AS132 Quad 2-input NAND gate, for example.

Another secondary problem with this circuit is that you shouldn't use TTL gates if you want a symmetrical transition delay for high-to-low and low-to-high transitions. TTL input and output trigger levels are not very symmetrical -- instead, use a CMOS Schmitt trigger gate for the 2nd gate, and some compatible CMOS gate for the 1st gate.


(b) Remember that TTL has an asymmetric output drive structure ("bipolar BJT totem pole"), so it typically sinks current better than it can drive it. Check out the Ioh and Iol output current drive specs on a datasheet for something like 74S or 74LS series logic. So to drive an LED, you will typically pull down to turn it on, and add the series resistor to the LED to set the LED current. Some LEDs come with built-in resistors, but it is usually cheaper to just use a jellybean resistor with the LED unless board area is at a huge premium. In order to fan out and drive some more gates, you need to factor in the current that you are investing in the LED drive, and make sure that any additional gates that you drive will still see the Vil voltage that they expect. You probably wouldn't drive more than one more gate, and you could then use that buffer gate to fan out to the usual number of other gates with the slightly delayed copy of the original signal.


Hope that all makes sense. Now for another couple of bad circuits...
 
Last edited:
  • #39
How about a couple opamp circuits? These show a couple of the most common errors that EE students (and new EEs!) make when working with simple opamp circuits. These are from Chapter 3 of Horowitz and Hill on opamps.

Same as before -- if you know the answers easily, please hang back to let others work on them. And for those posting possible answers, please do not guess! Check out some datasheets for typical representative components, and see if you can see some specifications that are being violated...
 

Attachments

  • HH_Ch9ab.JPG
    HH_Ch9ab.JPG
    50 KB · Views: 867
  • #40
berkeman said:
How about a couple opamp circuits? These show a couple of the most common errors that EE students (and new EEs!) make when working with simple opamp circuits. These are from Chapter 3 of Horowitz and Hill on opamps.

Same as before -- if you know the answers easily, please hang back to let others work on them. And for those posting possible answers, please do not guess! Check out some datasheets for typical representative components, and see if you can see some specifications that are being violated...

[Circuit A]
Berkeman, I'm so used to working with ideal views of the op-amp, that when I need to take device limitations into account, I get stalled...
But looking at the circuit, I see no resistor, so when the diode is conducting, current will flow without limitation and will thus damage the very delicate 741?

Can give some more hints with regards to circuit A?-
 
  • #41
ranger said:
[Circuit A]
Berkeman, I'm so used to working with ideal views of the op-amp, that when I need to take device limitations into account, I get stalled...
But looking at the circuit, I see no resistor, so when the diode is conducting, current will flow without limitation and will thus damage the very delicate 741?

Can give some more hints with regards to circuit A?-

That's one of the problems with (a), and as you say, it could be fixed with a resistor between the opamp output and the diode's anode (the "output" of the circuit).

There's one more problem with (a), and it has to do with the potentiometer.
 
  • #42
berkeman said:
There's one more problem with (a), and it has to do with the potentiometer.

They could have used a rheostat to handle the higher power dissipations? And also, when pot is "maxed out", we'll be putting about 30V into the op-amp. According to the datasheet, we're pushing the limits of the 741 here. No?
 
  • #43
ranger said:
They could have used a rheostat to handle the higher power dissipations? And also, when pot is "maxed out", we'll be putting about 30V into the op-amp. According to the datasheet, we're pushing the limits of the 741 here. No?

Nope. The pot looks like it is connected to the same rails as the opamp. The opamp rails aren't shown, but it would be pretty standard to run it between those +/-15V rails.

Here's a very good (classic) primer on potentiometers from Bourns:

http://www.bourns.com/pdfs/trmrpmr.pdf

Hint -- the issue has to do with "Dry Circuit Conditions"...
 
Last edited by a moderator:
  • #44
So, in time it is possible that an oxide film will form at the contact of the wiper in the potentiometer. And because of the very low input current of the opamp, there will not be enough punch through voltage at the wiper contact to break down the oxide and the input of the opamp will remain isolated.

Would a resistor from the +15V or -15V rail to the wiper solve the problem?
 
  • #45
antonantal said:
So, in time it is possible that an oxide film will form at the contact of the wiper in the potentiometer. And because of the very low input current of the opamp, there will not be enough punch through voltage at the wiper contact to break down the oxide and the input of the opamp will remain isolated.

Would a resistor from the +15V or -15V rail to the wiper solve the problem?

Correct! It is a common mistake to ignore the minimum wiper current specification for a trimpot. The Bourns application note suggests 10uA to 100uA, but the potentiometer datasheet should list the number for whichever pot you are using. The LM741 input bias current is well below these numbers, so you can't just connect the wiper to the opamp input alone. And yes, you would do something more like what you are suggesting, where you connect the CW side of the pot to +15V, connect the wiper to the CCW side of the pot (Quiz Question -- why the CCW side?), and use another resistor down to -15V in a voltage divider arrangement to vary the input voltage to the opamp, while meeting the wiper current and power rating for the trim pot.

Good job. And now all of that should provide the hint necessary to solve circuit (b)...:biggrin:
 
Last edited:
  • #46
antonantal said:
So, in time it is possible that an oxide film will form at the contact of the wiper in the potentiometer. And because of the very low input current of the opamp, there will not be enough punch through voltage at the wiper contact to break down the oxide and the input of the opamp will remain isolated.

Would a resistor from the +15V or -15V rail to the wiper solve the problem?
berkeman said:
Correct! It is a common mistake to ignore the minimum wiper current specification for a trimpot. The Bourns application note suggests 10uA to 100uA, but the potentiometer datasheet should list the number for whichever pot you are using. The LM741 input bias current is well below these numbers, so you can't just connect the wiper to the opamp input alone. And yes, you would do something more like what you are suggesting, where you connect the CW side of the pot to +15V, connect the wiper to the CCW side of the pot (Quiz Question -- why the CCW side?), and use another resistor down to -15V in a voltage divider arrangement to vary the input voltage to the opamp, while meeting the wiper current and power rating for the trim pot.

Good job. And now all of that should provide the hint necessary to solve circuit (b)...:biggrin:

Wow, I just learned something really useful here!
 
Last edited by a moderator:
  • #47
For circuit b, I think we need resistor from the non-inverting input to ground as a return path for the very small input current. Also if one wishes to work with small signals of varying frequency, the resistor will also help to set the cut-off frequency for ac signals (f3dB).
 
  • #48
berkeman said:
Quiz Question -- why the CCW side?

Because we want maximum input voltage to the opamp when the potentiometer is turned all the way in the CW direction.

If we connect the wiper to the CCW end, when we turn the pot all the way in the CW direction the wiper shorts the resistance of the pot and all the voltage will be droped on the resistor connected from the CCW end to the -15V rail, and we have maximum voltage at the input of the opamp.


If we connect the wiper to the CW end of the pot, when we turn it all the way in the CW direction the whole resistance of the pot enters in the voltage divider and we have minimum voltage at the input of the opamp.
 
  • #49
ranger said:
For circuit b, I think we need resistor from the non-inverting input to ground as a return path for the very small input current. Also if one wishes to work with small signals of varying frequency, the resistor will also help to set the cut-off frequency for ac signals (f3dB).

Ding, ding, ding! Another correct answer. So to summarize the answers for the two circuits in Post #39:

(a) The top opamp output needs a series resistor before the clamp diode, and needs a different potentiometer connection to ensure that the pot's minimum wiper current spec is met.

(b) A DC path is needed to supply the opamp's input bias current.

Both of these are very common errors, as I said before.

I'll post another circuit here in a little bit...
 
  • #50
antonantal said:
Because we want maximum input voltage to the opamp when the potentiometer is turned all the way in the CW direction.

If we connect the wiper to the CCW end, when we turn the pot all the way in the CW direction the wiper shorts the resistance of the pot and all the voltage will be droped on the resistor connected from the CCW end to the -15V rail, and we have maximum voltage at the input of the opamp.


If we connect the wiper to the CW end of the pot, when we turn it all the way in the CW direction the whole resistance of the pot enters in the voltage divider and we have minimum voltage at the input of the opamp.

Excellent. Whenever you are putting a pot into a circuit, stop and think about how the behavior of the circuit is going to be changed by turning the pot, and be sure to make the behavior happen in the natural/intuitive way. Turning a pot CW should increase volume, or increase voltage, or ... etc.
 
  • #51
Here are another couple more bad opamp circuits from chapter 3 of H&H. They share a common theme in their problems...
 

Attachments

  • HH_Ch3i.JPG
    HH_Ch3i.JPG
    49.6 KB · Views: 734
  • HH_Ch3m.JPG
    HH_Ch3m.JPG
    51.3 KB · Views: 690
  • #52
[Circuit I. - +15V regulator]

So far I see the following problem with it - the missing base resistor shows an improperly biased BJT. If one wishes to turn on the transistor based on voltage, a FET should be used. Preferably a MOSFET so we don't accidentally forward bias the gate-source region. And also a MOSFET is better suited as an analog switch. If however, the current controlled device is desired, just pop in an appropriate base resistor.

I'll try to find some more errors.

Berkeman, does this circuit have a problem with varying VE due to varying VB as the output of the op-amp varies depending on the voltage differential?
 
Last edited:
  • #53
ranger said:
[Circuit I. - +15V regulator]

So far I see the following problem with it - the missing base resistor shows an improperly biased BJT.

Why can't the opamp supply the needed base current?

ranger said:
Berkeman, does this circuit have a problem with varying VE due to varying VB as the output of the op-amp varies depending on the voltage differential?

If you mean in the sense of PSRR (power supply rejection ratio), then not really. There is a more fundamental problem with the opamp supply voltage...
 
  • #54
berkeman said:
Why can't the opamp supply the needed base current?

I don't understand this. Why not have a resistor to bias the BJT? The BJT has a relatively low input impedance. Shouldn't we want to avoid large output currents to prevent excessive power dissipation on the output stage of the op-amp :confused:
 
  • #55
ranger said:
I don't understand this. Why not have a resistor to bias the BJT? The BJT has a relatively low input impedance. Shouldn't we want to avoid large output currents to prevent excessive power dissipation on the output stage of the op-amp :confused:

How do you provide feedback to stabilize the regulated output voltage if the opamp were not feeding the base?
 
  • #56
Powering the op-amp from its own stabilised output won't work. To bias the transistor, the op-amp output would have to be higher than the supply voltage, and that can't happen.

Powering the opamp from the unstabilized 20 to 30V supply should be OK.
 
Last edited:
  • #57
AlephZero said:
Powering the op-amp from its own stabilised output won't work. To bias the transistor, the op-amp output would have to be higher than the supply voltage, and that can't happen.

Powering the opamp from the unstabilized 20 to 30V supply should be OK.

Also, for better regulation of the output voltage I would supply the zener through a resistor from the stabilized 15V supply, not from the unstabilized supply.

That pretty much answers question "I". The opamp needs a supply that is high enough to let it comfortably control the BJT base voltage. Check the 741 datasheet to see how high the output can go with respect to the V+ supply, and add some margin. AlephZero's comment about how to supply the zener is also a good idea.

Now, with all those hints, the other circuit in "M" should be pretty easy to solve...
 
  • #58
We can't have 15V at the output of the first opamp if it is powered from +5V.
 
  • #59
antonantal said:
We can't have 15V at the output of the first opamp if it is powered from +5V.

Absolutely correct. So to summarize the answers for Post #51,

(i) The output voltage of an opamp is limited by its V+ supply rail, and also further limited by different amounts, according to the output voltage specification on the datasheet.

(m) (same answer as i)


I'll post another question in the morning. There are a couple on this same opamps page that are bothering me a bit. Not simple answers...
 
  • #60
berkeman said:
AlephZero's comment about how to supply the zener is also a good idea.

I posted the zener comment, then decided (incorrectly) that it wouldn't work and deleted it. :rolleyes:

It will work, of course.
 
  • #61
Hey berkeman,

I don't have a scanner right now. Could you post circuit B (x100 op-amp output stage for audio amp) and circuit G (x100 audio amp. (single supply)) so we can get some thoughts on it? You should of course post yours first.

thanks.
 
  • #62
ranger said:
Hey berkeman,

I don't have a scanner right now. Could you post circuit B (x100 op-amp output stage for audio amp) and circuit G (x100 audio amp. (single supply)) so we can get some thoughts on it? You should of course post yours first.
The order of the figures must have changed in the 2nd edition of H&H, but I think these are what you're asking for. They're getting a bit harder now...

[G] x100 opamp output stage for audio amp (with BJT input amp)

[J] x100 audio amplifier (single supply)
 

Attachments

  • HH_Ch3_BJT_x100opamp.JPG
    HH_Ch3_BJT_x100opamp.JPG
    42 KB · Views: 706
  • HH_Ch3_9V_x100.JPG
    HH_Ch3_9V_x100.JPG
    44.5 KB · Views: 686
Last edited:
  • #63
For the first circuit, I don't know what is the range of the input voltage but if it can reach a higher value than the potential on the base of the BJT, that electrolytic capacitor is not a good idea.

In the second circuit, there is no dc path to the ground for the inverting input.
 
Last edited:
  • #64
Circuit G:

It seems a coupling capacitor is missing from the output of the bjt amplifier to the input of op-amp. There should also be resistor to ground to cater for the bias current on the non-inverting input. Also the resistor will set the f3dB frequency; I guess we don't want to amplify all frequencies.
Shouldn't we also want to add a cap in series with the 1K to have unity gain at DC? We'd of course choose C to have the appropriate f3dB frequency.
 
Last edited:
  • #65
antonantal said:
For the first circuit, I don't know what is the range of the input voltage but if it can reach a higher value than the potential on the base of the BJT, that electrolytic capacitor is not a good idea.
Good point about the cap, but they are probably assuming a pretty small signal (no more than 15V/100 one would hope), centered around ground as the audio input.

antonantal said:
In the second circuit, there is no dc path to the ground for the inverting input.

You don't need a DC path to ground, per se, you just need a DC source for the input bias current. The opamp output DC connection could supply that. The issue with the 2nd circuit is something different. Hint -- be sure to double-check the datasheet for the LM358. It has some unique characteristics that the author of this bad circuit was apparently trying to use...
 
  • #66
ranger said:
Circuit G:

It seems a coupling capacitor is missing from the output of the bjt amplifier to the input of op-amp. There should also be resistor to ground to cater for the bias current on the non-inverting input. Also the resistor will set the f3dB frequency; I guess we don't want to amplify all frequencies.
Shouldn't we also want to add a cap in series with the 1K to have unity gain at DC? We'd of course choose are to have the appropriate f3dB frequency.

Good stuff, ranger. Yes, the input offset at the V+ input of the opamp would peg the output of the x100 amp. And adding a cap and ground bias resistor will mostly fix that. Adding a cap to the 1k pulldown resistor to ground on the V- input will roll off the DC gain as you say, but it would also help fix one last problem that this circuit would have if you just left the opamp's gain setting resistor as they are right now. Can you see what that would be?
 
  • #67
Unfortunately, I cannot quite put my finger on the last problem, berkeman :redface:

But does it have to do with trimming the off-set voltage?
 
  • #68
ranger said:
Unfortunately, I cannot quite put my finger on the last problem, berkeman :redface:

But does it have to do with trimming the off-set voltage?

Not exactly. Since the gain is x100, and the supply rail is 9V, try putting in a conservative signal to give you a 5Vpp output signal, so 5V/100 = 50mVpp. What will the output look like?
 
  • #69
ranger said:
Unfortunately, I cannot quite put my finger on the last problem, berkeman :redface:

But does it have to do with trimming the off-set voltage?

Oh wait, you said "last problem", so I thought you meant the 2nd circuit. But if you're referring to my last comment for the first circuit, then yes, the problem is with the input offset voltage being amplified by x100. What do you typically do to minimize the input offset voltage component generated by the input offset current for the opamp? And assuming that you do that here, what are you left with as an input offset voltage for, say, an LM741 opamp? So what do you get for an output error after the x100 amplification?
 
  • #70
berkeman said:
Oh wait, you said "last problem", so I thought you meant the 2nd circuit. But if you're referring to my last comment for the first circuit, then yes, the problem is with the input offset voltage being amplified by x100. What do you typically do to minimize the input offset voltage component generated by the input offset current for the opamp? And assuming that you do that here, what are you left with as an input offset voltage for, say, an LM741 opamp? So what do you get for an output error after the x100 amplification?

Yes, I meant the last problem with circuit G.

Well to minimize such offset voltage, one could use a trimming network or simply use an op-amp with very small VOS or a FET amplifier which has little input current. Another way I see to eliminate the input-offset voltage due to offset current is to make the the resistances of both the inverting and non-inverting input equal. In this way, both inputs will have negligible offset voltage due to offset current becuase they see the same equivalent resistance.

According to the datasheet for the 741, we should expect a typical offset voltage of about 1mV. I guess this also applies to a properly trimmed op-amp?
 
Last edited:

Similar threads

Back
Top