Lesson plan

3D printer and CNC basics lesson plan

Learn what a printer’s firmware does underneath: homing, temperature control with safety, G-code motion and runout detection.

2 chapters, 4 lessons, about 4 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

  • Find zero with an endstop, then move two axes from G-code lines.
  • Hold a heater at temperature, catch a loose sensor and pause for empty spools.

Materials for the whole unit

  • Arduino Uno R3
  • Filament lamp
  • Full-size breadboard
  • LED
  • Limit switch, lever microswitch x 2
  • MOSFET
  • Photo interrupter, slot
  • Piezo speaker
  • Pushbutton
  • Resistor x 4
  • Slide switch
  • Stepper driver, A4988 x 2
  • Stepper motor, NEMA 17 x 2
  • Thermistor, 10k NTC

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 2 h

Motion

Find zero with an endstop, then move two axes from G-code lines.

LessonTimeWhat students do
Stepper homingHow a printer finds zero: an A4988, a NEMA 17 and an endstop, a fast seek, a back-off and a slow second touch, then moves inside software limits.60 min
  1. Steps are not position
  2. Refuse to move blind
  3. You are the carriage
  4. Software endstops
A mini G-code interpreterSend G28, G0, G1 and M114 to a two-axis plotter line by line, and see what a firmware does with each one: home, interpolate, report, answer ok.60 min
  1. One line at a time
  2. Home first
  3. G28
  4. A straight diagonal

Materials

  • Arduino Uno R3
  • Limit switch, lever microswitch x 2
  • Stepper driver, A4988 x 2
  • Stepper motor, NEMA 17 x 2

Check for understanding

Each student finishes "A mini G-code interpreter" on their own, without opening the hints. The simulator checks 4 of its 4 steps as they go.

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

Chapter 2. About 2 h

Printing safely

Hold a heater at temperature, catch a loose sensor and pause for empty spools.

LessonTimeWhat students do
Heated bed PID and thermal runawayA thermistor, a MOSFET and a PID loop that hold a bed at temperature, and the protection that switches the heater off when the reading stops following it.60 min
  1. What is real and what is modeled
  2. Heat the bed
  3. Drop the thermistor
  4. Break the wire
A filament runout sensorAn optical runout sensor, a debounce, the filament still in the path after the sensor, and a pause that waits for new filament and a press of resume.60 min
  1. Where the sensor sits
  2. Load filament
  3. Run out
  4. Reload and resume

Materials

  • Arduino Uno R3
  • Filament lamp
  • Full-size breadboard
  • LED
  • MOSFET
  • Photo interrupter, slot
  • Piezo speaker
  • Pushbutton
  • Resistor x 4
  • Slide switch
  • Stepper driver, A4988
  • Stepper motor, NEMA 17
  • Thermistor, 10k NTC

Check for understanding

Each student finishes "A filament runout sensor" on their own, without opening the hints. The simulator checks 4 of its 4 steps as they go.

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

Your class

Teach this unit as a class

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