Skip to content

Week 8: Electronics Design - Richard Shan, Alana Duffy

Assignment

For this week, we were assigned to:

  • Use the test equipment in your lab to observe the operation of a microcontroller circuit board
  • Document your work on the group work page and reflect what you learned on your individual page

Work Distribution

People Description
Alana Multimeter Operation
Alana Taking Pictures
Richard Oscilloscope Testing for Blinking LED
Richard Oscilloscope Testing for Dynamic Brightness LED
Richard Blinking LED Programming
Richard Dynamic Brightness LED Programming
Richard Oscilloscope Reading Analyses
Richard/Alana Documentation

Oscilloscope

Blinking LED

We first tested the oscilloscope with an existing program to blink the programmable LED on Richard’s board. We chose to use Richard’s board because that board already had a programmable LED connected to the ATTiny412’s pin 4, which is a programmable analog/digital pin. Documentation for the creation of the board and programming the blinking LED can be found here.

We used this program to blink the pin 4 programmable LED.

void setup() {
  pinMode(2, OUTPUT);
}

void loop() {
  digitalWrite(2, HIGH);
  delay(200);
  digitalWrite(2, LOW);
  delay(200);
}

We placed the prongs of the oscilloscope on either side of the blinking LED and allowed the machine to acquire its readings.

Here is the oscilloscope reading. The visible representation shows that every 200 milliseconds, the LED’s power toggles between receiving no power and max power. When toggling the power, there is a brief inrush voltage spike due to extra energy remaining in the circuit.

Dynamic Brightness LED

Next, we created a program that would progressively dim and brighten the LED. Based on the lessons we learned during programming the custom board, I knew that in order to program the LED on pin 4, I needed to use pin 2 in the Arduino IDE. Pin 4 on the ATTiny412 corresponds to analog/digital programming pin 2.

Here is my code that I uploaded to the board. I used analogWrite instead of digitalWrite, which allowed me to change the amount of power flowing into the LED as opposed to simply turning it on or off.

int pin = 2;

void setup() {
  pinMode(pin, OUTPUT);
}

void loop() {
  for (int i = 0; i <= 255; i+=5) {
    analogWrite(pin, i);
    delay(20);  
  }
  for (int i = 255; i >= 0; i-=5) {
    analogWrite(pin, i);  
    delay(20);  
  }                    
}

After I uploaded the program to the board, I placed the prongs of the oscilloscope to either side of the dynamic LED. The dimming and brightening LED can be seen in the timelapse.

Here is the oscilloscope reading. The wave curve is visible which demonstrates the fluctuating amount of power going into the LED, dimming and brightening it from completely off to max power.

Multimeter

A digital multimeter can measure many things of a circuit like voltage, continuity, and resistance. To test using the multimeter, we measured continuity on the same board as we did the oscilloscope.

To set the multimeter to test continuity, we turned the knob so that the circled section (the one with the sideways wifi symbol) had the knob pointing to it. Then, we hit the red function button twice (also circled in the image below). We then put the pins on one of our traces with multiple components on the traces between the two pins.

In the video, you can see the value on the multimeter screen increase and hear a beeping sound. This indicates that there is continuity going through the traces and components between the pins. We were able to know that continuity was supposed to run through this place because of the schematic and the traces eventually connecting to power and ground pins.


Last update: March 23, 2024