Author Topic: Fun with the circuit sim  (Read 911 times)

0 Members and 1 Guest are viewing this topic.

Madscientist267

  • Hero Member
  • *****
  • Posts: 1181
  • Country: us
  • Uh oh. Now what have I done?
Fun with the circuit sim
« on: December 24, 2008, 05:44:48 AM »
Hey all -


I played around with the circuit sim that Nothing40 found and came up with this. Its not really meant to be serious, unless you know where to get a 52V Zener, for example. And what about that inductor? LOL


I am sure there are several other flaws that a simulator can't pick up on (there always are, right?) but I had fun creating it, learned a bit, and thought you all might find it interesting. At the very least, I know you guys will pick it apart, but that's half the fun!


Its a ~100 watt (RMS) inverter, using all discreet components (no chips) and works well, on paper at least, even though its not super efficient considering it runs straight from 'batteries' (DC-AC directly). I believe my findings were about 45% or so - So sue me. >X-D


The original story about the simulator can be found at


http://www.fieldlines.com/story/2008/12/19/41219/235


and the link straight to the simulator is:


http://www.falstad.com/circuit/e-index.html


Rather than dealing with formatting issues (as well as creating lengthy nothing-but-code posts) as I originally had envisioned, I uploaded the text file containing the circuit here:


http://www.otherpower.com/images/scimages/11966/100W_Inverter_Complete_Rev_B_Windows_.txt


Just copy 'n paste its contents into the import box and watch the show.


Tidbits:


The left 3 scopes are final stage power dissipation (one for each MOSFET) and the total power dissipated across the load resistor (when the switch is on). Hover a component or its scope to see which scope goes with which component.


The middle 3 highlight timing and voltage regulation waveforms, and the one on the right by itself runs slower to capture the regulation quality. It's not bad actually, it takes about 3 or 4 cycles to adjust from no load to 100W; considerably more tho to relax when the load is removed.


It has a hiccup during startup, as for some reason, the applet starts the main tank mid-swing, and the master oscillator (modified phase shift) is not syncronized with it, so the startup waveforms look rather funky for about the first 100mS or so. You might have to click the reset button on the sim to see this take place. Once they line up, output is a nice looking sine, with only a small amount of crossover distortion.


Its processor intensive (its the only program I have seen in a while that overheats one of my laptops). I have also slowed the sim down so that it isn't so jerky. I also think that this is about the limit for the simulator as far as complexity - Just trying to add a few more parts for loads (inductive, etc), it locks up the simulator as soon as another inductor hits the ground rail with no hope of recovery. Save early, save often. Haven't been able to find a workaround, so this version only has a pure resistive load. Shrug.


Enjoy, and let me know what you think!


Steve


PS - It got rather large before it was over, so if you can't see the entire circuit on the screen even after maximizing, right click an open area, select Other -> Drag All then hover any component, click and drag to bring the remainder into view.

« Last Edit: December 24, 2008, 05:44:48 AM by (unknown) »
The size of the project matters not.
How much magic smoke it contains does !

scottsAI

  • Hero Member
  • *****
  • Posts: 884
Re: Fun with the circuit sim
« Reply #1 on: December 24, 2008, 11:40:49 AM »
Madscientist267,


Cool simulator, I like the continuous running type. (bookmarked)

Interesting circuit, not something I would build either.


Formatting issues: switch your post to text formatting, no formatting is done on text.


Have fun,

Scott.

« Last Edit: December 24, 2008, 11:40:49 AM by scottsAI »

Madscientist267

  • Hero Member
  • *****
  • Posts: 1181
  • Country: us
  • Uh oh. Now what have I done?
Re: Fun with the circuit sim
« Reply #2 on: December 24, 2008, 11:51:52 AM »
Sweet aint it? I liked it enough that I downloaded and 'installed' the standalone version. Web pages come and go - didn't want to be a victim of this in this case. :)


The formatting comment was mainly geared at allowing ease of posting links without having to enter the BR code into the post manually.


Glad you liked it. Its obvious that its not a practical circuit to build, but education was the key, there were several things that I picked up on while 'building' it that I didn't really foresee as problems before I started.


I'm sure I'll design a few more things with it - even if just to illustrate concepts in my own mind. Wish I could take credit for the simulator itself... its the best I've seen yet. On the fly editing has been grossly neglected as SPICE modeled software has evolved.


Steve

« Last Edit: December 24, 2008, 11:51:52 AM by Madscientist267 »
The size of the project matters not.
How much magic smoke it contains does !

scottsAI

  • Hero Member
  • *****
  • Posts: 884
Re: Fun with the circuit sim
« Reply #3 on: December 24, 2008, 04:06:55 PM »
My modeling background is with big dollar software packages like Saber (Analogy)

One work station software set $120K!


Now on my own

Over the summer discovered KiCad, open source, great EDA program. Schematic capture was easy to learn, PCB layout must do tutorial or will waste lots of time like me!-)

I highly recommended this program for schematic and PCB layout, both due to its free and works as well as any program I paid good dollars for.


Still looking for a good simulator, literally dozens of open source projects out there all half done.

Wanted a free MatLab, to learn it. Found one people claim as good if not better and free!


Have used Spice over the years, been using MicroSim demo since 1998.

Many simulators do not have proper models, so do not use them.

I test with a transistor, reverse the E - C pins, see what happens.

Many simulators models think nothing... not true, still works as transistor, gain is less than 1.


Have fun,

Scott.

« Last Edit: December 24, 2008, 04:06:55 PM by scottsAI »