LAB 1
Artemis

The first lab of the ECE 4960 course entailed setting up the SparkFun Redboard Artemis Nano. The Artemis is the primary microcontroller we will be using in the course and this lab helped get familiar with it through different examples.

Installation

The Artemis board is an Arduino-compatible board that can be programmed and tested from the Arduino IDE. In order to use the board, I followed the instructions given in the lab handout, including the following steps.

  • Install the Arduino IDE from the arduino.cc website. I installed version 1.8.19 (the latest version).
  • Once the IDE is installed, add the Arduino core for the Artemis board called Apollo3, which was done from the given custom link and then using the Boards Manager in the IDE to install. https://raw.githubusercontent.com/sparkfun/Arduino_Apollo3/main/package_sparkfun_apollo3_index.json
  • The Artemis board is ready to be programmed after connecting it to the computer using a USB-C to USB-C cable.

I also tried using the new pro Arduino IDE version 2.0, which has some advanced features like debugging. However, after installing the core and trying to test on an example, the code didn’t upload successfully. It seems that the experimental IDE is not yet compatible with Apollo3.

Example: Blink

The first example we tested on the Artemis board was the default Arduino example called Blink, which blinks the onboard LED connected to digital pin 13. The code uses the digitalWrite function to toggle the LED every 1 second. The video below shows this example executing on the Artemis board.

Example: Serial

In order to test the serial connection between the Artemis and the computer, we used the Serial example included with the Apollo3 core. This example simply set up the serial capability to a baudrate of 115200 and output a series of statements through the serial monitor. It also read any input through serial and printed it back out. The following screencast shows the programming of the board through the IDE and the serial output on the Serial Monitor whenever the Reset button is pressed.

Example: Analog Read

The third example exposed us to the usage of the on-chip ADC on the Artemis board that can be used to measure analog voltage. The Apollo3 core also has some special internal ADC channels to measure internal die temperature, VCC voltage, and VSS voltage, which were all printed in this example. In the video included below, we see that when the microcontroller on the board is pressed with fingers, the external reading gradually increases from around 5000 to almost 6700.

Example: Microphone

The last example we experimented with was the PDM (Pulse Density Modulation) MEMS microphone that is included on the Artemis board. The PDM microphone is different from the more commonly used Electret analog microphone that simply outputs an analog voltage to be read by the microcontroller. We ran the PDM Microphone Output example, which is a more advanced example than the other three. The code first configures the PDM microphone based on the microcontroller and the PDM clock speed to determine the sampling frequency (PDM clock = 6MHz, sampling frequency = 46875Hz). Once configured, it reads the mic to fill up a data buffer (size 4096) and perform and FFT to determine the loudest frequency (the peak) in that time duration. In order to test the example, I used an online tone generator to produce different frequencies from my computer’s speaker. In the screencast video below, we see how the loudest frequency reading changes to match the set tone frequency with above 99% accuracy.