Connect components using labels in KICAD

In order to develop circuits in a more practical, simple and orderly way, in KiCad there are four (4) basic ways to connect components, depending on the number of elements present in the project, as well as the comfort that the designer presents. During its creation, you can use the ones you consider necessary. Among these options we have:

· Connection through lines.

· Connection by network labels.

· Connection by hierarchical labels.

· Connection by global labels.

CONNECTION THROUGH LINES:

As its name indicates, it allows the connection between components through lines, these can be used throughout the worksheet and can pass over other lines during their connection, an example is indicated in image number 1:



Image 1. Connection of components through lines.

If you decide to select this option during its construction, you must verify that no connections are made between the lines during its movement, that they are not part of the circuit since this is one of the most common errors when drawing, let's see the following image:



Image 2. Superposition of lines without connection between them.

In this image it can be seen how the lines connected to pins 19, 20, 21 and 22 do not touch each other, a frequent error is the one we will see below:



Image 3. Line connection error.

The green dot between the lines indicates that there is a connection between them, one of the most common errors. In this scenario, the program will not detect this as an error, since there may be times when lines need to be connected, so it is important to always check the work done.

For the design presented in image number 1, these lines should not connect with each other.

Note: The blue lines are used in this example to differentiate the modules created by blocks, it is a way to visually generate their stages, being divided as follows:

· Feeding stage.

· Comparator/amplifier stage.

· Stage with Arduino Nano.

· Lighting stage.

To make the connection through lines, the line option was selected, located in the upper right part of our program with the following symbol:



We select the symbol and we take it to the end of a component, we press click and we move it to the end of the component that we want to connect:



Image 4. Connection of two resistors by means of a line.

CONNECTION BY NETWORK TAGS:

This option allows us to reduce the number of lines between components, reduces the probability of making errors due to unwanted connections and at the same time, visually improves the distribution of each element in our design sheet. Image number 5 shows the components indicated in image number 1 but with the connection by network labels.


Image 5. Connection through network labels.

A closer view of the circuit is made so that the difference can be appreciated.


Image 6. Stage Lighting Network label.

The black letters present in image 6 represent the labels, they need to be repeated at the other end where they were previously connected with lines so that the program can establish the connection between them, the following image shows their connection:


Image 7. D2_T1 connection on pin D2 in Arduino Nano stage.

This is the way in which the connection is made by means of network labels, to make this selection, we locate the same bar where we visualize the connection by line and select the following symbol:


Once selected, click on the end where we will establish the connection, at that moment a text window will open like the one in the following image:



Image 8. Label properties.

We write the name that will allow us to identify both ends, we select it, copy it and then press accept, this will allow us to have copied the name we used, thus avoiding transcription errors.



Image 9. Creation of Network Label, first connection.

Then, we go to the other point where we want to make the connection, click, paste the previously copied name and select accept.



Image 10. Creation of Network Label, second connection.

With this, we managed to create the first connection through network labels. We repeat this procedure with all our connections.

Connection test in the circuit:

At the end of our connections phase, we must move on to the component numbering and registration stage, as we include them in our worksheet we can number them manually, but we can do it when the connections are finished, this stage is up to the designer .

To automatically annotate the components and validate their operation without errors, we look for the following icon:

When selected, a window will be displayed.

with several options for the numbering of components, if we let the numbering be the default, we press the annotate button, as shown in the following image:


Image 11. Numbering of components.

When you press this button, you will notice that each component now has a number. To verify that all connections are correct, we locate the following icon:


When clicking on it, a window will be displayed where it will indicate if there are errors in our design and at the same time it will give the location of the errors for their easy location and correction. When the window is displayed, we select the execute button and wait for the result.

If the word finished appears in the message field, it means that we have no errors.

CONNECTION BY HIERARCHICAL LABELS:

This option allows you to distribute the design with the use of different worksheets, at this point you can use a greater number of components without running out of workspace, since by using multiple sheets, your workspace is expanded. To carry out the design with hierarchical labels we look for the following icon:



Click on it and go to our worksheet, click and move the cursor as when we design a box or rectangle:



Image 12. Construction of hierarchical sheet.

To finalize the dimensions of our sheet, we press click, at that moment a window will appear with the properties of the scheme, there we place the name of the module that we are going to develop:



Image 13. Properties of the scheme.

In this example, the sheet corresponding to the power supply of the circuit is made since the distribution of each module will be based on the design presented at the beginning.

When completing the information, we press the OK button and we will have our first hierarchical sheet, by double clicking on it, it will open and we will have a sheet identical to the main one.



Image 14. Hierarchical Sheet – Food.

Just as this hierarchical sheet was created, the sheets will be created according to the distribution presented in Image 1 and 5 respectively, this gives a total of four (4) hierarchical sheets in the same project, here their distribution:



Image 15. Hierarchical sheets.

To access each hierarchical sheet, you have to double-click inside the sheet, in this case, we will display the content present in the Feed sheet:


Image 16. Content in the Food hierarchical sheet.

It has the same elements described in image 1 and 5 only that the connection pins of the comparator - amplifier are incorporated. Hierarchical sheet labeling is not performed on this sheet.

The numbering of the components varied because, at the time of entering them on each sheet, their numbering changed.

To exit this page and return to the main one, you must select the following icon:


It allows us to go back to the previous hierarchy page, that is, the one with the highest hierarchy.


Image 17. Comparator - amplifier hierarchical sheet.

An approach to the circuit is made to visualize its labeling in a hierarchical way:



Image 18. Hierarchical Label.

To make this type of label, you must search for and select the following icon:



The procedure to be used is the same as described above for the network label, only that it will be applied to one end of the circuit, the other end is in another hierarchical sheet, this is where the difference will be noticed:

This sheet has four (4) hierarchy labels, to establish the connections we must go to the main sheet.

In that view, find and select the following icon:



Then, place the cursor on one of the edges of the sheet that has the labels created.



Image 19. Comparator Hierarchical Sheet Border.

When clicking on the line, the names of the labels present in it will appear:



Image 20. Comparator hierarchical sheet labels.

Note: Once this procedure is done, these steps are repeated in the following hierarchical sheets, at this point, we will go to the Arduino Nano sheet, showing the final labeling process:



Image 21. Internal labels in Arduino Nano hierarchical sheet.

Note: The direction of the arrow in this type of label represents the input and output signal, this is selected when creating the label in properties of the hierarchical label¸ additional to these options are the following:



Image 22. Properties of the hierarchical label.

Once the creation of labels in the Arduino Nano sheet is finished, we proceed to place the labels in the view of the sheet:



Image 23. External labels in Arduino Nano Hierarchical Sheet.

At this point, the order and distribution of labels by neighborhood is carried out, on the left side, the labels in common with the Comparator sheet can be seen, while on the right side are the labels in common with the Illumination sheet. Sheet that we will see next:



Image 24. Internal label in Hierarchical Sheet Lighting.

The pas are repeated are made in the previous sheets obtaining:



Image 25. Hierarchical label.

At this point, we proceed with the connection of the labels through lines:



The result is shown below:



Image 26. Hierarchical label connection.

Note: upon completion of the connections, the design review is performed with the error detector:



CONNECTION BY GLOBAL LABELS:

Using this type of tag allows you to maintain multiple connections with just one tag, unlike the previous example.

This type of label is made by selecting the icon:



Then repeat the steps described on the previous label.

Starting from the previously created hierarchical sheet distribution, only the label change will be made.

On the Power sheet, the input voltages will be identified with global labels:



Image 27. Global Hierarchical Label for 8V, 5V and GND.

In the Comparator Sheet, we proceed to change the type of label, for this, place the cursor over the label and by pressing the secondary button, a menu will appear, look for the Change Type option and select Change to global label, as shown in the following image:



Image 28. Options to change the status of a label or text.

We select Change to global label and it automatically changes the shape of the label.



Image 29. Global label view.

The same procedure is performed on the Arduino Nano hierarchical sheet:



Image 30. Global label view in Arduino Nano hierarchical sheet.

We repeat the process with the Hierarchical Illumination sheet.



Image 31. Global label in Hierarchical sheet Lighting.



Image 32. General view of the Global Label.



Image 33. Second option when generating Global labels.

Final Note: KiCad offers options for the construction of circuits, it depends on the complexity of the project and the comfort of the designer, which one to use.