Lesson plan

Build a foam dart sentry lesson plan

A foam dart desk guard built safety first: a thermal camera that finds a warm body, pan and tilt aim from its pixels, a range check, a solenoid trigger with a flyback diode, an arm switch, and no-fire zones in code.

3 chapters, 6 lessons, about 5 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

  • Pixels as directions for a pan and tilt pair, and an 8 x 8 thermal camera that tells a person from a mug.
  • An ultrasonic range check with no range no fire, and a solenoid on a MOSFET with its flyback diode and an arm switch.
  • Face height, a doorway and a lock time in code, and a desk guard with a magazine that runs out.

Materials for the whole unit

  • Arduino Uno R3
  • Bench power supply
  • Diode
  • Hobby servo x 2
  • MOSFET
  • Slide switch
  • Solenoid
  • Thermal camera, AMG8833
  • Ultrasonic ranger

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 1 h 50 min

Find and aim

Pixels as directions for a pan and tilt pair, and an 8 x 8 thermal camera that tells a person from a mug.

LessonTimeWhat students do
Pan and tilt from a heat mapTwo servos aim the launcher. A thermal camera fixed on the base gives each of its 64 pixels a direction, and one line of arithmetic turns a pixel into a pan and a tilt.55 min
  1. Run it
  2. Aim by hand
  3. A pixel is a direction
  4. Follow the heat
  5. Down the desk
Heat trackingAn 8 x 8 thermal camera finds a warm body against a cool room. Pick a threshold, find the hottest pixel, and ignore a hot mug that is not a person.55 min
  1. Sixty-four thermometers
  2. Warm enough to count
  3. Anywhere in view
  4. Not a person
  5. A colder room

Materials

  • Arduino Uno R3
  • Bench power supply
  • Diode
  • Hobby servo x 2
  • MOSFET
  • Slide switch
  • Solenoid
  • Thermal camera, AMG8833
  • Ultrasonic ranger

Check for understanding

Each student finishes "Heat tracking" 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: "A colder room".

Chapter 2. About 1 h 50 min

Range and trigger

An ultrasonic range check with no range no fire, and a solenoid on a MOSFET with its flyback diode and an arm switch.

LessonTimeWhat students do
Range checkA thermal camera cannot tell near from far. An HC-SR04 can: fire only between 1 and 3 meters, and never when there is no echo at all.55 min
  1. How far
  2. Too close
  3. Too far
  4. In range is not enough
  5. A safer minimum
A trigger solenoidA 12 V solenoid pulls the launcher’s trigger through a logic-level MOSFET, a diode catches the coil’s kick, and an arm switch decides whether any of it can happen.55 min
  1. Arm it
  2. Pull the trigger
  3. The kick
  4. Reload
  5. A faster reload

Materials

  • Arduino Uno R3
  • Bench power supply
  • Diode
  • Hobby servo x 2
  • MOSFET
  • Slide switch
  • Solenoid
  • Thermal camera, AMG8833
  • Ultrasonic ranger

Check for understanding

Each student finishes "A trigger solenoid" 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: "A faster reload".

Chapter 3. About 1 h 30 min

Safe zones and the guard

Face height, a doorway and a lock time in code, and a desk guard with a magazine that runs out.

LessonTimeWhat students do
Safe zonesPlaces the sentry must never fire: face height, a doorway, and anything it has not watched long enough. Each one is a line of code, checked before every shot.45 min
  1. Face height
  2. Lock on first
  3. The doorway
  4. A lower ceiling
Project: a desk guardPut the desk guard together: a full engagement, a magazine that runs out instead of a sentry that never stops, and your no-fire zones.45 min
  1. An engagement
  2. A magazine
  3. Your zones
  4. Guard duty

Materials

  • Arduino Uno R3
  • Bench power supply
  • Diode
  • Hobby servo x 2
  • MOSFET
  • Slide switch
  • Solenoid
  • Thermal camera, AMG8833
  • Ultrasonic ranger

Check for understanding

Each student finishes "Project: a desk guard" 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: "Guard duty".

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.