Week 6: Electronics Design
Our assignment:
Group Assignment: use the test equipment in your lab to observe the operation of an embedded microcontroller
Individual Assignment: 1. simulate a circuit 2. use an EDA tool to design an embedded microcontroller system using parts from the inventory, and check its design rules for fabrication
Group Assignment
Find our group assignment documented in full here
This week as a group, we learned how to use the power supply, the oscilliscope, and the multimeter. This equipment let us know how our circuits are operating on a granular level.
Quick Start Resources: For a basic primer on how electricity functions in the context of a circuit, we first watched a short video on How Electricity Works by the Engineering Mindset page on Youtube. The website Spark Fun Electronics and the Arduino Documentation online page both provided additional resources for learning about our equipment.
POWER SUPPLY
We have the KORAD KD3005D Digital Control DC Power Supply in our fab lab.Link to general power supply manual

Our Power Supply equipment. It has display of the voltage and current. You can also toggle between Constant Current Mode (C.C) and Constant Voltage Mode (C.V). The machine has a voltage adjustment knob the left and a current adjustment knob to the right. At the bottom is the power switch, the positive (red) output terminal, the negative (black) output terminal, and the earth ground (green) terminal.
The power supply outputs voltage and can limit current that runs through. The earth ground terminal acts as a safety mechanism as a backup path for the current in case there is somehow a short circuit.
Things to note:
- Be careful with the leads - keep them separate and not touching. You can plop them into the breadboard where nothing is connected.
- Be careful not to put over 5V for the voltage when you supply power to the 5V voltage pin. It can caue damage.
- You can supply over 5V when using the VIN pin because that pin has a built in regulator
To power our first board, we set the voltage to 5V and limitted the current to 30 milliamps. Then we hooked up to ground and to power (5V) on the Arduino pins.

Using our power supply to power the board. Our LED works!
When we removed the LED from the breadboard, the current dropped from about 30 milliamps to 17 milliamps, demonstrating that it takes some current to power the LED.
We also observed that pressing the button (wired on the board to switch the LED on and off) doesn't change the current by a perceptible amount.
When we moved power from 5V pin to the VIN pin, it reduced the entire amperage from 17 to about 10 milliamps, demonstrating the VIN pin also takes current to regulate power.
OSCILLISCOPE
We have the SIGLENT SDS 1202X-E Digital Storage Oscilloscope (200MHz; 1GSa/s). We have a copy of this manual in the lab. And here is Spark Fun's helpful page on the Oscilloscope.

Our oscilloscope!
The cool thing about an oscilloscope is that it allows us to graph how electrical signals change over time. The x-axis is the time and the y-axis is the voltage. This provides more info than a simple multimeter (see more on that below though...)
Before we went through the functions as a group, I walked through the manual to do a functional inspection and probe compensation. I got the following results:

Everything was looking good! As the manual explained, in normal condition the display should show a square waveform

Diagrams of features of our oscilliscope
As a group, we began by testing the equipment on our simple LED + push button circuit. Our oscilliscope has 2 channels. We set one channel (yellow) for the button and one channel (pink) for the LED. We hooked up the probe to ground and to the corresponding part of the circuit. We observed how the graph changed over time as we pushed the button on off. We learned that you can use the Run/Stop button to take a snapshot on the machine and zoom into really small timescales (like microseconds and nanoseconds) to detect voltage changes.
The readouts on screen tell us that within ~5 microseconds the voltage changes as indicated. We can see this is a process happening in time in which the voltage transitions from 0 to 5 V. (See group assignment page for image)
Then, we hooked up the pink channel to ground and clipped to the LED.
Measuring voltage of LED and button over time as we pushed button on and off. (See group assignment page for image)

Zooming in allows you to see differences across time
Things to note:
- Ensure that ground is connected. Do not just start probing things without connecting to ground
- "Bouncing" refers to when instead of a clean jump from on to off when the button is pressed there are multiple electrical signals bouncing around. It doesn't always happen, but if it does it can be an issue for the microcontroller.
- To actually register something being a voltage it hsa to ramp up and take time. We noticed it took about 20 microseconds for our circuit to get from 0 V to 5 V. Using the oscilloscope we can observe a visual graph to detect the change in voltage over this brief period of time
We observed the phenomenon of "bouncing." (See group assignment page for image)
MULTIMETER
We each received the Klein Tools MM325 multimeter. Here is the online manual for this multimeter. As stated in the manual, this is a "manual-ranging multimeter that measures AC/DC voltage, DC current, and resistance " and also tests batteries, diodes, and continuity. The black probe is ground and the red is positive.

A chart from the manual showing the range, resolution, and accuracy for each function of the multimeter

Features of the MM325 Multimeter
We begain by doing a continuity check with our simple LED pushbutton circuit. While doing continuity checks, we must ensure there is no power supplied to the board because you don't test for continuity in a powered circuit. We switched the multimeter to the icon on the right that looks like a speaker and now we can probe around the circuit and whenever the multimeter beeps, this indicates a closed, continuous, conductive circuit between the probes. Continuity means there is a wire between things.
Next, we practiced measuring resistance, clicking the device over a notch to the 2K icon....
We measured the voltage drop on our LED. Things didn't add up perfectly to 5V, but it was within our tolerance. We learned it is a feauture of an LED to drop a voltage. The multimeter measured the drop in voltage at about 2V. More images and lessons learned from multimeter available on our group assignment page.
Circuit Simulation
For my circuit simulation, I decided to go back to my ping pong game I set up during our embedded programming week. With the encouragement of my instructor, I also added in an input element of a button that would restart the game.
I set up the circuit for simulation in Wokwi using the code from before but I had to figure out the updated code for including the restart button. The updated code used is included below in my design files.

My circuit simulated on Wokwi
Designing Embedded Microcontroller System Using an EDA Tool
After simulating the circuit, I next designed it using KiCAD. Here is a great reference manual online by KiCAD. Below are the steps I went through to make my design.

Adding the KiCad FabLib plug-in to streamline the library of components we have

Locating the potentiometer component to add to the schematic

begining to place components on schematic

first attempt at creating the ping pong schematic

updating PCB from schematic

making edge cut layer

first attempt at ping pong board design

updating my schematic to include specific Arduino Nano board component

updating board design

errors from Design Rules Checker

At last, the board passes the Design Rules Checker! It is now print-ready
Workflow
The basic workflow for electronics design on KiCad I learned this week and exemplified above is:
Create the schematic in the Schematic Editor Window
- Create new project and open schematic editor
- Search for, locate, and add needed components (use fablab plugin to stick with our inventory!).
- Wire the components (you can click "w" as a shortcut or click the corresponding icon) connecting pins with correct wiring placement.
- Make sure to connect power and ground to all components. Add power symbols where necessary (don't need to wire all components back to Arduino pins)
- Run Electrical Rules Check (ERC) to make sure connections are good to go
- Ensure footprints are assigned correctly (for example, with the ping pong board I had to go back because my pin socket component needed to be changed from 1.27mm to 2mm)
- If making any changes to the schematic after PCB is created, remember to update PCB again
Next create the printed circuit board in the PCB editor Window
- Click "PCB Editor" icon to open
- Click "Update PCB from Schematic" icon to import component footprints and ratsnest
- Arrange components -- there's an art and a logic to this! Think about what all needs to be connected and how to minimize crossing line. And if applicable think about user interaction. Get things close enough but also leave room for connecting and use ratsnest lines as a guide too!
- Make edge cut layer to define board outline and draw a continuous closed shape around components. Properties >> layer >> edge cut
- Draw filled zone along outside of the edge cut layer outline. Go to "Copper Zone Properties" and click PWR_CND -- this makes a ground plane. We're not gonna fill zones yet. First we need to route...
- Configure design rules (if you haven't already, need to do before routing). Navigate: File >> Board Setup >> Design Rules In the constraints section set the minimum values the CNC milling machine can handle. In the net classes section you can set default track width. Defaults aren't right for important things (like trace thickness). We set clearance at 0.2mm and track width at 0.4mm.
- Routing! Navigate: Route >> Single Route Track. Route the traces using the generated ratsnest as a guide. "X" is keyboard shortcut for routing. Route all the connections + power. You can kinda ignore ground for now but you really can't because the wiring itself must not block off access to the ground plate. Try and avoid 90 degree angles. Once everything is looking good..
- Create ground plane. Navigate: Edit>> Fill All Zones. Note: this is like the final last step because if you have further changes you'll have to redo.
- Perform Design Rules Check (DRC). This section of the KiCad Manual explains this nicely. Navigate: Theres an icon that looks like a checklist for this function in the top toolbar. In the window click "Run DRC" and address any errors until the board passes the DRC.You need to complete this final step after any and all changes are made to the board before you're cleared to print.
Design Files
Link to design files