LTspice can generate a PCB net list.
FreePCB can import net lists.
The two are not exactly compatible however, but the LTspice version only needs a small bit of editing so that FreePCB can readily make sense of it.
Firstly though, the LTspice schematic needs to be like that for a sub circuit, that would include labelled input and output nodes for the external 'pins' of a subckt. In other words it has to be complete in terms of everything that should go onto the PCB, including pads for external connections.
However FreePCB doesn't recognise LTspice labelled nodes (as directions 'input', 'output' etc.) as external connections, to it they're just named net nodes, or connections that join things together in the circuit.
Pads to which external connection wires have to connect can be added by adding them by hand to the *PARTS* section of the net list, however you also have to add each one to the correct node line in the *NET* section, which defines which components connect to which other.
To make this more unambiguous, I created a 'PCB pad' object for LTspice ~ it's symbol is on the left, it's equivalent subckt schematic on the right:
The subckt file for this object is merely:
.subckt pcbpad P
R1 P 0 1G
This is a component with one connection only. Use this in the places where a labelled external connection node would normally be. Further, you can change its label from 'U' whatever to whatever else you like; this will be the legend that FreePCB will use on the final PCB.
Export the LTspice PCB net list thus:
The resulting ASCII file takes the form:
First you must change: *PADS2000* to read: *PADS-PCB*
Code: Select all
*PADS2000* *C:\Program Files\LTC\LTspiceIV\My Drawings\Over-Volts clamp-2 PCB master.asc Thu Feb 03 14:58:20 2011* *PART* M1 mosfet1 R1 4.7k C1 10n . . . etc. *NET* *SIGNAL* N007 M1.1 RL1.5 R3.2 *SIGNAL* N010 M1.2 C1.1 ZD1.2 R2.1 . . . etc. *END*
Next, the component value (or transistor name, whatever) after each component reference in the *PARTS* section must be changed to an equivalent FreePCB footprint symbol name. These are the shapes of the components as they will appear on the PCB.
You are quite likely going to have to create footprint symbols for things that FreePCB hasn't got in its library, do this first.
Warning ~ it's quite possible that the pin numbering sequence for standard LTspice symbols and FreePCB symbols will be different. For example:
LTspice transistor symbol: 1 - collector; 2 - base; 3 - emitter.
FreePCB transistor symbol: 1 - emitter; 2 - base; 3 - collector.
Also I've found this with plastic package power transistors and MOSFET's ~ in this case the centre pin is collector or drain, that should be pin one for a FreePCB symbol then, to match LTspice, the leftmost pin then becomes pin 2 (base or gate) and the rightmost becomes pin 3 (emitter or source). The easiest way to deal with this is load an existing FreePCB symbol, and save it as a different name and with the pin numbers rearranged to match the LTspice connections.
Modifying the *PARTS* list ~
Original LTspice version:
Note the last six are the new pcb pads objects, with reference names altered from the default 'U1', 'U2' to 'HT', 'RS' etc.
Modified version of the listing for FreePCB:
So written after the reference labels, these are all names of existing footprint symbols in FreePCB.
Import the net list into FreePCB thus:
Before you can import you have to select 'New' from the 'File' menu and give the new design a name. Then:
... and then, as if by magic, TA-DA!!
All you have to do then (I say "all") is move the things around to wherever you want. The violet lines are the "ratlines" which is the net list connects the components together. Provided the symbol pin numbers match the LTspice sequence AND the actual real life component package then it should be right. But double-check!
Finally, the ratlines are repositioned to make the inter-connecting tracks.
Another note ~ where using electrolytic capacitors, always use the LTspice 'polycap' symbol, this should ensure the polarity comes out the right way round on the PCB.