Skip to content

G1: Museum Anti theft System

Mariam Ramadan edited this page May 29, 2023 · 63 revisions

Museum Anti-theft System

Submitted By

Name Github
Mariam Elsaqa mariamelsaqa
Mariam Ali mariamramadan1
Mohamed Ali Mohamedakhalil
Kirolos Mikhail KirolosAssaad

Github Repo

https://github.com/mariamelsaqa/MuseumAntiTheftSystem

The proposal

The proposal is to create a system that can be used in museums to prevent theft of works of art. The system will be composed of a camera that will be responsible for capturing the images of a thief when change in the pressure of the floor is detected, which shall also trigger an alarm. Admins will be able to see the images captured by the camera in real time through a web application. To turn off the alarm the admin will have to enter the correct password through a numberpad.

Project Design

Identified Components

Component Image
Nucleo STM32 board for the MCU stmm-removebg-preview
Force Sensitive Resistor Sensor unnamed (1)
LILLYGO CAM LILLYGO
ESP32 Screenshot_2023-05-29_at_3 43 57_AM-removebg-preview
Buzzer buzzer-removebg-preview
Keypad keypad-removebg-preview
LCD Display with serial interface adapter module Screenshot_2023-05-29_at_2 34 41_AM-removebg-preview
LEDs led-removebg-preview

Architecture

The following diagrams show the architecture of the system from both hardware and software perspectives.

Block Diagram

WhatsApp Image 2023-05-29 at 8 11 51 AM

This diagram shows the main hardware components of our system and how they are integrated together. The buzzer and LEDs serve as our alarm system. This Alarm system can be controlled by the user via the keypad in order to authorize themselves. The voltage divider circuit is the one responsible for measuring changes that may happen to museum artifacts. The voltage is dropped across the resistor and force-sensitive resistor. As the weight of the artifact decreases, the resistance increases which decreases the voltage input at the Analog to Digital Converter pin at the STM.

Flowchart

Flowchart
This flowchart illustrates how different modules interact with each other on the software level. At the beginning, the main module will keep polling for the force sensor reading. If the reading decreases than a certain threshold, which means the artifact is being tampered with, then it will check for the authorization of the user. The user can authorize themselves through the attached keypad. If the password mismatches then there is a security breach in the system and the alarm will trigger. The alarm is composed of a buzzer, LED, and ESP32 Camera to identify the thief. Otherwise, then the access was authorized and the theft is eliminated.

Timeline

  1. Experiment with the sensor to determine the correct amount of resistance in the voltage divider circuit and start integrating it with the MCU ADC peripheral.
  2. Integrating the alarm system as it is dependent on the FSR readings.
  3. Integrating the keypad module with the system to allow for authorized access.
  4. Setting up a web server and linking it to the ESP32 camera to be able to identify the user in case of a breach.

First Update

We were able to get each component functional on its own, but we did not integrate them yet to have a fully functional system.

  1. The pressure sensor can detect when the artifact is removed and it turns on the alarm and the LED
  2. The ESP-32 camera is working and can take footage.
  3. The keypad is fully functional using polling.
    slides

Demo for the pressure sensor, buzzer and LED

buzzer.mov

Demo for the functional ESP-32 camera

camera.mov

Demo for the keypad

polling.mov

Challenges

The most challenging part was to get the ESP-32 camera functional as it was hard to interface the ESP-32 camera.

TO-DO

1- Integrate the whole system.
2- The camera should capture a photo and send it to a drive when the artifact is moved.
3- The alarm should be turned off when the passcode is entered correctly.
4- Test the system.

Second Update

We were able to integrate all the components to have the following functionality:

  • When the weight of the artifact decrease, the buzzer and the LED are triggered and a picture is captured for who is moving the artifact.
  • The LCD asks for a password which can be entered, if the password is correct, the alarm and the LED will be turned off.
    slides

Our Final Connections

Screenshot 2023-05-29 at 9 11 08 AM
  • We connect the buzzer and LED with the same GPIO_Output pin.
  • We connect the upper pins of the keypads with 4 GPIO_Output pins, GND, 3v3 respectively.
  • We connect the lower pins of the keypads with 4 GPIO_Input pins, GND, 3v3 respectively.
  • We connect the LCD with I2C SCL and SDA.
  • We connect the FSR with ADC (add 100k resistance) and GND.
  • We connect the ESP with Ground and GPIO_Output.

Recorded Demo

IMG_4507.MOV

Output Photo

Screenshot 2023-05-29 at 9 34 34 AM

How to Replicate

To initially integrate the system:

  • we had to trigger the buzzer and LED by interrupts not polling.

To get the ESP-32 CAM work:

  • We configured LILLYGO as a server that only works when it gets called to send a picture.
  • The host laptop works as a server that contains a GET Request that requests the picture from LILLYGO server.
  • ESP-32 receives a trigger from STM (the same as the one received by the buzzer and LED) to call the host laptop API.

How to Deploy

prerequisites

  • Keil V5
  • CubeMX
  • ESP-IDF
  • NPM
  • Node JS & Express JS

Steps

  • Open CubeMX and configure PA0-PA1-PA4-PA5 as GPIO_Input, configure PA6 till PA8, PA11, PA12 as GPIO_Output.
  • Configure UART2, ADC1, I2C1.
  • In the LILLYGO directory run this command: idf.py build flash monitor
  • In the ESP-32 directory run this command: idf.py build flash monitor
  • In the backend server directory run this command: npm run dev

Future work

  • deploy the server on the cloud.
  • create a 3D case for the whole system.
  • Add face detection using tiny machine learning.

References

Clone this wiki locally