Project Summary
Simulation of System Room Physical Security Using ESP32 Microprocessor, MQTT Communication Protocol, Node-RED, Grafana, InfluxDB, Various Sensors and Materials (PIR, Temperature - Humidity, Gas - Smoke Sensors, Servo Motor, Buzzer, LED, Button).
Creating the Necessary Conditions for System Room Entrance Security.
First Condition: Receiving Command via Telegram Bot.
Second Condition: Motion Detection on PIR Sensor.
Third Condition: Entry During The Specified Hours.
Recording The Entries and Exits Made to The System Room by Recording Them in The InfluxDB Database and Sending a Notification Message to The Authorized Persons via Telegram.
Recording Temperature, Humidity, Gas and Smoke Values Inside The System Room to InfluxDB Database and Instantly Monitoring with Grafana Software.
In Case The Values Taken With The Sensors Exceed the Limit Values, Alarm is Initiated and a Warning Message is Sent to The Authorized Persons via Telegram.
Physical Image of The Project
Introduction
System Room; It is the room that contains devices such as computers, servers, storage and where all network connections pass. The amount of data in the digital world is increasing day by day. In order to ensure the security of the data, in addition to Network Security (Firewalls, etc.), the Physical Security of the System Room must also be ensured. In the Physical Security of the System Room; There are security procedures such as Entry Control to the System Room, Temperature, Humidity and Cabling Control of the System Room, UPS System for Uninterrupted Electricity, Early Warning System with Smoke Sensors against Fire and Gas Fire Extinguisher (FM200, etc.) System. The project aims to provide access control to the system room and temperature, humidity and smoke control of the system room. Only authorized persons should have access to the System Room. Entrance should be monitored with IP Camera, Multiple Controls should be requested for Entrance to the System Room and Logs of Entrances should be kept. In the project, three different controls were used for System Room Entrance. First Control; The necessary command must be sent via Telegram, the Android Messaging Application. In order to send this command, a bot user has been created in Telegram and the command is sent to this bot and received by the system. In order for the command to be accepted by the system, the Telegram User must have the necessary authorization. Commands sent by unauthorized users are not accepted by the system. Second Control; Motion Detection Control was performed at the System Room Entrance. Motion must be detected to enter the System Room. Third Control; Time Filter has been added for System Room Entrances. It is possible to enter the System Room between 07:00 in the morning and 20:00 in the evening. Entry is prohibited at any time outside these time intervals. In order to enter the System Room, all three controls must be met at the same time and the button at the entrance of the System Room must be pressed. In order to close the entrance door of the System Room, the necessary command must be sent by an authorized user via the Telegram Bot User and the door can be closed by pressing the button at the System Entrance. In cases where the System Room Entrance Door is opened or closed, the Login User and Date Information is sent to the Telegram Bot User and Authorized Persons can see this information.
Devices in System Rooms must operate uninterruptedly. In order for the devices to work properly, the temperature and humidity values of the system room must be kept at optimum levels. Since the devices operate uninterruptedly, a lot of heat dissipation occurs in the system room and external factors can also affect the temperature. Increasing the temperature may adversely affect the performance and lifetime of the devices. Increased humidity in the system room may cause problems such as corrosion or short circuits. In case of excessive decrease or increase in temperature and humidity values, the devices may turn themselves off automatically. This may cause problems in accessing data. Cooling Systems are used to keep the Temperature and Humidity at Optimum Values. In addition, Smoke Control should also be done to prevent fire in the System Room. In the project, Temperature, Humidity and Smoke Information is monitored instantaneously and the system is intended to give an alarm if predefined threshold values are exceeded. As Threshold Values, 40 for Temperature, 60 for Humidity and 400 for Smoke are determined. If one of the threshold values is exceeded, the information and date of the alarm is sent to the authorized persons in the system via Telegram Bot User. In addition, a sound is given that the alarm has started and the red light is on. If the Threshold Value or Values Return to Normal While the Alarm Continues, the Alarm is Stopped and the Information and Date that the Alarm is Stopped is Sent to Authorized Users via Telegram Bot User.
System Room Access Control Information (Telegram Command Information, Movement Information, Door Status Information), Instant Temperature, Humidity, Smoke Values and Alarm Status of the System Room are continuously recorded in a database and the data in the database can be monitored instantly through a web software.
Hardware Used
ESP32
ESP32 Microcontroller of Espressif Company was used in the project. ESP32 is a Microcontroller with integrated Wi-Fi and Bluetooth connectivity and rich features used especially for IoT Applications. In addition, the fact that the ESP32 Processor can operate at 240Mhz and has a high FLASH Memory provides an advantage over other microcontrollers. ESP32 Microcontroller is preferred in the project because the data is sent over the Internet and multiple analog sensors are used.
PIR Sensor
HC-SR501 Adjustable Infrared Motion Detection Sensor is used in the project. This sensor gives a logic 0 digital output when no motion is detected and a logic 1 digital output when motion is detected. In addition, with the adjustable potentiometers on the sensor, the detection area and dwell time of the sensor have been changed. With the adjustments made on the sensor, the detection area is 3 meters and the waiting time is approximately 10 seconds. When the PIR Sensor detects motion, it gives a logic 1 digital output for about 10 seconds, and if no other motion is detected within 10 seconds, it gives logic 0 digital output again. The PIR Sensor is used to check whether motion is detected at the system room entrance.
Servo Motor
Servo Motor is a Closed Circuit Motor System. Servo Motor Controls Angular or Linear Position, Speed and Acceleration in Mechanisms. It is generally used in Robot and RC Mechanisms. Servo Motors are used to take a desired position and not change its position until any other command is received. Tower Pro SG90 RC Mini Servo Motor Model was used in the project. This model has a rotation angle of 180 degrees and the ability to rotate 60 degrees in 0.1 seconds. The Servo Motor was used to simulate whether the door at the entrance of the system room was opened or not. At the beginning of the system, the angle of the servo motor is at 0 and when the system room door is opened, the angle of the servo motor reaches 180.
Temperature and Humidity Sensor
Temperature and Humidity Sensor is used to detect temperature and humidity information in the environment. DHT11 Temperature and Humidity Sensor Board was used in the project. The sensor measures the temperature between 0-50 °C with +/-2 error margin. It measures humidity between 20-90% with 5% error margin. This Sensor Model was preferred because it is suitable for the Temperature and Humidity Threshold Values determined in the Project and is low cost. With the Temperature and Humidity Sensor, the Temperature and Humidity Information in the Environment was taken every 3 seconds and this information was used to determine whether the system should go into alarm or not.
Gas and Smoke Sensor
MQ-2 Model was used as Gas and Smoke Sensor in the project. MQ-2 Sensor Detects Combustible Gas and Smoke in the Environment between 300-10000 PPM Concentrations. This sensor gives analog output between 0-1024 values according to the gas and smoke density in the environment. With the Gas and Smoke Sensor, Gas and Smoke Information in the Ambient Gas and Smoke Information is Received Every 3 Seconds and This Information is Used for the Purpose of Whether the System Switches to Alarm State.
Buzzer
Buzzer is a mini speaker used to make warning sounds. In the study, it is used for sound emission with approximately 250 ms intervals when the alarm starts.
LED
LED stands for Light Emitting Diode. In the project, a red LED is used for visual warning when the alarm starts.
In the project, 4 Pin Push Button is used to open the System Room Entrance Door provided that the controls are provided (Servo Motor from 0 to 180 Angle). The System Room Door cannot be opened even if the button is pressed before the controls required for opening the door are provided. Push Button is used with 1K Ω Pull-Down Resistor in the circuit. The Pull-Down Resistor ensures that the button remains at Logic 0 (0V) when the button is not pressed and at Logic 1 (5V) when the button is pressed. When the button is held down, the system is prevented from perceiving that the button has been pressed multiple times. In addition, when the button is pressed, the Interrupt Function is executed on the programming side, allowing the Interrupt Function to be executed wherever the program is running.
Technologies / Software Used
Arduino IDE
Arduino IDE is a software development platform that provides the process of compiling the codes and uploading the codes to the microcontroller connected to the USB. Arduino IDE was used for coding the study, compiling the codes and uploading the codes to the ESP32 Microcontroller.
Telegram Bot
Projede Sistem Odası Giriş Kapısının Açılması için İstenen Şartlardan Biri Telegram Bot Üzerinden Komut İstenmesiydi. Bu Amaçla İlk Olarak Telegram Üzerinde BotFather Botu Kullanılarak “SunucuOdasıBilgi” Adında Bot Kullanıcısı Oluşturulmuştur ve Bu Bot Kullanıcısına Programlama Tarafında Bağlanabilmek ve Kullanabilmek için Token ID Alınmıştır. Yetkili Bir Kişinin “SunucuOdasıBilgi” Bot Kullanıcısını Kullanabilmesi için Telegram Üzerinden User ID Bilgisi de Alınmıştır. Bot Kullanıcısı Herhangi Bir Kişi Tarafından Görüntülenebilir, Fakat Yetkisiz Kişilerin Gönderdiği Komutlar Kabul Edilmeyecektir.
Proje en baştan yapılcak.