Bad Circuits - Test Your Knowledge

Click For Summary
The discussion focuses on analyzing "Bad Circuits" from "The Art of Electronics" by Horowitz and Hill, specifically highlighting the challenges students face in identifying errors in circuit schematics. Participants are encouraged to share problematic circuits they encounter and engage in discussions to enhance learning rather than simply providing answers. Key issues identified include the necessity of current-limiting resistors for LEDs and the implications of grounding and circuit design practices. The conversation also touches on the effects of load capacitance and fan-out limitations in TTL circuits, emphasizing the importance of proper circuit design for functionality and performance. Overall, the thread serves as a collaborative educational resource for understanding circuit design flaws.
  • #31
Okay, so on (b) you folks have worked through most of it, and I'll summarize the answer(s) soon. But there's another consideration that I'd like to see brought up, even though it's only really true for "TTL" logic, which sees very limited use nowadays.

To save board space and cost, you can drive an LED with a gate in some circumstances, and even drive other logic with that same signal as well. But you have to be sure to check some of the specs for the gates, and make sure that you are not over-taxing the output current capability of the gate. Now, assuming that the gate driving the LED is "TTL" (like 74LSxxx, 74Sxxx, etc.), what would be the best way to connect the LED (plus the series current limiting resistor that you-all have mentioned) in order to most efficiently drive the LED and a few other gates as well? Why?

Do not guess on this one. Read a couple datasheets and reason it out.

I already have another pair of questions that I'll post later today or tomorrow morning. They illustrate a pretty cool (and very important) real-world issue in digital logic.
 
Engineering news on Phys.org
  • #32
Well, actually berkeman, there's a huge issue left -- one that I thought you were alluding to in your last post. That issue is: power.

When you provide a middle-of-the-road input to a CMOS gate, you'll actually turn on both output transistors simultaneously. These two transistors will fight each other, conducting away your precious battery power. Everytime a gate changes state, the two transistors briefy conduct simultaneously, and this is the only time that a CMOS gate uses any appreciable power besides leakage.

If you apply a very slowly-rising signal to a CMOS gate, you're going to burn up a ton of power until the input rises high enough to turn off the PMOS devices.

Again, this isn't the kind of thing you're going to notice or worry about while bread-boarding in an introductory EE class, but it's a very, very real concern in industrial-quality design.

- Warren
 
  • #33
chroot said:
Well, actually berkeman, there's a huge issue left -- one that I thought you were alluding to in your last post. That issue is: power.

When you provide a middle-of-the-road input to a CMOS gate, you'll actually turn on both output transistors simultaneously. These two transistors will fight each other, conducting away your precious battery power. Everytime a gate changes state, the two transistors briefy conduct simultaneously, and this is the only time that a CMOS gate uses any appreciable power besides leakage.

If you apply a very slowly-rising signal to a CMOS gate, you're going to burn up a ton of power until the input rises high enough to turn off the PMOS devices.

Again, this isn't the kind of thing you're going to notice or worry about while bread-boarding in an introductory EE class, but it's a very, very real concern in industrial-quality design.

- Warren

Absolutely, but that's on part (a) of the two circuits. I was referring to the part (b) LED circuit in my previous post. Also, all the gates in these first two circuits are labelled "TTL", so the power issue in (a) is less important than if they were CMOS.

So to summarize where we are, we need the fundamental problem still to be identified in (a), and how can we reconfigure (b) to be more practical and support some amount of fan-out?
 
  • #34
Whoops! You're right berkeman, I was getting the two circuits confused.

- Warren
 
  • #35
chroot said:
If you're designing something that you intend to run at even a couple of kilohertz, though, this current-robbing LED will kill your design.
You are correct of course, but when would you ever want an LED that you wouldn't be able to see it blinking that fast?:blushing:
 
  • #36
How about a transistor to drive the LED? It'll cost a little board space however.
 
  • #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: 904
  • #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: 776
  • HH_Ch3m.JPG
    HH_Ch3m.JPG
    51.3 KB · Views: 723
  • #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.
 

Similar threads

  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
20
Views
2K
Replies
12
Views
3K
Replies
12
Views
3K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K