The MCP4725 DAC
A 12-bit DAC on I2C puts out a real voltage, no PWM and no filter. Then its speed limit: the sketch measures its own sample rate, and the pitch it can reach.
Open it in the simulatorMake sound and hear it, on the Uno and the ESP32: square waves with tone(), a sine from PWM, an MCP4725 DAC and its speed limit, I2S to a MAX98357A, recorded clips on a DFPlayer, an INMP441 microphone, and a spaceship voice clock.
0 of 7 done
7 lessons in 4 chapters, about 6 hours on a simulated Arduino Uno R3. Free, in your browser, every step checked by the simulator.
A 12-bit DAC on I2C puts out a real voltage, no PWM and no filter. Then its speed limit: the sketch measures its own sample rate, and the pitch it can reach.
Open it in the simulatorA DFPlayer Mini decodes recorded clips from a microSD card and drives the speaker itself; the Uno sends it commands over serial. Two buttons, a BUSY pin and a spaceship sound board.
Open it in the simulatorEach lesson opens when the one before it is done, and each chapter ends in a project.
Square waves, PWM samples and a real voltage from a DAC.
A piezo on pin 8 plays a coin pickup, a power-up and a laser sweep: tone() makes a square wave, and the piezo and a frequency counter read the pitch back, to the hundredth of a hertz.
0 of 7 steps
A real sine from a pin that can only be HIGH or LOW: 62.5 kHz PWM, a sample table played 8000 times a second by a timer interrupt, and two RC stages that smooth it into 440 Hz.
0 of 7 steps
A 12-bit DAC on I2C puts out a real voltage, no PWM and no filter. Then its speed limit: the sketch measures its own sample rate, and the pitch it can reach.
0 of 6 steps
I2S out to a speaker, and recorded clips from a card.
An ESP32 sends a sine as 16-bit samples over I2S to a MAX98357A, which drives an 8 ohm speaker by itself. Then the amplifier’s gain and shutdown pins, wired on the canvas.
0 of 7 steps
A DFPlayer Mini decodes recorded clips from a microSD card and drives the speaker itself; the Uno sends it commands over serial. Two buttons, a BUSY pin and a spaceship sound board.
0 of 7 steps
An I2S microphone: level, decibels and pitch.
Sound in: an INMP441 sends 24-bit samples over I2S to an ESP32, which works out the level in dBFS from their RMS and the pitch from counting zero crossings, and flags when it gets loud.
0 of 7 steps
A talking clock built from recorded words.
A spaceship voice clock: a DFPlayer strings number clips into "ship time is eight o’clock", a button asks for the time, and a piezo chimes ding-dong on the hour.
0 of 8 steps
All 7 lessons, in order, each with what it covers. Any of them opens in the editor right away.
Every lesson runs in the simulator with nothing to buy. When you want the real thing, these kits have the parts.
Pick the starter kit you own and run every lesson in its manual with the same parts on the same pins.
See every kitYes. All 7 lessons of Sound and audio on microcontrollers are free and run in your browser, with nothing to install and no parts to buy before you start.
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.
About 6 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.
Each chapter ends in a project that puts it together: The MCP4725 DAC and DFPlayer clips.
With "Tone and square waves", and each lesson builds on the one before it. New to circuits? Electronics basics is the course that starts from zero.