12
\$\begingroup\$

I was designing new schematics and decided to inspect another library downloaded from kicad official sources on Github. The one thing that cought my eye instantly was that Electrical type for both GND and VCC was POWER INPUT.

Is it meant to be that way or just a workaround for an existing problem, eg. failing DRC?

\$\endgroup\$
3
  • 2
    \$\begingroup\$ On a symbol, you mean? \$\endgroup\$ Oct 23, 2016 at 23:28
  • \$\begingroup\$ @ThreePhaseEel yes, on a pin. \$\endgroup\$
    – sitilge
    Oct 24, 2016 at 7:19
  • 1
    \$\begingroup\$ That's expected. You should only see power outputs on things like voltage regulators. \$\endgroup\$ Mar 30, 2017 at 3:08

4 Answers 4

12
\$\begingroup\$

VCC and GND are meant to be power inputs. ERC on the schematic will check that all power inputs are driven i.e. have a power output somewhere on the net. It'll also make sure you don't connect two power outputs together. An example of a power output would be the output terminal of a regulator.

The idea starts to break down if you put passives (inductors, chokes, resistors) that break up the net, but it can be helpful when used properly.

\$\endgroup\$
4
  • 2
    \$\begingroup\$ Isn't vcc power input and gnd power output? \$\endgroup\$
    – sitilge
    Oct 26, 2016 at 10:56
  • 3
    \$\begingroup\$ @sitilge No, I like to think about it in terms of whether a device requires or supplies the power. A single power net only has one output on it. For GND, the only thing power output would be the terminal to the battery's GND (or whatever else grounds the entire circuit) \$\endgroup\$
    – mbrig
    Oct 26, 2016 at 23:19
  • \$\begingroup\$ I don't get why? I would like to add a VCC and a GND, which would power e.g. Arduino. VIN is power input and all 3 GNDs are too. So connecting VCC to VIN and GND to GND, is intuitive to me. But all 4 are by default power inputs. So DRC fails. How can I make simple circuit with power source connected to an Arduino? \$\endgroup\$ Jan 20, 2019 at 21:08
  • 2
    \$\begingroup\$ @Genom, you'd place a PWR_FLAG next to the connector where the power comes in, or change the pin types on the connector to power_out (because that connector is what supplies power to the net). \$\endgroup\$ Jan 24, 2021 at 14:06
6
\$\begingroup\$

As a newbie I found this difficult to understand and it remains very non-intuitive (at least from a programmer's perspective) to have the ground (logical circuit output) "logically" defined as an input.

The answer from @mbrig put me on the right track, but I still had errors elsewhere until I understood the requirements to separately flag each power network with the PWR_FLAG symbol, explained here: KiCad pin connected to some others pins but no pin to drive it.

Create this kind of group somewhere else on your EE schema diagram, continue to use the more intuitive +#V/VCC and GND symbols in your actual main circuit, and the errors go away.

Power Flags Example

\$\endgroup\$
1
  • 4
    \$\begingroup\$ That just silences the warning though -- you want the PWR_FLAG at the place where the power comes in (e.g. near the connector for the power supply). \$\endgroup\$ Jan 24, 2021 at 14:07
2
\$\begingroup\$

One common misconception in electronics is that a wire not connected to anything will have a voltage of "zero volts".

Most people seem to understand that in a typical circuit with lots of stuff connected to "+5V", there should be one thing (typically a connector accepting power from some outside power source, or a battery connector, or etc.) that actively drives that wire to +5V, and lots of loads (such as an ATmega processor or a LED driver or a 74x00 series chip or etc.) connected to +5V that consume power.

When only loads are connected to a +5V wire, KiCAD doesn't see how they are getting power, so the KiCad ERC correctly warns you that as far as it can tell nothing will get power. (When I have a battery and a flashlight bulb, and I only connect a GND wire between them, leaving the other side disconnected, the bulb stays dark).

For some reason, people don't always pick up on the fact that GND acts exactly the same way.

There should be one thing (typically a connector accepting power from some outside power source, or a battery connector, or etc.) that actively drives the GND wire or the GND plane to 0V, and lots of loads (such as an ATmega processor or a LED driver or a 74x00 series chip or etc.) connected to GND that consume power.

When only loads are connected to GND wire, KiCAD doesn't see how they are getting power, so the KiCad ERC correctly warns you that as far as it can tell nothing will get power. (When I have a battery and a flashlight bulb, and I only connect a +5V wire between them, leaving the other side disconnected, the bulb stays dark).

For the vast majority of integrated circuits, both +VCC and GND are power inputs. Something else needs to actively drive both of those pins to the right voltage, or the chip won't work.

This is related to the common misconception that electrical charges carry electrical energy -- the incorrect idea that batteries somehow "fill up" electrical charges with energy, the incorrect idea that "energetic charges" carry that energy through the +5V line to the chip which drains the charge of energy, and then the incorrect idea that "non-energetic charges" flow back through the GND wire to the battery to be charged up again.

In fact, electrical energy flows from the battery to the IC in one direction (from the battery to the chip) near the +5V and the GND wires at a large fraction of the speed of light. Simultaneously, electrical charges flow in opposite directions (one from the battery to the chip, the other from the chip back to the battery) inside the +5V and the GND wires at perhaps a few millimeters per minute. What's important for most circuits (and supported by KiCad's ERC/DRC) is the the flow of electrical energy.

"Electricity" misconceptions spready by textbooks.

\$\endgroup\$
0
\$\begingroup\$

Technically, ground can be at a higher or lower voltage then the output ( a positive or negative voltage supply for example). From this perspective ground pins should be bi-directional power pins. Current could be flowing either into or out of the ground pin, depending on the voltage of the output pins.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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