Electronics-Related.com
Forums

KiCad Spice, Anyone Tried It?

Started by Ricketty C June 2, 2020
In article <eraddf5lnlivhljdp6e4oms83bkr89ufs5@4ax.com>,
John Larkin  <xx@yy.com> wrote:

>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.
You misunderstand. KiCAD has both a schematic-capture module (which exports netlists in various forms), and a PCB layout module. A common work-flow with the current version is * Capture and annotate schematic. * SPICE simulation (either export a SPICE netlist and use an external version of SPICE, or use the built-in ngspice-based simulator). * Add footprint information for whatever components didn't have a suitable footprint in their symbol-library description. * Do an "internal export" of the netlist over into the PCB-layout module. * Lay out your PCB. You don't export a netlist from the PCB part of the program (except in the sense that KiCAD can annotate the traces and pads in the Gerber export with the net identities, per Gerber X2).
On Tue, 2 Jun 2020 14:24:13 -0700, dplatt@coop.radagast.org (Dave
Platt) wrote:

>In article <eraddf5lnlivhljdp6e4oms83bkr89ufs5@4ax.com>, >John Larkin <xx@yy.com> wrote: > >>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. > >You misunderstand. >
Not a bit.
>KiCAD has both a schematic-capture module (which exports netlists in >various forms), and a PCB layout module.
That's what I call "a PCB program."
> >A common work-flow with the current version is > >* Capture and annotate schematic. >* SPICE simulation (either export a SPICE netlist and use an external > version of SPICE, or use the built-in ngspice-based simulator). >* Add footprint information for whatever components didn't have > a suitable footprint in their symbol-library description. >* Do an "internal export" of the netlist over into the PCB-layout > module. >* Lay out your PCB.
Not my flow. I Spice any little bits that might need it before I draw the actual board schematic. Often nothing needs to be Spiced. Sometimes many circuits have to be played with, and only one will survive to go onto the PCB schematic. I'd never try to Spice the entire board. I generally give a hand-drawn PCB schematic to a drafting guy to enter for me, and do the layout. That's a different tool set from Spice.
> >You don't export a netlist from the PCB part of the program (except >in the sense that KiCAD can annotate the traces and pads in the >Gerber export with the net identities, per Gerber X2).
LT Spice is awfully good. -- John Larkin Highland Technology, Inc picosecond timing precision measurement jlarkin att highlandtechnology dott com http://www.highlandtechnology.com
On 3/6/20 3:25 am, Ricketty C wrote:
> 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."
Oh, right you are. There is an LTSpice integration also, and I'm recalling that.
> One of the big issues had to do with the awkwardness of just adding the models in an easy to use manner.
Yeah, Kicad still acts like a bunch of separate tools, not well integrated. Management of 3d models alongside the footprints is another problem. CH.
On 3/6/20 3:56 am, Lasse Langwadt Christensen wrote:
> 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
A discussion on eevblog.com suggests: " Kicad footprints generally are using the IPC-7x51 standard. Parts are oriented so that pin 1 is on the upper left, or on the left for two pin parts. Rotation from that base orientation is CCW e.g. a +90 degree rotation puts pin one on the lower left. JLC seems to be using the EIA-481-D standard, or perhaps the IEC61188 standard." I don't know any of these standards, but it might mean something to fo;k here. CH.
On Tuesday, June 2, 2020 at 1:56:49 PM UTC-4, Lasse Langwadt Christensen wrote:
> 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'm not sure what you are saying with this. Are you talking about the contents of the XYRS file that the tool spits out? I would expect that to indicate the orientation on the PCB. Are you saying the jlcpcb program indicates how much to turn the part rather than where it should be? I'm just not following this.
> 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
I've never understood why pin 1 orientation is such a complex issue. But I do know it fails from time to time. -- Rick C. -- Get 1,000 miles of free Supercharging -- Tesla referral code - https://ts.la/richard11209
On Wednesday, June 3, 2020 at 8:31:28 AM UTC+10, John Larkin wrote:
> On Tue, 2 Jun 2020 14:24:13 -0700, dplatt@coop.radagast.org (Dave > Platt) wrote: > > >In article <eraddf5lnlivhljdp6e4oms83bkr89ufs5@4ax.com>, > >John Larkin <xx@yy.com> wrote: > > > >>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. > > > >You misunderstand. > > Not a bit.
Another - more fundamental - misunderstanding.
> >KiCAD has both a schematic-capture module (which exports netlists in > >various forms), and a PCB layout module. > > That's what I call "a PCB program."
Yet another misunderstanding. A printed circuit layout program uses a netlist as one of it's inputs. A schematic editor is the usual name for the program that let's you create the net-list in a form that you can understand - a schematic. The schematic editor needs device symbols that you can put into the schematic so that you can link pins in a way that gives you something you can comprehend. The printed circuit layout program needs device footprints so your can route printed circuit races between the same pins in a way that realises the net list. Dumb customers want the whole package to arrive in one neatly wrapped bundle
> >A common work-flow with the current version is > > > >* Capture and annotate schematic. > >* SPICE simulation (either export a SPICE netlist and use an external > > version of SPICE, or use the built-in ngspice-based simulator). > >* Add footprint information for whatever components didn't have > > a suitable footprint in their symbol-library description. > >* Do an "internal export" of the netlist over into the PCB-layout > > module. > >* Lay out your PCB. > > Not my flow. I Spice any little bits that might need it before I draw > the actual board schematic. Often nothing needs to be Spiced. > Sometimes many circuits have to be played with, and only one will > survive to go onto the PCB schematic. > > I'd never try to Spice the entire board.
Nor would anybody sane.
> I generally give a hand-drawn PCB schematic to a drafting guy to enter > for me, and do the layout. That's a different tool set from Spice.
This works a lot better when the schematics are simple. Reworking a hand-drawn schematic after you've decided that a particular approach isn't going to work well enough is extremely tedious. Doing the same thing on-screen isn't painless, but you can cut and paste large chunks, which reduces the chance that you'll get some minor correction wrong.
> >You don't export a netlist from the PCB part of the program (except > >in the sense that KiCAD can annotate the traces and pads in the > >Gerber export with the net identities, per Gerber X2). > > LT Spice is awfully good.
But it wasn't designed to fit into a suite of design tools. The really nice thing about a properly integrated set-up is that you can simulate what you have designed (and catch any trivial drop-offs early) and pass on exactly the same net-list that worked in the simulation to the printed circuit layout program. John Larkin doesn't work with really complicated circuits, where this can be really helpful. -- Bill Sloman, Sydney
On Tuesday, June 2, 2020 at 9:11:46 PM UTC-4, Clifford Heath wrote:
> On 3/6/20 3:25 am, Ricketty C wrote: > > > One of the big issues had to do with the awkwardness of just adding the models in an easy to use manner. > > Yeah, Kicad still acts like a bunch of separate tools, not well > integrated. Management of 3d models alongside the footprints is another > problem.
I was actually talking about LTspice. It's great that it is available and free, but the tools has a kludgy interface that is very unintuitive with a series of arcane steps to include models. The lack of good documentation is also a hold back. I recently found "bugs" or more accurately, undocumented behaviors in digital components in the LTspice A group devices. Even the LTspice wiki does not have accurate data on this particular part and other areas. It's a wiki, so I could change that, right? No, the wiki has been locked to outside contributions. So it's not even a wiki anymore. It's not your typical user community. But then I'm posting in s.e.d, so what do I know about "normal"? I'm posting about a couple of issues in KiCad to their forums. One issue has been recognized as a bug and reported. The other is about the visibility of the text with zoom levels. Not an easy thing to discuss or illustrate. Any means of capturing the screen display is distorted by the image and display the image is viewed on in addition to the software that is displaying it. So how do you show someone in a forum what you are seeing? Anyway, I find the program mostly not hard to use. It's a bit of a bother that it seems to have odd ways to select the object of the action. Most programs have you select an verb action and then you point and click the noun, the thing you want to perform the action on. With many commands in KiCad you have to point your cursor to the object first without a click, then select your verb. When you press the delete key, whatever object is being pointed to by the cursor gets deleted... NOW! That's a bit tricky to adjust to when used to selecting the delete mode first and then clicking to invoke the action. Or I guess it is common to actually select something and then using the delete key. It is a mixed thing though. Some commands work on groups and you select the group first. Oddly enough there are different keys for doing the same thing on groups. You hover over a part and press G to drag the single item. To drag a group you click and drag the select the group, then press TAB to drag. Why two different keys??? I guess in the grand scheme these are not big issues, but switching between LTspice and KiCad messes with your instincts. They are often opposites. Even the default zoom direction is opposite in LTspice from the rest of the world. At least you can change it. -- Rick C. -+ Get 1,000 miles of free Supercharging -+ Tesla referral code - https://ts.la/richard11209
On 02-Jun-20 6:01 pm, 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. >
I have. It's a bit clunky to use, and has a tendency to crash without explanation, taking the rest of KiCad with it, especially with subcircuits (so make sure you save your work). But it does function. Sylvia.
On Tuesday, June 2, 2020 at 9:32:53 PM UTC-4, Clifford Heath wrote:
> On 3/6/20 3:56 am, Lasse Langwadt Christensen wrote: > > 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 > > A discussion on eevblog.com suggests: > > " > Kicad footprints generally are using the IPC-7x51 standard. Parts are > oriented so that pin 1 is on the upper left, or on the left for two pin > parts. Rotation from that base orientation is CCW e.g. a +90 degree > rotation puts pin one on the lower left. > > JLC seems to be using the EIA-481-D standard, or perhaps the IEC61188 > standard." > > I don't know any of these standards, but it might mean something to fo;k > here.
I did my first layout around 2008 and struggled with this a bit. The program I used for layout was FreePCB and it had a bug in rotations on the bottom side. What does the standard say about that??? You can view the rotations as viewed from the top side in the X-ray view or as viewed from the bottom side as if you flipped the board over which you do when you actually assemble it. I think the IPC standard selects the former, the X-ray view from the top of the board. So if the same IC with pin one reference in the upper left as viewed from the top were in a position with pin one in the lower left corner as viewed from the top of the board, it would be a +90 degree rotation for both parts in the XYRS file. I will be checking this carefully with this board. But it is a hard thing to check unless you thoroughly understand how it is all supposed to work. I've not seen software that help with this verification yet. Maybe KiCad will spit out files that provide all the assembly info in a standard format that can be viewed in the equivalent of a Gerber file viewer. That's a reason I was hoping for the ODB++ output, but it sounds like they have another standard they use. -- Rick C. +- Get 1,000 miles of free Supercharging +- Tesla referral code - https://ts.la/richard11209
I guess I spoke too soon about KiCad being easy to pick up... well it isn't about picking up really.  It's about issues of multiple pages.  They don't really support a flat, multi-page schematic.  It must be hierarchical.  So to have a two page schematic, you must have a top sheet and one or more lower sheets.  

The parts can have multiple units, but schematics can't have multiple pages.  That seems oddly inconsistent. 

-- 

  Rick C.

  ++ Get 1,000 miles of free Supercharging
  ++ Tesla referral code - https://ts.la/richard11209