I’m trying to create a PCB with a few custom components, which has approximately 100 connections between them.
In the past, for my small designs (under 15 components), I’ve painstakingly drawn wires between the placed components, and then just launched the PCB editor, routed, etc.
I’m trying to find a way to create a list of connections and import them into kicad. Ideally I’d use a .csv of rows of text like component-ref-1.pin1 to component-ref-2.pin2. Import, wires show up on schematic. I don’t need autorouting on the schematic or anything fancy.
I don’t even need a schematic perse, but since I’m using some custom parts+footprints, there would have to be some manner of placing footprints, and then referencing them.
I’ve got mediocre Python skills, and have messed with kiutils and investigated skidl. Not sure if that helps?
I don’t understand the interworkings enough to vary off the standard workflow, so I just need pointed in the right direction as to the best method.
Last point if this matters: this is a one-off hobbyist board used by just me. It doesn’t need to be pretty, maintainable, etc. Just something quick and dirty is fine by me. Exactly 1 of these boards will be made and used.
I wonder about the part creation for custom parts with skidl… the examples I saw seemed rather simple. Ideally I’d load the schematic in, and then modify it. But that’s not supported with skidl.
The relationship between wires, any internal connections, nets, labels is unclear to me when they would move to another. Obviously there’s something happening at update pcb to schematic time. And when pcbnew loads.
I was able to load a schematic into kiutils, and add connections, but they never went anywhere. This was before I had proper footprints linked, so perhaps they will simply show up now… more experimentation is in order.
I was looking at doing this. Just don’t know how to specify components+footprints if I skip the schematic part. I’d think I’d need to define the parts and get reference IDs before I’d refer to them in the netlist. If you have a netlist referencing an unknown part, how would it know what is what?
Can I bring over a existing schematic with the parts placed and then import a new netlist?
I’ve never done it, so I am just guessing but… I suspect that if you pre-place the parts you need in pcbnew, and name them appropriately, a correctly formatted netlist should create the connectivity you need to route the board.
Right. One way might be to create a schematic, place parts, make a single connection, and then see what that file looks like for the single connection and duplicate it. If it’s a text file, which I think it is, then shouldn’t be too bad.
That’s why I was attempting to use kiutils because trying to reverse the exact syntax, and generate new connection entries from scratch seems error prone. If I could load the schematic in, have it parse the connection into some type of python structure, then I could add some more of those… and have it deal with outputting the correct format.
But since you say you have a list of connections to make, then you don’t really have a schematic, you just have a list of symbols that need connecting, right? So you don’t really need to digest an existing schematic. Surely Skidl can take a list of symbols that refer to names in the libraries and a list of connections and generate a netlist to feed into the PCB Editor?
Yeah all I have is a half dozen connectors placed on the schematic with the correct parts and footprints linked. But you’re right, nothing of consequence.
It does look like I can reference parts from external libraries. Just gotta figure out how to call them and set it up.
Each of these avenues are just rabbit holes of details, so it’s just deciding which one I want to jump down in.
Appreciate your thoughts. The documentation looks pretty comprehensive, and you make the association with the footprint at the same time you create the part.
This looks perfectly doable, so I should take a swing at it! Lemme play and see where I can get!
I do like the idea of just skipping out on the schematic completely. Just don’t need it.
The PCB, fwiw, that I’m designing allows me to connect two PALs simultaneously to a system on the inputs. The common inputs and unique outputs run to a logic analyzer interface. This lets me test my GAL reproduction of some custom logic in-circuit with live data. Bought real 3M ZIF sockets but kinda shocked at the $25 price tag each. Retro-computing stuff…
Thanks @myne . For everyone playing along at home, this is essentially a power shell script that appears to parse, edit, and rewrite LTspace .asc files and convert them to older kicad (like vers 4) .brd files. Have I got this right?
I played with skidl a bit last night… and have it loading, parsing custom parts. I did find a bug in the latest skidl, which I’ll be filing a github issue today on. I have a quick fix. If your component doesn’t contain a datasheet property, then you can’t use it within skidl.
Ok just to close the loop on this one. SKIDL is awesome for this task.
The solution includes the following steps:
Sets the search path of the default libraries
Adds a new search path for the custom parts
Creates the parts by referencing library and part name. Sets the footprint and reference
Takes a list of string of net definitions that’s formatted like this partvariable.pinnumber-partvariable.pinnumber
Creates a new net with a unique name
Adds the pins to the net
Generates a netlist
I created a new kicad project, opened up the pcb editor, file…import netlist, then click apply and load. From that point, you have a bunch of nets, but they aren’t routed. You need a board outline first. You can either route each net one by one… OR
you can install the java-based freerouting app, export the board as specctra DSN, bring it into that tool, and then save it back as a import the .ses results back into kicad.
Really fast and convenient workflow once I figured it out.