4
\$\begingroup\$

Just starting to learn PCB design and picked KiCad because it is free. There are a few things that I am not sure about.

I am working on a small project where I have designed and built all my circuits on breadboards and now I would like to create them on PCBs. So I have started using KiCad to create the schematics, then design the board layout and create the Gerber files to send off for manufacture.

First question: can I create a single project and have each single schematic included as each circuit has signals that are common to all like clocks etc.?

Second question: when I run the ERC I get errors saying input pins are not driven by output pins. These circuits are all powered remotely by using pins on the PCB. I have heard about using the PWR_FLAGs but how do they work?

\$\endgroup\$
1
  • 2
    \$\begingroup\$ "First question ... Second question". Please ask separate questions in two separate submission. And please ask the actual question in the title of each. Don't be surprised if this one is closed for "lack of focus". \$\endgroup\$ Jan 3 at 18:40

2 Answers 2

4
\$\begingroup\$

can I create a single project and have each single schematic included as each circuit has signals that are common to all like clocks etc?

Yes. KiCad has hierarchical sheets which allow you to embed schematics within schematics. It also has three types of net names: net label, hierarchical label, and global label.

To draw a hierarchical schematic, start with the Create hierarchical sheet button on the right toolbar. Double-click on the box to enter. To have an input/output signal on this block, make a hierarchical label. Once you've drawn your subcircuit, you can leave the sheet with the Leave sheet button on the top toolbar. In the higher-level circuit, right-click on the box representing the subcircuit and click Import sheet pins to bring your signals out of the block and into the higher-level circuit.

Global labels are nets shared by every sheet. These include power labels placed as power ports (e.g. +3V3, GNDPWR), and any you have defined as global labels using Place global label (on the right toolbar).

when I run the ERC I get errors saying input pins are not driven by output pins. These circuits are all powered remotely by using pins on the PCB. I have heard about using the PWR_FLAGs but how do they work?

A PWR_FLAG is a special single-pin symbol that acts as a Power output device. ERC is simply ensuring that all Power input pins are connected to a Power output pin, i.e., that something is actually providing the power those pins are requesting. Your connection / terminal blocks will usually only have Passive pins, though, so ERC assumes that pin will not provide power. If you put a PWR_FLAG somewhere on that net, ERC will see a Power output and be happy.

You can see (and set) the exact ERC rules (which connections are errors, which are warnings, and which are OK) under the ERC dialog's Options tab.

If a symbol already in your circuit has its own Power output terminal (e.g. a switched-mode power supply or linear regulator) then you won't need a power flag on that net.

You can attach the PWR_FLAG to any point on a net, if you know that net is powered from somewhere outside your circuit. Personally, I prefer to put PWR_FLAGs beside the actual connection that power comes in from the outside world; this just makes the schematic a little bit more readable. I often see a PWR_FLAG just connected directly to a +3V3 net off in the corner somewhere, which still works for ERC but isn't as clear to the reader.

\$\endgroup\$
2
  • \$\begingroup\$ Ok this makes sense, thank you. One more question: When it comes to moving from schematics to the PCB layout stage, how does this work with multiple hierarchical sheets? Do you do each sheet separately? \$\endgroup\$
    – David777
    Jan 3 at 18:30
  • 2
    \$\begingroup\$ @David777 All sheets combine to a single PCB netlist that you layout all at once. One kicad project = one PCB layout. If you want to split your design into multiple PCBs, then use multiple projects. \$\endgroup\$ Jan 3 at 20:35
3
\$\begingroup\$

So first question, can I create a single project and have each single schematic included as each circuit has signals that are common to all like clocks etc?

If this is a breadboard scale project, I would simply do a single schematic for the entire project. Hierarchical sheets are very useful, but are going to be quite confusing if you've never done schematic capture before, and probably aren't needed if this is a "small" project.

Second question, when I run the ERC I get errors saying input pins are not driven by output pins. These circuits are all powered remotely by using pins on the PCB. I have heard about using the PWR_FLAGs but how do they work?

This may be controversial, but I also recommend that for a small beginner project that you not use the ERC. You're going to spend more time setting it up than it would take to sit down and look if your circuit makes sense. ERC is a lot more useful when you have a huge project with many sheets and you cannot easily see all the connection in one place. That said, do NOT skip the DRC when you do the PCB layout.


If you want to learn KiCAD I recommend doing it in small steps. Make a simple schematic, lay out the PCB, and then ask for feedback. Don't try to use every last tool and feature all at once.

\$\endgroup\$
3
  • \$\begingroup\$ It is a breadboard project, but it consists of over 10 breadboard circuits and can't fit them all on one schematic. But it does make sense for a beginner to 'modularly' build each one separately. So the KiCad tools does allow to design a PCB layout without running the ERC? \$\endgroup\$
    – David777
    Jan 3 at 18:28
  • 3
    \$\begingroup\$ @David777 Yes, the ERC is simply for your reference. The software does not care if you run it, and it is quite common to not use it projects where it isn't needed. Technically you can skip the DRC too, but the risk there is that send out gerbers that can't be manufactured or that don't implement the schematic correctly... \$\endgroup\$ Jan 3 at 18:49
  • 3
    \$\begingroup\$ Not necessarily a good idea, but you can make the schematic page as large as you want, so all projects will always "fit". Use multiple sheets not because you're running out of space but because the components implement a logically distinct function, because you want to have multiple copies of the same components, etc. Similar to how you would choose to implement functions in a normal computer program not because you don't want the main function to be too long but because they make sense as logically distinct blocks of code. \$\endgroup\$ Jan 3 at 18:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.