Source: https://mokxi.com/teachers/plans/build-smart-lock
Updated: 2026-11-19

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.

Start a class from this course

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.

Lesson | Time | What students do

Keypad codes Take 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

- A lock with three ways in
- Never echo the code
- The right code
- A wrong code, timed
- Hear it

The latch Switch 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

- Twelve volts, half an amp
- Open
- Bolt pulled
- Locks itself

RFID cards Read 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

- Hold a card
- The right card
- Someone else's card
- Why a UID is weak

Fingerprint Let an R30x fingerprint sensor match a finger against its own library, and open for enrolled fingers only. | 45 min

- A sensor that does the work
- Enrolled finger
- A stranger
- 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.

Lesson | Time | What students do

Logs and lockout Lock 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

- Remember everything
- Three strikes
- Even the right code
- Read the log

Project: a three-factor door Demand 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

- Three factors
- The card
- The finger
- The code
- Out of order
- 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.

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.
