## Circuit Modeling with SPICE

2 09 2011

Last week Raymond Rogers made a SPICE model of my coil circuit. Extremely helpful and awesome, thanks Ray!

SPICE is a general-purpose open source analog electronic circuit simulator.

I’ve been trying to get started with SPICE for a while now, but the steep learning curve prevented much progress. So to have a working example of a circuit I’m familiar with is so very useful.

Now we can run virtual experiment on the coil circuit and see how much current we get. Pretty damn cool!

Here are some example input values and resulting current graph:

Capacitance: 15 mF, 450V

Coil resistance: 180 mΩ

Coil inductance:  0.1mH

In this diagram the vertical axis is the voltage of a 1mΩ ammeter resistor, so 1V = 1KA.

I encourage anyone who knows splice to run this code, make changes and share results.

Also a shout out to jstults for his python script for inductance modeling.

THIS IS OPEN SOURCE SCIENCE.

### 7 responses

2 09 2011

Thanks for the nod; I’ve been meaning to get better at spice too; running your circuit is a good excuse.

I’ve also been playing a bit with QUCS; which, while still developing, has some neat capabilities and is open source.

3 09 2011
3 09 2011

When I try the circuits you made, I just see a black applet window.

However the falstad example circuits are amazing!

3 09 2011

ooooops. some characters got stripped or something.

view raw

hosted with ❤ by GitHub

This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.

 \$ 1 5.0E-6 3.5993318835628396 41 5.0 50 g 240 240 240 256 0 R 80 128 48 128 0 0 40.0 450.0 0.0 0.0 0.5 r 80 128 160 128 0 0.1 c 240 128 240 240 0 0.015 0.0017903664661923875 r 240 128 304 128 0 0.1 159 304 128 368 128 0 0.1 1000000.0 L 336 144 336 176 0 1 false 5.0 0.0 l 400 192 400 256 0 1.0E-4 0.004937375236010898 r 400 256 400 320 0 0.0010 g 400 320 400 336 0 r 400 192 400 128 0 0.18 w 368 128 400 128 0 s 160 128 240 128 0 1 true x 248 102 289 106 0 16 wiring x 416 194 440 198 0 16 coil x 433 293 527 297 0 16 current-sense o 3 64 0 35 80.0 204.8 0 -1 o 8 64 0 34 0.3125 25.6 1 -1 o 7 64 0 33 0.3125 204.8 2 -1

This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.

 \$ 1 5.0E-6 16.817414165184545 41 5.0 50 g 288 240 288 256 0 R 208 128 176 128 0 0 40.0 450.0 0.0 0.0 0.5 r 208 128 288 128 0 1000.0 c 288 128 288 240 0 0.015 1.4975251988401852 r 288 128 352 128 0 0.1 159 352 128 416 128 0 0.1 1000000.0 L 384 144 384 176 0 0 false 5.0 0.0 l 448 192 448 256 0 1.0E-4 1.4975247930281652E-6 r 448 256 448 320 0 0.0010 g 448 320 448 336 0 r 448 192 448 128 0 0.18 w 416 128 448 128 0 x 296 102 337 106 0 16 wiring x 464 194 488 198 0 16 coil x 481 293 575 297 0 16 current-sense o 3 64 0 35 2.5 0.8 0 -1 o 8 64 0 34 7.62939453125E-5 9.765625E-5 1 -1 o 7 64 0 33 7.62939453125E-5 9.765625E-5 2 -1

you can either copy paste the URL or copy paste the raw data and use the “File → Import” function.

3 09 2011

That works. Freaking awesome!

4 09 2011

Microcap is a professional simulator I use, but a demo can be downloaded that allows up to 50 components, that should be more than enough for what you are doing.

29 09 2011

[…] Previously we modeled the polywell coils and power supply in SPICE. […]