Skip to content

Electronics Design

Group assignment:

  • Use the test equipment in your lab to observe the operation of a microcontroller circuit board (as a minimum, you should demonstrate the use of a multimeter and oscilloscope)

  • Document your work on the group work page and reflect what you learned on your individual page

Individual assignment:

  • Use an EDA tool to design a development board to interact and communicate with an embedded microcontroller

Learning outcomes

  • Select and use software for circuit board design

  • Demonstrate workflows used in circuit board design

As usual, here is my schedule!

Group Assignment

Oscilloscope

An oscilloscope is a device used to visualize electrical signals. It converts these signals into visible waveforms, which are displayed on a screen. The oscilloscope consists of several components, including signal input probes, signal conditioning systems, vertical and horizontal

Details:

  1. Power Button: Turns the oscilloscope on/off.

  2. Vertical Scale Knobs: Adjusts the vertical scale (volts per division) of the waveform.

  3. Horizontal Scale Knobs: Adjusts the horizontal scale (time per division) of the waveform.

  4. Trigger Level Knob: Sets the trigger level for synchronization.

  5. Trigger Source Button: Selects the input channel for triggering.

  6. Auto Setup Button: Automatically adjusts the oscilloscope settings for optimal waveform display.

  7. Cursor Measurement Buttons: Enables measurement of various parameters such as voltage, time, frequency, etc., using on-screen cursors.

  8. Save/Recall Buttons: Allows saving and recalling of waveform settings and data.

  9. USB Port: Facilitates data transfer and storage via USB connection.

Multimeter

A multimeter (also known as a volt-ohm-milliammeter, volt-ohmmeter or VOM) is a measuring instrument that can measure multiple electrical properties. A typical multimeter can measure voltage, resistance, and current, in which case can be used as a voltmeter, ammeter, and ohmmeter.

Here is a labelled picture of the parts which I got it from here

Checking the voltage:

Reflection

This weeks group assignment was really fun, and Iā€™m sure all of us learned a lot from it. Hands on experience and spending time with our local instructor really helped us understand how the tools worked, it was also really fun to apply concepts that we learned in class and see that all of it was actually true. Real-time changes on the oscilloscope helped me visualize electrical circuits much better and it really brought me down to earth in respect to circuits, and it reminded me that everything is happening and is calculated, which is pretty important when everything seems like magic sometimes. Experimenting allowed us to develop and refine our troubleshooting skills by diagnosing our circuit issues, verifying component values, and analyzing signal behavior Doing this group assignment with our classmates as well helped us work on collaboration and communication skills as we discussed why something was happening, shared insights, and worked together to come to an actual conclusion that made sense (to us).

Click here to view the group assignment

Individual Assignment

Before we start designing, click here to learn the new vocabulary I learnt.

Designing!

I already designed and milled our 1st final project board during week 7. However, Professor Neil suggested me to use Xiao esp32c3 and oled instead of esp 32-wroom-32 and i2c lcd.

SO here is the pinout for xiao esp32c3 which has the same pins as the seeed xiao rp2040.

I am going to use KiCad to design my board.

Click here to learn how to add the xiao library for kicad.

As for the other libraries, we uploaded it from an usb drive where the library was already downloaded my our instructor!!

To add the required libraries, firstly, go here and download the zip files:

Then save it here:

Then open kicad, go to PREFERENCES -> Manage symbols -> add the file -> go back to preferences -> Manage footprints -> add file like this:

Now create a new project:

And then, save it like this:

After cretaing a new file, start creating a design by clicking the schematic option.

SINCE THE PINS FOR XIAO ESP32C3 IS SAME AS XIAO RP2040, I WILL BE USING THIS BOARD AS A REFERENCE FROM HERE

Here is the sample schematic design:

Now LET’S DESIGN!!

Some things to know:

Now add the components:

SOME COMPONENTS WILL NOT HAVE FOOTPRINTS LIKE THIS:

We can add these footprints later. Now let us connect the components and create labels as shown below:

And don’t forget to add grounds!!

DONE WITH DESIGNING :

Now let’s add the footprints. Firstly go here:

Then assign it:

NOW SWITCH TO PCB:

For easier navigation, I am doing this:

CONNECTING:

I didnot want to solder my xiao directly to the board so that’s why I decided to make a 1x 07 pin socket and adjusting it like this:

And this is how it turned out:

NOW HERE IS HOW YOU EXPORT IT:

For miling, I am going to use Roland SRM 20 miling machine.

I am going to use Mods for converting the svg file to rml file like this:

In Mods right click -> Programs -> Open Program -> Roland (SRM-20 mill 2D PCB)-> Select png/svg

Here are the PNG forms of the rml file:

For making PCB Boards we have to set this setting:

Printing!

Somehow I forgot to take a picture of my board before soldering it :((

Here is the list of components that I will require:

Solder with me!

Here is how it looks!!!

Programming

For testing, I am going to use a blink code from arduino ide.

Click here to learn about how to install arduino ide

And here is how you can do it!

Firstly, go to preference -> fill “Additional Boards Manager URLs” with the url below:

https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json

Now go to Tools -> Board -> Boards Manager -> Type “esp32” and select the latest version and install it:

Now for selecting our board, go to Tools -> Board -> ESP ARDUINO -> select “XIAO_ESO32C3”. Since the the list is pretty long, keep scrolling!!

Now go to Files -> Examples -> Basics -> Blink and don’t forget ti change the pin according to your board like this:

Code:

Now before uploading, selecting the port is a very crucial part and you can do it like this:

Firstly, go to Tools -> Port and then select the serial port name like this:

Testing:

Here is how it turned out!

Using a button to control a led

Since we already added the board, we can now go to Files -> Examples -> Digital -> Buttons. Then adjust the pin values according to your board. This is how my code looks like:

Now code!

Output

Here is how it turned out!

Using a button to control multiple leds

I used the same code as above but edited a bit of it on the same board with changed leds. This is how the code looks:

Here is the full code:

const int buttonPin = 3;
const int led1Pin = 2;
const int led2Pin = 4;
const int led3Pin = 5;

bool buttonState = false;
bool lastButtonState = false;
bool ledState = false;

void setup() {
  pinMode(buttonPin, INPUT_PULLUP);
  pinMode(led1Pin, OUTPUT);
  pinMode(led2Pin, OUTPUT);
  pinMode(led3Pin, OUTPUT);

  Serial.begin(9600);
}

void loop() {
  buttonState = digitalRead(buttonPin);

  if (buttonState != lastButtonState) {
    if (buttonState == LOW) {
      ledState = !ledState;
      digitalWrite(led1Pin, ledState);
      digitalWrite(led2Pin, ledState);
      digitalWrite(led3Pin, ledState);
    }
  }

  lastButtonState = buttonState;
}

Output

Here is how it looks:

Compressions:

Imagemagick

I used image magick for image compression. Here are some commands I used for compression:

Ffmpeg

I used ffmpeg for video compression. Here are some commands I used:

  1. Basic Conversion:

Convert a video file to another format:

ffmpeg -i input.mp4 output.avi
  1. Changing Video Resolution:

Resize a video:

ffmpeg -i input.mp4 -vf scale=640:480 output.mp4
  1. Extracting Audio:

Extract audio from a video file:

ffmpeg -i input.mp4 -vn -c:a copy output.mp3

Link

Click here to view the vocabulary I learnt this week!!

Files

Jumpscare

I WAS NOT PREPARED FOR THIS!! šŸ’€

THAT’S IT FOR THIS WEEK!!

HAVE A NICE DAY!


Last update: March 20, 2024