Introduction: A Mediam Volteg 11KV Scada System Using an Arduino, Raspberry Pi, Php, Mysql, and Python

About: I work in the South Cairo Electricity Distribution Company, researcher and developer of systems. I worked on many projects, including automatic control of medium and low voltage networks, and face and fingerpr…

Through this research paper, we will review the possibility of building an industrial RTU unit to control an electric distributor of medium voltage 11 kV, meaning that it is 11 thousand volts, or 11,000 volts.

By using a set of open source tools such as

Raspberry Pi , Arduino Mega with its Arduino C language , Python , php , mysql , SQL and Apache server

Supplies

XAMP server (LOCALHOST)

  1. PHP
  2. MYSQL
  3. PHPmyadmin
  4. SQL

Raspberry Pi

Arduino Mega with its Arduino C language

Python 2.7

RS-485

FLASH MODEM

Step 1: Distributors 11 KV

Distribution substations are located near to the end-users. Distribution substation transformers change the transmission or subtransmission voltage to lower levels for use by end-users. Typical distribution voltages vary from 34,500Y/19,920 volts to 4,160Y/2400 volts.

34,500Y/19,920 volts is interpreted as a three-phase circuit with a grounded neutral source. This would have three high-voltage conductors or wires and one grounded neutral conductor, a total of four wires. The voltage between the three phase conductors or wires would be 34,500 volts and the voltage between one phase conductor and the neutral ground would be 19,920 volts.

From here the power is distributed to industrial, commercial, and residential customers.


Substations are designed to accomplish the following functions, although not all substations have all these functions:

  • Change voltage from one level to another
  • Regulate voltage to compensate for system voltage changes
  • Switch transmission and distribution circuits into and out of the grid system
  • Measure electric power qualities flowing in the circuits
  • Connect communication signals to the circuits
  • Eliminate lightning and other electrical surges from the system
  • Connect electric generation plants to the system
  • Make interconnections between the electric systems of more than one utility
  • Control reactive kilovolt-amperes supplied to and the flow of reactive kilovolt-amperes in the circuits


The major components of a typical substation are:

Air Circuit Breaker

Batteries

Bus Support Insulators

Capacitor Bank

Circuit Switchers

Concrete Foundation

Conduits

Control House

Control Panels

Control Wires

Converter Stations

Coupling Capacitors

Current Transformers

Disconnect Switches

Distribution Bus

Duct Runs

Frequency Changers

Grounding Resistors

Grounding Transformers

High-Voltage Underground Cables

High-Voltage Fuses

Lightning Arresters

Manholes

Metal-clad Switchgear

Meters

Microwave

Oil Circuit Breakers

Potential Transformers

Potheads

Power-line Carrier

Power Transformers

Rectifiers

Relays

SF6 Circuit Breakers

Shunt Reactors

Steel Superstructures

SupervisoryControl

Suspension Insulators

Synchronous Condensers

Transmission Bus

Vacuum Circuit Breakers

Step 2: RTU

We will have to utilise more than one tool at the same time when developing RTU.

Make contact with the control room.

In order to communicate with the control room, devices such as the Raspberry Pi and the flash modem are used.To make that connection, we'll need a flash modem with a static IP address, as we'll be using the TCP / IP protocol.

The Modbus protocol is at the heart of MODBUS RTU and MODBUS TCP/IP, and they all exchange data via Modbus register address. But what's the distinction between them? Today, we will look at them from the following perspectives.


The notion is unique.

MODBUS is a common industrial control data exchange protocol that may be used to communicate protocol data in RTU and ASCII. RTU sends data directly as binary data, but TCP transforms each byte of binary data into a predefined two-digit hexadecimal string and then serially joins them to transmit data as TCP code. RTU is the most often utilised approach.


The manner of communication differs.

MODBUS TCP is the comparable communication mode for Ethernet. Asynchronous serial transmission (through different media such as wired RS 232/422/485/; optical fibre, wireless, etc.), using MODBUS RTU or MODBUS ASCII as the associated communication mode. Modbus PLUS is the high-speed token-passing network and communication mode.


Protocol encapsulation is distinct.

Modbus TCP protocol adds an MBAP message header to RTU protocol, and because TCP is based on dependable connection service, the CRC check code in RTU protocol is no longer required, hence there is no CRC check code in Modbus TCP protocol. As a result, a famous saying goes: Modbus TCP protocol indicates Modbus RTU protocol is OK by adding five 0 yuan and one 6 yuan in front, and then eliminating two CRC check code bytes.


Various roles

The Modbus RTU protocol allows controllers to interact with one another and with other devices through a network.

The Modbus/IP protocol bridges the gap between the transport and network layers.

Transmission varies.

The Modbus RTU protocol's use is limited due to its small transmission distance and sluggish speed.

Because of its long transmission distance and fast transmission speed, the Modbus/IP protocol is frequently utilised.

Various uses

The Modbus RTU protocol is mostly used in electrical automation and process control, and it often employs an RS Kramp-Karrenbauer 232 or RS Kramp-Karrenbauer 485 communication interface.

Modbus/IP is mostly utilised over the Internet or intranet.

Modbus communication protocol includes numerous varieties that support serial ports (mostly RS 485 bus) and several Ethernet versions, the most well-known of which are Modbus RTU, Modbus ASCII, and Modbus TCP. In the industrial sphere, the Modbus RTU protocol is widely used, and the Modbus communication protocol based on serial communication often refers to the Modbus RTU communication protocol.

NOTE: Data encryption must be used between the RTU and the control room's primary server.

Take a look at our :Raspberry Pi + USB modem


Modbus can also be used to acquire electrical loads and voltages from protective devices.

Modbus is a serial communication standard that has evolved into a de facto standard communication protocol and is now widely used to link industrial electronic equipment. The physical layer in Modbus RTU and Modbus ASCII is RS485. A Raspberry Pi may be used as a Master or Slave in Modbus applications, although an RS485 interface is required. Our RS422 / RS485 Serial HAT is a completely galvanic isolated serial communication HAT developed for use with the Raspberry Pi that is ideal for such applications.

The purpose of this paper is to demonstrate how to configure the HAT and the Raspberry Pi for Modbus serial connection.

Take a look at our : How to Use Modbus With Raspberry Pi


Creating control points from outputs and inputs and transferring them to the control room

Starting to build the control points and transferring the state of the circuit breaker from the distributor is done using Arduino, knowing that the Raspberry Pi has analogue and digital points, but their number does not correspond to our project because the target distributor has a large number of circuit breakers. The following information is necessary to display the points that must be managed and cases that must be transmitted to the control room.

For example, the number of circular breakers and the number of instances for each circular sector, such as the case of separation and connection, automated disconnection owing to a flaw

Controlling the circuit breakers by separating and joining, and all of this is taken into account when deciding the kind of Arduino, and I now utilised two Arduino megas because the distributor had 14 toroidal breakers. Each circular sector has two control states, disconnecting and joining, and three states are transmitted. To regulate the state of each breaker, connection, or disconnected due to a fault.

Relays were employed as an intermediate between the Arduino and the control pins in the circuit breakers to safeguard the Arduino and the Raspberry Pi, which are the two key components in developing our project's RTU.

As a result, the relay gets the order to disconnect or connect from the Arduino, and there are three relays to convey the annular sector's status.

Relays were employed as an intermediate between the Arduino and the control pins in the circuit breakers to safeguard the Arduino and the Raspberry Pi, which are the two key components in developing our project's RTU.

As a result, the relay gets the order to disconnect or connect from the Arduino, and there are three relays to convey the annular sector's status.

And to protect the Arduino and the Raspberry Pi, which are the two main components in building the RTU of our project, relays were used to act as an intermediary between the Arduino and the control pins in the circuit breakers.

So that the relay receives the command to disconnect or connect from the Arduino, and there are three relays to transfer the state of the annular sector

Make RTU a reality

And this is through Python, as it is responsible for achieving communication through the flash modem to receive the commands of the control room to disconnect or connect and transfer the status of each circular breaker in our distributor in the event that there is an event on a ring breaker within the system, through its connection to Arduino through the USB port

 It is also responsible for decoding the commands it receives and encrypting the data that will be sent to the control room

It is also in charge of establishing the MODBAS connection and creating an array to link to the safety precautions for the transfer of electrical loads and entrance cell voltage.

Now we can declare RTU is ready to run, but without initiating a connection because the server in the control room has yet to be created.

Step 3: Equipping the Control Room and Constructing the Server

Building a server to communicate with the RTU unit, which we have previously discussed, is done by providing a computer with standard specifications, as the amount of data that will be sent to the RTU units is encrypted numerical values, but if there will be more than one RTU unit, the server must have higher specifications, which will be determined by the size of the project and its requirements.

Because it affects the server's construction, the operating system for the server was either Windows or Linux, but in our project, we chose Microsoft Windows.

SET UP SERVER APACHE

A server must be constructed in order for our RTU devices to connect with each other using EASYPHP or Xampp.

This communication is mostly carried out along two axes.

The first is a connection to a flash modem.

The second is php files, which are in charge of receiving data from the RTU at the electrical distributor, which is reflected in (electrical loads - voltages - circuit breaker status).

Save the values to the database.

An essential point to note here is that we are dealing with a crucial form of object programming OOP, as if a portion of the system fails, the entire process is entirely disturbed, thus the implementation must be carefully considered.

Our server configuration includes the creation of PHP files.

We must understand that PHP files, if present, include Structured Query Language (SQL) and JavaScript files.