Skip to content

Week 06 - Electronics Design

Group Assignment:

  • Use the test equipment in your lab to observe the operation of a microcontroller circuit board

Please refer to the group page to read about our group assignment.

Individual Assignment:

  • Use an EDA tool to design a development board that uses parts from the inventory to interact and communicate with an embedded microcontroller

Extra credit:

  • [] Try another design workflow
  • [] Simulate your design
  • Design a case around your design

Introduction

For electronics design I selected KiCAD as the EDA (Electronic Design Automation) software, because I had worked a little bit with it and the Fablab library is available for KiCAD, which simplifies the selection of components for the circuit.

For this assignment I went through the inventory and had a look at the different microcontrollers available and their specifications. My choice fell on the ATSAMD11C14A-SSUT, because it offers USB connectivity, has a more powerful core and a decent amount of inputs and outputs.

I already had the new KiCAD 9.0 version set up in my computer so I started right away.

Schematic Editor

After running KiCAD I created a new project and saved it to my repository. Next I opened the schematic editor.

Here the components have to be selected, placed on the drawing and the electrical circuit built in a schematic way, so it doesn't represent the actual physical layout, but all pins are connected in the right way.

Hotkeys

All important commands in KiCAD have HOTKEYS as for example A to access the symbol library.

Because I'm not familiar with the details of electronics design, power regulators and more, I looked for an example and found this page explaining the schematic of a SAMD11C development board.

So I started adding components, organzing the sheet and adding connections.

KiCAD schematic drafting

Because I wanted to think ahead I decided to incorporate a connector for SDI-12 bus communication. On this page I learned how do design a converter from the 5 V bus signal to a 3,3 V UART signal. I don't fully understand how the circuit works, but I decided to copy it to begin with.

I tried to add everything that is needed to the drawing, including some status leds for the voltage supply, an output led and two push buttons - one for reset and one for digital input. Because the SDI-12 bus usually comes with 12 V power, I decided to add a voltage regulator for that as well, so the board can be either powered by 5 V from USB or 12 V from the SDI-12 bus.

KiCAD schematic

Tip

When not sure about how to connect the component, you can easily access the datasheet by dupble-clicking the component and then clicking on the globe right to the datasheet url.

Next it was time to assign the footprints of the components:

Footprints assigning

PCB Editor

Once all components had a footprint assigned, I opened the PCB Editor.

This is what it looks like, after importing all the components.

PCB Editor

Now it's time to sort things out and arrange them nicely.

Because the board is going to be fabricated in the Roland mill, I need to adjust the trace width and distance, dictated by the diameter of the tool bit. This is done in File - Board Settings.

Board Settings

I realized quickly, that finishing the layout is going to be a time consuming task. It took me several hours to finish it and get everything connected. Like with most other topics, the learning curve is quite steep and after a while I could spot certain resistors or capacitors that I could move to cross a path and create a "bridge".

Tip from my instructor

When in trouble connecting pads on a single sided PCB, use a 0 Ω resistor as a bridge.

(I had to make use of this hint in two places on my PCB. )

PCB Layout

Now I needed to draw the outlines of the board. This is done with the drawing tools, but it's important to activate the Edge.Cuts layer.

I also added some text to the F.Cu layer and some mounting holes.

PCB

Now, when I run the Design Rules Checker, I get a lot of warnings because of silk screen interference, which I will ignore, because the silk screen isn't going to be manufactured anyway. There is also one error, related to the footprint of IC1. It comes in a TI package named DBV which is too small for milling with the standard tool.

Footprint issue

After talking to my instructor, we decided to continue with this component, as I'm already using the larges available package and just seperate the pads 1 and 3 a tiny little bit. To do so, you can right-click the footprint in the drawing and select Open in Footprint-Editor. I moved the pads 0,05 mm away from each other so the space in between them is 0,4 mm.

Footprint Editor

Here is a view of the 3D model in KiCAD.

3D PCB Model

Discovering and fixing a mistake

Then I realized, I made some serious mistake. When implementing the schematic of the SDI-12 to UART interface, I forgot to repeat the labels for UART RX and TX at the microcontroller side so there are two traces missing! This means going back to schematics and PCB editor and trying to fix it.

It was quickly fixed in the schematic editor, but of course this changes would ruin my nice PCB layout.

After several more hours of tweaking I got it fixed, with the help of now three 0 Ω resistors. I'm quite happy, that I just got away with a single sided PCB.

Here is the new layout. (I also learned making use of the bridging capeability of the button switches. )

New layout

Then I exported the 3D model as a *.step file.

Designing an enclosure for the PCB

In Fusion360 I imported the step file with the PCB and all components and drew a simple enclosure around it, with a 3D printed base and a clear laser-cut acrylic lid.

Enclosure

As always, all design files can be found in the repository.

Learnings

This week I recalled the use of the oscilloscope and familiarized myself with the type we have in our lab. I also got a better understanding of the PWM output of a microcontroller, by analyzing the signal.

The Individual assignment helped me to get more used to the design process in KiCAD and learn some tricks.

  • Using 0 Ω resistors
  • Using components with interconnected pins for bridging
  • Planning complex circuits and arranging traces without any automation
  • How to tweak individual footprints to assure manufacturability