Lab 01 — Introduction to PCB Software (Altium Version)

In this lab, help you get started with getting your block diagram and example schematics into your preferred PCB software! We want to make sure you're able to easily get help with using the software before we leave you to design the full schematic for assignment 02. You should feel free to ask any of our staff your help! As a general rule, if it takes you more than 5 minutes for a simple task you think should take much less time, ask us and we can help get things moving.

Lab 1 Lab 01 (KiCAD Specific)
NOTE: this lab is a CRASH COURSE and is really just to get you familiar with what is POSSIBLE in Altium. I'll link to external tutorials when I can but don't worry about understanding every detail of everything! Just think of it as dipping your toe into the North Altium Sea. It's overwhelming at first, but with time and practice you'll learn to sail too.

Moana!

Installing Altium Designer

The first step is to Install Altium Designer if you have not done so already. If you are in the class, you should have already done this, and you should already be on the Altium 365 workspace for the class where we will hold a lot of the design resources - let us know ASAP if this is not true.

These instructions work for both MIT students as well as non-MIT affiliates with an @edu email address. Altium is provided free for students + educators.

Creating a Folder in the Altium 365 Workspace

Once you’re added to the Altium 365 Workspace you should get an email with instructions to add the workspace to your Altium Installation and a link to the online Altium 365 workspace.

Go to the Altium 365 workspace and sign in, click “projects,” “New,” and “Create Folder.”

Create a folder where the name is your kerberos!

Once you connect to the Altium workspace in Altium itself, you should see your folder in the workspace. Create a new project IN that folder or you can create a new project in the folder on the web interface.

Name your project MyFirstPCBProject_kerberos

Here’s another Altium 365 tutorial

Introduction

This lab is a super simple, super short lab! It’s basically just to get you familiar with the following in Altium Designer.

  • project structure
  • schematic capture
  • layout tools
  • component libraries/manufacturer part search

We will be designing a very simple PCB from start to finish, not accounting for ANY parasitics, or following really any “good design principals.” Remember, this lab is JUST FOR YOUR FAMILIARITY with the software. This is by no means a “well designed PCB.”

The order you will do things in this lab is…

  • select your components
  • create a schematic
  • create a layout of these components
  • define a board shape
Typically, when defining "board shape" we do this in a MECHANICAL LAYER called the BOARD SHAPE LAYER or MECHANICAL LAYER 1 so that when exporting the PCB to be manufactured the manufacturer's software can identify the mechanical layer easily, otherwise they'll probably email you with questions. **This is not necessary for this lab since we aren't manufacturing these, but is the accepted practice so you should do it this way.**

Overall Design

In this lab we’ll be designing a very simple board with an LED, a resistor, and a JST header (here’s the datasheet in case the link is broken). Pretend you need a tiny PCB with an LED on it, maybe you’re making a flashlight. But none of the power electronics are actually on the board. You’ll use the JST header to send a voltage to the board (connect a power supply), the resistor will limit the current, and the LED will shine.

How does an LED work?

Brief aside for those who don’t know, anyone who does know can skip this section. LEDs shine with a brightness proportional to the current flowing through them. Most LED circuits have what is called a “current limiting resistor” which limits the current from the power source to an appropriate level for the LED. If the resistor is not there, the LED would burn out immediately when hooked up to a voltage source.

LEDs also have a voltage drop across them when they are turned on. This voltage drop is NOT proportional to the current through the LED nor the applied voltage, however is specific to the LED and is based on the internal characteristics of the silicone. We can draw the following circuit diagram for the LED, resistor, and power connector.

circuit diagram for lab

If we look @ the datasheet for a typical LED we can see the values of the two parameters we care about, the forward voltage, and forward current per chip. In this case, the forward current needed for the LED to work is 20mA. Let’s call this $ I_{fw} $. When on, the LED will have a voltage drop between 1.7-2.6V, let’s call this $V_{drop}$.

Now let’s assume we’ll power the board with four AA batteries (if we’re making a flashlight), that’s a voltage of 6V if they’re in series. Let’s call this voltage $V_{in}$. The current can be calculated as follows. The value of the resistor is $R_{limit}$.

$I_{fw} = \frac{V_{in}-V_{drop}}{R_{limit}}$ (Ohm’s Law)

That means the voltage across the resistor at MAXIMUM will be 6V-1.7V which is 4.3V, so if we want 20mA of forward current, $R_{limit}$ must be 215 Ohms.

Note that we took the lower bound of the typical LED forward voltage range, this is to ensure we don't accidentally under-size the resistor and send too much current through the LED.

Component Selection + Manufacturer Part Search

Create a new project by going to "File"-->"New"-->"Project", name it "Lab 01_{your kerberos}". Then add a new schematic to the project by right clicking the project on the left hand pane and selecting "Add New to Project"-->"Schematic." Save the schematic as "Sheet1.SchDoc."

Figure 1

When designing PCBs, we need to remember that we work with REAL components. We need to be able to find these components, and purchase these components. Therefor PCB design is entirely design for manufacturing (DFM) where component selection based on what is avaliable is critical.

A Schematic defines the components of a PCB and how they are connected it also tells Altium what components the design uses. Altium has many in-built parts libraries that automatically pull the pin-out and the footprint of each part into your design. A Pinout is the definition of what to connect to what pin for a part, the footprint is the physical shape of the pads on the PCB.

Altium In-Built Component Library

Altium has a built-in library for very basic components and footprints (such as basic resistors and capacitors). It can be accessed from the “components tab” on the right side of the screen.

If you don't see the components tab, go to "panels" in the lower right corner.
NOTE: we generally do NOT use this library unless we are looking for very standard parts such as through-hole resistors, or header pins. ALL SMD COMPONENTS SHOULD BE FOUND USING THE MANUFACTURER PART SEARCH

In this case we know our design has a resistor. Let’s assume we’re ok with using a through-hole resistor FOR NOW instead of an SMD resistor (we’ll change it later).

Go to the components tab, and using the drop-down select "Miscellaneous Devices.IntLib." Then type resistor in the box.

Figure 2

When you search, you'll have many options. You should see a "Res1" and "Res2" both of which have a footprint labeled as "AXIAL." AXIAL is another name for a through-hole resistor because of its construction. Right click on it, select "Place Res1" and put it on a random place in the schematic file you opened. Hit "esc" to change your cursor back to normal.

This is an example of how to use the built-in component library. Feel free to scroll through other options in the library. Note there’s another library called the “Miscellaneous Connectors Lib” which contains things like header pins (those things you have on an arduino). Sometimes those are very useful as well.

Manufacturer Part Search — JST Connector + LED

Now we have to select the LED and the JST connector (feel free to select one of your choice but use the manufacturer part search).

Go to "panels"-->"manufacturer part search" and then search "LED" in the box. Many options should come up, and generally these will all be surface mount components. You only want to look at LEDs that have the green "chip" symbol next to them, this indicates Altium has a PCB footprint for that part already in the software.

Figure 3

Select the LTST-C190GKT from Vishay Electronics. Right click on it, place the component.

Select the “properties” tab on the right. Notice that Altium can direct you both to where you can buy this part, but also the datasheet.

Figure 4

Now do the same for the JST S2B-PH-K-S(LF)(SN) connector. We'll use this connector to provide power to the board.

Selecting the Resistor

Now, use the technique presented above and the datasheet of the LED you selected to calculate a value of the resistor. Note that you can choose any input voltage you desire but it must be higher than the voltage drop of the diode (12V should work for most cases). Now, find a resistor of that value using Altium Manufacturer Part Search.
Also, look at the datasheet of the resistor to see if it is rated for the current you calculated. For example, you know the voltage drop across the resistor, the current going through it, calculated $P_{resistor} = V*i$ and make sure that is less than the power rating of the resistor (1/2W, 1/8W, etc).
NOTE: for the rest of this lab, I assumed an input voltage of 12V and my diode had a rated current of 30mA and a drop of 1.7v. I chose a 1/2W 340 Ohm, 50V resistor from Vishay.
Note some datasheets for LEDs will list a REVERSE VOLTAGE before listing a FORWARD VOLTAGE. The REVERSE VOLTAGE is the voltage if we run current through the LED the wrong way. We want the FORWARD VOLTAGE drop.
Note this resistor has a voltage rating. Something to consider when picking parts as well. As a rule-of-thumb, go with a voltage rating of around 30% over what your specification is. So if I want a capacitor to hold 12V, I'll get like a 16V capacitor. This is called de-rating a component, and it's typically done to give us a little margin of safety in case something happens. You'll generally want to de-rate *most specs* including current limits and power limits

Schematic Capture Basics (Net Labels, Pin Types)

A good tutorial on Schematic Capture from Altium.

You should have all your parts selected and in the schematic now. Mine are placed like the image below. Note that if you select a component, you can use the space-bar to rotate it on a schematic (not in layout).

Figure 5

The little numbers are called “pins.” And these are the things we connect together to make a circuit. There are many types of pins in Altium. I/O pins, power pins, etc etc. You can learn more about defining pin types here.

Component Designators

The first step in a schematic, after placing your parts, is to assign designators to your components. The designator is the letter-number combination above the part on the schematic. They appear on the schematic, on the PCB itself, and in the bill-of-materials. This makes it really easy to identify components in a PCB. Each component should have a unique designator.

  • “C” stands for “capacitor”
  • “D” stands for “diode”
  • “L” is for “inductor”
  • “R” is for “resistor”
  • “P” is a connector of some sort
  • “U” is a surface mount chip
Select each component and go to the properties tab. Then enter a designator. For example, for the resistor, instead of R?, enter R1. Do this for all your components.

Figure 6

Connecting the Parts

Now we have to connect the parts. We could use the “wire” tool and connect everything up like this. But for large schematics this isn’t clean and it’s not very informative.

Figure 7

So we’re going to use net labels because it’s CLEANER! First, we know that we’ll be providing 12V power to the JST connector. So one side of the connector should go to a 12V power net, and the other side should go to a ground net. Think of a net as a web of connections. Anything in the web is connected to everything else in that web.

EVERYTHING IN A NET IS CONNECTED SO ALL THE NAMES MUST MATCH. IF YOU WANT TWO POINTS IN A CIRCUIT TO CONNECT THE NAMES MUST MATCH, IF THEY DO NOT MATCH EXACTLY THEY WILL NOT CONNECT.

Figure 8

To place a power port, see the image above. In this case I want a 12V port, but you could place a 5V port. Or if you want a voltage different than 12V or 5V you can place a “VCC” port. Once you place the port you can edit the name of the port to be whatever you want it to be. However, the name is the net label, it’s what defines the connection. Anything else with that same label will connect together IT DOESN’T MATTER IF THE SYMBOL IS THE SAME OR DIFFERENT. Also note the name of a net doesn’t MEAN anything to Altium (only to you). For example, if I take a 50V power converter and connect it to a 12V net, Altium won’t tell me that’s a problem. It doesn’t know, it doesn’t care, it’s just a label. So YOU as a designer need to ensure all the voltages and signals being passed are correct.

Figure 9

My connector now looks like this. Next, I’ll do the diode. For the diode. I know one side goes to ground and the other side needs to connect to the resistor. I’ll use a NET LABEL at the top of the resistor, and the same GND symbol used for the power connector at the bottom. A NET label is exaclty like the power labels we were placing except its not specific to power, it can be used for signal or anything else.

Figure 10

Figure 11

Now for the resistor I’ll do the same thing I did with the diode except I’ll connect one side to the 12V and the other side to the D+ net I created.

Figure 12

Now let me show you different variations of the same circuit.

Figure 16

Figure 13

Figure 14

Note that this last schematic is NOT the same Schematic, GND /= to Ground, 12V /= to +12!

Figure 15

Connect your circuit together in the schematic using the techniques above.

Multi-Sheets and Heirarchies for Bigger Designs!

In this example, we’ve connected an LED, a resistor, and a battery. However, you’ll be working on a much larger project for this course that has more components, connections, signals, and other fun stuff. Placing all of these elements in the same sheet can get really messy! It can also make it harder to debug your PCB later. To avoid this, we can use multi-sheet designs to separate components into modules and show how modules connect to one another.

If your design is looking large, but you can separate it into independent modules that do not connect to one another, you can make a flat design. This is a project that has multiple independent sheets that are not connected in any way.

On the other hand, if you can split your design into modules that are interdependent, a heirarchial design can work for your project. This involves multiple sheets with shared signals or connections between modules in each sheet, like a tree with branches off of it. The schematic for your project for the course will likely be a heirarchial design.

Regardless of whether you choose a flat vs. heirarchial design, you can organize the sheets in your design using a top sheet. This shows what sheets are in your design and how they connect.

Figure 17

Above is an example of a top sheet, taken from SEVT’s battery management system and included in last year’s class as a case study. Signals that are shared between sheets are represented as ports. These are different from net labels, which can only be used in the sheet they are created in, as they can be referenced by different sheets in the design. For more information on how to implement a multi-sheet design, check out this page for Altium and this page for KiCAD.

Layout Basics (LSM, Trace Widths, Design Rules)

OK yay, now we need to actually make the PCB itself. Schematic defines the circuit, layout defines the board.

Add a new PCB to the project the same way you added a schematic.

Figure 18

You’ll see a very very blank board. You won’t even see components. That’s because we haven’t linked the PCB to the schematic yet. So let’s do that.

Go to your schematic file and select "Design-->Update PCB Document ..." from the top bar.

Figure 19

A pop-up will appear, hit "Validate Changes" and then "Execute Changes." It should automatically switch you to the PCB document and you should see your components.

Figure 20 Figure 21

The big black thing is the PCB, the components are self explanatory, the red box is called a “Room.” A Room is unique to a schematic in layout. All the components that are contained in a schematic should be contained inside the box that defines the room. This helps with component separation, for example separation of power and signal. In more complex boards, multiple schematics will be created for a single PCB, and each schematic will have its own “Room” on the PCB. What you need to know for now is if you drag a component outside the room, Altium will be angry.

Drag the room onto the PCB, select each component, and select the "Properties" tab. Use the "Rotation" parameter to adjust the rotation, and drag to change the location. Layout your parts. Resize the room if necessary.

This is what I did.

Figure 22

Note that if you go to the bottom you'll see the layers of the PCB (Top, Bottom, Mechanical 1, ...), if you select "Top Overlay." You'll be able to move the yellow labels around to your liking.
It's good practice to label your circuit, especially inputs, we should label the 12V and Ground on the connector. Select the "Text" in the top bar and label your 12V and ground. CHECK YOUR SCHEMATIC TO SEE WHICH IS WHICH. Edit the actual text by clicking on it and going to the "Properties" tab.

Figure 23

You can also define these layers using the Layer Stack Manager. The default PCB is a two layer PCB. If you want to learn more about the LSM, look at this tutorial. We’ll cover it more later.

Calculating Trace Widths + Spacing

All limits in electrical systems are either based on voltage or current. Limits due to voltage depend on the dielectric breakdown between any two points in the circuit (usually $V_{IN}$ and $GND$). If you give a chip a voltage any higher than the specific rating, it will explode immediately and you’ll have to shove all the magic smoke that makes chips work, back into the chip.

And ratings due to current are generally thermal limitations. ALL electrical items have resistance and therefore experience power dissipation at the rate $P_{thermal} = I^2 R_{component}$. If the device heats too much, it can melt or explode which is why components generally come with a “continuous” current rating where the device can release that heat to the surrounding environment just as fast as it’s being generated. And a “burst current” rating where the device can operate at this higher current rating for a certain period of time before the heat build-up is too much.

Trace width is a function of the desired current capacity. The distance between the traces is a function of the required voltage difference between the traces and the dielectric of the material (generally air). Here’s a good tutorial on that.

For this lab, we are working at low voltages and low currents. We won’t consider distance between the traces this time (in the future we will teach you). But we’ll look at current capacity for argument’s sake. Here’s a good starting table.

trace width

There’s a really good tutorial on calculating trace-width for power as well as the impedance of a trace from Millennium Circuits.

For this lab, you can use the table to select your trace width or go with a standard 10mil trace. 1 mil = 0.001 inch, note that the “weight” of the trace refers to the density of copper, higher density copper carries more current. The “thickness” of the trace is set by the “layer thickness” in the layer-stack-manager (see “Defining the Layer Stack” on this page). You’ll also want to make sure the trace isn’t too thin to manufacture. Generally most PCB fabricators are good with 6 mil traces and larger including PCBWay (which we’re using), but check with your fab.

NOTE, WE WILL GO THROUGH ALL THIS IN DETAIL IN THE LAYOUT LECTURE, THIS IS SIMPLY A "PREVIEW" OF THINGS TO COME AND FOR YOUR OWN PERSONAL INTEREST. FOR NOW WE CAN JUST USE THE DEFAULTS WITHOUT CHANGING ANY SETTINGS

Routing the PCB

Routing means connecting things with traces. Traces are like wires. We’ll just use all the default settings. Note that the components default to sitting on the Top Layer of the board, so we can only connect traces to them on the top layer. The exception to this is the JST connector because it’s through-hole, and not surface mount. This means we can connect to it on the top and bottom layer. Internal layers of the PCB (if they existed, they don’t in this case) need to be electrically accessed with VIAs, but that will come in a future lecture.

Select the Top Layer. Select the "Interactive Route" tool.

Figure 26

This tool will allow you to draw traces. Notice the thin grey lines in the layout between the components. These are the nets, they are what you have to connect to each other, and they should match your schematic.

Hover over the pad of the objects you want to connect, click to place one end of the trace, keep clicking to define the points that shape the trace, it's just like lines in a CAD software, and then click on the pad of the other component to finish the trace.

Figure 24

Keep drawing traces until all the net indicators disappear. This is how you know everything is connected.

Figure 25

Note that Altium has a "auto-routing" tool. Never use it, it's garbage, you'll learn why next week.

Defining Board Shape (Mechanical Layers)

Finally, you may have noticed that the board is comically large for the components on it. So let’s define a shape.

Go to the "Mechanical 1" layer. Click on the "line tool" and draw an outline of your choice.

Figure 27

Figure 28

Next, use your cursor and select the individual segments of the line you drew on the mechanical layer while holding down the SHIFT key. Then go to "Design"-->"Board Shape"-->"Define Shape from Selected Objects."

Figure 29

The board should now look like this.

Figure 30

If you go to "View"-->"3D Layout Mode" you can view the board in 3D!

Figure 31

CONGRATS YOU JUST MADE YOUR FIRST PCB!!!!
***TODO:*** Using the skills you learned in today's lab, start working on your project schematic! You will likely need to use a heirarchial multi-sheet structure to organize your design. We suggest you use your block diagram as a start for which components should be split into which sheet. If you have any questions or need guidance, feel free to reach out to course staff in-lab or on Slack!

References

Trace width table

Voltage calculations

Current calculations

Schematic capture in Altium

Defining board shape in Altium