bancika / diy-layout-creator

multi platform circuit layout and schematic drawing tool
http://diy-fever.com
GNU General Public License v3.0
908 stars 100 forks source link

Wishlist - to import a netlist #505

Closed ChrisOfBristol closed 3 years ago

ChrisOfBristol commented 4 years ago

It's possible to export a netlist from DIYLC. This is part way towards importing a netlist from a schematic, which would be a useful feature. (This is mentioned, but lost among many other issues in Issue #171.) Just importing the components would be good, doing anything with the connections might be complicated and not really necessary. I'm aware of Tango/Protel and orCAD netlist formats. This is an example of the Tango format:

[ R1 RESISTOR 100k

] [ R8 RESISTOR 100k

] [ R7 RESISTOR 100k

] [ R6 RESISTOR 100k

] [ R5 RESISTOR 100k

] [ U4 DIP14 TL074

] [ U1 DIP14 TL074

] [ U3 DIP14 TL074

] [ U2 DIP14 TL074

] [ C1 CAP_CERAMIC 820p

] [ D1 DIODE Zener 12V

] [ B1 PADS2 9V

] [ R2 RESISTOR 100k

] [ R3 RESISTOR 100k

] [ R4 RESISTOR 100k

] [ R11 RESISTOR 100k

] [ R10 RESISTOR 100k

] [ R9 RESISTOR 100k

] [ D4 LED LED

] [ D3 LED LED

] [ D2 LED LED

] ( unnamed_net15 U4-11 ) ( unnamed_net14 U3-3 U1-3 R7-1 R8-2 U2-3 ) ( unnamed_net13 R1-2 B1-1 ) ( unnamed_net12 R1-1 R7-2 C1-2 R2-2 ) ( unnamed_net11 D1-2 R2-1 ) ( unnamed_net10 R5-1 R6-2 U3-2 U4-2 U4-3 R3-1 ) ( unnamed_net9 R3-2 U4-1 U1-2 R4-2 ) ( unnamed_net8 U2-2 R5-2 R4-1 ) ( unnamed_net7 U3-1 R11-1 ) ( unnamed_net6 U2-1 R10-1 ) ( unnamed_net5 U1-1 R9-1 ) ( unnamed_net4 R11-2 D4-1 ) ( unnamed_net3 R10-2 D3-1 ) ( unnamed_net2 D3-2 R6-1 R8-1 C1-1 D1-1 B1-2 D4-2 D2-2 ) ( unnamed_net1 R9-2 D2-1 )

bancika commented 4 years ago

well I thought about it, but it's just too complex at this point...the biggest questions are

Either way, if I were to add it, it should be SPICE format, because I export to SPICE format :)

ChrisOfBristol commented 4 years ago

how do you place those component on the layout?

In a column to the right of the canvas or a row underneath it.

how do you know which resistors/capacitors to put?

The netlist file specifies component name, type and value and 2 other factors.

do they want to draw a schematic or a pedal layout or an amp layout?

I don't understand this - I just use DIYLC to draw stripboard layouts.

The example below shows components imported from the netlist file to the right of the canvas ready to be manually placed.

It also shows a panel which has been loaded from the imported netlist file with a list of nets that haven't yet been connected. As components are manually connected, nets are removed from this list. The existence of the option Config>Highlight Connected Areas suggests that related functionality already exists in DIYLC.

example

ChrisOfBristol commented 4 years ago

Automation of component placement and connection. IMHO In the applications that I have seen, automatic placement of components makes a mess. It's better to start by manually placing the components, before attempting to link them automatically. However even this is dubious, resulting in a rats-nest, at least some manual placement is necessary. For the type and size of circuit that DIYLC users create, automation of component placement and connection is messy and more trouble than it's worth for the user - let alone the author of the software.

bancika commented 4 years ago

It's relatively easy to import components while ignoring the connections between them.

My question about component types is - say you need to import a capacitor. Which one do you pick? Ceramic, Electrolytic, Axial/Radial Film...

On Thu, Apr 2, 2020 at 12:56 PM ChrisOfBristol notifications@github.com wrote:

Automation of component placement and connection. Opinion:In the applications that I have seen, automatic placement of components makes a mess. It's better to start by manually placing the components, before attempting to link them automatically. However even this is dubious, resulting in a rats-nest, at least some manual placement is necessary.

IMHO For the type and size of circuit that DIYLC users create, automation of component placement and connection is messy and more trouble than it's worth for the user - let alone the author of the software.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bancika/diy-layout-creator/issues/505#issuecomment-607774066, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACXONCJDY6GCY2KAWB3DLFLRKRVOPANCNFSM4LXDMGAA .

-- Branislav Stojkovic www.diy-fever.com

ChrisOfBristol commented 4 years ago

Here is a list from gEDA, it shows film, electrolytic and ceramic capacitor types.

[ C3 CAP_FILM 82n

] [ C2 CAP_ELECTRO_200 1u

] [ C1 CAP_CERAMIC1 820p

] It would be necessary be able to relate the schematic component type stated by the schematic software to a DIYLC component type.

bancika commented 3 years ago

I'm toying around this idea. Do you have a list of commonly used components that could be mapped to DIYLC components? I thought that for starters it would have some predefined mappings in the code, but it can also learn through usage when user changes default behavior or maps additional types

image

ChrisOfBristol commented 3 years ago

(See email too) QUCS component name/qucs field no of component detail/component detail/veroroute name

'R' '' '' 'RESISTOR' 'potentiometer' '' '' 'PADS3' 'Varistors' '' '' 'RESISTOR' 'C' '13' 'neutral' 'CAP_ELECTRO_200_NP' 'C' '13' 'polar' 'CAP_ELECTRO_200' 'L' '' '' 'INDUCTOR' 'Tr' '' '' 'PADS4' 'Switch' '' '' 'SWITCH_ST2' 'Relais' '' '' 'PADS4' 'Vdc' '' '' 'PADS2' 'Vac' '' '' 'PADS2' 'LEDs' '' '' 'LED' 'LEDs_red' '' '' 'LED' 'LEDs_yellow' '' '' 'LED' 'LEDs_green' '' '' 'LED' 'LEDs_infrared' '' '' 'LED' '_BJT' '9' 'npn' 'TO92' '_BJT' '9' 'pnp' 'TO92' 'JFET' '' '' 'TO92' 'GND' '' '' 'PAD' 'OpAmp' '' '' 'DIP8' 'OpAmps' '' '' 'DIP8' 'Diode' '' '' 'DIODE' 'Z-Diodes' '' '' 'DIODE' 'RTD' '' '' 'DIODE' '_MOSFET' '9' 'pfet' 'TO220' 'PMOSFETs' '' '' 'TO220'
ChrisOfBristol commented 3 years ago

Now it's live it will be very interesting to see the feedback. I do think it will be an extremely useful function, you may need to offer different file formats, but the feedback should suggest those. On the other hand it might turn out that most people designing small to medium sized circuits for their own use have either got the schematic (as an image) from somewhere else, or just use pen and paper🙁

Using the net information in the netlist. A function which the program uses with the nets information to automatically place the components is a far more complex problem, in fact I suspect it has a lot in common with the Travelling Salesman Problem I have tried VeroRoute and a long time ago when I had Windows I used a program called Stripboard Magic.

There are better approaches. To start with the user should be able to set some parameters - like closeness of soldered holes etc. Options:

  1. User places important components like chips which have lots of connections and sockets/controls which need to be in a certain position, power rails etc. Then press Connect and program places the rest of the components and connects them.
  2. Components are shown as linked together, but user places them all. Fritzing does this (from an internal schematic). It looks like a tangle to start with.
  3. Have a list of nets, they get ticked off as the user connects them.

All very complicated and a lot of work, and perhaps not of very great utility, so I really don't think it would be likely to become a high priority.

PopoutApps commented 2 years ago

There is now a Python package available from PyPI called qucs-netlist which can take a QUCS schematic and simulation file (or create the latter if necessary) and convert them into a netlist suitable for loading into DIY Layout Creator (or any other PCB layout software that can load a standard netlist). Available from here https://pypi.org/project/qucs-netlist/ Also on GitHub here https://github.com/PopoutApps/qucs_netlist