Lesson plan

Build a smart lock lesson plan

A keypad with a constant-time check, RFID, a fingerprint, a relay-driven bolt, an EEPROM log and a three-factor door, with honest security notes.

2 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

  • A code, a latch, a card and a finger, each on its own.
  • Logs, lockouts and three factors together.

Materials for the whole unit

  • Arduino Uno R3
  • Buzzer
  • Fingerprint sensor, R30x / AS608
  • Keypad, 4x3 telephone
  • Relay module
  • RFID reader, MFRC522
  • Solenoid

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 3 h 10 min

Ways in

A code, a latch, a card and a finger, each on its own.

LessonTimeWhat students do
Keypad codesTake a code from a 4x3 keypad without echoing it, and compare it in constant time so the timing of a wrong guess gives nothing away.55 min
  1. A lock with three ways in
  2. Never echo the code
  3. The right code
  4. A wrong code, timed
  5. Hear it
The latchSwitch a 12 V solenoid bolt through a relay for three seconds on the right code, and see why fail secure and fail safe are different promises.45 min
  1. Twelve volts, half an amp
  2. Open
  3. Bolt pulled
  4. Locks itself
RFID cardsRead MIFARE card UIDs with an MFRC522, open for the one on the list, and learn why a UID on its own is a name, not a password.45 min
  1. Hold a card
  2. The right card
  3. Someone else's card
  4. Why a UID is weak
FingerprintLet an R30x fingerprint sensor match a finger against its own library, and open for enrolled fingers only.45 min
  1. A sensor that does the work
  2. Enrolled finger
  3. A stranger
  4. Open by finger

Materials

  • Arduino Uno R3
  • Buzzer
  • Fingerprint sensor, R30x / AS608
  • Keypad, 4x3 telephone
  • Relay module
  • RFID reader, MFRC522
  • Solenoid

Check for understanding

Each student finishes "Fingerprint" 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: "Open by finger".

Chapter 2. About 1 h 50 min

A door

Logs, lockouts and three factors together.

LessonTimeWhat students do
Logs and lockoutLock out three wrong codes in a row, for longer each time, and keep a ring of the last 16 events in EEPROM that survives the power going off.45 min
  1. Remember everything
  2. Three strikes
  3. Even the right code
  4. Read the log
Project: a three-factor doorDemand something you have, something you are and something you know, in order and in time, with the log and the lockout behind them.65 min
  1. Three factors
  2. The card
  3. The finger
  4. The code
  5. Out of order
  6. Make it yours, safely

Materials

  • Arduino Uno R3
  • Buzzer
  • Fingerprint sensor, R30x / AS608
  • Keypad, 4x3 telephone
  • Relay module
  • RFID reader, MFRC522
  • Solenoid

Check for understanding

Each student finishes "Project: a three-factor door" 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: "Make it yours, safely".

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.