In the previous tutorial we looked at the elements of a PCB; in this tutorial we will be looking at what a schematic is, the elements of a schematic and how they are used. For those wondering we will be introducing the concepts of PCB Layout Editors in the next tutorial.
A PCB Layout Editor is software that takes an electronic schematic and gives you the tools to design a PCB around it. Whilst this is an important tool, we will be focusing on designing the circuits first before moving onto this stage.
What is a Schematic?
We’ll start by look at what exactly a schematic is. A schematic is a circuit diagram for the electronic device you are dealing with. Not only does it tell you how each component of the circuit is connected but also:
- the part number (if applicable) – this is the manufacturer’s part number, eg: PIC18F4520-E/P
- the identification code (sometime called the name) – this gives each component on the schematic an unique identifier, eg: R4
- These are also important later on when designing PCBs.
- the value of the component – some components like resistors have specific values, eg: 4.7kΩ
Let’s take a look at an example schematic:
This is the schematic for the popular 741 operational amplifier. As you can see it consists of transistors, resistors and capacitors.
Remember that an electronic circuit has to be completely unambiguous to avoid confusion.
Let’s now take a look at a simple schematic and the PCB that was designed from it.
This is a simple 555 timer circuit that flashes an LED on and off. Below is the corresponding PCB.
As you can see, by looking at the PCB alone it is not obvious what the circuit does. You will also notice that the components do not show their value. Many manufacturers will only include the component identifier (name), for several reasons: to reduce amount of printed text on the PCB, to obscure the circuit for copyright reasons etc. For now we will only look at the schematic of the timer circuit but we will look at the PCB in more depth later on.
The identifier of a components begins with a letter known as the reference designator. Each type of component has a different reference designator:
|Q||Transistor – BJTs, MOSFETs, FETs…etc|
|S||Switch – any type|
|X or Y||Crystal|
We’ll start by looking at the symbols on schematics, what components they refer to and what their value and identifier (reference designator) look like.
There are two symbols for resistors: the USA way and the international way – we’re a UK based site so we always use the international way in our circuits.
Resistors have the reference designator, R, and will always have their value displayed alongside them. Note the potentiometer in the image above is shown in the international style and shows the maximum resistance value.
Like resistors, capacitors can be drawn the USA way or the international way – again we always use the international way.
Capacitors have the reference designator, C, and again will always display their value alongside them. Again note that the variable capacitor is shown in the international style and shows the maximum capacitance value.
Same again, inductors can be drawn the USA way or the international way – however we draw it either way depending on who is designing the schematic as the USA symbol looks a lot more like an inductor than the international symbol.
Inductors have the reference designator, L, and again will always have their value displayed alongside it.
There are several types of symbols used for diodes depending on the type of diode you are using. However they all have the reference designator, D. Remember that an LED is a diode and thus like all other diodes has the reference designator, D.
As you can see the diodes have their value alongside the symbol, however the values can be several different things:
- The manufacturer’s part number, eg: 1N5819
- The diode’s reverse breakdown voltage (Zener Voltage), eg: 3.2V, with power rating, eg: 1W
- The diode’s peak inverse voltage and average forward current rating, eg: 500mA/100V
These values depend on the application and also how specific the schematic is: if the schematic is directly connected to a PCB then part numbers will be used, if however the schematic is for a preliminary design, then part numbers may not have been chosen yet.
It isn’t common to see a schematic with diode values rather than part numbers, however that’s not to say you can’t do it. This principle also applies to other components such as, transistors, MOSFETs, voltage regulators…etc.
There are two symbols for transistors – one for NPN transistors and one for PNP transistors – both of which have the reference designator, Q.
Sometimes symbols will have the base, collector and emitter labelled, however if not, we have the collector and emitter in line on the right hand side of the symbols above. However the emitter always has the arrow pointing inwards or outwards. This leaves the base on the left hand side of the symbols above. Transistors also have their part numbers alongside their symbols.
There are multiple ways to show power supplies on a schematic using several different symbols:
Whilst we can use the traditional symbols for cells or power sources it is possible to use supply symbols as well. This is especially useful if we have multiple components that require power, which can lead to a lot of connections purely for power. Let’s take our 555 timer circuit from before and see how these supply symbols can be used:
As you can see, although this isn’t that messy, if more components were added, the schematic would become significantly messier with more and more wires connecting to the 9V cell. Let’s look at how much neater the schematic could be using supply symbols:
You’ll also notice that whilst the cells have the reference designators, BT (for battery), the supply symbols and the sources do not have reference designators:
This is because these are not real components but rather symbols to indicate other components. When designing a schematic for a PCB, a DC source will more likely be a circuit consisting of an IEC C14 connector, fuse, transformer, rectifying circuit, voltage regulator…etc (you get the idea). Or however, it could just be a simple DC barrel jack.
There are two symbols that can be used to show fuses:
Fuses have the reference designator, F, and has the current blowout rating next to the symbol.
Crystal oscillators and ceramic resonators both have the reference designator X or Y.
Crystals usually have two pins on them whereas resonators (not shown) tend to have capacitors added to each pin thus having an extra pin for GND.
We’ll look at two types of jumpers, jumper wire and pin headers, both of which have the reference designator JP. A jumper wire is used on single sided boards to “jump” over a trace where a route cannot be found otherwise. Pin headers on the other hand have several uses: as a connector during prototyping, to connect PCBs together, to provide a connection for ribbon cables or to provide a connection for individual wires.
Jumper wires isn’t very common to see anymore due to double sided PCBs becoming easier to fabricate. However if you find yourself fabricating PCBs at home, you’ll find single sided PCBs significantly easier to work with and thus will need to use jumper wires.
Connectors can be anything from a DC barrel jack for power (as shown) or a 3-pin XLR connection for audio. Whatever the actual connector may be, they all use the same reference designator, J.
Connectors are a vital component when designing electronics, especially if you want your electronics to be able to integrate with the real world. A device that measures acceleration is only useful if the user can download that data, using for example, an SD card or USB connection.
Switches come in all sorts of various designs and all have the reference designator S:
The most basic switch you can get is the single pole / single throw (SPST) switch. This is a switch that can either be on or off, a bit like how our light switches function. Switches can have more than just one throw, such as the single pole / double throw (SPDT) switch which allows a one side of the switch to either be connected to one connection or another.
Switches can also have multiple poles rather than just the one, like our double pole / single throw (DPST) switch which works in the same way as the SPST switch but with two connections instead of just the one.
Finally we have our push switch: the normally open switch (push to make) and the normally closed switch (push to break).
There are many more types of switches that have symbols too (pressure switch, temperature switch, float switch…etc), but I haven’t included them here since they are quite rare to see.
Integrated Circuits (ICs) come in so many different packages and with so many different functions that there isn’t a symbol used to represent them on schematics. Instead we usually draw a rectangle with the pins extending out of the sides with the pin number and description:
ICs have the reference designator, U, and have the part number alongside the symbol. As you can see above, the voltage regulator can have the part number or the value of the output voltage. This is the same as the diodes or fuses (and more): whilst prototyping we may not know what part number to use, a simple description (the output voltage) may be adequate.
The last symbols we will be looking at are the logic gates.
There are typically two different symbols for logic gates, the traditional way and the newer, standardised, IEEE symbols. You’ll find the traditional symbols used the most, however, some people may decide to use the newer symbols.
Typically, multiple logic gates will come packaged in ICs: the 4011, for example, is an IC with 4 x 2-input NAND gates. When designing schematics we can use the logic symbols rather than the symbol for ICs:
Let’s take a look at this circuit above, it is a D-Type Flip Flop constructed from 4 NAND gates an inverter (a NOT gate).
Since the 4011 IC has 4 NAND gates packaged in it, the names of each NAND gate begins with U1, to indicate the IC but has A,B,C and D afterward to show which NAND gate we are referring to. You’ll notice the pin numbers are shown on each pin of the NAND gate; as you can see they are all different, showing the four NAND gates available. If we were to add one more NAND gate to this schematic it would have the name U2A. We will now require another 4011 chip (U2) and we’ll be using the first NAND gate available on the chip, thus we get U2A.
Now that we’ve looked at all of the components let’s look into the remaining parts of schematics. Let’s take a look at our D-Type Flip Flop again:
Nets & Nodes
Components on a schematic are connected by lines known as “nets”. When one net joins to another we show it with a dot, these are called “nodes”. These nodes show that the nets are connected, if there’s no node, the nets are simply passing by one another. It is good practice to avoid having nets overlapping nets throughout your schematic anyway, however, as in the schematic above, that isn’t always possible.
On some schematics, especially the more complicated, larger ones, you’ll find that most components are not connected, but simply denoted with labels. Let’s take a look at this section of schematic (for the Raspberry Pi, Model B):
On the left, we have the HDMI pins for the BCM2835 (the RPi’s Processor) and on the right we have the HDMI port. Let’s zoom in closer to see how the schematic uses labels rather than lots of nets, just to keep everything neat
Nets, just like components, can be given names. But rather than names such as R2, U5 or X1, they can have any name. In the schematic above they have names like HDMI_CLK_P or HDMI_TX2_P. Two nets with the same name are considered connected, even though there may not be an actual connection that can be seen. In PCB Layout Editors (which we’ll look at in the next tutorial), it is possible to give nets names and it will automatically ensure that they are connected.
Note however, that if you are going to use names rather than connecting nets, ensure that you label your nets so that the reader can see where they will connect to.
We’ll stop there for now since this tutorial is already huge. In the next tutorial we will be introduction the concepts of PCB Layout Editors, which will allow you to draw your schematic and then have a PCB automatically building around it. We’ll also come back to schematics again in a later tutorial.