The Smart Access System

by cos03 in Teachers > 7

1616 Views, 11 Favorites, 0 Comments

The Smart Access System

WhatsApp Image 2021-10-17 at 10.46.39 PM.jpeg
WhatsApp Image 2021-10-10 at 2.42.03 PM (2).jpeg
WhatsApp Image 2021-10-10 at 2.42.03 PM (1).jpeg
WhatsApp Image 2021-10-10 at 2.42.03 PM.jpeg

Background

Last year, we had the stem workshops in form 1 to form 3. In the stem workshops, s1 to s3 students learnt how to use the microbit for measuring hear rate, recognize the faces and sending the emails by IFTTT. In the summer, our general office was renovated. New walls and new doors were installed in our general office. However, when we opened the door of our general office, the door sometimes hit someone behind the door. It was not safe. In addition, we could not install the glass on the door because of the decreasing security level. What could we do to improve this not ideal situation? Our stem team tried to solve this problem by using the skills learnt in the stem workshops. Our preliminary design, we would consider the situation of the both safety level and the security level in our general office. In order to increase the safety and the security, we implemented the smart access system. The stem teacher used this example as an real application for students learning the microbit. They all found the interest about coding and electronic circuit which kept them engaged in learning using the micro:bit!

How can we make the smart access system? The smart access system were divided into two parts, one was the distance sensor system and the other was the face recognition system.

Supplies

投影片1.PNG
投影片2.PNG

1. Microbit x2

2. Ultrasonic Distance Sensor - HC-SR04 x 2

3. Driver Expansion Board x2

4. NeoPixel Ring - 24 x 5050 RGB LED x1

5. Breadboard x1

6. Dupont wire x 40

7. Electric Solenoid Lock x1

8. Relay 5V to 12V x1

9. 12V 2A power supply

10. huskylens x1

Hardware Connection With Blockcode Program

Neat Trug.png
507E4598-FAA6-4A47-9F96-61B30DA821BB.jpeg
8F9B3C6D-309C-43EC-BF77-BA853E64FB1C.jpeg

First, we connected one distance sensor, one microbit with one Driver Expansion Board and one NeoPixel Ring - 24 x 5050 RGB LED by using dupont wires as the circuit ( using Tinkercad's Circuit simulator to draw) . Second, we wrote the program to test the circuit. Finally, we connected two distance sensors (Two distance sensors circuit) by using different pins of microbit and rewrote the blockcode program.

Two Distance Sensors With LED Ring Controlled by Microbit.

two distance sensors model.png

P0, P1, P2, P8, 4 pins from microbit expansion board were connected to the trig pins and the echo pins of two distance sensors.

P12 pin from microbit expansion board was connected to the NeoPixel Ring - 24 x 5050 RGB LED.

How Did the Blockcode Program With One or Two Ultrasonic Sensors Work?

E5FE2414-5573-49E0-99D8-126F40AD8FE4.jpeg
WhatsApp Image 2021-10-12 at 2.52.15 PM.jpeg
A7B90F94-C586-40B1-8370-C0E45F8E43D4.jpeg
274A6C4E-E872-48AB-8D3F-21A2A80101F9.jpeg

Our idea was innovative. If the person was behind the door, the smart access system would give the warning signal. If the ultrasonic distance sensor detected the hand closer enough, it would turn NeoPixel Ring - 24 x 5050 RGB LED on and showed the led X pattern on the microbit .

The Principle of the Safety Device

4B51E85C-5D74-4467-9BC8-AD2D373511F0.jpeg
C16D799C-A46A-48E5-9E54-CB8A0CDD70F2.jpeg
2F7A48D9-F6A1-424D-89B9-71A51AB14257.jpeg

If any person was behind the door, two ultrasonic sensors installed on the plastic board which increased the sensitivity and the area of detecting coverage, would detect the person. So, the 'cross' pattern was displayed and the LED ring would be on. Otherwise, the 'tick' pattern was displayed and the LED ring would be off.

The Access System With AI Lens

E0899028-F7F4-49C4-A5AE-99A585B9CBBB.jpeg
huskylens with microbit expansion board.png
AI lens lock system.png

We used the huskylens to recognise the staff who could have the access right to the general office. By using the microbit with the Driver Expansion Board to control the electric solenoid Lock, if the huskylens recognised the staff, the microbit with the Driver Expansion Board would send the signal to the relay to open the electric solenoid Lock by using pin 8. In addition, the microbit could know the status of the electric solenoid Lock (lock or unlock) by detecting pin 0 which was high or low (optional but not necessary).

Huskylens With Microbit

09594B03-D2ED-477F-8F11-84318627DFB0.jpeg
B8646D2C-AD71-4400-8123-9080DBBFBE5E.jpeg
97A12489-C2D7-4A13-8F5F-DDB0D6E54A4F.jpeg
53F23EE9-CBD7-49DE-89F9-2B0269AF3C7E.jpeg
42CC23D1-7AF8-4D86-9096-298CDCB20938.jpeg

The Huskylens learnt the images by the face recognition function, embedded in the huskylens. Four possible images that the Huskylens could learn. By writing the block codes, the AI system could recognise the face which could give the 'tick' symbol or the 'cross' symbol on the LED of the Microbit. In addition, by using the relay, converting 5 V to 12 V signal, the electric solenoid lock could be controlled by AI system.

The Demonstration of Safety Device ( Distance Sensors)

demonstration of one distance sensors
demonstation of two distance sensors
demonstration of click and cross signal
demonstration of simulation of the obstacle behind the door
The demonstration of walking under this safety system
  • The demonstration of one distance sensor
  • The demonstration of two distance sensors
  • The demonstration of click and cross signal
  • The demonstration of the simulation of the obstacle behind the door by using the chair as obstacle
  • The demonstration of walking under this safety system

The Demonstration of AI Lens Recognition

demonstration of AI lens face recognition to unlock the solenoid lock part 2
demonstration of AI lens face recognition to unlock the solenoid lock part 1

The solenoid lock was unlocked for about 2 seconds if the AI lens recognised the authorised person, the staff.

LED Ring on or Off According to the Obstacle Under the Safety Device.

WhatsApp Image 2021-10-11 at 5.59.56 PM (8).jpeg
WhatsApp Image 2021-10-11 at 5.59.56 PM (7).jpeg
WhatsApp Image 2021-10-11 at 5.59.56 PM (6).jpeg

The Smart Access System ( Higher Safety and Higher Security)

WhatsApp Image 2021-10-11 at 5.59.56 PM (4).jpeg
WhatsApp Image 2021-10-11 at 5.59.56 PM (5).jpeg
WhatsApp Image 2021-10-11 at 5.59.56 PM (1).jpeg
WhatsApp Image 2021-10-11 at 5.59.56 PM.jpeg
WhatsApp Image 2021-10-11 at 5.59.56 PM (2).jpeg

The Huskylens was installed with the pan and tilt system which made by two servos controlled by the microbit. This design could be applied to change the orientation of the Huskylens to adapt the real situation. At the same time, the microbit with huskylens controlled the door in the general office. The LED ring as the alarm light, were installed on the wall. When the people was behind the door, the alarm light would be on. The students saw these applications. They said that the smart access system was amazing.