Lesson 10: Power Station Security System
INTRODUCTION
In this lesson, we’ll explore how face recognition technology keeps power stations safe! Using the Unihiker K10 board, we’ll build a system to control access to equipment areas—only registered faces get in!
PREPARATION

ENGAGE

Let’s look at an image of a real face recognition entry system.
Notice how workers use special tools to enter secure zones. Today, we’ll use face recognition—a smart technology that checks if you’re allowed in!
Discussion Questions:
“Have you used face unlock on a phone? How does it work?”
“Why is it safer than a password for a power station?”
Imagine a power station: It has big machines and sensitive equipment. Workers need to enter, but strangers shouldn’t!
Real-World Link:
Many modern power stations (like wind or solar farms) are far from cities. They use face recognition to let workers in automatically—no need for guards! If an unregistered person tries to enter, the system sends a warning.
EXPLORE
Let’s Test Face Detection!
Core Teaching Steps
Goal:
Build a simple program to detect faces and find out when it fails.
Connection:

Coding:

Run the code—you’ll see a live video feed. When a face is detected, the screen will show “Face Found!”.
Experiment & Record:

Group Activity:
Work in pairs—one person acts as the "face provider," the other changes the test case.
EXPLAIN
Core Teaching Steps
Goal:
Understand the steps of face recognition.
Group Discussion:
Why Can’t the Camera “See” Covered Faces or Faces in Dark?
Facial Features: The camera looks for key parts like eyes. If these are covered (e.g., by a scarf), there’s nothing to “read”!
Lighting: Like how you can’t read a book in the dark, the camera needs light to “see” facial details clearly.
Steps of Face Recognition:
Step 1: Face Detection
What it does: The camera “looks” for a face (like finding a human face shape in a picture).
Step 2: Feature Extraction
What it does: The system picks out unique parts (like the distance between eyes, or the shape of a nose).
Step 3: Face Matching
What it does: Compares the new face’s features to a “library” of registered faces.

Guide thinking:
Why It Matters for Power Stations?
If a stranger’s face doesn’t match the library, the system shouts (or sends a message): “Warning! Unregistered person near equipment!”
CHALLENGE
Build Your Own Power Station Security System!
Core Teaching Steps
Goal:
Program the K10 to “learn” faces (Button A) and “recognize” faces (Button B).
Coding:

Explanation:
1.
: collect and learn recognized faces. After successful learning, an ID (starting from 1) will be automatically assigned to each face. Up to 48 faces can be learned. No need to re-learn after power off.
2.
: This is a check to see if the face is known. When “face id = -1”, it means the face is NOT recognized (like a stranger). When “not(face id =-1)”, which means “face id ≠-1”, it means the face IS recognized. So when this check is true, the program shows "welcome" because it sees a known face!
Test:
One student acts as the “engineer” (presses A to register their face).
Others test with their faces—observe if the system alerts for unregistered users.
Coding:

1. ![]()
tells the Unihiker K10 to forget all the face IDs it has learned before. .
2.
shows a welcome message on the screen. It combines "welcome, staff No." with the face ID number, so you can see which staff member has been recognized.
Test:
One student acts as the “engineer” and one acts as the “visitor”(presses A to register their face).
Then test with their faces—observe whether the system shows the number of registered users.

CONCLUSION
Recap:
Face recognition keeps power stations safe by checking who enters equipment areas.
It works in 3 steps: detect the face, extract features, match to a library.
You built a real system with the K10—now you’re mini power station security experts!








