1.0 UWRT Electrical Team Training 2021-2022

Mars Rover Electrical Training 

2021 - 2022

Introduction

Welcome to the University of Waterloo Mars Rover Team! This document is designed to be a tutorial for new electrical team members. This tutorial will take you through the design of a simple printed circuit board (PCB). You will learn about schematic capture, component placement, and PCB routing/layout. 

If you have any questions, feel free to ask Farris Matar on Discord, or post in the #electrical channel.

Intro to PCB design

Sparkfun has a great, must-read, explanation of what a PCB is, plus an overview of relevant terminology. These terms will be used throughout the tutorial so make sure to familiarize yourself with them. Mandatory prerequisite reading: http://alternatezone.com/electronics/files/PCBDesignTutorialRevA.pdf 

A quick summary of the PCB design process:

  1. Schematic capture

    1. This is where you draw a diagram of your circuit, made up of components connected with wires. 

    2. Each component has a symbol associated with it

    3. Each symbol has pins that are points where you can connect it to the circuit

  2. Layout

    1. This is exactly what it says on the tin; you lay out where you want the components to physically be on the board, and then route the traces between them. And yes, this order is important! A common saying is, “layout is 90% placement and 10% routing”! Good placement will ensure good routing, so make sure you get it right!

  3. Manufacturing

    1. Once you’ve finished the layout, you can send it to a board manufacturer to have it made! When the circuit boards come back they will be bare; that is, the components still need to be placed.

    2. The second step is populating the board with the components. If you’re poor you will do it by hand, either by individually soldering all of them or using a stencil. If you’re rich (i.e., you are a company) you can get them assembled by an outside company which uses fancy machines to do all the work.

  4. Testing

    1. After you finish building your circuit, you need to test it to ensure that the board works as it’s supposed to. Does it turn on? Do all the components do the right thing? Depending on the complexity of the project, this can easily be the longest step. 

The circuit we’re doing today is a 555 timer circuit. This circuit, once powered, will blink the LED on and off. Since this tutorial is all about getting to grips with PCB design, a detailed explanation of how the 555 timer works is beyond the scope of what we’re doing here. But you’re totally free to look it up!

Below is a diagram of the circuit (picture source)

And here’s a table explaining the 555 timer’s pin numbers:

Pin number

Pin name

1

Ground 

2

Trigger

3

Output

4

Reset

5

Control Voltage

6

Threshold

7

Discharge

8

Supply Voltage



To flash the LED, the 555 timer will be in astable mode, which means that the output won’t stay the same; it constantly alternates between being at VCC (the supply voltage) and ground (0V). Thus, the LED will appear as though it is blinking. 

For this PCB, we’re going to be using DipTrace, which is a relatively easy to use PCB design software. While we actually use Altium for our projects, it’s rather intimidating, so DipTrace will teach you all the basic commands, which are essentially the same in every PCB CAD software anyway. 

  1. Download DipTrace for free here.

  2. Download the component library from the Dropbox here

Schematic Capture

Open up DipTrace and click Schematic Capture. You should see something like this: 

To add the library you downloaded in step 0.2, click Project Libraries  > Library Setup…

Then under Groups, select Project Libraries, then click Add Library:

Navigate to where you saved UWRT_Tutorial_sch.eli and select it. They should now appear on the left side:

This has all the components you need to start drawing the schematic. Before you start placing components on the sheet, we’re going to take steps to make it readable. First, under the View Menu > Units, make sure you’re in mils (thousandths of an inch). Then on the top bar, change your grid size to 100 mils. 

This ensures your grid is nice and big, and is generally good practice to make sure any disconnected components are immediately obvious. Next, also under the View menu, go to Part Markings > Additional > Values. This displays the value (e.g., 10 kΩ) next to the component. Now, place all of the required components onto the sheet. You need only click them on the left side and they’ll appear under your cursor on the sheet. Left-click to escape so you can choose another one. You should get something like this:

Your components will be numbered depending on the order you place them in, so they probably won’t be numbered exactly the same as in the photo above but that should be okay. 

A couple of things to note: you may notice that the 555 timer’s pins aren’t in a particular order. (Here are some common pinouts that show you how they look on the physical chip.) That’s fine! The schematic symbol is just that: a symbol. You can have it look however you want, if you think it will make your diagrams look more readable. For bigger parts, (e.g. 128 pin chips) you can even split them across multiple symbols so that say, all the ground pins are on one symbol and all the general input/output (GPIO) pins  are on another. Point is, your symbol doesn’t have to look anything like the component. 

Another thing to know is that you don’t need to restrict yourself to having one ground symbol, or one power symbol for the entire sheet. You can have lots of them! For example, from the diagram we can see that pin 1 and C2 are both connected to ground. So you can do this:

Or this:

And they mean exactly the same thing. The latter tends to be preferred as it’s more readable and easily apparent that pin 1 connects to ground. 

Now, you can start drawing the circuit. Be sure to arrange your components appropriately before wiring them up. Press the SpaceBar to rotate them. 

On the right side of the top bar, click the Place Wire button:

Change the Route Mode to Manual on the right side as it’s rather annoying otherwise. 

The little squares at the end of pins are points where one can connect wires. Click one little square, then connect it to the other little square. Left click to get out of placing wires. 

Connect up your circuit, using the initial 555 timer diagram as a reference. Readable and clear schematics are good schematics! 

When you’re done, press F9 or click Electrical Rule Check under Verification to check if anything in your circuit is not connected properly. If there are errors, read through them, Google any you don’t understand, and try to clear them. Once there are no errors, you can proceed to the layout! 

Layout

On your finished schematic, click File > Convert to PCB… (if it asks you about colour, go with a dark background.) You should see a window resembling this:

The little blue lines tell you which pads should be connected to each other, based on the schematic you just drew.

This is a pretty good guide to PCB layout, written by Dave from EEVBlog (a YouTube channel about electronics). It’s worth a read if you want to conform to best practices, though since this layout is simple, it’s not 100% applicable. 

Move the components around so that the blue wires aren’t crossing as much as possible and keeping in mind where you would like the parts to be on the actual PCB (printed circuit board), so that they are ready to be connected. Remember, a good layout is 90% part placement and 10% routing! Here are some handy tips:

  • Double-clicking a component will open its properties.

  • Like in the schematic, press SpaceBar to rotate the components. 

  • A 5 mil grid should be good enough. 

  • It’s generally good practice to keep your components aligned so they look nice and neat.

  • Mousing over a pad will highlight connected pads.

  • To move a component’s reference designator (e.g., R1, C1), press F10 while the component is selected and you can drag it around. Press SpaceBar to rotate it. Alternatively, you can go into its properties, under Markings, and select a position from the dropdown menu next to Justify. 

  • You can put traces under silkscreen! Pads under silkscreen is a no-no, though.           Side note: The silkscreen is a layer printed on top of the PCB which contains letters and symbols to identify the parts on the PCB. So the reference designators are part of the silkscreen.

  • Once you’ve decided on a place for your component, it’s good practice to lock it (Ctrl-L) so it never moves about again. 

After placing your components, it’s time to get routing! Click the Manual Route button:

You have a wealth of routing options at your disposal. Press SpaceBar to cycle through the different modes. Generally, most people tend to stick to routing option where the traces (wires on the PCB) bend at 45 degree angles because it looks nice. For more routing tips, Dave’s guide (linked above) is a fountain of good advice, under the Basic Routing section. 

Once you’ve finished routing all the traces, press F9 to verify your layout. If nothing’s wrong, then congratulations! You have now finished this tutorial. 

Submission

To gain access to our project repository on GitHub, send screenshots of your finished schematic and layout to @Rayyan Mahmood @Yuchen Lin

Questions? Comments? Feedback on this tutorial for improvement? Let @Rayyan Mahmood @Yuchen Lin n know!

Food for Thought

  • What can you add to make the layout more efficient? (e.g., minimise layer changes for traces, making the board more compact etc.)

  • As it is, the circuit you’ve made won’t actually work if you actually made it. What do you have to add to get it to work as intended?