A Smart Magnetic Lock-based Solution That May Be Used to Safeguard Medium Voltage Transformer Rooms.

by Sayed Mostafa in Circuits > Arduino

386 Views, 0 Favorites, 0 Comments

A Smart Magnetic Lock-based Solution That May Be Used to Safeguard Medium Voltage Transformer Rooms.

FBHLY0OJOIXWPKN.png
A Smart Magnetic Lock-based Solution That May Be Used to Safeguard Medium Voltage Transformer Rooms.
The mechanism for closing electrical panels with a single phrase
The mechanism for closing electrical panels with a single phrase

In this study article, I will examine the feasibility of employing a magnetic lock to secure medium voltage transformer rooms from theft, because they are positioned outside without guards and their exposure to theft has a detrimental impact on the quality and continuity of electrical supply.

The system will be constructed on the concept of the Internet of Things, thus the process of opening the electrical transformer rooms will be through a control room with a graphical interface that allows the operator to search for the transformer room to be opened.

This article will also provide the programe code and electronic circuit design in an open source way, as well as the specifications for the transformer room door and ventilation apertures.

Initially, a similar project was built, but it relied on the keyboard to enter the password, based on a programme that generates those passwords, so that the password changed every time the panel was closed, based on algorithms and mathematical equations based on the type of non-sequential digital encryption. Furthermore, the password was created in three dimensions.

Supplies

61ty6ixaXRL._AC_SY355_.jpg
download.png
51id2ezpnHL.jpg

The components that will be provided have nothing to do with how the transformer room is built or how its door is constructed because they vary depending on the target network. What will be provided has to do with the programming languages and electronic parts that will be employed.

  • ESP8266 Nodemcu
  • MIFI

( It will function as an RTU )

  • Batteries

( to ensure the system's electrical power in the case of a sustained power loss in the transformer room, either by an electrical defect or a disconnection for other purposes )

  • magnatic lock door

Please take note : The battery capacity is decided by the current and the number of working hours for which the current is expected to be secured.

A Circuit

FBHLY0OJOIXWPKN.png

In essence, the ESP8266 development board uses the integrated regulator to draw 9 volts from the power source. The ground connects to the source on the mosfet, and the positive from the power supply goes to the magnet. The magnet receives the embryo's drainage.

As a result, pin 5 on the microcontroller opens the gate on the embryo. When the pin is turned on, this enables 9 volts to flow to the magnet. The opamp receives the transducer's analogue signal, amplifies it, and transmits the result to the analogue pin. To pin 14, the infrared sensor delivers a digital signal indicating that the door is closed. The microcontroller supplies 3.3V electricity to the opamp and infrared sensor simultaneously.

Since I use that thicker steel plate, I've discovered that utilising 9 volts instead of the 12 volt rated magnets allows them to operate considerably cooler while still being pretty strong. Additionally, the microcontroller's regulator is only able to withstand up to 9 volts. The resistors and diodes must also be added in the order they are shown in the diagram.

I should mention that you might not need an op-amp in this situation, depending on whether you're installing a piezo vibration sensor and how long you wire it. The sensor's outer loop may simply be connected to ground and the other wire to the analogue input with a 1M resistor in between. The op amp is only amplified.

We used two sensors: one to check that the seal was tight and the other to detect vibrations.

Code for Microcontroller

/*
* ESP8266 NodeMCU LED Control over WiFi Demo
*/
#include <ESP8266WiFi.h>
#include <WiFiClient.h>

//ESP Web Server Library to host a web page
#include <ESP8266WebServer.h>

//---------------------------------------------------------------
//Our HTML webpage contents in program memory
const char MAIN_page[] PROGMEM = R"=====(
<!DOCTYPE html>
<html>
<body>
<center>
<h1>WiFi magnatic lock door demo: 1</h1><br>
Ciclk to turn <a href="ledOn">DOR ON</a><br>
Ciclk to turn <a href="ledOff">DOR OFF</a><br>
<hr>
</center>

</body>
</html>
)=====";
//---------------------------------------------------------------
//On board LED Connected to GPIO2
#define LED 2

//SSID and Password of your WiFi router
const char* ssid = "circuits4you.com";
const char* password = "123456789";

//Declare a global object variable from the ESP8266WebServer class.
ESP8266WebServer server(80); //Server on port 80

//===============================================================
// This routine is executed when you open its IP in browser
//===============================================================
void handleRoot() {
Serial.println("You called root page");
String s = MAIN_page; //Read HTML contents
server.send(200, "text/html", s); //Send web page
}

void handleLEDon() {
Serial.println("LED on page");
digitalWrite(LED,LOW); //LED is connected in reverse
server.send(200, "text/html", "LED is ON"); //Send ADC value only to client ajax request
}

void handleLEDoff() {
Serial.println("LED off page");
digitalWrite(LED,HIGH); //LED off
server.send(200, "text/html", "LED is OFF"); //Send ADC value only to client ajax request
}
//==============================================================
// SETUP
//==============================================================
void setup(void){
Serial.begin(115200);

WiFi.begin(ssid, password); //Connect to your WiFi router
Serial.println("");

//Onboard LED port Direction output
pinMode(LED,OUTPUT);
//Power on LED state off
digitalWrite(LED,HIGH);

// Wait for connection
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}

//If connection successful show IP address in serial monitor
Serial.println("");
Serial.print("Connected to ");
Serial.println(ssid);
Serial.print("IP address: ");
Serial.println(WiFi.localIP()); //IP address assigned to your ESP

server.on("/", handleRoot); //Which routine to handle at root location. This is display page
server.on("/ledOn", handleLEDon); //as Per <a href="ledOn">, Subroutine to be called
server.on("/ledOff", handleLEDoff);

server.begin(); //Start server
Serial.println("HTTP server started");
}
//==============================================================
// LOOP
//==============================================================
void loop(void){
server.handleClient(); //Handle client requests
}

Controls for Web Apps

The simplest definition of a web application is a web page with some javascript that sends instructions to the web server we built on the microcontroller. On AWS S3, I constructed a static site for it, and a GUI was made to display it. The door may now be opened, locked, or left unlocked. In order to run the door from any location with an internet connection, it will also be possible to protect the app and set up my network.

The IP address used in the code must be changed to your microcontroller's. The IP address is locked down by my router, so it will never change.