Do you have any idea of adding wiring harness to the schematic diagram?

Hi, all

I have always had the idea of ​​adding a wiring harness to the schematic. A type other than wires and buses.

For example, the spi bus, the wiring harness is named SPI0, SPI1, etc. In the sub-figure, the SLK, MOSI, and MISO of the MCU are connected to the SPI wiring harness like a bus.

Then use the SPI wiring harness to connect between the various sub-pictures, so that the schematic diagram can become clean and elegant.

Can this idea be realized?

Is this just for the schematic?
And how would this be any different from drawing a bus?

Are you familiar with wire labels? (both local, global & hierarchical)?

If it’s for the PCB, a wiring harness does not make much sense on a single PCB. You have the added costs of the connectors, the wiring and the labor to connect it all. While tracks etched in copper are free.

If you mean something else, then maybe make some sketch to clarify your words and post that here.

Thank you for your reply, my English is not good, and I rely on google to express it as accurately as possible.

My idea is to group some related signal wires into a group, then this group of signal wires will become a harness. In the schematic diagram, using a wire harness to replace a group of related signal lines for drawing can make the schematic diagram very concise. This form of expression is limited to schematic diagrams and has no relation to PCB Layout.

I found a drawing I drew, which is an Ethernet module, and used it to illustrate. There are other similar SPI modules, RS232 modules, etc., which are not listed one by one.

To explain first, the schematic diagrams I draw are based on a hierarchical diagram structure. For example, MCU, Ethernet and other peripherals are each made into a fixed module, which is the same principle as the function body of C language programming. Then refer to these subgraphs in the main picture, and use many labels to indicate different signals, and finally use many links to connect the first associated labels.

In KiCAD, the current bus type uses the same prefix plus a changing number to name each signal line, for example, address lines A0, A1, A2… However, the name of the control bus signal of the Ethernet is not expressed in this way, so it cannot be expressed in the naming form of the standard bus. Only a lot of wires can be used to indicate the connection, which makes the connection relationship on the schematic display very messy.

What’s even more unfortunate is that on 4K resolution monitors, because of the lack of “magnetic attraction” function, when there are a lot of connections on the schematic, it is difficult to check whether the connection being operated is really correct. In fact, I always I have to zoom in many times to see if each connection point is correct.

Therefore, if a “bus” type of wiring harness can be added, the Ethernet and MCU sub-pictures only need a pair of “harness” labels to connect, for example, the wiring harness named “ethernet_bus” (similar to the bus). Otherwise, you need to use a double of more than a dozen labels to connect, which adds a lot of extra work when drawing and checking.

Thank you for your patience to finish reading. I hope I clarified this matter.

Unfortunately, the current release only handles “vector buses”, which are the <PREFIX>[M..N] style that you described.

The upcoming KiCAD 6 release has a new “group bus” that should do what you want. Here is the description from the documentation:

A group bus is a collection of one or more signals and/or vector buses. Group buses can be used to bundle together related signals even when they have different names. Group buses use a special label syntax:

<OPTIONAL_NAME>{SIGNAL1 SIGNAL2 SIGNAL3}

The members of the group are listed inside curly braces ( {} ) separated by space characters. An optional name for the group goes before the opening curly brace. If the group bus is unnamed, the resulting nets on the PCB will just be the signal names inside the group. If the group bus has a name, the resulting nets will have the name as a prefix, with a period ( . ) separating the prefix from the signal name.

For example, the bus {SCL SDA} has two signal members, and in the netlist these signals will be SCL and SDA . The bus USB1{DP DM} will generate nets called USB1.DP and USB1.DM . For designs with larger buses that are repeated across several similar circuits, using this technique can save time.

Group buses can also contain vector buses. For example, the bus MEMORY{A[7..0] D[7..0] OE WE} contains both vector buses and plain signals, and will result in nets such as MEMORY.A7 and MEMORY.OE on the PCB.

Thanks for the hint, I found it in 5.99, it’s great!

A quick caution about using 5.99. That version is pre-release for 6, and changes every day. Most of the changes are to finalize new features and fix existing bugs. Occasionally the changes are to fix newly introduced bugs. Projects saved in 5.99 are not able to be opened in the stable versions (currently 5.1.10) because of new features in the PCB file format and a completely new schematic format.

I’m not saying “don’t used 5.99”, rather I just want to set your expectations properly. I, personally, would advise one of two approaches for using 5.99:

  1. Try out the latest and if there are bugs that prevent you from doing work, upgrade as newer nightly releases roll out. But if you are happy with it, hold off on upgrading until you see a feature that you want to use being announced in the Post-v5 new features and development news thread.
  2. Install each new nightly as they become available and participate in the KiCad Gitlab page to report new bugs and comment on already reported bugs. And if you program, maybe help troubleshoot and/or fix bugs (but you should probably join the developers mailing list so you don’t duplicate other people’s effort.)

Welcome to the forums, and:

Well, your English is better than how I would speak or write in what ever language you natively speak in (I’m not sure since you don’t give a location in your profile to use as a hint to your language). Mostly because I’m only fluent in English, and only know a few select words in other (mostly European) languages. I also rely in google translate more than I should when reading other languages. :wink:

Hi SembazuruCDE,

Nice to meet you, I have been using KiCAD 5 for more than a year and feel it is great! I am also happy to try the new 5.99. I have already understood the 5.99 rule description before, so I will refresh its new code every week.

I come from the largest police country on the planet, so I speak carefully. Although I am looking forward to joining the KiCAD construction team, it is difficult to concentrate on doing one thing for a long time because I have no sense of security, so I don’t want to delay the work of others in the team. As the saying goes: Don’t build tall towers on top of quicksand…

But what I can do now is to tell people around me that KiCAD is great, and I wrote some small tutorials to tell them how to use KiCAD well. This is my glory, and I thank the KiCAD team for making such a good work. :grinning:

1 Like

Here are some examples of this in the 5.99 nightly build:

If you just put some nets inside curly braces ({}) you can pass them to a sub-sheet like this:

You can also define a Bus Alias that makes this easier (Tools -> Bus Definitions in the menu)

Then there is less typing on the schematic:

2 Likes

Great, I am looking for related documents to try to shorten the description of a bunch of signals, because my Ethernet module has too many signals, thank you very much, I solved the big problem!

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