Feeling stupid: how to solve an AoE exercise - Page 1
Forum section: electronics / beginners

author: Moriambar
author_rank: Unknown
timestamp: April 04, 2020, 11:02:51 am
content: Hi,I'm currently studying a bit more seriously the AoE.Here is the circuit that I'm looking at (third editio, page 77, right column)It is supposed to generate an output pulse from a step in the input.I get how it does that etc. In the next page, there is the following exercise, though:QuoteMy take is this: first of all the voltage of the capacitor, albeit charging from a 5V power supply will eventually stop at ≈0.6V, due to the fact that Q2will start conducting, therefore stopping the charging of the capacitor.Recollecting the memories of the RC capacitor charging circuit (AoE 3rded, page 22), I see that the voltage I am searching for is or should be of the form Vout=Vpower+Ae-t/RC.EDIT: to clarify I consider Voutto be the voltage at the base of Q2, which is the right terminal of C1.Were Vpower=5V.I then try and find the A parameter, knowing that at t=0, Vout=-4.4V; thence I have -4.4V=5V+A=>A=-9.4Vso my equation should be Vout=5-9.4e-t/RC.I then solve for Vout=0.6V, and try and find t. I have0.6V=5V-9.4V e-t/RC=> 4.4V=9.4V exp[...] => 4.4/9.4=e-t/RC=> ln(4.4/9.4)= -t/RC => t= -ln(4.4/9.4) RC but the number I get is ≈0.75 RC and not 0.63 RC.Where and why am I gone wrong?Cheers.

author: iMo
author_rank: Super Contributor
timestamp: April 04, 2020, 11:13:29 am
content: Quote from: Moriambar on April 04, 2020, 11:02:51 amThe Vout only goes from 0V (aprox) to Vpower, it cannot be -4.4V.You should focus yourself on the voltage at the Q2 base.. The voltage there goes from -4.4 to 0.6V.

author: Moriambar
author_rank: Unknown
timestamp: April 04, 2020, 11:18:40 am
content: Quote from: imo on April 04, 2020, 11:13:29 amOk this I don't get. The previous paragraph of the text explained thatQuoteI interpreted this in the following manner: since the ∆V across the capacitor is ≈4.4 V (left terminal at 5V, right one at 0.6), when the voltage of the first terminal (which is connected to Q1's collector) drops to ground, the other terminal shows to be at -∆V with respect to it, ie -4-4V.Again what am I missing?EDITQuoteHow can Q2's base be at a different voltage than C1's right terminal? They're connected directly... so no ∆V should appear there, right?

author: iMo
author_rank: Super Contributor
timestamp: April 04, 2020, 11:25:13 am
content: The capacitor C1 in "idle mode" will have +5V at the left terminal and 0.6V at the right terminal.When the Q1 opens, the right terminal of the C1 will be -5V + 0.6 = - 4.4V, and the left will be 0V. From that time t=0 and VQ2base=-4.4V (Q2 closed) and Vout=5V C1 starts to discharge itself, such in time "t=.." it will reach VQ2base= +0.6V which opens Q2 (and Vout drops to 0V).

author: Moriambar
author_rank: Unknown
timestamp: April 04, 2020, 11:28:26 am
content: Quote from: imo on April 04, 2020, 11:25:13 amthanks for your reply and patience.So are you saying that I should focus about the other part of the capacitor charging up from 0 to 5V instead of considering what the right side is doing?I still am confused and not capable of calculatingThanks

author: Moriambar
author_rank: Unknown
timestamp: April 04, 2020, 11:42:35 am
content: nvm, it's in the errata:https://artofelectronics.net/errata/

author: iMo
author_rank: Super Contributor
timestamp: April 04, 2020, 11:43:00 am
content: When calculating the time "t" (while the Vout=5V) you have to consider the voltage rising from -4.4V to +0.6 at the base of the Q2.The rising voltage follows "discharging the C1" via the base resistor R3 of the Q2.The Q2's base-emitter is a diode basically. With negative voltage (like -4.4V) on the base with that wiring the diode is reverse polarized (and the Q2 is closed).PS: a simulation..

author: Moriambar
author_rank: Unknown
timestamp: April 04, 2020, 12:20:51 pm
content: Quote from: imo on April 04, 2020, 11:43:00 amyes thanks. Unfortunately the error was not mine, but it was in the errata. So I got the correct solution to start with, and thus I think I already understood it. Thanks for your reply anyway. and your patience too

author: rstofer
author_rank: Super Contributor
timestamp: April 04, 2020, 03:11:04 pm
content: Keep the errata in front of you at all times. There isn't a book published that doesn't have errors. The more diligent you are with understanding discrepancies, the more you will need the errata. BTW, there's no guarantee that the errata is all-encompassing. There may by other errors.Learn to use LTspice and simulate every circuit you possibly can. It's one thing to know the math, it's another to see it simulated. I would go further and suggest that a breadboard is another step in the learning process. But that takes a scope. Once again, I'm going to recommend the Analog Discovery 2 but I'm not going to duplicate what I have written over the last couple of weeks.There are a couple of links in this message:https://www.eevblog.com/forum/beginners/a-cost-effective-upgrade-from-a-6022bl-from-a-beginner/msg2990108/#msg2990108

author: Moriambar
author_rank: Unknown
timestamp: April 04, 2020, 04:23:12 pm
content: Quote from: rstofer on April 04, 2020, 03:11:04 pmhi,thanks for yout reply. I actually already have a bench and scope, and already worked a bit on many projects but still at an amateur level (mainly focused on i2c and arduino/attiny). Also I always used mosfets since I basically just had only the need for switches in my projects.BJTs have always been incredibly complicated for me and so I decided to tackle them using basically the only book I have (AoE).Regarding breadboarding I should be fine.LTSpice is another beast and I actually couldn't understand how to make it work for the life of me. I can draw a circuit but then… that's it.It does nothing.

author: iMo
author_rank: Super Contributor
timestamp: April 04, 2020, 04:47:54 pm
content: Here is the .asc file with your example.Double click the file and it opens in LTspice.Click at the runner there and it opens the black result window as well.Go to the schematics window and click at, for example, "out" wire with the cursor (a red "probe" appears when hovering over a wire) - you should get the waveform visible.When in the black window you may zoom-in by framing a part of waveform with the cursor while pressing a mice button.

author: rstofer
author_rank: Super Contributor
timestamp: April 04, 2020, 06:02:05 pm
content: Once the schematic is entered, the tricky bit might be getting the transient analysis command in place:Edit->Spice Analysis then select the Transient tab and set the end time. Close the dialog. The example uses an end time of 1 second. This is far too long and could be changed to something much smaller. OR, just use the window approach mentioned to zoom in on the important parts of the waveform.Click on the Running Man button to run the analysis.Setting up the signal source is also an issue: Right-click on the voltage source and select the PULSE radio button in the upper left. Fill in the blanks and you are good to go.If you get a trace color that is essentially invisible (like that lime green trace on a white background), right click on the signal name at the top of the plot window and select another color.I don't use the default black backgroundTools->Control Panel->Waveforms Tab->Color Scheme Button->"Click to edit Background color->Set RGB values to 255 for white background.The reason I don't use the black background is that it uses too much toner if I print the screen image. That, and I prefer the white background.

author: rstofer
author_rank: Super Contributor
timestamp: April 04, 2020, 06:13:24 pm
content: Quote from: Moriambar on April 04, 2020, 04:23:12 pmThen you are good to go in terms of visualization. You can always generate a square wave with your Arduino.There are some example problems that aren't worth the time to breadboard them. Others provide a lot of learning in a single example. This circuit is one of them. Change the capacitor value and see how the pulse changes. Sure, it's easy to understand it mathematically, it's more important to know it really works using actual components.

author: Moriambar
author_rank: Unknown
timestamp: April 04, 2020, 07:03:01 pm
content: Quote from: rstofer on April 04, 2020, 06:13:24 pmThanks, I usually generate a square wave with a 555, but still have to understand well how to get 50% duty cycle, but I plan to do it later.I feel the AoE may not be the best book to learn on, but if one is really committed, the examples are never trivial, and they always make you think. Wonderful

author: Renate
author_rank: Super Contributor
timestamp: April 04, 2020, 07:32:48 pm
content: Hey, that was fun!The interesting part is that it is the exponential decay of the voltage across the resistor that we care about.The cap could have been fed with a bias of 1000 V (but still P-P of4.4 Verr, I meant 5 V) and it would all work out the same.On the 555 duty cycle:Always remember, pin 3 (totem pole output) and pin 7 (open collector) are the same behaviour.Want a 50%? Connect pin 3 through an R to 2 & 6 & cap to ground.