All paths

Digital signal processing

Signals into numbers and back, on the Uno and the ESP32: sampling and aliasing, moving averages and FIR filters, IIR filters, the FFT, windows and leakage, pitch and beat detection, and a guitar tuner on a microphone and a TFT.

Arduino Uno R3Free7 lessons7 h4 chapters2,567 XPEmbedded engineering · Advanced+250 XP

0 of 7 done

What you will build

2 projects, built step by step

7 lessons in 4 chapters, about 7 hours on a simulated Arduino Uno R3. Free, in your browser, every step checked by the simulator.

Chapter 2 project

IIR filters

The exponential moving average: one line, one variable, and a memory that never quite forgets. Its time constant measured on a square wave, and the trade between smoothing and lag.

Open it in the simulator
Chapter 3 project

Pitch and beat detection

Autocorrelation finds the pitch of a note on A0 whatever its wave shape, and an onset detector on A1 finds a drum’s beat and its tempo, measuring pitch in the quiet between beats.

Open it in the simulator
The map

Chapter by chapter

Each lesson opens when the one before it is done, and each chapter ends in a project.

Chapter 1

Sampling

What a fixed sample rate can see, and what it gets wrong.

  1. Open303 XP

    Sampling and Nyquist

    An Uno samples a signal generator at exactly 1000 Hz and finds the frequency in its samples: right up to 500 Hz, and a false, lower one above it. Aliasing, seen and measured.

    0 of 7 steps

4 questions, graded as you go.
Chapter 2

Filters

Moving average, FIR and IIR, measured on real hum and steps.

  1. Locked265 XP

    Moving average and FIR

    A slow sensor with mains hum on top, at 500 samples a second: a 10-point moving average that cancels 50 Hz exactly, a 15-tap FIR low-pass, and what happens at 60 Hz.

    0 of 6 steps

  2. ProjectLocked484 XP

    IIR filters

    The exponential moving average: one line, one variable, and a memory that never quite forgets. Its time constant measured on a square wave, and the trade between smoothing and lag.

    0 of 6 steps

4 questions, graded as you go.
Chapter 3

The spectrum

The FFT, windows, and finding pitch and beat.

  1. Locked303 XP

    The FFT

    128 samples at 4000 Hz through arduinoFFT on an Uno: bins 31.25 Hz apart, the biggest one is the pitch, a square wave shows its odd harmonics, and a tone above Nyquist folds into the spectrum.

    0 of 7 steps

  2. Locked265 XP

    Windowing

    A tone between two bins smears across the whole spectrum. The same capture through the FFT with no window and with a Hamming window, and the leakage eight bins away measured both ways.

    0 of 6 steps

  3. ProjectLocked606 XP

    Pitch and beat detection

    Autocorrelation finds the pitch of a note on A0 whatever its wave shape, and an onset detector on A1 finds a drum’s beat and its tempo, measuring pitch in the quiet between beats.

    0 of 7 steps

5 questions, graded as you go.
Chapter 4

Boss project

A guitar tuner from microphone to needle.

  1. Locked341 XP

    Boss: a guitar tuner

    An ESP32 listens through an INMP441, decimates, autocorrelates, names the nearest guitar string and shows the cents on an ILI9341 with a needle that turns green in tune.

    0 of 8 steps

3 questions, graded as you go.
Syllabus

Every lesson in the course

All 7 lessons, in order, each with what it covers. Any of them opens in the editor right away.

Chapter 1

Sampling

  1. Sampling and NyquistAn Uno samples a signal generator at exactly 1000 Hz and finds the frequency in its samples: right up to 500 Hz, and a false, lower one above it. Aliasing, seen and measured.
Chapter 2

Filters

  1. Moving average and FIRA slow sensor with mains hum on top, at 500 samples a second: a 10-point moving average that cancels 50 Hz exactly, a 15-tap FIR low-pass, and what happens at 60 Hz.
  2. IIR filtersThe exponential moving average: one line, one variable, and a memory that never quite forgets. Its time constant measured on a square wave, and the trade between smoothing and lag.
Chapter 3

The spectrum

  1. The FFT128 samples at 4000 Hz through arduinoFFT on an Uno: bins 31.25 Hz apart, the biggest one is the pitch, a square wave shows its odd harmonics, and a tone above Nyquist folds into the spectrum.
  2. WindowingA tone between two bins smears across the whole spectrum. The same capture through the FFT with no window and with a Hamming window, and the leakage eight bins away measured both ways.
  3. Pitch and beat detectionAutocorrelation finds the pitch of a note on A0 whatever its wave shape, and an onset detector on A1 finds a drum’s beat and its tempo, measuring pitch in the quiet between beats.
Chapter 4

Boss project

  1. Boss: a guitar tunerAn ESP32 listens through an INMP441, decimates, autocorrelates, names the nearest guitar string and shows the cents on an ILI9341 with a needle that turns green in tune.
Kits

Build it on your bench too

Every lesson runs in the simulator with nothing to buy. When you want the real thing, these kits have the parts.

Have a kit already?

Find your kit

Pick the starter kit you own and run every lesson in its manual with the same parts on the same pins.

See every kit
Questions

About Digital signal processing

Is Digital signal processing free?

Yes. All 7 lessons of Digital signal processing are free and run in your browser, with nothing to install and no parts to buy before you start.

Do I need a real Arduino Uno R3?

No. Every lesson runs on a simulated Arduino Uno R3 with its parts on the canvas, and the simulator checks each step as you go. When you want to build it for real, the same wiring and code work on a real board.

How long does Digital signal processing take?

About 7 hours: 7 lessons in 4 chapters, each one a few short steps. Your progress is kept, so you can stop after any lesson and pick up where you left off.

What will I build?

Each chapter ends in a project that puts it together: IIR filters and Pitch and beat detection.

Where do I start?

With "Sampling and Nyquist", and each lesson builds on the one before it. New to circuits? Electronics basics is the course that starts from zero.