How to create nets, and tag things to nets, inside pcbnew (without a schematic)

It might not be an advantage for somebody who already thinks in a way that gets a benefit from a schematic. I could imagine that users who do not want a schematic never really learned how to use one so it would take not only learning eeschema but schematics in general.

Plus i could imagine tools for such a task could even benefit normal users. After all there might be parts in the schematic that do not really appear in the schematic.
And these tools could also be precursors for things like pin swapping and other such features that influence the schematic from within pcbnew.

1 Like

Hey @paulvdh

1.) you (personally) dont need to imagine it for it to be a valid workflow that is valid for others.
2.) imagine these 3 -
a.) a lot of these hobby chips/boards from sparkfun or ladyada (Arduino, SX1509, etc) show the user how to hook up things using a breadboard - which very closely resembles a PCB layout - so the user is already thinking in PCB land - and NOT in schematic land.
b.) Often wiring ICs are very much the same between PCB or schematic view… so it feels redundant and more work to create the schematic view when time is short - why not jump straight to the PCB view.
c.) kicad pcbnew tool is 97% there, so why not add tagging/labeling of pads and now this (often) requested workflow is now supported? Right now the only thing really missing is that the copper fills dont connect to anything when starting from pcbnew - and adding a feature to tag/label the pads would allow a pcbnew only workflow.
d.) a feature to reverse engineer a pcbnew diagram to schematic would actually help support the notion to “work in schematics” - actually… the impulsive or lazy individual can now have a quick path to transition their quick layout into something more full blown and ‘proper’… fully recognize that development labor is short. But this is a vision that could actually help push the ‘schematic’ agenda…

Finally - For a metaphor - It’s kind of like reading Guitar Tab vs Musical staff notation. Purists will hate the Guitar Tab - but plenty of guitarists prefer the TAB notation because it closely resembles what the guitarist is working with - the fretboard.

Could you provide an example?

Well wireit is the easiest way. So i suggest you use the debug version they provided you over on the bug report and help them find the issue

OK, I’ll bite, have bitten.

I went as far as starting a new project from scratch and start a new project for this, and timed it a bit. I took me 15 minutes to get to the point of having a schematic, a netlist and Footprints in Pcbnew.

2020-05-04T17:04 Starting KiCad.
2020-05-04T17:05 New project started, Single resistor placed.
2020-05-04T17:05 Footrpint assigned.
2020-05-04T17:16 Complete schematic drawn, footprints assigned, ERC free.
2020-05-04T17:17 Components & netlis put in Pcbnew with [F8].
2020-05-04T17:18 Verified all components are there.
2020-05-04T17:19 Netlist saved.

The schematic is a trivial standard single transistor amplifier:
image

So I admit I erred here. The complete netlist is not trivial enough to write with an text editor. When I typed that, I only looked at the portion of the netlist file that actually defines the nets, which are the last 30 lines of this netlist file. 6 nets are defined.

(export (version D)
(design
  (source /home/paul/projects/kicad/asdf_transistor_amp/asdf_transistor_amp.sch)
  (date "2020-05-04T17:19:05 CEST")
  (tool "Eeschema 5.1.5-52549c5~86~ubuntu18.04.1")
  (sheet (number 1) (name /) (tstamps /)
    (title_block
      (title)
      (company)
      (rev)
      (date)
      (source asdf_transistor_amp.sch)
      (comment (number 1) (value ""))
      (comment (number 2) (value ""))
      (comment (number 3) (value ""))
      (comment (number 4) (value "")))))
(components
  (comp (ref R1)
    (value R)
    (footprint Resistor_SMD:R_0805_2012Metric)
    (datasheet ~)
    (libsource (lib Device) (part R) (description Resistor))
    (sheetpath (names /) (tstamps /))
    (tstamp 5EB02F61))
  (comp (ref R2)
    (value R)
    (footprint Resistor_SMD:R_0805_2012Metric)
    (datasheet ~)
    (libsource (lib Device) (part R) (description Resistor))
    (sheetpath (names /) (tstamps /))
    (tstamp 5EB034AC))
  (comp (ref R4)
    (value R)
    (footprint Resistor_SMD:R_0805_2012Metric)
    (datasheet ~)
    (libsource (lib Device) (part R) (description Resistor))
    (sheetpath (names /) (tstamps /))
    (tstamp 5EB043E6))
  (comp (ref R3)
    (value R)
    (footprint Resistor_SMD:R_0805_2012Metric)
    (datasheet ~)
    (libsource (lib Device) (part R) (description Resistor))
    (sheetpath (names /) (tstamps /))
    (tstamp 5EB043EC))
  (comp (ref Q1)
    (value PZT2222A)
    (footprint Package_TO_SOT_SMD:SOT-223-3_TabPin2)
    (datasheet http://www.fairchildsemi.com/ds/PN/PN2222A.pdf)
    (libsource (lib Transistor_BJT) (part PZT2222A) (description "1A Ic, 40V Vce, NPN Transistor, General Purpose Transistor, SOT-223"))
    (sheetpath (names /) (tstamps /))
    (tstamp 5EB04ADC))
  (comp (ref C1)
    (value C)
    (footprint Capacitor_SMD:C_0805_2012Metric)
    (datasheet ~)
    (libsource (lib Device) (part C) (description "Unpolarized capacitor"))
    (sheetpath (names /) (tstamps /))
    (tstamp 5EB055A2))
  (comp (ref C2)
    (value CP)
    (footprint Capacitor_SMD:CP_Elec_6.3x3.9)
    (datasheet ~)
    (libsource (lib Device) (part CP) (description "Polarized capacitor"))
    (sheetpath (names /) (tstamps /))
    (tstamp 5EB06ED3))
  (comp (ref J1)
    (value Conn_01x08)
    (footprint Connector_IDC:IDC-Header_2x04_P2.54mm_Vertical)
    (datasheet ~)
    (libsource (lib Connector_Generic) (part Conn_01x08) (description "Generic connector, single row, 01x08, script generated (kicad-library-utils/schlib/autogen/connector/)"))
    (sheetpath (names /) (tstamps /))
    (tstamp 5EB0AEE1)))
(libparts
  (libpart (lib Connector_Generic) (part Conn_01x08)
    (description "Generic connector, single row, 01x08, script generated (kicad-library-utils/schlib/autogen/connector/)")
    (docs ~)
    (footprints
      (fp Connector*:*_1x??_*))
    (fields
      (field (name Reference) J)
      (field (name Value) Conn_01x08))
    (pins
      (pin (num 1) (name Pin_1) (type passive))
      (pin (num 2) (name Pin_2) (type passive))
      (pin (num 3) (name Pin_3) (type passive))
      (pin (num 4) (name Pin_4) (type passive))
      (pin (num 5) (name Pin_5) (type passive))
      (pin (num 6) (name Pin_6) (type passive))
      (pin (num 7) (name Pin_7) (type passive))
      (pin (num 8) (name Pin_8) (type passive))))
  (libpart (lib Device) (part C)
    (description "Unpolarized capacitor")
    (docs ~)
    (footprints
      (fp C_*))
    (fields
      (field (name Reference) C)
      (field (name Value) C))
    (pins
      (pin (num 1) (name ~) (type passive))
      (pin (num 2) (name ~) (type passive))))
  (libpart (lib Device) (part CP)
    (description "Polarized capacitor")
    (docs ~)
    (footprints
      (fp CP_*))
    (fields
      (field (name Reference) C)
      (field (name Value) CP))
    (pins
      (pin (num 1) (name ~) (type passive))
      (pin (num 2) (name ~) (type passive))))
  (libpart (lib Device) (part R)
    (description Resistor)
    (docs ~)
    (footprints
      (fp R_*))
    (fields
      (field (name Reference) R)
      (field (name Value) R))
    (pins
      (pin (num 1) (name ~) (type passive))
      (pin (num 2) (name ~) (type passive))))
  (libpart (lib Transistor_BJT) (part PZT2222A)
    (description "1A Ic, 40V Vce, NPN Transistor, General Purpose Transistor, SOT-223")
    (docs http://www.fairchildsemi.com/ds/PN/PN2222A.pdf)
    (footprints
      (fp SOT?223*))
    (fields
      (field (name Reference) Q)
      (field (name Value) PZT2222A)
      (field (name Footprint) Package_TO_SOT_SMD:SOT-223-3_TabPin2))
    (pins
      (pin (num 1) (name B) (type input))
      (pin (num 2) (name C) (type passive))
      (pin (num 3) (name E) (type passive)))))
(libraries
  (library (logical Connector_Generic)
    (uri /usr/share/kicad/library/Connector_Generic.lib))
  (library (logical Device)
    (uri /usr/share/kicad/library/Device.lib))
  (library (logical Transistor_BJT)
    (uri /usr/share/kicad/library/Transistor_BJT.lib)))
(nets
  (net (code 1) (name "Net-(C1-Pad2)")
    (node (ref C1) (pin 2))
    (node (ref J1) (pin 3))
    (node (ref J1) (pin 4)))
  (net (code 2) (name GND)
    (node (ref C2) (pin 2))
    (node (ref R3) (pin 2))
    (node (ref R4) (pin 2))
    (node (ref J1) (pin 7))
    (node (ref J1) (pin 8)))
  (net (code 3) (name "Net-(Q1-Pad3)")
    (node (ref R4) (pin 1))
    (node (ref Q1) (pin 3)))
  (net (code 4) (name +15V)
    (node (ref C2) (pin 1))
    (node (ref R2) (pin 1))
    (node (ref R1) (pin 1))
    (node (ref J1) (pin 2))
    (node (ref J1) (pin 1)))
  (net (code 5) (name "Net-(J1-Pad5)")
    (node (ref J1) (pin 5))
    (node (ref J1) (pin 6))
    (node (ref Q1) (pin 2))
    (node (ref R1) (pin 2)))
  (net (code 6) (name "Net-(C1-Pad1)")
    (node (ref Q1) (pin 1))
    (node (ref R3) (pin 1))
    (node (ref R2) (pin 2))
    (node (ref C1) (pin 1)))))

How can a user ever get any understanding of how his breakout board works without reverse-engineering from the “fritzing” view to a normal schematic? Things should be made as simple as possible, but not simpler. Skipping the schematic obfuscates how the circuit works.
I assume here that you decided to use these breakout boards because you have some interest in electronics.
I had no idea what an SX1509 was. First info I found was it’s datasheet, even though I searched for: https://duckduckgo.com/?q=ladyada+SX1509&ia=web
I also did find the “fritzing” example of that board, and it does make it a little bit easier to wire if you have the exact same components. But what if you do not have one of those arduino boards with the weird pinout, but for example an arduino nano, which fits on a breadboard? Then you’re already back to reading labels for the I2C and power connections, which are not on the “fritzing” thing.

I do not know many (any?) IC’s where the pinout completely follows function. Even with a simple IC as an ULN2803, where inputs and outputs are opposite each other, there are still a GND pin and a common pin for the cathodes of the diodes.

You picked a bad metaphor for me. I have no idea whatsoever what a “guitar tab” is.

I guess that part of the difference is that quite a lot of people keep on thinking that making a custom symbol or footprint is “difficult” and spend an hour searching on the 'net instead of making a custom symbol or footprint in 10 minutes. (The initial learning curve adds a significant amount of time to that though, and complicated footprints may take much more time).

I’ll come back to this. in a separe post. You’ve made me curious enough to try to import some random footprints into Pcbnew and experiment a bit with what I can do with it.

This is something we can agree on. I would really like to see better support for reverse engineering into KiCad. The first reverse engineering feature I’d like to see in KiCad is to simply add a (scanned) photograph of a PCB as backgound image. I’m not even going to make a wish list request for it, as there are many more pressing issues to be fixed in KiCad.

Just in case anyone wants to do anyting with this (trivial) project, I’ve zipped and attached it:
asdf_transistor_amp_2020-05-04.zip (7.6 KB)

Worked with the WireIt folks to test/fix the tool on MacOS. Works now!

Just annotated all the net names for my pcbnew-only layout (which formerly had an empty netlist).
Valuable tool. Easy to use. Took me < 5min. All my copper fills are doing the right thing now.
So easy.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.