Source: https://mokxi.com/teachers/plans/data-converters
Updated: 2026-11-19

Lesson plan

# ADCs, DACs and sampling lesson plan

What a converter really gives you: aliasing, resolution and the LSB, R-2R and PWM DACs, the ADS1115, MCP3008 and MCP4725, and a 16-bit voltmeter that checks itself.

7 chapters, 7 lessons, about 6 hours, no board. Every lesson runs in the browser, with nothing to install.

Start a class from this course

The unit

## Objectives and materials

### By the end, students can

- Sample below twice the signal and it lies.
- Codes, steps, bits, references and clipping.
- Binary weights from two resistor values, and why it needs a buffer.
- A pin and an RC filter: level, ripple and step.
- Sixteen bits and a gain amplifier against ten bits and speed.
- A 12-bit DAC on I2C, read back and compared with PWM.
- A 0 to 30 V meter with a divider, a self-test and a range you pick.

### Materials for the whole unit

- 8-resistor network
- Arduino Uno R3
- Bench power supply
- Capacitor
- DAC, MCP4725
- Eight-channel ADC, MCP3008
- Function generator
- Multimeter
- Oscilloscope
- Resistor x 9
- Sixteen-bit ADC, ADS1115
- Slide switch x 5

Every part is already on the simulator’s bench, so there is nothing to buy or hand out. The counts are the most any one lesson uses, if you build it on real breadboards too.

Chapter 1. About 55 min

## Aliasing

Sample below twice the signal and it lies.

Lesson | Time | What students do

Aliasing: when a fast signal looks slow An Uno samples a sine from a function generator at a rate you pick and counts the cycles it sees: right below half the sample rate, wrong above it, with the Nyquist rule and the anti-alias filter that real converters put first. | 55 min

- Run it: 10 Hz at 100 samples a second
- 40 Hz: still fine
- 70 Hz: a lie
- Predict: 95 Hz
- Sample faster
- The scope samples too

### Materials

- Arduino Uno R3
- Function generator
- Oscilloscope

### Check for understanding

Each student finishes "Aliasing: when a fast signal looks slow" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "The scope samples too".

Chapter 2. About 55 min

## Resolution and LSB

Codes, steps, bits, references and clipping.

Lesson | Time | What students do

Resolution and LSB: the smallest step A bench supply on A0: the code and the volts, one LSB of 4.88 mV, a change too small to see, fewer bits and bigger steps, the 1.1 V reference for finer ones, and what happens past full scale. | 55 min

- Run it: a code, not a voltage
- Smaller than a step
- Fewer bits
- Predict: 4 bits
- A smaller reference
- Past full scale

### Materials

- Arduino Uno R3
- Bench power supply

### Check for understanding

Each student finishes "Resolution and LSB: the smallest step" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Past full scale".

Chapter 3. About 55 min

## R-2R DAC

Binary weights from two resistor values, and why it needs a buffer.

Lesson | Time | What students do

R-2R DAC: bits into volts with two resistor values Four slide switches drive a 10k and 20k ladder: each bit worth half the one above it, the LSB, full scale one step short of 5 V, a predicted code, and why a ladder needs a buffer. | 55 min

- Run it: the top bit
- Each bit is half the last
- The LSB
- Full scale
- Predict: code 1010
- A load on the ladder

### Materials

- Bench power supply
- Multimeter
- Resistor x 9
- Slide switch x 5

### Check for understanding

Each student finishes "R-2R DAC: bits into volts with two resistor values" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "A load on the ladder".

Chapter 4. About 55 min

## PWM as a DAC

A pin and an RC filter: level, ripple and step.

Lesson | Time | What students do

PWM as a DAC: a pin and a filter Pin 9's PWM through a 10k and 10 uF low-pass: the duty sets the voltage, the pin still switches, a smaller capacitor shows the ripple, a predicted level, and the 19.6 mV step of 8-bit PWM. | 55 min

- Run it: duty 128
- The pin still switches
- Predict: duty 64
- Ripple
- Predict: duty 200
- One step of PWM

### Materials

- Arduino Uno R3
- Capacitor
- Multimeter
- Oscilloscope
- Resistor

### Check for understanding

Each student finishes "PWM as a DAC: a pin and a filter" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "One step of PWM".

Chapter 5. About 45 min

## ADS1115 and MCP3008

Sixteen bits and a gain amplifier against ten bits and speed.

Lesson | Time | What students do

ADS1115 and MCP3008: buying more bits A 16-bit ADS1115 on I2C and a 10-bit MCP3008 on SPI read the same input: a change only one of them sees, clipping past the range, a programmable gain that makes 0.1 V worth 12,800 counts, and the speed each trades. | 45 min

- Run it: two ADCs, one input
- A change only one can see
- Past the range
- A small signal, magnified
- Predict: the 1.024 V range

### Materials

- Arduino Uno R3
- Bench power supply
- DAC, MCP4725
- Eight-channel ADC, MCP3008
- Sixteen-bit ADC, ADS1115

### Check for understanding

Each student finishes "ADS1115 and MCP3008: buying more bits" on their own, without opening the hints. The simulator checks 5 of its 5 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Predict: the 1.024 V range".

Chapter 6. About 45 min

## MCP4725

A 12-bit DAC on I2C, read back and compared with PWM.

Lesson | Time | What students do

MCP4725: a real DAC on I2C The gallery's DAC sine: a 12-bit MCP4725 writes a 32-point sine, A0 reads it back, and pin 9 plays the same sine as PWM for comparison on the scope. | 45 min

- Run it: find the chip
- The top of the sine
- The bottom
- Read VOUT
- PWM beside it

### Materials

- Arduino Uno R3
- DAC, MCP4725
- Oscilloscope

### Check for understanding

Each student finishes "MCP4725: a real DAC on I2C" on their own, without opening the hints. The simulator checks 5 of its 5 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "PWM beside it".

Chapter 7. About 55 min

## Boss build

A 0 to 30 V meter with a divider, a self-test and a range you pick.

Lesson | Time | What students do

Boss: a 16-bit voltmeter An ADS1115 meter for 0 to 30 V: wire a bussed resistor network as an 8:1 divider, tell the sketch the ratio, check it against an MCP4725 self-test, and pick the range that fits. | 55 min

- Wire the divider
- Run it: 20 V in
- Tell it the ratio
- Self-test against the DAC
- Predict: 30 V
- Your change: a wider range

### Materials

- 8-resistor network
- Arduino Uno R3
- Bench power supply
- DAC, MCP4725
- Eight-channel ADC, MCP3008
- Oscilloscope
- Sixteen-bit ADC, ADS1115

### Check for understanding

Each student finishes "Boss: a 16-bit voltmeter" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Your change: a wider range".

Your class

## Teach this unit as a class

Start a class from this course and its 7 lessons are assigned in one go, in order. Students join with a six-character code or printed login cards, and each one’s work comes back to you.

The class tools are free for 30 days for one class of up to 20 students, with no card. The lessons themselves are free either way.

Start a class from this course See the demo class

More units

## Other lesson plans

Electronics basics 20 lessons, about 10 h. Embedded on the Arduino Uno 16 lessons, about 12 h. Embedded on the ESP32-C3 13 lessons, about 11 h. Embedded on the Raspberry Pi Pico 7 lessons, about 6 h. Build your own fight stick 5 lessons, about 4 h. Embedded on the STM32F411 6 lessons, about 6 h. C++ on a board 13 lessons, about 10 h. Digital logic and memory 4 lessons, about 4 h. Interactive devices on the Uno 9 lessons, about 8 h. From gates to a computer 23 lessons, about 16 h. Build a claw machine 8 lessons, about 6 h. Every unit All the courses as ready-made units, on the teachers page.
