Skip to content

Week 6 Electronics Design

This page documents the group assignment for week 06 of Högni, Jóhannes and Ólöf.

  • 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

Overview and Approach

The group decided to look into the basics on using the Oscilloscope, Multimeter and the Logic Analyzer. Then we tested them on different microcontrollers. Jóhannes and Högni did the tests in Fab Lab Ísafjörður and Ólöf did this in Fab Lab Austurland.

The Oscilloscope

About the Oscilloscope

We found this information site about Oscilloscope on the labs site for group projects on Fab Lab Vestmannaeyjar. According to this information site the Oscilloscope can display the voltage of a signal as function of time U(t) in a graphical way on a screen. Here are some more information based on the information site.

Basic Oscilloscope functions:

Calculates the amplitude and frequency of oscillating signals and displays it in a numerical manner

The voltage-time function can be displayed in a graph

Measuring a components signal and comparing the measurement with the expected output can help troubleshooting possible malfunctions

Can show and separate the proportions of AC and DC in a signal

Has usually multiple input channels for comparative measurements

Indirectly the Oscilloscope can be used to determine:

Current

Sound

Frequency and period

Duty cycle

Rise and fall timing

Voltages characteristics

Resistance

AC voltage and DC voltage

The Multimeter

About the Multimeter

The multimeter is a device for measuring different electric parameters. The most basic versions can measure voltage and current, as well as other related variables as resistance, frequency, capacity and more.

It comes as a handheld tool with internal battery and two leads for connecting to the measuring points.

Connection ports and fuse

It is important to be aware of what variable is intended to measure and what input ports the leads need to be connected to. Also the limits of the device need to be known and considered (as with all measuring equipment).

When the intention is to meaure the voltage of a powersource, but the leads are connected for current measurement you can easily blow the internal fuse of the current measuring circuit. Then the current measurement will be inoperative until you replace the fuse.

The Logic Analyzer

We didn't manage to test the logic analyzer by the end of this week, but plan to use it at a later point.

Video on how to use the Logic Analyzer

We also found this video on how to use the Logic Analyzer on the Fab Lab Vestmannaeyjar website.

Fab Lab Ísafjörður

In FabLab Ísafjörður Högni and Jóhannes worked together on the group assignment. Högni documents about the multimeter and Jóhannes about the oscilloscope.

Multimeter

We tested the the Tenma 72-7780 6000 counts True RMS multimeter and used the Raspberry Pi Pico microcontroller board for the tests. This device can measure resistance in ohms, voltage in volts, frequency in Hz, duty ratio in percentage, current in ampere and capacitance in farads. This is done by connecting the device either in series or parallel to the device that is being tested and then reading the measure on the screen.

We performed a couple of tests on the Raspberry Pi Pico, we also tested a resistor, lightbulb and the power source.

The first test was to measure the voltage of the Raspberry Pi Pico when connected to the voltage pin and ground. We connected the microcontroller to the computer using the built in USB connection. The result was 2.959V, which is less than the 3.3V that we would have expected.

raspberry

Then we changed the connection for the red wire to the bus pin and measured the voltage.

messure_connected

And this is the result, 4.9V whereas we would have expected a value of 5V.

messure_closeup

Next we measured a resistor that was labeled 47 kiloohms.
resistor

And it measured at 47 kiloohms

result

We then measured the resistance of a small lightbulb at 157.6 ohms

resistance

We then wanted to measure the current in the lightbulb and for this we need to connect it to a powersource.

conection

Which enables us to measure the current and you can see the result below with the lightbulb lighting up.

microamper

Next we decided to test the voltage of the fixed output settings on the power source to see how accurate that i starting with the 2.5V setting and it measured 2.54V

powersource

Finally we then measure the 3.3V setting which measured 3.3V

multimeter

Oscilloscope

We tested a GWINSTEK GDS-1152A-U digital oscilloscope with two channels and storage function.

First we measured the noise from the DC power supply (GWINSTEK GPD-3303D). The Autoset function immediatly tuned the graph to the highest resolution, when we connected the fixed 3,3 V output of the desktop power supply to the probe. We measured an amplitude of around 40 mV at a high frequency of 5 to 30 kHz.

Oscilloscope power supply noise

Next we connected a digital output of the ESP32-S3 development board to the probe and simulated a blinking led at 50 Hz using a small code in micropython.

from machine import Pin
from time import sleep
ledpin = Pin(46, Pin.OUT)   # set GPIO46 to output for led on/off

while True:
    ledpin.value(1)
    sleep(1/100)
    ledpin.value(0)
    sleep(1/100)

Oscilloscope probe

Here is the screen of the oscilloscope confirming the square wave signal of 3,3 V at 50 Hz. The raster in the background is tuned that each vertical line equals to 1 V.

Square wave

Here is the video of another square wave at 0,5 Hz.

Last but not least we tested the PWM output of the microcontroller, as can be used for dimming LEDs. For this experiment we defined a 5 kHz output signal and had the brightness increase from zero to full brightness with a constant rate, before dropping back to zero.

Here is the code for that:

from machine import Pin, PWM
from time import sleep
freq = 5000
ledpwm = PWM(Pin(5), freq)

while True:
    for duty_cycle in range(0, 1024):
        ledpwm.duty(duty_cycle)
        sleep(0.005)

The screen shows clearly the increasing duty cycle (ratio 3,3 V signal to 0 V) of the output, before falling back to zero.

Fab Lab Austurland

The Multimeter and the Raspberry Pi Pico

Measuring the Raspberry Pi Pico

Ólöf is going to use the Raspberry Pi Pico for her final project and therefore she decided to use it with the Oscilloscope and the Multimeter. This was done with assistance from co-teachers who explained how the settings should be and where to probe!

Raspberry Pi Pico used with the Multimeter

An Elma BM257s – True RMS multimeter was used for the measurements.

Measuring the operating voltage of the 3.3V Pin

Here you can see how the Multimeter was used to measure the operating voltage of the 3.3V Pin. The black probe is ground and the red probe was placed on the pin. The co-teachers explained that you could probe the micro-usb for ground.

Measuring 3.3V Pin

Multimeter

The measurement appears on the screen of the Multimeter. As you can see it is set to measure the DC voltage which is symbolized with straight lines over a V.

3.3V

Measuring the operating voltage of the V-bus or the 5V Pin

This photo shows how the Multimeter was used to measure the operating voltage of the V-bus Pin/5V Pin.

Measuring Vbus/5V Pin

The operating voltage from the USB connection from a computer to the V-bus or the 5V Pin

The Raspberry Pi Pico was powered by a laptop through a micro-USB to USB connection. When it is connected through the V-bus pin, it operates on 5 Volts, as you can see on the screen.

5V

Video of the Raspberry Pi Pico used with the Multimeter

Here you can see videos that shows how the operating voltage of the 3.3V pin on the Raspberry Pi Pico was measured with the Multimeter.

Operating voltage 3.3V - Raspberry Pi Pico 3.3V

Operating voltage 5V - Raspberry Pi Pico V-bus

The Oscilloscope and the Raspberry Pi Pico

Raspberry Pi Pico used with the Oscilloscope

An Agilent Technologies DSO1002A Oscilloscope was used for the measurements. Ólöf decided to use the same code as in week 04 when programming one single NeoPixel LED to change colours. The settings were done as in the example from Nicolas Decoster and the code was copied from him. Ólöf was hoping that the oscilloscope could read and show different signals. Here you can see the code:

 //Defining which pin to use for LED and button
    #define LED 4
    #define BUTTON 0

    //Variable to keep track of how many button presses
    uint8_t buttonPresses = 0;

    //Defining what is input and what is output or input and pullup

    void setup() { 
        pinMode(LED, OUTPUT);
        pinMode(BUTTON, INPUT_PULLUP);
    }

    //Creating a loop that follows a pattern and then repeats itself
    void loop() { 
      //Defining what happens if button is pressed  
      if (digitalRead(BUTTON) == HIGH) {  
      // Increment buttonPresses
        buttonPresses++;

    //If buttonPresses is greater than 4, reset it to 0
    if (buttonPresses > 4) {
      buttonPresses = 0; 
    }

    // Blink LED based on buttonPresses count
    for (uint8_t i = 0; i < buttonPresses; i++) {
      digitalWrite(LED, HIGH);
      delay(200);
      digitalWrite(LED, LOW);
      delay(200);
  }  

    // Wait for button to be released
       while (digitalRead(BUTTON) == HIGH) {
       } 
     }  
  }

Video of the Oscilloscope and Raspberry Pi Pico.

Video showing how the Oscilloscope was used to measure the DC current in Raspberry Pi Pico. It shows how a code, telling a single NeoPixel LED to switch between colours, appears as rectangular waves of voltages versus time. It is interesting to think about that different sizes of the rectangular waves symbolize different colours that are made by sending a certain amount of voltage.

Oscilloscope - Raspberry Pi Pico programmed to change colours on a Neopixel LED

The screen of the Oscilloscope showing waves.

Here you can see the screen of the Oscilloscope. It shows clearly different sizes of the rectangular waves. You can see how the voltage goes up in the beginning of a wave and that the voltage input varies for shorter time in the first waves and then for longer time in the waves on the right side of the screen.

Time versus Voltage This image with explanations was created in Canva