Electronics-Related.com
Forums

KiCad Spice, Anyone Tried It?

Started by Ricketty C June 2, 2020
I didn't realize KiCad has a spice simulator built in.  Anyone used it?  I could have been editing my board schematic and doing the simulation at the same time!  

I don't know how compatible models are with various simulators.  I contacted one vendor about a problem with their spice model and they basically blew me off saying I needed to use Orcad spice.  lol  

I guess when you've seen one spice simulator, you've seen one spice simulator. 

-- 

  Rick C.

  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
On 02/06/2020 10:01, Ricketty C wrote:
> I didn't realize KiCad has a spice simulator built in. Anyone used > it? I could have been editing my board schematic and doing the > simulation at the same time! > > I don't know how compatible models are with various simulators. I > contacted one vendor about a problem with their spice model and they > basically blew me off saying I needed to use Orcad spice. lol > > I guess when you've seen one spice simulator, you've seen one spice > simulator. >
KiCad is on my list of programs to try when I get the time. The nice thing about this list is that programs usually get better before I round to using them! So while I have nothing to add here to help you, I can encourage you - it's nice to see these threads in the midst of all these political or viral threads.
On 2/6/20 6:01 pm, Ricketty C wrote:
> I didn't realize KiCad has a spice simulator built in.
Not quite. It's an export to LTSpice. No, I haven't used it. I Spice little things, but by the time I get to Kicad I pretty-much know what I want, and it doesn't need Spice-ing. I'm pretty keen on trying out the Kicad/JLCPCB combination soon though. It seems a pity that though they publish their parts list (even including current stock levels!) they don't publish a matching Kicad library for any of the parts - and the standard Kicad footprints use a different centroid/rotation standard. CH
On Tuesday, June 2, 2020 at 7:46:04 AM UTC-4, Clifford Heath wrote:
> On 2/6/20 6:01 pm, Ricketty C wrote: > > I didn't realize KiCad has a spice simulator built in. > > Not quite. It's an export to LTSpice. No, I haven't used it. > I Spice little things, but by the time I get to Kicad I pretty-much know > what I want, and it doesn't need Spice-ing. > > I'm pretty keen on trying out the Kicad/JLCPCB combination soon though. > It seems a pity that though they publish their parts list (even > including current stock levels!) they don't publish a matching Kicad > library for any of the parts - and the standard Kicad footprints use a > different centroid/rotation standard.
I don't think this is a front end to LTspice unless I misunderstand. A web page says, "KiCad uses ngspice internally to perform SPICE based circuit simulation." A video shows the tool running in real time in the KiCad display. Heck, even if it only were an LTspice front end it would have to be better than LTspice. Trying to learn how to do things in LTspice is insanely mucked up. I needed to add multiple models to a design I'm working on and the issues involved took more of my time than the design! One of the big issues had to do with the awkwardness of just adding the models in an easy to use manner. Then when I sought help there was not much willingness to find easier ways of doing it. Eventually a found that I could copy the symbol from an intrinsic device to my design directory, edit the fields in that symbol ONCE and then use the component as much as I want without further editing of internal values of the component. I don't need to clutter up the schematic with commands to add libraries. Seems like a winner to me, but figuring that out was a huge PITA. -- Rick C. + Get 1,000 miles of free Supercharging + Tesla referral code - https://ts.la/richard11209
tirsdag den 2. juni 2020 kl. 13.46.04 UTC+2 skrev Clifford Heath:
> On 2/6/20 6:01 pm, Ricketty C wrote: > > I didn't realize KiCad has a spice simulator built in. > > Not quite. It's an export to LTSpice. No, I haven't used it. > I Spice little things, but by the time I get to Kicad I pretty-much know > what I want, and it doesn't need Spice-ing. > > I'm pretty keen on trying out the Kicad/JLCPCB combination soon though. > It seems a pity that though they publish their parts list (even > including current stock levels!) they don't publish a matching Kicad > library for any of the parts - and the standard Kicad footprints use a > different centroid/rotation standard. >
most part are standard footprints so just pick the part and the right footprint afaiu the rotation is different because Kicad uses the standard for where pin 1 should be, jlcpcb uses the way the part is in the tape I use a script to spit out BOM and placement file with corrected rotation, just need to add the lcsc part number as a field to the schematic symbol jlcpcb has previewer to show the placement some you can check it and I believe they also do a manual check if the silkscreen shown the pin 1 location
In article <62807952-266d-4660-bd35-60411658a926@googlegroups.com>,
Ricketty C  <gnuarm.deletethisbit@gmail.com> wrote:
>I didn't realize KiCad has a spice simulator built in. Anyone used it? I could have been editing my board schematic and doing the >simulation at the same time!
Yes, it's a fairly recent addition (with KiCAD 5 I believe). It's based on ngspice. Definitely more convenient to use than the older approach (exporting a SPICE netlist and then running it into a stand-alone ngspice or gnucap or a similar Spice version or equivalent). I've been using it to simulate the frequency/phase responses, and impulse response of an audio power amplifier I'm working with. It has been quite helpful, although its output-and-reporting capabilities are somewhat limited. You can probe voltages and currents, but in the current release version there's no way to enter more complex expressions (e.g. voltage differences). I believe that's on the wishlist for future versions. The current-and-display graphings works, but zooming is a bit quirky. If I recall correctly, it can export the data it collects (all of the voltages and currents) into a .csv, so if you wish you can import this data into a spreadsheet and do additional calculations and graphings. One thing to be aware of, is that if you have e.g. bipolar or FET transistors whose pin ordering doesn't match up with the SPICE conventins (e.g. C B E), you must add an attribute to the component description in your library to tell it which pins go to those three nodes. The same is true for diodes or any other non-symmetrical component. Otherwise, the SPICE simulation won't match your schematic and the results will be... odd. The models which are released with the current KiCAD 5 should have the necessary attribute already, but if you cons up your own from a data sheet, be aware of this need (and maybe start with one of the canned part models which have the pins in the right order).
>I don't know how compatible models are with various simulators. I contacted one vendor about a problem with their spice model and they >basically blew me off saying I needed to use Orcad spice. lol
I've been able to use a bunch of externally-sourced models (simple ones, not subcircuits) from various sites. The ngspice tool tends to report seeing parameters it doesn't recognize, but that doesn't seem to affect its ability to use the parameters in the models that it does understand. It won't handle any vendor's proprietary/encrypted model format, of course.
In article <XZqBG.541383$Xk.482690@fx46.iad>,
Clifford Heath  <no.spam@please.net> wrote:
>On 2/6/20 6:01 pm, Ricketty C wrote: >> I didn't realize KiCad has a spice simulator built in. > >Not quite. It's an export to LTSpice. No, I haven't used it. >I Spice little things, but by the time I get to Kicad I pretty-much know >what I want, and it doesn't need Spice-ing.
The older version of KiCAD was limited to exporting. The new one has an ngspice-based interface built in.
>I'm pretty keen on trying out the Kicad/JLCPCB combination soon though.
I used that combo for the prototype boards for my current project (PCB manufacture only, not assembly), and I'm happy enough that I'll be having JLCPCB do the small production spin as well. The boards all look fine, and the one prototype I assembled is working nicely. I think it was eight days from the day I uploaded the Gerbers, to the day a DHL truck drove up with the package... and that's for boards which I had had plated up to 2 oz copper, which adds a couple of days to the production. I waited until after the worst part of the lockdown in China was over and they were opening back up... even so, it was very good service, all things considered.
On Tue, 2 Jun 2020 21:45:57 +1000, Clifford Heath <no.spam@please.net>
wrote:

>On 2/6/20 6:01 pm, Ricketty C wrote: >> I didn't realize KiCad has a spice simulator built in. > >Not quite. It's an export to LTSpice. No, I haven't used it. >I Spice little things, but by the time I get to Kicad I pretty-much know >what I want, and it doesn't need Spice-ing. > >I'm pretty keen on trying out the Kicad/JLCPCB combination soon though. >It seems a pity that though they publish their parts list (even >including current stock levels!) they don't publish a matching Kicad >library for any of the parts - and the standard Kicad footprints use a >different centroid/rotation standard. > >CH
Is there any reason to generate a Spice netlist in a PCB program? They really don't have much in common. Sounds clumsy to me. -- John Larkin Highland Technology, Inc picosecond timing precision measurement jlarkin att highlandtechnology dott com http://www.highlandtechnology.com
tirsdag den 2. juni 2020 kl. 21.46.32 UTC+2 skrev John Larkin:
> On Tue, 2 Jun 2020 21:45:57 +1000, Clifford Heath <no.spam@please.net> > wrote: > > >On 2/6/20 6:01 pm, Ricketty C wrote: > >> I didn't realize KiCad has a spice simulator built in. > > > >Not quite. It's an export to LTSpice. No, I haven't used it. > >I Spice little things, but by the time I get to Kicad I pretty-much know > >what I want, and it doesn't need Spice-ing. > > > >I'm pretty keen on trying out the Kicad/JLCPCB combination soon though. > >It seems a pity that though they publish their parts list (even > >including current stock levels!) they don't publish a matching Kicad > >library for any of the parts - and the standard Kicad footprints use a > >different centroid/rotation standard. > > > >CH > > Is there any reason to generate a Spice netlist in a PCB program? They > really don't have much in common. Sounds clumsy to me. >
same as any other spice just using a different schematic editor
On Tue, 2 Jun 2020 12:56:07 -0700 (PDT), Lasse Langwadt Christensen
<langwadt@fonz.dk> wrote:

>tirsdag den 2. juni 2020 kl. 21.46.32 UTC+2 skrev John Larkin: >> On Tue, 2 Jun 2020 21:45:57 +1000, Clifford Heath <no.spam@please.net> >> wrote: >> >> >On 2/6/20 6:01 pm, Ricketty C wrote: >> >> I didn't realize KiCad has a spice simulator built in. >> > >> >Not quite. It's an export to LTSpice. No, I haven't used it. >> >I Spice little things, but by the time I get to Kicad I pretty-much know >> >what I want, and it doesn't need Spice-ing. >> > >> >I'm pretty keen on trying out the Kicad/JLCPCB combination soon though. >> >It seems a pity that though they publish their parts list (even >> >including current stock levels!) they don't publish a matching Kicad >> >library for any of the parts - and the standard Kicad footprints use a >> >different centroid/rotation standard. >> > >> >CH >> >> Is there any reason to generate a Spice netlist in a PCB program? They >> really don't have much in common. Sounds clumsy to me. >> > >same as any other spice just using a different schematic editor
LT Spice has a nice schematic editor and good probing hooks. I usually do my Spicing well before I start a real product schematic, and I'd never simulate a real design, just little bits here and there. -- John Larkin Highland Technology, Inc picosecond timing precision measurement jlarkin att highlandtechnology dott com http://www.highlandtechnology.com