sk1pwrprt1- Power Ports

create counter

This is an early edition of this material. There's lots of "Good stuff" here, and not a lot is actually wrong… I hope.

(Note-to-self: I should "split out" two sub-topics near bottom.)

This page may, before 10 November 2011, have had some errors in it due to a confusion between the roles of pin names and pin and pad numbers. Those errors are now, I hope, fixed. I have a page with more on the pin/pad name/number confusion if you are really curious.


I also offer a shorter note about power ports, if that's what you want, if you don't have time or inclination just now for a full tutorial. Power ports are important, though. Don't put off mastering them for too long.

If you are new to PCB CAD, "power ports" may seem a little strange to you. I hand-drew circuit diagrams and created… also by hand… PCB layouts for those circuits for years and never encountered "power ports". I used a good PCB CAD program from time to time for years with a little kludge to get around what power ports would have done for me… because I didn't know about power ports, which are the right way to do "it".

What is this "it" we should do?

I'm finding that hard to put into words. Bear with me? Read on, and perhaps "it" will emerge. I hope you will find most of my pages more coherent than this one!

If you just want to connect an LED, a switch and a resistor, and provide a connector for supplying power, you won't need power ports.

For a simple case where a power port is helpful consider the following. It hooks up the "good old" 555 timer chip in a circuit to make an LED wink as long as power is present. "Timer", by the way has little to do with "times of the day". "Timer" in this context is all about making various sorts of "on/off"s happen at regular and predictable intervals.

The following is a good start to the 555 PCB, and contains nothing that you couldn't do with the basic skills presented in the introductory tutorial from this site, The 555 is in the standard "linear" library.

Just a few things are missing. Critical things!… but only a few. And they will be supplied using "power ports"

You may have noticed the two short vertical lines near the top and bottom of the schematic, on the left hand side. You probably guessed that you would connect 5v (or so) to the top one, and "ground", or the return to the power sources "negative" terminal, to the other. Correct!

In my early, kludgey, days, I merely stuck one channel connectors on the end of such wires, and pads for them on the PCB design, and remembered what they were for. This works… but there is a much better way. Much better because it allows you to do more rigorous checking of your work, and because it allows you to do things you can't do by kludge.

Before we talk about how to provide for the power and ground connections, what else is missing from the diagram above??

What about "below" the LED? We "know" that goes to ground, don't we? But that isn't shown on the diagram… yet.

There's one last "missing bit". You may have to look closely, and may have to know things about the 555 and many similar chips, even something like a simple quad NAND chip.

What's missing?

Yes! The diagram doesn't show any connection to pin 1 or to pin 8! Now… it is not unknown for a chip to have an unused pin, but these pins are important to a 555. In fact it really won't work until you connect those pins properly!

What goes to those pins? The connection for the power to run the chip connected to pin 8, and the "return" connection, back to your power source's "negative" terminal, or "ground", aka "zero volts". These are the same two things that the rest of the circuit needs connecting to!

We'll return to this very shortly.

Vcc, Vdd, GND and Vss

Many chips… including the 555… will operate happily on a range of input voltages. Wikipedia says the 555 works on anything from 4.5v to 15v.

"Vcc" is a common abbreviation for "the voltage you are using to run this chip". (It by no means the only abbreviation for that. Vdd is another commonly used one. Of course, you can also put the actual voltage you intend to use, e.g. "5v" on a diagram.)

If you happen to be using chips in a circuit some of which use "Vcc" and others use "Vdd", you just put both power ports on the relevant line of the drawing.

Also "of course": Whenever you connect power (more properly termed connecting a voltage), you have to make two connections. If you are powering your circuit from one of those small rectangular 9v batteries, the connections are called "+ve" and "-ve"… when in fact "zero volts" would be a more accurate label for the "-ve" terminal, but, hey… we have to live with what is, or at least so I'm told. Sigh.

So… we talked about "Vcc" (aka "Vdd"), and it accounts for one of the connections from whatever makes the electrons go around our circuit.

The other connection is called "ground". It could be called "zero volts", the same way that Vcc could be called "9v" if we power our circuit with a 9v battery. "Ground" is sometimes called "Vss".

There's a different circuit at the bottom of the page to illustrate this "Vcc" and "Vdd" in one circuit case.

Big Gotcha… cost me about 2 hours one night.

We've talked about using power ports…. "GND", Vcc", etc.

Besides putting a power port on power lines (which includes the "GND" line), for eeSchematic's electrical rules check, you also need to attach a "power flag" to at least one point on "each power line". If your circuit has, say, Vcc and GND, that means TWO power flags. One for each. Even if you've used the "trick" of having a number of "bits" of the circuit only "connected" because each has a GND power port on it, you only need one power flag on the GND line. (You can connect it to any one of the bits which have a GND port.)

And another thing: The "power flag" thing is added the same way you added the power ports. It is in the same list that held Vcc and GND. You use the same schematic symbol, "power flag" on BOTH the Vcc and GND lines. (Two of them, two flags. One for each line.)

An extra "little detail" I want to squeeze in here….

Take a deep breath. Do not let your eyes glaze… It isn't long.

Some circuits require three "power" (voltage) connections. Beginners will probably first encounter this if they try to use a "dual rail op-amp". (Single rail op-amps exist, and will do many useful things… but then you wouldn't get to learn about times when three power connections are needed!)

In the following, one unit of the long bar and the short bar, and the gap between them, represents a single cell… the thing we usually call a "battery". If you have a flashlight that runs on two cylindrical "batteries", you have a flashlight that operates on 3 volts (each cell provides 1.5v). (The two cells together constitute a "battery". A "9 volt battery" actually is a battery, as it has multiple cells inside it.)

Hang in there… nearly done with the "little detail".

Here we have the same circuit twice. Four ordinary "flashlight" batteries, in series, with wires from each end, and out of the middle.

An electronics engineer would probably label things as shown on the left: Positive 3v, ground, and negative 3 volts. There is absolutely nothing "wrong" with the labeling I've shown on the right, though. Voltages are always measured between two points. Another definition of "ground" is "the place against which all voltages are measured.

Non-musicians skip this paragraph: Hear about the proud violist? Not only knew how to play quarter notes, but would play one… one for you whenever you wanted!

Happily for the hobbyist, many, many, many things can be done with "single rail power (voltage) supplies", i.e. something with two wires, say 5v and ground.

END of "little thing"!

Scroll up the page for a moment, look at the 555 circuit I showed you back there. Think about how the "battery" (or other source of voltage) needs to be connected.

There are the two places represented by the short vertical lines, 5v (or whatever, "Vcc") to the top, ground to the bottom.

The ground ("GND") wire also needs to be connected to the "bottom" end of the LED.

And we need to supply Vcc and GND to the 555, on its pins 8 and 1 respectively. Not so easy to do with our present knowledge.

At the moment, you may curse the component designer for making those two pins invisible… but invisible pins could be your friends, really, once you master a few simple things about using power ports. (Not everyone thinks invisible pins are a good thing, by the way… but if you don't want to use them, you may find yourself needing to create your own components for devices which have components (with invisible pins) already provided in the stock libraries.) (See the xtronics wiki for further on this… indeed, see it anyway for some good stuff!!)

"Connecting" the "power"

All we're actually doing for the next few paragraphs is putting some new components onto the schematic. I'll tell you when we've finished doing that.

To place a power port, you can either use the "Place power port" button, on the right hand toolbar….

… or, if you have the pointer button selected at the moment, (or arrange that by pressing the escape key a few times!) just press "P" to start the "place power port" process. Pressing "P" (or, if you're using the button, clicking on the drawing surface) will bring up the "Place Power Port" dialog….

(Notice what it says in the title bar? (Under KiCad ver 2001-04-29, anyway!) It says "Component Selection", doesn't it? I told you placing power ports is just placing components! Power ports are components in the same way that butterflies are insects. Want to really annoy a 10 year old? Argue with him about whether a square is a rectangle. (A sqare is a rectangle, by the way.))

Add the following, and connect them to the existing circuit, to create what you see in the images a little way down the page. We've already launched "place power port" in the first instance…

First add a "Vcc power port" to the top of the short vertical line at the upper left….

*Click "List all" to see the list of available power ports
*Select Vcc… NOT Vdd, NOT +5v… or any other!

*Position it, drop it.

Repeat the process to add a "GND" power port to the bottom of the short vertical line at the lower left….

And do it one more time, to add a "GND" power port at the bottom of LED at the lower right….. Leaving you with…

Here are some closeups of the important bits….

Power port symbols will "connect" to the end of a line or "connecting point" of a component without a junction. (Although a junction will do no harm… If in doubt, feel free to place one.)

Power port symbols will not connect, without a junction, if you just put them down merely "touching" an existing line somewhere along its length.

If you put one down touching a point where a line changes direction, the power port will connect to "the line", as, in a sense, you have two "line ends" there.

Sorry to descend into all that detail… but you need to know! (How will you know if you got it right? By what the rat's nest lines show you when you get to the PCB layout stage of the design process. Fear not! With a little care, and if you don't do anything unreasonable, you can go back and forth between eeSchema and PCBnew, changing connections, adding (or removing) junctions. Just be sure to re-save the netlist after each change at eeSchema, and re-load it each time you return to PCBnew (if you've made changes.)

Even before you leave eeSchema, you can check whether the power port is connected to something, or merely sitting on it. With the pointer tool active, put the cross hairs on the power port, press "G" to draG it. (or use right-click to initiate a drag.) If when you drag the power port, the line moves too, all is well. (Press the "escape" key to get out of the dragging without upsetting your diagram.)

The story continues on the next page.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License