Back

Electronics Design

Week 8

Assignments

Our tasks for this week are:

  • Group assignment:

    • Use the test equipment in your lab to observe the operation of a microcontroller circuit board
    • Send a PCB out to a board house
  • Individual project:

    • Use an EDA tool to design a development board to interact and communicate with an embedded microcontroller, produce it, and test it
      • extra credit: try another design workflow
      • extra credit: design a case for it
      • extra credit: simulate its operation

Group Assignment

This week’s group assignment documentation is here.

Dev board design demo in KiCAD

As a group we went through the exercise of designing a development board for the ATtiny1614 microcontroller. We started in the schematic with the microcontroller and, liberally referencing the datasheets, proceeded to add components like a button and header pins. We need to be able to program the board, as well as connect it to other as-yet-undefined inputs and outputs.

Rather than using wires between all the pins (leading to a difficult-to-read rat’s nest of connections), we leverages pin labels to keep the schematic clean and readable.

Once we were satisfied with our components, we moved into the PCB layout phase. We started again with the microcontroller, and then positioned the components around it trying to optimize how the traces would run. This was an iterative process, and involved going back and forth between the schematic view and PCB layout window to update labels and/or switch pins to simplify the traces and prevent overlaps.

Send a PCB to board house

We also walked through the exercise of how you would export a custom board you designed (in our case, in KiCAD) to a board house. There are many board houses you can use, but the one we used is JLCPCB.

Board houses accept PCB board designs in the Gerber file format, but each one could be a little different so make sure to check the import file instructions for each board house.

You can choose between a variety of options such as base material, number of boards (5 is the minimum quantity), and number of layers, to name a few. The price per board of course depends on the settings you select, but in general it is shockingly cheap, on the order of a few DOLLARS. The most expensive part is the shipping!

Individual Assignment

I’m hoping to use this week to make a small development spiral to move my final project forward.

Since ultimately I’d like to embed a network of LEDs in the walls of the heart and program them to make patterns representing the flow of blood through the chambers, I decided I wanted to add an RGB LED to my development board. I also want to include a potentiometer to be used as a dial to cycle through all the colors of the RGB LED. Some people do this with three potentiometers but I’d rather just use one, so I’ll use logic in the code to map the different values of the potentiometer into RBG values.

I’d also like to include a standard button (and maybe just a standard LED) onboard as another input, maybe to make it easy to change modes or brightness or something like that.

Components I’m using:

  • ATtiny1614
  • Potentiometer BUT on second thought, we don’t have this surface mount component in our lab inventory. So scratch that. Instead I’ll need to mill holes through the board and solder on the backside. Kindof a pain but I suppose good practice for managing/milling a 2-sided board…. ACTUALLY, I found a very small surface mount trimmer (another word for potentiometer? what is the difference between a trimmer and a potentiometer?) in our fab inventory. So I’ll put that on my board and use a little screw driver to adjust it. It won’t be quite the experience of changing the RGB LED colors with a dial, but still it’s cool. Since this eensy part wasn’t in the fab Kicad library I got to go through the process of reading the data sheet and creating a new footprint for the part to use in my PCB design.
  • RGB LED
  • Button

Resources:

A Maker who did a project where she controlled an RGBs LED colors with one potentiometer Potentiometer explanation Explanation of RGB LED wiring

Because I’m using an ATtiny1614 uC, I’ll need a serial-UDPI adaptor. The Adrianino page has documentation for the little connector board I’ll need: a Serial UPDI + VCC.

Diagram Traces Outline

Design

I started off thinking I’d make my own custom version of the Adianino board, but modified to add my little surface mount trimmer and an RGB LED. Ultimately I ended up making a board based off the demo board we made in the local class to learn KiCad.

I used KiCad which is an open source and well documented Electronics Design Automation tool.

Side note: there’s an AI PCB board designer that I’d like to play with at some future point called Flux

It was important to add the fab Footprint and Symbol libraries in KiCad, in order to make sure I’m designing using components which are available in our fab inventor:

Schematic

Then I could go through as add my components into the schematic, and start connecting with with labels as we learned in the local class demo of KiCad.

Even when using the fab libary it was important to double check that whatever component I was designing with was actually physically availible in our particular lab’s inventory. So I started to build out my BOM even as I was designing. In my case, I ran into an issue where the trimmer listed in the fab inventory in kicad was different from the one we had physically in the lab (the one in the lab was much smaller).

PCB footprint

Adding a custom footprint

Because the little trimmer we have in the lab is not in the standard fab library, I got to go through the process of creating a new footprint to use in my PCB layout. There are quite a few resources online for how to do this, such as this one. I wasn’t concerned about creating a new schematic symbol so I used an existing symbol and just assignmed my new footprint to it.

I used the dimensions of the pads which are in the datasheet for the trimmer:

Final result in the PCB editor:

Creating a custom board outline in Inkscape

As I was laying out my components in the the PCB layout, I noticed that it was starting to resemble a heart. And of course I started leaning into it more.

I exported the traces as an SVG to create the board outline in Inkscape, since it’s easier to do in that platform than natively in KiCad.

In Inkscape, I also added the text labeling different sections of my board: the FTDI port, the UPDI port, the Button, and the little potentiometer. And of course added my initials.

Milling

Generating the code for milling

I used mods to generate the .rml files with the settings as in Week 4.

Milling

Stuffing

Programming

I used the little serial-UDPI adaptor I made this week and my QuenTorres board from Week 4 to program my Cardio Dev board:

Hero Shots

Reflections

I’m very pleased with my little cardio development board!

Files

Built with Hugo | Using a personally adjusted version of Nadieh Bremer's website and the theme Stack