You need to use EasyEDA editor to create some projects before publishing
Trying to get my first schematic to run
21437 18
djays12 6 years ago
So it is my first schematic and I'm trying to run it. Here's the schematic: https://easyeda.com/djays12/Tachometer_electronics-076dcb60fc8f48358604c85fbfbcc000 I've already replaced the NPN transistor (it used to be a BCW66G) for a generic model that can be read by spice. Mainly the circuit is a frequency/voltage converter that will be used to convert a 0-267Hz square wave signal into a 0-1.6Vdc voltage. The output of the LM2907 is then boosted through a op amp and a transistor to be able to output enough current for the load (an electromagnet, that I replaced by a inductor in the circuit). This circuit will be used to power a tachometer (the electromagnet is acting on the needle and fight again a return spring). The message error I get is as follow: > Circuit: gooduntitled > > Doing analysis at TEMP = 27.000000 and TNOM = 27.000000 > > Warning: v2: no DC value, transient time 0 value used Warning: > singular matrix: check nodes u1_2 and u1_2 > > Note: Starting dynamic gmin stepping Note: One successful gmin step > Note: One successful gmin step Note: One successful gmin step Note: > One successful gmin step Note: One successful gmin step Note: One > successful gmin step Note: One successful gmin step Note: One > successful gmin step Note: One successful gmin step Note: One > successful gmin step Note: One successful gmin step Warning: singular > matrix: check nodes u1_2 and u1_2 > > Warning: Dynamic gmin stepping failed Note: Starting source stepping > Warning: singular matrix: check nodes u1_2 and u1_2 > > Note: One successful gmin step Note: One successful gmin step Note: > One successful gmin step Note: One successful gmin step Note: One > successful gmin step Note: One successful gmin step Note: One > successful gmin step Note: One successful gmin step Note: One > successful gmin step Note: One successful gmin step Note: One > successful gmin step Note: One successful source step Warning: > singular matrix: check nodes u1_2 and u1_2 > > Warning: singular matrix: check nodes u1_2 and u1_2 > > Warning: source stepping failed > > DC solution failed - > > Last Node Voltages > ------------------ > > Node Last Voltage Previous Iter > ---- ------------ ------------- xr2_2 0 0 r1_1 0 0 u1_1 0 0 v1_1 0 5.8766e-118 r1_2 0 0 u2_6 -1.52529e-103 -1.38638e-117 volprobe1 5.35177e-104 7.98716e-118 l1_1 5.35177e-104 0 u1_2 0 0 l1#branch 0 0 v1#branch 2.51539e-115 0 v2#branch 0 0 > > doAnalyses: iteration limit reached > > op simulation(s) aborted Error(parse.c--checkvalid): volprobe1: no > such vector. ngspice-26 done Anyone have an idea on what I did wrong?
Comments
andyfierman 6 years ago
You simulation does not run because you have not used simulatable parts for the LM2907 tacho and 741 opamp. Even if you had used a simulatable model for the 741, you have not connected any power supply rails to it. To resolve these issues and much more besides, please see: https://easyeda.com/forum/topic/How_to_find_simulatable_parts_and_run_a_simulation_in_EasyEDA-1YgasK2kC Please also see: https://easyeda.com/andyfierman/Demonstrating_the_EasyEDA_LM2907_and_LM2917_spice_models-mxrJDVdvp :)
Reply
djays12 6 years ago
Thanks for the reply, really helpfull. I still have so much to learn about electronic (I'm a marine engineer, my electronic knowledges come from years back at school). I didn't even realise that the rail needed to be fed by a power source (duh!). So I replaced the LM2907 with the one from the spice components list. Same for the LM741. Added power supply to the rails. Still have an error message when I try to run it, although I think I'm getting closer. > Circuit: gooduntitled > > Doing analysis at TEMP = 27.000000 and TNOM = 27.000000 > > Warning: v2: no DC value, transient time 0 value used Note: Starting > dynamic gmin stepping Note: One successful gmin step Note: One > successful gmin step Warning: Further gmin increment Note: One > successful gmin step Note: One successful gmin step Warning: Further > gmin increment Note: One successful gmin step Warning: Further gmin > increment Note: One successful gmin step Note: One successful gmin > step Warning: Further gmin increment Note: One successful gmin step > Warning: Further gmin increment Note: One successful gmin step > Warning: Further gmin increment Note: One successful gmin step Note: > One successful gmin step Warning: Further gmin increment Note: One > successful gmin step Warning: Further gmin increment Note: One > successful gmin step Note: One successful gmin step Warning: Further > gmin increment Note: One successful gmin step Warning: Further gmin > increment Note: One successful gmin step Note: One successful gmin > step Note: One successful gmin step Note: One successful gmin step > Note: One successful gmin step Note: One successful gmin step Note: > One successful gmin step Note: One successful gmin step Note: One > successful gmin step Note: One successful gmin step Note: One > successful gmin step Note: One successful gmin step Note: One > successful gmin step Note: One successful gmin step Note: One > successful gmin step Note: One successful gmin step Note: One > successful gmin step Warning: Further gmin increment Note: One > successful gmin step Warning: Further gmin increment Note: One > successful gmin step Note: One successful gmin step Note: One > successful gmin step Note: One successful gmin step Note: One > successful gmin step Note: One successful gmin step Note: One > successful gmin step Note: One successful gmin step Note: One > successful gmin step Note: One successful gmin step Note: One > successful gmin step Note: One successful gmin step Note: One > successful gmin step Note: One successful gmin step Note: One > successful gmin step Note: One successful gmin step Note: One > successful gmin step Warning: Dynamic gmin stepping failed Note: > Starting source stepping Note: One successful source step Note: One > successful source step Note: One successful source step Note: One > successful source step Note: One successful source step Note: One > successful source step Note: One successful source step Note: One > successful source step Note: One successful source step Note: One > successful source step Note: One successful source step Note: One > successful source step Note: One successful source step Note: One > successful source step Note: One successful source step Note: One > successful source step Note: One successful source step Note: One > successful source step Note: One successful source step Note: One > successful source step Note: One successful source step Note: One > successful source step Note: One successful source step Note: One > successful source step Note: One successful source step Note: One > successful source step Note: One successful source step Note: One > successful source step Note: One successful source step Note: One > successful source step Note: One successful source step Note: One > successful source step Note: One successful source step Note: One > successful source step Note: One successful source step Warning: > source stepping failed > > Transient solution failed - > > Last Node Voltages > ------------------ > > Node Last Voltage Previous Iter > ---- ------------ ------------- xu4_6 0 0.567896 * volprobe2 0.193907 0.193914 volprobe1 0.193915 0.698463 * xu4_7 0.567889 0.567896 xu3.tachinn 0 0 r1_2 7.32864e-06 7.32976e-06 xu3.opinp 7.32864e-06 > 7.32976e-06 xu3_1 0 0 xu3.tachinpx 0 0 xu3.outschmitt1 1 1 xu3.offsetschmitt1 0.425917 0.425922 xu3.n001 0.425917 0.425922 xu3_2 > 0.425917 0.425922 xu3.n002 0.425917 0.425922 xu3.n003 0.350052 0.350053 xu3.n004 0.284017 0.284021 xu3.n005 0.000146057 0.000146079 xu3.q36b 0.567856 0.567864 xu3.q37b 0.544502 0.544506 xu3.qd1c > 0.154781 0.154783 xu3.tail 0.567889 0.567896 xu3.comp 0.246161 0.246166 xu3.q41b 0.567596 0.567604 xu3.q41e 0.0174554 0.0174585 xu3.q43c 0.567889 0.567896 xu3.q44e 0.19391 0.193916 xu3.q45b 0.19391 > 0.193916 r1_1 1.46573e-06 1.46595e-06 xr3_2 7.32864e-07 7.32976e-07 r2_1 0.193915 0.698463 * l1_1 0.193915 0.698463 * v.xu3.vimon1#branch > 4.26208e-10 4.26214e-10 b.xu3.bv1#branch 0 0 b.xu4.b1#branch 5.54136e-13 -9.59495e-13 * l1#branch 0 -1.06436e-60 l.xu3.lconvfix1#branch 4.26208e-10 4.26214e-10 v1#branch -0.335851 > -0.335858 v2#branch 1.00002e-07 1.00002e-07 v.xu3.vlink2#branch -1.38984e-09 -1.39006e-09 v.xu3.vlink1#branch 0 0 > > > doAnalyses: Too many iterations without convergence > > tran simulation(s) aborted Error(parse.c--checkvalid): volprobe1: no > such vector. ngspice-26 done I think I did something wrong with the power supply? Also, the transistor wasn't taken from the spice component list, maybe it's causing me some issue? Thanks again! :)
Reply
djays12 6 years ago
Got it to be simulated! But the output is not what I expected. Moving a probe to my pulse signal, it seem I did something wrong. I'm trying to create a 0-10V square signal with a pulse about 267Hz.
Reply
djays12 6 years ago
Worked a bit more on it. The frequency signal is not set up correctly. The issue I have is the LM2907 doesn't seem to change it voltage output when I change the tach frequency... it is always 11.212V. Based on my maths, with the current value of C1 and R1, it should follow this logic: 0 Hz = 0V 267 Hz = 1.6V Any help with that?
Reply
andyfierman 6 years ago
The ammeter symbol you have used is not simulatable. Do `SHIFT+F` then search for `ammeter` and select the (only!) symbol. The symbol should have a litlle `s` in it. * If schematic symbols do not have that little `s` in them when viewed in the library list then they are not simulatable. Hint: why not low pass filter the tacho output between the LM2907 output and the opamp input using a series R and parallel C low pass filter instead of having a bulky inductor in series with the ammeter? :)
Reply
djays12 6 years ago
Just replaced the ammeter with the one under the Spice Miscellaneous directory. Now I have a current reading! Thanks for the tip about the S symbol, really helpful to find the right component quickly. As for your hint, that's a part of my circuit that I find awkward aswell. The inductor is meant to simulate the electromagnet that drive the tachometer needle... This is the actual load of my circuit. I didn't try to filter the signal from the the LM2907 in any way. Do you think I should filter it? And I still don't have an output voltage that change with the frequency. I tried playing with the R1 and C1 value (they are used to change the F to V ratio in the datasheet, and still always the same voltage...
Reply
andyfierman 6 years ago
I don't have access to a suitable machine at present so can't diagnose directly but you find cloning the lm2907ee example and playing with it. Also have a look in the Google copy of the Simulation eBook for the section on initial conditions and starting up simulations. You may just need to ramp up the supply to get it to start it. Also, break the circuit up into sections. Get the tacho section working then simulate the output of the tacho using a voltage source into the op amp section. Then join the two sections and debug that. It's a common mistake to try to simulate a whole system. Much better to sum smaller sub-sections then stitch them together. :)
Reply
djays12 6 years ago
Ok I tried playing around with the LM2907 alone. Got it to work by playing with the values of C1 and R1 and made it work. The problem arise when I add my Op amp circuit to allow for a higher current at the same voltage to be allowed through a transistor. The Current coming out of the LM2907 drop to 0A and the the voltage at the output rise near 12V. Maybe because the only simulatable op amp I found is ideal_opamp and it's so Ideal that there is no current drain at all in the non-inverting input? I had to put a 10k resistor between the Vout of the LM2907 and ground for it to work...maybe not necessary in real life? Still, I'm glad I got it somewhat working now! Now the voltage have some ripples at the lowest frequency that will be read (around 25Hz for 800rpm). I'll have to read a bit on filtering such signal.
Reply
andyfierman 6 years ago
I think you need to have a closer look at the datasheet for the LM29x7. It **must** have a resistor from the EMIT pin to ground. http://www.ti.com/lit/ds/symlink/lm2917-n.pdf :)
Reply
djays12 6 years ago
I always assumed that this resistor was there to simulate a load. Guess I was wrong on that one. So I did some experiment to filter the signal coming out from the LM2907. I built a RC filter with a 1k resistor in serie and a 47u capacitor in parallel to ground. The ripples are completely gone on the higher frequencies, at the expense of some delay in the speed the voltage varie (which isn't really dramatic since the engine can only change rpm at a certain speed). However, at low speed, the simulation stop abrutly after 140ms.. even if I asked to simulate for 500ms. In fact, it made me realise that all these time, the simulation ended up after about 350ms and not 500ms. What does it mean? Some component will go kaput after this amount of time? or that everything is at a stable state after that amount of time?
Reply
andyfierman 6 years ago
See also: http://www.ti.com/lit/an/snaa088/snaa088.pdf EasyEDA imposes a maximum simulation CPU time and/or number of displayed points (10k). If your simulation stops before the `Stop Time` look at your `Simulation Results` window to see the system messages. Sometimes a sim may fail to converge after some point quite late on. You can try reducing the max timestep and/or setting a Start Time after the actual start of the simulation so that you only see the results from the Start Time to the Stop Time. Also see the eBook about running the sim directly from an in-schematic Analysis Directive. That will allow you to have a (Stop Time)/(Max Timestep) ratio of up to 10k.
Reply
djays12 6 years ago
So I made it work the way I want, well close enough to move to the next step and build a prototype on a breadboard. As I check how much current the circuit will pull and start planning the PCB, I'm very surprise that the simulator say the LM2907 will have about 11.6A going through his VCC input?? How accurate is the simulator for such things? This seems to me like an excessively high current! The rest seem fine! I'm kind of excited to try this out!
Reply
andyfierman 6 years ago
I suspect you have applied a supply voltage that is above abs max in the datasheet. I design most of the dedicated EasyEDA models so that they draw huge supply currents if any pin is taken outside abs max voltages.
Reply
djays12 6 years ago
I supply 12V in the simulation. It'll be dropped down to 10V in the real circuitry, through a voltage regulator to filter out the noises from the car charging system. The max supply voltage is 28V...
Reply
djays12 6 years ago
Just tested all the other pin coming in and out VCC and collector pin (it was that supply that was getting 11.6A running through). No other pins have nowhere near that many current Load current: peak to about 700uA then goes down near 150uA the other pins reach about 200uA of current MAX I have an hard time figuring out where this current is going...
Reply
andyfierman 6 years ago
My bad. If you look in the Spice netlist you'll see there's a diode across from the Collector to ground (0). I had that dioe the wrong way round so it always conducted instead of breaking down at somwhat about the Collector pin abs max voltage. All the LM29x7xxEE models are now corrected and should show the correct supply current.
Reply
andyfierman 6 years ago
To clarify: `If you look in the Spice netlist at the LM2907_8EE model...` and: `All the LM29x7_8EE and LM29x7_14EE models are now corrected...`
Reply
djays12 6 years ago
Much better, the device now pull about 7.5mA! Thanks for figuring this one out :)
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