Skip to content

Week 8: Electronics Design

  • 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

Testing our Microcontroller

Using a multimeter

The most common ways to debug connections is with the 'Voltage', 'Continuity' and 'Resistance' settings on the multimeter.

To ensure our Xiao RP2040 microcontroller board works correctly the input voltage must be between 1.7V and 7.5V. (Taken from the chip mentioned in schematic).

Using the multimeter in voltage mode, we tested the Vin(5V) pin coming from a USB power source.

And found it to be 4.983 volts.

We also investigated the 3.3 volt regulated pin that powers the microcontroller itself.

And found it to be 3.301 volts.

To ensure that connections on our PCB were OK we switched into 'Continuity' mode.

We checked that pin 4 connects to the button, and likewise for the other side of the connection (PWR|GND|and the LED pin).

When connected to both sides of the button the multimeter beeps, indicating a closed circuit. If not it would read OPEN.

And finally, we used resistance mode to verify that we are using the correct current limiting resistor for our LED.

Switching into continuity mode, and measuring across the resistor we got a value of 4k7 ohms.

Generally in a more complex circuit its hard to measure values such as this (there might be other resistors on this same net, creating a more complicated resistor network). But for this simple circuit we were able to get an accurate result.

Using an oscilloscope

We used the oscilloscope to probe the pwm being set on the LED pin.

We wrote some code using if loops to create a "breathing" effect where it would slowly increase the PWM and decrease it over and over. Here is what that looks like in Thonny's graphing which is what we are used to:

And here is what we saw on the scope:

We also tested the accuracy of the duty cycle being set on the Pin. We set it to a duty cyle of exactly 50% (well within a few thousands of a percent) and found that the resulting duty cycle was 50.24%.