Skip to content

Search

Search courses, labs, notes, tools…

Guided lab · ECE 2

Sampling with a microcontroller: RMS, frequency and FFT

Feed the bench generator into a real ADC and let MicroPython do the DSP

Time
50 min
Bench
Emona kit bench

Free. The lab opens after Google sign-in, which also keeps your progress.

Screenshot of the "Sampling with a microcontroller: RMS, frequency and FFT" virtual lab running on the Emona kit bench, wired and measuring

What you do in this lab

The function generator drives ADC0 of a Raspberry Pi Pico running MicroPython. A program samples it at a fixed rate and prints the mean, RMS, peak-to-peak and frequency; another one runs a 256-point FFT. You will check the numbers against theory, then raise the input frequency past fs/2 and watch the FFT peak fold back (aliasing).

Objectives

  • Bias an AC signal into the ADC range and convert codes to volts.
  • Compute mean, RMS and frequency from samples, and check RMS = Vpp/(2√2) for a sine.
  • Read an FFT: bin width fs/N, window side-lobes, amplitude of a peak.
  • Predict aliases: a tone at f > fs/2 appears at |f − k·fs|.

Inside the lab

Step-by-step instructions with wiring checks, the readings you should get, questions with model answers and a short quiz. Sign in to open it.

Unofficial, free student project. Not affiliated with Emona Instruments or with any university. Emona and ETT-101 are trademarks of their owner.