Skip to content

Project for the UNITN course "Embedded Software for the Internet of Things"

Notifications You must be signed in to change notification settings

mosearc/smart_lock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SMART LOCK - Project for the UniTn course "Embedded Software for the Internet of Things" (group 5)

Image

Section links

Description

The project consists on a microcontroller device handling the mechanism that opens and closes a door. Its job is to take as inputs two authentication factors with sensors (i.e. RFID scanner for NFC card scan; NUMPAD for PIN or PUK), then contact a remote server on an IP network though WiFi: basing on server's response, it then decides if opening the door or not. Our project also implements brute force prevention security measures, like asking for PUK after 3 wrong PIN insertions. Our model could handle N smart locks all connected to the same server through IP internet: this allows to add/remove/check identities remotely, but also to monitor when and who access any specific door (i.e. NFC cards and PINs can be created/deleted using a simple web app or mobile application; specific doors can be blocked in specific daily hours; etc.)

Video

Video

Link video

Presentation

Link presentation

Requirments

Hardware Requirements

1] MSP432P401R Board + Educational booster pack (led, display):

Image Image

For our project we used MSP432P401R Board, a microcontroller from Texas Instruments based on a 32-bit ARM Cortex-M4 CPU. The Educational Booster Pack with its additional hardware peripherals is also required. With the led and the lcd in the boosterpack we display the information about the status which are useful for the user.

2] RFID SENSOR

Image

This component provides information about the nfc card; needs a power supply of 3.3V to operate. It sends informations to the board throught SPI protocol.

3] PIN PAD

Image

This component implements the second authentication factor, it is used to collect the pin code.

4] ESP8266MOD (server-to-msp interconnection through WiFi internet access):

Image

MCU capable of connecting WiFi to send IP packets and capable to serially communicate through UART with the MSP432. When the MSP432 needs to contact the server, it can send to the ESP8266 a specific command through UART (to check if a NFC card is authorized to open this specific door, for example). The ESP8266 will forward it to the server using its WiFi module; when receives a response from the server, it informs back the MSP432.

5] SERVER:

Any computer accessible from the lock MCU through IP network which is also capable of running Nodejs.

6] DOOR OPEN SYSTEM

Image Image

This system consists in a servo motor that opens the door when the pir sensor detects a movement. In order to work properly, it needs a power supply of 5V taken from the board.

Software requirements

1] Code Composer Studio

2] Arduino ide

  • ESP8266 Library / Arduino_JSON

3] Visual Studio Code

  • Nodejs / npm

Project Layout

.
├── Esp8266
│   └── main_esp.cpp
├── msp432p401r
│   ├── Debug
│   │   ├── makefile
│   │   └── syscfg
│   │       ├── ti_drivers_config.c
│   │       └── ti_drivers_config.h
│   ├── main_nortos.c
│   ├── Modules
│   │   ├── Buzzer
│   │   │   ├── buzzer.c
│   │   │   └── buzzer.h
│   │   ├── NFC
│   │   │   ├── mfrc522.c
│   │   │   ├── mfrc522.h
│   │   │   ├── nfc.c
│   │   │   └── nfc.h
│   │   ├── PinPad
│   │   │   ├── LcdDriver.c
│   │   │   ├── LcdDriver.h
│   │   │   ├── pin_pad.c
│   │   │   └── pin_pad.h
│   │   ├── PIR
│   │   │   ├── pir.c
│   │   │   └── pir.h
│   │   ├── Servo
│   │   │   ├── servo.c
│   │   │   └── servo.h
│   │   └── UART
│   │       ├── uart.c
│   │       └── uart.h
│   └── servo.syscfg
└── Server
    ├── app.js
    ├── db.json
    ├── package.json
    ├── package-lock.json
    └── protocol.txt

Software Design

Image

Getting Started

  • Mount the hardware.
  • Clone the repo:
git clone https://github.com/mosearc/smart_lock.git
  • Open the folder corresponding to the module you want to compile/upload/run using the appropriate IDE (as specified in Software requirements section). Make sure to obtain and import the libraries needed.

Next Features

  • Buzzer implementation as an alarm when the system is locked
  • More interrupts usage (i.e. for PIR sensor)
  • Additional remote server functionalities
  • Side apps development for handling locks/cardIds/pins
  • Activation/deactivation of specific doors basing on daily time

Team members

We always met each other in person to work at the project

  • Mosè Arcaro
  • Stefano Camposilvan
  • Gabriel Fumagalli
  • Luca Bortolotti

About

Project for the UNITN course "Embedded Software for the Internet of Things"

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published