Lesson 1

Introduction

Circuit design is the foundation for all electronics we encounter on a daily basis. For example, smart phones are incredibly complex and spend months in development to make sure the processor, antenna, Bluetooth, GPS, accelorometer, camera, and many other systems work together. In this lesson, we will explore some of the fundamentals of circuit design and how to create a simple circuit board.

Overview

  1. Background Knowledge
  2. Schematic Design
  3. Board Design
  4. G Code

Ohm's Law

Ohm's law is the basis of all circuit analysis. It states that voltage is proportional to current and resistance.

Diodes

Diodes are common elements in circuits. An LED is a Light Emitting Diode. Diodes only allow current to flow in one direction.

KiCAD: Schematic Design

To begin, make sure you have installed KiCAD. Next we will create a new project by clicking on the circled button. This project will contain the schematic, circuit board, and many other important files for our project. After creating the project click "Schematic Layout Editor" just to the left of the OP-Amp (Triangle with plus and minus).

Placing Components

To start designing a circuit board, you must make a schematic. To begin, click on the OP-Amp to open a new menu with several components.

Component Names

There are over twelve thousand components available in the base library. This can be further expanded via sites like Digikey and Mouser, which add foot prints and other such items for components they sell. NOTE: The names of components under history are what I used to build this schematic.

KiCAD: Board Design

Footprint Assignment

Next you must assign foot prints to each component. This is done by clicking the red and green button with an op amp and integrated circuit. I have the listed the correct footprints in the pictures at left.

Generate Netlist

A netlist must be made so the schematic can be transferred to a PCB layout editor.

Read Netlist

Next the netlist must be read into the PCB editor by clicking the netlist button in the upper menu. This bring in the footprints of the components.

Arrangement and Routing

The components on the board may not be in the best position when added. You can rearrange them with a click and drag and rotate them by pressing R. There will be some lines from each pad showing where it should be connected. These are called the ratlines and are very helpful when arranging the board to limit the length of the traces between components.


Once the board is arranged, the traces must be drawn. This is done by pressing the "Route Tracks" button off to the right hand side or by pressing Shift + X. Clicking on a pad will begin to draw a trace from the clicked pad. Clicking on the next pad will finalize the trace. For this board, the traces will all be the same thickness. However, it is good practice to make power and ground traces thicker than the other traces.

Board Outline

Once all the traces are routed, the board must be outlined so it can be cut away from the copper board. Click on the Edge.Cuts and click on the "Add Graphic Lines" button. Afterward, outline your board.

Design Rule Check

Click the lady bug to run a design rule check. The settings are important as these are determined by the fabricator you'll be using.

G Code

KiCAD: Export Gerber

Once your board passes DRC and you're satisfied with how it looks, File -> Plot and make sure you have both Cu, Paste, mask, silk, and Edge cuts checked. These are the various layers of the board. This does not include the drill files though. Be sure to click "Generate Drill Files" and export these files in Excellon format. PTH and TPH should be in the same file so check the box that corresponds to this option.

FlatCAM

Open up FlatCAM and import the copper top and bottom. These files will be called "filename.L.cu.gbr" where cu denotes that it is copper and L is the layer. Once the Gerber is imported, move it to the position where it should be on the Carvey. I like to keep mine in the upper right corner. With a 6"x6" board I'll push the Gerber up to around. I did this with the known board dimensions and some experimentation. The mirror tool will be used for the bottom of the board. If the copper board is only copper clad on one side, do not bother with the bottom layer.

Milling

Once the gerbers are positioned correctly, the next step is to create geometry for the CNC machine. This is done by double clicking one gerber, setting the tool diameter, and clicking generate geometry. The diameter of the V bit varies with depth and must be determined for the depth you'll be cutting at. This done by using some basic trig and the picture at left. The distance is the depth and the angle should be given in the data sheet or webpage where the bit was purchased. For example if you were to use the P3.1001 Milling bit from inventables, the angle would be 10 degrees. The diameter would then be equal to twice the depth time tan(5) or 2*d*tan(5). The typical depth that should be cut at is 0.002" as that is the thickness of the copper on one layer. After creating the geometry, go to the newly created geometry file and confirming the depth and tool diameter. Once these are correct, click generate. A new g code file will be created. Export this file onto a flash drive and upload it to the Carvey web page.

Reminders

This is a very lengthy process and can result in multiple mistakes. The best thing to do is keep trying until you get it right.