Guided lab · ECE 2
Microcontroller DAC: PWM, RC filter and DDS
Make an analog sine wave from a pin that can only be 0 or 5 V
- Time
- 45 min
- Bench
- Emona kit bench
Free. The lab opens after Google sign-in, which also keeps your progress.

What you do in this lab
A real Arduino Uno program (running instruction by instruction on an emulated ATmega328P) drives a 62.5 kHz PWM pin. You will measure the carrier, filter it with an RC low-pass to get a 250 Hz sine (a "PWM DAC"), see what the filter corner does to the ripple and the amplitude, then write your own DDS generator in MicroPython on a Raspberry Pi Pico.
Objectives
- Explain how a PWM signal and a low-pass filter make a DAC: the filter keeps the average (duty × Vdd).
- Calculate the PWM frequency from the clock and the counter TOP: f = f_clk / (N·(TOP+1)).
- Choose an RC corner between the signal and the carrier, and predict ripple and attenuation.
- Build a DDS (direct digital synthesis) sine generator with a phase accumulator and a table.
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.
Related labs

Microcontroller: drive a transistor and LED, read a sensor divider
A Raspberry Pi Pico runs real MicroPython on the circuit bench: its ADC reads a voltage divider on the breadboard and a GPIO pin switches an LED through an NPN transistor
45 minCircuit bench

Serial protocols 1: UART frames and errors
Generate real 8N1, 8E1 and 7O2 frames, decode them, then break them on purpose
45 minEmona kit bench

Serial protocols 2: the I²C bus
START, address, ACK, data, STOP, repeated START, NACK and clock stretching
55 minEmona kit bench

Serial protocols 3: SPI modes and chip select
Four wires, four modes: CPOL, CPHA, MOSI, MISO and CS
45 minEmona kit bench
Unofficial, free student project. Not affiliated with Emona Instruments or with any university. Emona and ETT-101 are trademarks of their owner.