You need to use EasyEDA editor to create some projects before publishing
Adding Pre-Amp to Electret Gets "no DC value" Error
2140 16
stevensrmiller 8 years ago
I'm not all that new to electronics, but I am new to Spice simulation. Here and there, I get errors from the simulator that say, "no DC value," and refer to a signal generator. The project I am working on now, which is based on a [great paper][1] written by John Caldwell, and published by TI, is a pre-amplifier for an electret microphone. Caldwell's paper shows how to simulate an electret with a DC power supply, an AC source, and a voltage-to-current converter. When I simulate his, uh, simulation, it works perfectly. However, when I add the rest of his pre-amplifier circuit, I get the "no DC value" error. This happens even if the pre-amplifier circuitry isn't connected (other than by a common ground) to the electret circuitry. I don't understand that at all. Here's the project link: [https://easyeda.com/stevensrmiller/Electret_Simulator-gewqI0hbt][2] And here's the simulation report: Circuit: untitled Reducing trtol to 1 for xspice 'A' devices Doing analysis at TEMP = 27.000000 and TNOM = 27.000000 Warning: vg2: no DC value, transient time 0 value used Initial Transient Solution -------------------------- Node Voltage ---- ------- xu1.11 -nan xu1.12 -nan xu1.6 nan xu1.7 -nan c2_2 -nan xu1.53 -2.6 xu1.54 11.6 xu1.90 -nan xu1.91 25 xu1.92 -25 vcc 9 xu1.99 4.5 xu1.10 nan c2_1 -nan xu1.13 nan r5_1 -nan xu1.14 nan xu1.9 0 xu1.8 -nan v1_+ 62 vg2_2 62 c3_2 -nan r3_2 -nan volprobe1 -nan h.xu1.hlim#branch nan v.xu1.vlim#branch -nan v1#branch 0 v3#branch -nan vg2#branch 0 v.xu1.vln#branch nan v.xu1.vlp#branch nan v.xu1.ve#branch -nan v.xu1.vc#branch -nan v.xu1.vb#branch nan a$poly$e.xu1.egnd#branch_1_0 -nan ********************************************************************************** Timeout, Your simulation results are too large! Try reducing the total simulation time (Stop Time - Start Time), increasing the maximum time step, removing some of your probes or breaking your circuit into smaller simulatable blocks. ********************************************************************************** I'd be very grateful if someone could help me understand and correct this. Thanks! [1]: http://www.ti.com/tool/TIPD181 [2]: https://easyeda.com/stevensrmiller/Electret_Simulator-gewqI0hbt
Comments
andyfierman 8 years ago
`Warning: vg2: no DC value, transient time 0 value used` It's a warnign not an error. Don't worry about it. :) For more, see this: https://easyeda.com/forum/topic/What_does_this_mean_-Fx3XewqI0 I did notice that the VCC connection for your 741 opamp is upside down. :)
Reply
stevensrmiller 8 years ago
@andyfierman Hey, thanks! Caldwell's schematics typically don't show the polarities of the supply pins on his op-amps, and it turns out they match the symbols on the nearby differential inputs (the opposite of the generic op-amp in the EasyEDA editor). I just unthinkingly followed his schematic without noticing what I'd done. Fixing that makes the warning go away and I do get a waveform. Thanks for the link. Very helpful stuff. Am I correct that a warning must be dealt with? That is, whenever I get one, I don't get a waveform.
Reply
andyfierman 8 years ago
No, a warning won't stop a sim running. If it doesn't run then look for things like typos and syntax errors in the spice directives and component names etc.
Reply
andyfierman 8 years ago
@Stevensrmiller, You might like to have a browse through the simulations using the EasyEDA electret microphone model in this project: https://easyeda.com/andyfierman/Projects_for_beginners-tqkewO60i (Sorry, I couldn't find the project last night when I first replied.) :)
Reply
andyfierman 8 years ago
Nice article by John Caldwell: good spot!
Reply
stevensrmiller 8 years ago
@andyfierman It was a good article, wasn't it? The internet is riddled with circuits and Web pages that purport to explain them, but they aren't all written by people who truly know what they're doing. This one, with the imprimatur of TI on it, is a gem. Mr. Caldwell's degrees are in electrical engineering, and he appears to have learned his lessons well. Mine are in physics and computer science, so I know what a micro-amp and a Pascal are, and I can do math, but some of his methods are still a bit opaque to me. In particular, I'm baffled as to how his op-amp yields a predictable closed-loop gain with no resistor in series with C3 in the feedback network. He would seem he is treating the electret as a current source, not a voltage source and, on that basis, he is able to predict the ac component that flows through R2 (and, from there, its ac voltage drop, then the ac drops across R4 and R6). With a resistor, he would have an ordinary inverting amplifier. Without it, he has a current-to-voltage converter. I don't know much about electret microphones, but I had thought they were voltage sources, not current sources. Do know if I'm interpreting his design correctly, or where I might find more info on electrets? Thanks for the help!
Reply
andyfierman 8 years ago
"I'm baffled as to how his op-amp yields a predictable closed-loop gain with no resistor in series with C3 " The jfet stage inside the electret capsule has an external pullup resistor, R1. This essentially makes the jfet output look like a Norton source of a current source (the jfet drain pin) in parallel with a resistor (R1). A Norton source is equivalent to a Thevenin source of a voltage source in series with a resistor. The open circuit voltage of the Thevenin source is equalt to the open circuit voltage of the Norton source (i.e. with no external load apart from the internal parallel reistance of the Norton source itself). The short circuit current of the Thevenin source is equal to the current of the cosntant current source of the Norton source. A 1V source in series with a 1 Ohm resistor is the exact Thevenin equivalent of a Norton source comprising a 1A source in parallel with a 1 Ohm resistor. Therefore the midband gain of opamp in Caldwell's circuit can be seen to be defined by -R2/R1. You can play with such sources in EasyEDA of course... Is good yes?
Reply
stevensrmiller 8 years ago
I'm not following you, I'm afraid. If I change R1 from 13.7k to twice that, 27.4k, the output voltage waveform at the junction of R3 and C4 doesn't change. I am still studying them, but it appears that the current-to-voltage gain of a transimpedance amplifier using an op-amp is set solely by the value of R2. Here, the AC input current is 8.803 uA. I don't quite understand how it does this, but the op-amp matches that current through R2, which is 75k ohms. That means that the drop across R2 is 75,000 x .000008803 ~ 660 mV, which is just what I'm seeing in the simulation. Varying R2 does change the amplification factor, which makes sense for a current-to-voltage amplifier. Thus, I believe the current-to-voltage gain is simply -R2. Were you referring to voltage gain, not current-to-voltage gain? I do admit, I'm still mystified as to the nature of electret microphones. A big part that I'm still confused about (among others :) ), is the use of an op-amp to balance a current, instead of a voltage, at the inverting input. Will keep reading...
Reply
andyfierman 8 years ago
Sorry, I'm being stupid. What I said about Thevenin and Norton equivalent sources is true but my description of the gain in Caldwell's circuit missed out one crucial fact. The top end of R1 is tied to a supply. With an ideal (or at least a well decoupled) supply that is an AC ground. At mid-band, the drain of the jfet and therefore the jfet end of R1 is shorted to the inverting input of the opamp. In a linear opamp circuit the inverting input must be at the same potential as the non-inverting input (if it wasn't the open loop gain of the amp would make the output fly off and hit one or the other of the supply rails. To understand this, think of an ideal opamp with infinite gain but limited supply rails and hence output swing). The inverting input is therefore referred to as a virtual earth node. It doesn't have to be at 0V but it means that the feedback around the opamp holds it (to a 1st approximation) at a constant voltage equalt to the voltage at the inverting input. In this circuit that is a DC voltage equalt to mid supply. Now, since the virtual earth node is held at a constant voltage and the top end of R1 is also held at a constant voltage, there is therefore no AC voltage across R1. So there is no AC current flow through it. Therefore all the AC signal current flowing in and out of the jfet drain MUST flow through the input capacitor, C3, and - because an ideal opamp is assumed to have infinite input impedance - there is no signal current flow into and out of the opamp inverting input pin. Therefore all the signal current HAS to flow through R2. So, yes the mid-band gain is set purely by R2. Sorry about my lousy explanation earlier. If you think of an opamp as being a box with infinite gain and input impedance, zero output resistance but a supply limited swing and an infinite bandwidth, you can then understand how most opamp circuits work simply from realising that the difference between the inverting and non-inverting input must be zero or the output hits a rail and there is zero current flow into the opamp input pins. In practice it's a bit messier than that but that simple model is the key to everything else. :)
Reply
stevensrmiller 8 years ago
Thanks, that all makes perfect sense. My continuing problem is that I can't get my head wrapped around the fact that the *current* output of the op-amp matches the current being drawn by the electret. I mean, of course it has to be, or Kirchoff's Law of current-summing would be violated. But... it's easy to understand that an op-amp swings its voltage as necessary to keep the two differential inputs matched (assuming the necessary feedback path exists). But how does the op-amp "know" what current to supply? I feel dumb even putting it that way, but that shows how far from understanding this use of an op-amp I am. The principles that make an inverting voltage amplifier work are quite clear to me. But this is something entirely different. Seems like the op-amp *must* still be working in a way that balances its inputs, but what input voltage is being supplied to its inverting input in a transimpedance amplifier? How does that result in the necessary current being provided at the op-amp's output? Your paragraph above, about how I should think of an ideal op-amp, probably provides the answers. Alas, I'm at work and will have to delve into this in more detail later. Thanks again!
Reply
andyfierman 8 years ago
"I can't get my head wrapped around the fact that the current output of the op-amp matches the current being drawn by the electret." Beware that: I) it's only the AC signal current and not the DC bias current that this description applies to; II) it's not the current out of the opamp that you need to think about. It's the signal current flowing out of the jfet drain that flows through the feedback resistor, R2.
Reply
stevensrmiller 8 years ago
"...it's not the current out of the opamp that you need to think about. It's the signal current flowing out of the jfet drain that flows through the feedback resistor, R2." Aren't they the same?
Reply
andyfierman 8 years ago
They are but if you concentrate on where the current has to come from you miss the important point that the opamp has to set it's output so that the voltage across R2 is just right to push exactly the jfet drain current through R2. The opamp is always balancing the current through its feedback path with the current sourced or sunk through its input path to maintain a 0V difference between the inverting and non-inverting inputs. :)
Reply
andyfierman 8 years ago
A bit more background that I wrote a while ago can be found here: https://www.circuitlab.com/forums/support/topic/p28xfm83/incorrect-simulation-of-an-opamp-under-positive-feedback/ I haven't got around to rewriting it for EasyEDA... :)
Reply
stevensrmiller 8 years ago
Okay, I've read the items you provided (thanks!), and some other material. I think I've got it, but I'd be grateful for your review. A hypothetical current source feeding the inverting input to an op-amp with a negative feedback path might be part of a circuit that looks like this: I ---> R2 .-/\/\/\-. | | R1 |Z |\ | Vin o---/\/\/\--+--|-\ | | >--+--o Vout .--|+/ | |/ | --- /// Now, I know that the voltage over ground at point Z is zero. Thus, the drop over R2 is 0 - Vout = -Vout and, therefore, the current through R2 is -Vout / R2 = I. No current flows into the inverting input on the op-amp (as it has, being an ideal op-amp, infinite input impedance). Thus, the current through R1 is also I. The drop over R1 is Vin - 0 = Vin, so I = Vin / R1. This implies that Vin / R1 = -Vout / R2, which means that Vout as a function of Vin is the familar Vout = -Vin x R2 / R1 that we all know from the behavior of a common inverting amplifier. So far, so good, and this establishes that the current-to-voltage relationship of a transimpedance amplifier is Vout = -I x R2. We could stop there and be ready to start designing things with this information, but I'm compulsive about things like this, so I can't stop myself from doing more math. And that's where it gets a little mind-bending for me. It seems to me that the drop across the series network R1R2 must be Vin - Vout. The current through R1R2 is, again, I. Thus, it seems that this equation holds: [1] I = (Vin - Vout) / (R1 + R2) We can solve this for Vout as a function of I by substitution, replacing Vin with -Vout x R1 / R2 (as we already showed that Vout = -Vin x R2 / R1): [2] I = (-Vout x R1 / R2 - Vout) / (R1 + R2) Doing some simple algebra, we get these steps: [3] I x (R1 + R2) = -Vout x R1 / R2 - Vout [4] I x (R1 + R2) = -Vout x (R1 / R2 + 1) [5] -I x (R1 + R2) / (R1 / R2 + 1) = Vout But we already showed that Vout = -I x R2, while [5] appears to suggest that Vout is a function not only of I and R2, but of R1 as well. However, doing a bit more algebra, something surprising (to me, anyway) emerges. Multiplying the top and bottom of the left hand side of [5] by R2 gives us this: [6] -I x R2 x (R1 + R2) / (R1 + R2) = Vout which reduces to this: [7] -I x R2 = Vout The R1 term in [5] drops out! This means the source impedance makes no difference to the current-to-voltage ratio of the transimpedance amplifier (which we knew as soon as we established that Vout = -I x R2, but I didn't believe it until I could show that [1] can be reduced to [7] on the strength of the fact that Vout = -Vin x R2 / R1 for an inverting amplifier). That's kind of amazing, but I think I actually get it! So, uh... do I actually get it? If so, thanks so much for your help. If not, thanks in advance for pointing out any mistakes.
Reply
andyfierman 8 years ago
You have started from a complicated initial condition of an ideal current source driving an inverting opamp configuration that you would normally use to amplify the output of an ideal *voltage* source. This arguably makes it harder to demostrate that R1 has no effect when the source is an ideal curre3nt source but it is nontheless absolutely correct. If you start from an ideal voltage source input then you arrive at `Vout/Vin = -R2/R1` via demonstrating that; `Vout = -I*R2` And so if the source is replaced by a current `I` then clearly it is still true that, `Vout = -I*R2` Well done. You are now the owner of sufficient arcane knowledge of operational amplifier theory to understand how the opamp integrator and such cheeky applications as precision peak detectors and recitfiers work... :) BTW, I am very amused by your revertion to the use of ASCII art to draw your example circuit... =) As reasonable book to find out more from is: `Opamps for Everyone` by Ron Mancini of TI. The general opinion is that the 3rd edition covers more ground that the 4th but there are copies of various editions floating about on the the web so have a look and see which looks best. Another good one - I had a copy from National Semiconductor which got nicked but was lucky enough to get another just before it went out of print - is: `Intuitive IC Op Amps from Basics to Useful Applications` by Thomas M. Frederiksen The absolute bible on Opamp theory is: Tobey, G. E., Graeme, J. G., and Huelsman, L. P., Operational Amplifiers: Design and Applications, McGrawHill, 1971. These two are good for applications information, the Graeme book especially: Jerald G. Graeme Applications of Operational Amplifiers - 3rd generation techniques McGraw-Hill 1973 Burr Brown Electronics Series https://ia600708.us.archive.org/15/items/ApplicationsOfOperationalAmplifiers-3rdGenerationTechniques/Graeme-ApplicationsOfOperationalAmplifiers3rdGenerationTechniques.pdf `HANDBOOK OF OPERATIONAL AMPLIFIER APPLICATIONS` by Bruce Carter and Thomas R. Brown http://www.ti.com/lit/an/sboa092a/sboa092a.pdf and this excellent book from AD, which has two possible sites which may or may not offer slightly different editions: `Op Amp Applications Handbook` by Walter Jung. http://www.analog.com/library/analogdialogue/archives/39-05/op_amp_applications_handbook.html http://www.analog.com/en/education/education-library/op-amp-applications-handbook.html
Reply
Login or Register to add a comment
goToTop
你现在访问的是EasyEDA海外版,建议访问速度更快的国内版 https://lceda.cn(需要重新注册)
如果需要转移工程请在个人中心 - 工程 - 工程高级设置 - 下载工程,下载后在https://lceda.cn/editor 打开保存即可。
有问题联系QQ 3001956291 不再提醒
svg-battery svg-battery-wifi svg-books svg-more svg-paste svg-pencil svg-plant svg-ruler svg-share svg-user svg-logo-cn svg-double-arrow -mockplus- -mockplus- -mockplus- -mockplus- -mockplus- -mockplus- -mockplus- -mockplus-@1x -mockplus-

Cookie Notice

Our website uses essential cookies to help us ensure that it is working as expected, and uses optional analytics cookies to offer you a better browsing experience. To find out more, read our Cookie Notice