Skip to content
Snippets Groups Projects

#Electronics design

This week is about learning how to design a PCB.

Contents

  1. Using test equipment

  2. Redraw a hello board

  3. References

  4. Design Files

  5. Using test equipment


Using the test equipment in the lab to observe the operation of a microcontroller circuit board.

I used my hello board for this task. This tutorial on How to use a multimeter is a good resource.
A multimeter is a handy piece of equipment used for measuring voltage, current, resistance and continuity.

Operating voltage, resistance and continuity on the board with multimeter

To measure Voltage: Plug the black and the red probe into corresponding ports (depending on the model of multimeter).
Set the knob of multimeter to V.
Touch the black probe to the GND pin and the red probe to the VCC pin of the board. The screen will display the voltage across GND and VCC.

To measure Resistance: Set the knob of multimeter to R or Ohm symbol. Use range button to select M ohm, Kilo Ohm or Ohm.
Touch the black and red probes to the two ends of any resistor on the board or the corresponding traces.

To measure Current: Current measurement for electronic circuit board is not very common, especially for surface mount circuit boards. To measure current, the flow of current must be physically interrupted and the multimeter must be connected in-line. This can be done by adding a jumper bridge in the design of the board. Then by connecting the two probes of the multimeter in-line to the two jumper pads on the mA setting.

To check Continuity: Continuity testing measures the resistance between two points. If the resistance is very low, there is a beep which means the two points are in continuity. If resistance is high, the circuit is open, and the multimeter won't beep. This is the most useful to check connections and solder joints between microcontroller pins and header pins to connect inputs or outputs.

Set the multimeter to 'Continuity' - a diode symbol with propagation waves around it.
Touch the two probes on the two points to be checked and beep will give the feedback.

Use oscilloscope to check noise of operating voltage

This tutorial on How to use a oscilloscope is helpful.

Interpret a data signal using a logic analyser

Introduction

If this equipment is not available, another way to test microcontroller circuit boards is by making a simulation in web-apps like TinkerCAD or the open-source Arduino simulator, Wokwi.

  1. Redraw a hello board

I chose a hello.echo board based on ATtiny44 as it has the most available documentation.

Here is what the actual board looks like

To add an LED and a switch, I started by making a list of the components required:

Components list:
1x ATtiny44 microcontroller
1x 1uF Capacitor
1x header 2x3
1x FTDI connector
1x 10k ohm resistor
1x 20MHz resonator

Added components:
1x LED
1x 1kΩ Resistor
1x switch
1x 1kΩ Resistor

Data sheet for ATtiny44 - You can find an explanation in the Embedded Programming week.

Pinout for Attiny44

Creating the schematic

I used KiCad 5.1.6 to design my PCB. KiCad is an open source software suite for Electronic Design Automation (EDA). The program helps create a Schematic in sub-application called Eeschema, and then design the PCB Layout with Gerber output (this is what you send to a manufacturer) in another sub-application called PCBnew.

Update libraries

First step is to import all of the symbol and footprint libraries adapted for SMD components. These libraries can be found here.

Designing schematic

I placed the components listed above one by one, using the place component tool. Then changed properties like annotations and values, by hovering above the component and pressing E which opens the symbol properties window.

I also placed some tags using the tag tool - like GND and VCC, to make the schematic neat and clear.

Finally, I generated a Netlist by pressing the green netlist symbol on the toolbar.

However I got an error saying that component R1 did not have footprints defined.

So I went back and assigned footprints to the missing part, by going to its properties again, and selecting the correct footprint from the newly installed libraries. And generated the netlist again.

Drawing traces

Then I opened the KiCad pcbnew part, and loaded the netlist and stacked of all components in the middle of the board.

Design Rules in KiCAD: To mill the traces we use a 0.4 mm (1/64") end-mill. Which rounds up to 0.016 inches (0.015625 inches) or 16 mil. In the Design Rules Control you can set up Net Classes and Global Design Rules. I change both the trace width and the clearance to 16 mil. I also set the grid size to 16 mil to make it easier.

The components all have an indicative line connection, so I used that to rearrange them and then added the traces, using the trace tool.

After connecting them all, I used the line tool to draw the outline like so.

Next I exported this as svg with these settings:

I opened the svg in Adobe Illustrator, made new layers for the traces and outline respectively.

Then, after checking that the model is in mm, exported both layers separately at 150dpi in png.

Creating Toolpaths

I followed the same process as Electronics Production week to make toolpaths, mill the board, solder components and test the board.

But this time I used Mods instead of Fabmodules. Here's the process:

Milling and Stuffing

I started to mill the board, solder the components by following the workflow described in Electronics Production week.

On the first attempt, the I found that the edges of outline were too close to the traces, and they were fragile.

After offsetting the outline farther away, and milling the board again, I found that the pin headers were floating outside instead of resting on the board:

So chaning the outline accordingly, this is how the pins should rest:

And after soldering all components, here is how the final board looks: board

Programming and testing of the board is done during the Embedded Programming week.

  1. References

Sparkfun KiCad beginners guide
Reference Documentation

  1. Design Files

KiCad Schematic
KiCad pcbnew
SVG
AI
traces.png
outlines.png
traces - toolpath for srm20
outlines - toolpath for srm20