# KiCad: Power with hierarchical sheets

I just started trying to use KiCad (complete newbie), and I have a very basic question about using power inputs with hierarchical sheets.

Let's say I want a single LED on a hierarchical sheet, while my main sheet simply contains a battery.

Should I use hierarchical labels to connect power from the main sheet to my hierarchical sheet, or is there another way?

For instance, the main sheet:

And the hierarchical sheet:

Is this the correct solution? I initially tried to used the +9v and GND elements in my hierarchical sheets (many of them in a single sheet), but KiCad complains that some of them are not driven.

I found lots of topics discussing this, but nothing I can really understand, nor related to hierarchical sheets.

If I need to use hierarchical labels for connecting power, then when should I use +9v and GND?

• Technically, using +9v and GND ought to work. I have done so myself using the VCC and GND What is the error you're getting? Aug 23, 2015 at 17:49
• It says it is not driven. Does it mean I need to add a power flag to at least one +9v and GND in the hierarchical sheet? Aug 23, 2015 at 17:51
• In KiCad the power symbols are global throughout all the sheets. So if you add a battery in the main sheet and connect it to +9v and GND and then, did the same in the hierarchical sheet, KiCad will connect the nets when creating the net list. You don't have to use the hierarchical labels that way. Aug 23, 2015 at 17:55
• But then this requires a power flag in the hierarchical sheet right? Aug 23, 2015 at 17:59
• Just being pedantic: The LED is shown reverse biased and thus won't make light in the above schematic. That's why it's important to use consistent, well-understood naming. Jul 2, 2017 at 17:17

The solution that you have on your pictures will work fine. I have checked the Battery element in the library editor and it has both pins as a passive pins, so ERC wont complain.

If you want to use +9 V and GND elements from Power library, then you also need to add a power flag. In the reference they say:

It is common to have an error or a warning on power pins, even though all seems normal. [...] This happens because, in most designs, the power is provided by connectors that are not power sources (like regulator output, which is declared as Power out).

The ERC thus won’t detect any Power out pin to control this wire and will declare them not driven by a power source.

To avoid this warning you have to place a "PWR_FLAG" on such a power port.

So, using the power flags, you can make following configuration:

Regarding the hierarchical sheets, take a look at this video to learn more (browse the channel, there are lots of very useful videos for KiCad).