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
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.
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.
Component Selection + Manufacturer Part Search
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.
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).
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).
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.
Selecting the Resistor
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).
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
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.
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.
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.
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.
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.
Now let me show you different variations of the same circuit.
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.
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.
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.
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.
This is what I did.
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.
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.
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.
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.
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.
The board should now look like this.