You need to use EasyEDA editor to create some projects before publishing
Cannot simulate the simplest RC circuit.
3297 9
mbmast 8 years ago
I have a circuit I'm working on and was considering adding a simple RC circuit to control a transistor to enforce an initial state. I got as far as adding the capacitor in series with a grounded resister and threw in a voltage probe between the cap and resistor to fine tune the RC value before proceeding with adding the transistor and the rest of the initial state logic. What I discovered was that the voltage between the cap and resistor is always zero no matter what values I use for the cap and resistor. I even tried a full Farad for the cap and 1 Megohm for the resistor and still the voltage on the probe was a constant zero. Could someone take a look at the circuit and see what I could have missed? You can ignore all the op amp stuff and just look at the battery, the ground, C4, R12 and the probe, volProbe1. [enter link description here][1] I was running a transient simulation, starting at time 0, the increment set to 1 second and taking the simulation out to 120 seconds. Here's an image of the circuit with the relevant RC circuit circled: ![enter image description here][2] And here's an image of the transient simulation with the relevant probe and output identified: ![enter image description here][3] [1]: https://easyeda.com/editor#id=trpLJjECAW [2]: /editor/20160509/572fc7dfbcd69.png [3]: /editor/20160509/572fc812bed8e.png
Comments
andyfierman 8 years ago
Hi Mbmast, If you probe the +12V supply rail you will see why you get the result that the simulator is reporting. Your 12V supply 'battery' is an ideal DC Voltage Source. In spice, the voltage of an ideal DC Voltage Source at time t=0 is assumed by the simulator to have been present for all time t < 0, i.e. forever prior to the start of the simulation. Since the voltage of an ideal DC Voltage Source does not change at t=0, your capacitor C4 has already charged up to 12V through R12 so there is no current flow through it and therefore the voltage across R12=0. If you wish to see a change in the voltage across R12 from t=0 then you must introduce that change by some means. For a number of ways to do this, please see the EasyEDA Simulation eBook at: In particular: **Avoiding common mistakes:** https://docs.google.com/document/u/1/d/1OWZVVFRAe_2NW3WratpkA_SGuHa5AcRow5ZRfvcoVTU/pub#h.4d34og8 and: **Values and DC paths of RLC components:** https://docs.google.com/document/u/1/d/1OWZVVFRAe_2NW3WratpkA_SGuHa5AcRow5ZRfvcoVTU/pub#h.lnxbz9 and: **Configuring Voltage and Current Sources:** https://docs.google.com/document/u/1/d/1OWZVVFRAe_2NW3WratpkA_SGuHa5AcRow5ZRfvcoVTU/pub#h.2p2csry and: **Initial conditions and starting up circuits:** https://docs.google.com/document/u/1/d/1OWZVVFRAe_2NW3WratpkA_SGuHa5AcRow5ZRfvcoVTU/pub#h.46r0co2 * May I recommend that you take some time to read all the way through the Simulation eBook, including the links to simulations, as this will help to answer many of the questions that you have asked - and may well wish to ask in the future - here in the forum and so will save you a great deal of time whilst trying to get to grips with your simulations? :) (The Google links above are to the original copy of the Simulation eBook which you can also find at: https://easyeda.com/Doc/Simulation-eBook/ but the table of contents in the EasyEDA copy is broken and misses out some sections. We are working to fix it but in the meanwhile the copy published to the web from Google Drive works just as well.)
Reply
mbmast 8 years ago
Ah..... your explanation makes perfect sense. Thank you very much. Ok, looks like I have some reading to do.
Reply
andyfierman 8 years ago
Looking at your circuit and application, might this help? https://easyeda.com/andyfierman/Simple_LM324_squarewave_and_sawtooth_generator_-ZZTN4Ygys :)
Reply
mbmast 8 years ago
@andyfierman
Reply
mbmast 8 years ago
This helps a lot. It's a clever design. I like how C1 is used for both the square wave generator in U2 and the integrator in U3. I'm not too clear on what U1 does. And why is its non inverting input between a 1.0 and 1.1 meg resistor? Why not just two 1 meg resistors, or two 100K resistors? And lastly, is R4 is to avoid crossover distortion? Seems about 10X greater than most resistors I've seen used for this purpose. Thanks.
Reply
example 8 years ago
The circuit is far simper than you imagine. The actual oscillator is made up of the components around U2. See "Figure 27. Squarewave Oscillator" in: http://www.ti.com/lit/ds/symlink/lm124-n.pdf U1 just generates an approximately mid swing voltage that is needed to make the relaxation oscillator built around U2 work with a single supply. You could dispense with U1 and split R3 into a pair slung across the ground and supply with their common node connected to the non-inverting inptu of U2. I just use U1 instead because there are 4 LM324 in a box and I needed the same voltage it generates at the input of U3 anyway U2 is a standard non-inverting comparator with hysteresis (defined by the high and low output swing and the resistor potential divider set by R3 and R4 and the output voltage of U1). The output of U2 switches fully to the low and high extremes and as well as providing the positive feedback it is also used to feed the switched output back into C1 via RFREQ+R5. This sets up an exponential charge and discharge of C1 but because the target voltages are quite a bit larger than the comparator hysteresis trip points the charge looks almost linear because it only traverse a small part of the exponential curve in both rising and falling slopes. U3 buffers and amplifies the relatively small swing at the junction of C1 and RFREQ up to the maximum that the LM324 can achieve before it's output hits the ground and supply side output limits of it's swing (which is close to ground but only to about 1.5V below the +ve supply: see the LM324 datasheet). U1 supplies an output at slightly below 6V because it is set to the middle of the output swing of U2. This is because the symmetry of the squarewave is set by the symmetry of the LM324 outputs. If it swung to 0V and 12V then U1 would need to generate 6V. However, as just explained, the LM324 output swing down very close to ground but up to only about 1.5V below VCC (i.e. VCC-1.5 as in the datasheet). Therefore, U1 has to generate about 10.5V/2 i.e. 5.25V in order to set the reference for the hysteresis levels of the comparator formed by U2 at approximately mid-swing to ensure that the charge and discharge of C1 is symmetrical. The buffer U3 also has it's reference set by the output of U1 so that the output swings just within the limits of the LM324. Again R6 could be split and slung across the supplies to supply the reference but U1 is available for that so what the heck. U4 is just to play with really. It's there in the box with the other 3 so it's used to generate an output with an adjustable pulse width. It might be worth noting that if the pot is set to 50% or the inverting input of U4 is just tied to MIDBUF then the output of U4 will be pretty much exactly in quadrature with SQUARE. Of course, if desired, the inputs of U4 can be swapped over to reverse the polarity of the PWM output. One more thing to note: the LM324 is a useful device in this application because it behaves nicely even if the differential input voltage is equal to the output swing (i.e. one input at ground, the other at VCC-1.5V). It also plays nicely if the input common mode voltage is at either of these extremes. Note that not all opamps play that nicely under those conditions and not all comparators maintain a high impedance input with large differential input voltages (have a careful read of the "Application Hints" in: http://www.ti.com/lit/ds/snosbw6a/snosbw6a.pdf and "Figure 6. Input Characteristics" in: http://www.ti.com/lit/ds/symlink/lm319-n.pdf) And if you think that's a nice circuit, you might like the Function Generator I'm working on for an EasyEDA project... :)
Reply
example 8 years ago
Play with the sim and see what happens. Try replacing the name of the opamp with TL081EE which is an in-house model of the TL081 opamp. A nice device spoilt by some very bad habits... :o
Reply
andyfierman 8 years ago
Drat, Replied using the wrong login!
Reply
andyfierman 8 years ago
I've just added a bit more to: https://easyeda.com/andyfierman/Simple_LM324_squarewave_and_sawtooth_generator_-ZZTN4Ygys Enjoy, :)
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