Lesson plan

Debug like an engineer lesson plan

The multimeter, the oscilloscope, the logic probe and analyzer, Serial done right, and a method that finds any fault. Ends with a boss: three bugs in one circuit.

3 chapters, 6 lessons, about 2 hours, on the Arduino Uno R3. Every lesson runs in the browser, with nothing to install.

The unit

Objectives and materials

By the end, students can

  • Volts across, amps in line, and the checks you make with the power off.
  • A scope for shapes and edges, a probe and an analyzer for ones and zeros.
  • Print debugging done well, then reproduce, isolate, measure and fix on a real fault.

Materials for the whole unit

  • Arduino Uno R3
  • Capacitor
  • Full-size breadboard
  • LED
  • Logic analyzer, four channels
  • Logic probe x 2
  • Multimeter x 3
  • Oscilloscope
  • Potentiometer
  • Pushbutton
  • Resistor
  • Slide switch

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 40 min

The multimeter

Volts across, amps in line, and the checks you make with the power off.

LessonTimeWhat students do
The multimeter: volts across, amps throughTwo meters on one LED circuit: a voltmeter across the LED and an ammeter in the loop. Why one goes across and the other goes in line, and how to check Ohm's law against real readings.20 min
  1. Across for volts, in line for amps
  2. Read the LED's voltage
  3. Read the current
  4. Change the resistor, predict, then measure
  5. The LED barely moved
  6. Quick check
The power-off checks: ohms, continuity and diodesThree meters on a circuit with no supply at all: one reading a resistor, one beeping across a switch, one testing an LED. Why these checks need the power off, and what each one tells you.20 min
  1. Why the power has to be off
  2. Ohms: is it the value it says?
  3. Swap the resistor, trust the meter
  4. Continuity: is it connected?
  5. Diode test: is the LED alive?
  6. Quick check

Materials

  • Full-size breadboard
  • LED
  • Multimeter x 3
  • Resistor
  • Slide switch

Check for understanding

Each student finishes "The power-off checks: ohms, continuity and diodes" 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: "Quick check".

Chapter 2. About 35 min

Seeing signals

A scope for shapes and edges, a probe and an analyzer for ones and zeros.

LessonTimeWhat students do
What a scope sees: PWM, rise time and a bouncing buttonA meter gives you one number; an oscilloscope gives you the shape. Measure a PWM pin's frequency and duty, watch an RC slow its edges down, and catch a button bouncing a dozen times in one press.20 min
  1. A pin that is never at 3.7 V
  2. Measure the duty
  3. Rise time: why edges are not instant
  4. Make the edges fast
  5. Catch the button bouncing
  6. Two ways to debounce
Logic probe and logic analyzerA logic probe says high, low or nothing; a logic analyzer records the ones and zeros and decodes them into bytes. Find a floating pin, fix it with a pull-up, and read serial straight off the wire.15 min
  1. Is this pin high or low?
  2. The pin nobody drives
  3. Fix it with a pull-up
  4. Read serial off the wire
  5. Which tool when

Materials

  • Arduino Uno R3
  • Capacitor
  • Full-size breadboard
  • Logic analyzer, four channels
  • Logic probe x 2
  • Multimeter
  • Oscilloscope
  • Pushbutton
  • Resistor

Check for understanding

Each student finishes "Logic probe and logic analyzer" 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: "Which tool when".

Chapter 3. About 40 min

The method

Print debugging done well, then reproduce, isolate, measure and fix on a real fault.

LessonTimeWhat students do
Reading Serial like a proPrint debugging done well: labeled and timestamped lines, a warning word you can search for, and a verbose switch you flip from the Serial Monitor without rebuilding.15 min
  1. A line that means something on its own
  2. A word you can search for
  3. Turn the chatter on and off
  4. Ask the board how it is
  5. What printing costs
Boss: one circuit, three bugsA button and an LED that do nothing, with three faults planted at once. Use the method engineers use (reproduce, isolate, measure, fix) and a meter to find all three.25 min
  1. The complaint, and the method
  2. Bug 1: the input side
  3. Isolate the output: measure the resistor
  4. Bug 2: turn the LED round
  5. Measure again
  6. Bug 3: the wrong resistor
  7. What it was

Materials

  • Arduino Uno R3
  • Full-size breadboard
  • LED
  • Multimeter
  • Potentiometer
  • Pushbutton
  • Resistor

Check for understanding

Each student finishes "Boss: one circuit, three bugs" on their own, without opening the hints. The simulator checks 7 of its 7 steps as they go.

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

Your class

Teach this unit as a class

Start a class from this course and its 6 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.