Smart Substation
Smart Substation
CHAPTER: 1
INTRODUCTION
II.CONVENTIONAL METHOD
B. Problem statement:
The conventional method uses GSM. Since IOT is cost effective compared to SMS, monitoring
of energy usage at lower cost is made possible. The system is more reliable and accurate reading
values are collected from energy using devices. Live readings of devices can be viewed using
Android application. Also, the readings can be viewed online. The human interference is
avoided and all the values are kept maintained in the central server. Maintenance is poor
compared to proposed system. III.PROPOSED METHOD a.Introduction The main process of a
transmission system is to transfer electric power from electric generators to customer area,
whereas a distribution system provides an ultimate link between high voltage transmission
systems and consumer services. In other words, the power is distributed to different customers
from the distribution system through feeders, distributors and service mains. Supplying
electricity to consumers necessitates power generation, transmission, and distribution. Nuclear
power generators, thermal power generators and hydraulic power generators used to generate
the power and then transmitted through transmission systems medium. Power departs from the
generator and enters into a transmission substation, where huge transformers convert the
generator's voltage to extremely high voltages (155kV to 765 kV) for long-distance (up to about
300 miles) transmission. Voltage level is reduced using step down transformers and power is
transferred to customers for their usage through electric power distribution systems. Power
Now-a-days the demand for electricity is increasing at a constant rate in the population and is
being utilized for various purposes via, agriculture, industries, household purposes, hospitals
etc.,. So, it is becoming more and more complicated to handle the electricity maintenance and
requirements. Therefore there is an immediate requirement to save as much electricity as
possible. As the demand from the newer generations of population for electricity is increasing
so in along with it the technology improvement is needed. The proposed system uses the IOT
technology. Also there are other issues that we have to address such as power theft which in turn
generate economic loss to the nation. Monitoring, Optimized power usage and reduction of
power wastage are the major objectives that lie ahead for a better system. Smart Sub Station
energy meter using Wi-Fi system is designed based on three major objectives. They are:- 1. To
provide automated load energy reading over an immediate basis. 2. Reduce the power wastage.
3. To improve quality of power. 4. Remote sensing to Maintain Continuity of supply 5. Real
time monitoring. The data from the system is displayed on a webpage which can be accessed by
the EB service provider. The system is designed on an Arduino micro controller. The 3
divisions of the project is Controller, theft detection circuit and a WiFi unit. The controller
performs the basic calculations and processes the information. Theft detection circuit provides
information about any extra or theft load energy reading and the most important role is played
by the Wi-Fi unit to send the information from the controller over the Internet.
CHAPTER 2
Block Diagram:
HARDWARE REQUIREMENT
SOFTWARE REQUIREMENT
Multisim
Aurdino IDE for Programming
Power supply is the main part of the circuit; the circuit needs the12V DC supply. But in our
home 230 AC supply is available. So it has converted it to 12V DC and 5V DC by Rectifier
circuit by regulator IC 7812 and 7805 respectively.
Arduino/Genuino Uno:
"Uno" means one in Italian and was chosen to mark the release of Arduino Software (IDE) 1.0.
The Uno board and version 1.0 of Arduino Software (IDE) were the reference versions of
Arduino, now evolved to newer releases. The Uno board is the first in a series of USB Arduino
boards, and the reference model for the Arduino platform; for an extensive list of current, past or
outdated boards see the Arduino index of boards.
Technical specs
Microcontroller ATmega328P
Operating Voltage 5V
32 KB (ATmega328P)
Flash Memory
of which 0.5 KB used by boot loader
SRAM 2 KB (ATmega328P)
EEPROM 1 KB (ATmega328P)
LED_BUILTIN 13
Length 68.6 mm
Width 53.4 mm
Weight 25 g
LCD
LCD (Liquid Crystal Display) screen is an electronic display module and find a wide range of
applications. A 16x2 LCD display is very basic module and is very commonly used in various
devices and circuits. These modules are preferred over even segments and other multi
segment LEDs. The reasons being: LCDs are Economical; easily programmable; have no
limitation of displaying special & even custom characters (unlike in seven
segments), animations and so on.
When the Input voltage is 12V (max) the voltage across R2 ohm resistor is tuned still it becomes
5V which is feedback to the analog pin RA0 of the PIC
The ADC module of PIC converts analog input to 10 bit digital number. We want to convert this
digital to corresponding voltage in decimal.
0v = 0 0 0 0
5v = 1 1 1 1
= 5/1023
= 4.887 mV
Thus it means that for a change in 4.887mV, the binary output changes by 1.
The microcontroller-compatible current sensor module you can build yourself, using an
inexpensive 8-pin chip as an ‘active shunt’ for measuring ac/dc current levels up to 20 Amperes.
First of all, note that the circuit as it stands is only really intended to show how a basic current
sensor module can be built and act as a stimulus for further improvement. The design is centered
around a fully integrated, linear current sensorACS712from Allegro. The sensor (in SOIC8
package) consists of a precise, low-offset, linear Hall-effect sensor circuit with a copper
conduction path located near the surface of the die. Applied current flowing through this copper
conduction path generates a magnetic field which is sensed by the integrated Hall-effect sensor
and converted into a proportional voltage. The output of the ACS712has a positive slope
(>VIOUT(Q)) when an increasing current flows through the primary copper conduction path
(from pins 1 and 2, to pins 3 and 4), which is the path used for current sensing.
BUZZER:
LM35 Temp-sensor:
The LM35 series are precision integrated-circuit temperature devices with an output voltage
linearly-proportional to the Centigrade temperature. The LM35 device has an advantage over
linear temperature sensors calibrated in Kelvin, as the user is not required to subtract a large
constant voltage from the output to obtain convenient Centigrade scaling. The LM35 device does
not require any external calibration or trimming to provide typical accuracies of ±¼°C at room
temperature and ±¾°C over a full −55°C to 150°C temperature range. Lower cost is assured by
trimming and calibration at the wafer level. The low-output impedance, linear output, and precise
inherent calibration of the LM35 device makes interfacing to readout or control circuitry
especially easy. The device is used with single power supplies, or with plus and minus supplies.
As the LM35 device draws only 60 µA from the supply, it has very low self-heating of less than
0.1°C in still air. The LM35 device is rated to operate over a −55°C to 150°C temperature range,
while the LM35C device is rated for a −40°C to 110°C range (−10° with improved accuracy).
The LM35-series devices are available packaged in hermetic TO transistor packages, while the
LM35C, LM35CA, and LM35D devices are available in the plastic TO-92 transistor package.
The LM35D device is available in an 8-lead surface-mount small-outline package and a plastic
TO-220 package.
CHAPTER: 3
CIRCUIT DIAGRAM
WORKING PRINCIPLE:
The proposed work is designed for fully automatic manner with use of IOT. Here the output side
we can take a parameter of feeder information and breaker circuit. For information gathering and
controlling process voltage, current and frequency data are collected to the ArduinoUno
controller and it compare the value feed in that controller. If the changes in value are displayed
by IOT and sending SMS as to GSM. In addition the feeder information also sends to GSM and
we can control that operation through GSM command with use of AT command. If any feeder
and breaker fault occur the controller automatically send SMS to user or operator. From this we
can controlled easy without any network interferences. All the process takes over by android
mobile no need of PC problem. From this we can achieve the automation of substation feeder
and breaker circuit. All the status of our project is displayed by using LCD display. The typical
ThingSpeak workflow lets you: 1. Create a Channel and collect data 2. Analyze and visualize the
data. System can be used to display load energy usage reading in terms of Watts. Every user
would be able to access the information from anywhere on the earth. Thingspeak.com is one
such webpage which takes the help of the MathWorks MATLAB analytics to present the device
information in a more detailed analysis in both description and visualization. Thingspeak.com
provides the user the ability to add any number of channels to one account and in each account
information can be fed into 8 fields. An account can be assigned to one division of an area and n
channels can be created to a suite of n meters in the locality. The analytics can be viewed by both
the consumer and service provider. Since IOT is cost effective compared to SMS, monitoring of
energy usage at lower cost is made possible. Live readings of devices can be viewed using
Android application. Also, the readings can be viewed online. The human interference is avoided
and all the values are kept maintained in the central server. The communication medium is
secure and tampering of energy meters or theft of electricity can be identified easily. If an error
occurs in the system, the value in the central server will not be updated.
Flow Chart:
CHAPTER: 4
DESIGN
Transformer Voltage
A transformer's required secondary A.C. voltage varies greatly with the type of rectifier
chosen and filters arrangement. Use the formulas below as a guide based on the D.C. voltage you
require and the rectifier/filter chosen. All A.C. voltage references are R.M.S. Don't
Forget to take into account losses (not included in this guide), especially diode voltage drop.
Leave an adequate safety margin for D.C. regulator voltage
Requirements and minimum operating line voltage.
The basic criteria for choosing a microcontroller suitable for the application are
1) The first and foremost criterion is that it must meet the task at hand efficiently and cost
effectively. In analyzing the needs of a microcontroller-based project, it is seen whether
an 8- bit, 16-bit or 32-bit microcontroller can best handle the computing needs of the
task most effectively. Among the other considerations in this category are:
Packaging: It may be a 40-pin DIP (dual inline package) or a QFP (quad flat package),
or some other packaging format. This is important in terms of space, assembling, and
prototyping the end product.
Cost per unit: This is important in terms of the final cost of the product in which a
microcontroller is used.
Three general steps can be followed to appropriately select the control system:
Step # 1: Identify measurable variables important to production. It is very important to correctly
identify the parameters that are going to be measured by the controller’s data acquisition
interface, and how they are to be measured.
Step # 2: Investigate the control strategies. An important element in considering a control system
is the control strategy that is to be followed. The simplest strategy is to use threshold sensors that
directly affect actuation of devices.
Step # 3: Identify the software and the hardware to be used. Hardware must always follow the
selection of software, with the hardware required being supported by the software selected. In
addition to functional capabilities, the selection of the control hardware should include factors
such as reliability, support, previous experiences with the equipment (successes and failures),
and cost.
CHAPTER 5
COMPONENTS
Arduino Uno:
Arduino / Genuino Uno is open-source hardware! You can build your own board using the
follwing files:
Programming
The Arduino/Genuino Uno can be programmed with the (Arduino Software (IDE)). Select
"Arduino/Genuino Uno from the Tools > Board menu (according to the microcontroller on your
board). For details, see the reference and tutorials.
DEPT OF ELECTRICAL AND ELECTRONICS ENGG.
Page 21 of 49
Smart Substation using IOT
The ATmega328 on the Arduino/Genuino Uno comes preprogrammed with a boot loader that
allows you to upload new code to it without the use of an external hardware programmer. It
communicates using the original STK500 protocol (reference, C header files).
You can also bypass the boot loader and program the microcontroller through the ICSP (In-
Circuit Serial Programming) header using Arduino ISP or similar; see these instructions for
details.
The ATmega16U2 (or 8U2 in the rev1 and rev2 boards) firmware source code is available in the
Arduino repository. The ATmega16U2/8U2 is loaded with a DFU boot loader, which can be
activated by:
On Rev1 boards: connecting the solder jumper on the back of the board (near the map of
Italy) and then rese ing the 8U2.
On Rev2 or later boards: there is a resistor that pulling the 8U2/16U2 HWB line to
ground, making it easier to put into DFU mode.
You can then use Atmel's FLIP software (Windows) or the DFU programmer (Mac OS X and
Linux) to load a new firmware. Or you can use the ISP header with an external programmer
(overwriting the DFU bootloader). See this user-contributed tutorial for more information.
Warnings
The Arduino/Genuino Uno has a resettable polyfuse that protects your computer's USB ports
from shorts and overcurrent. Although most computers provide their own internal protection, the
fuse provides an extra layer of protection. If more than 500 mA is applied to the USB port, the
fuse will automatically break the connection until the short or overload is removed.
The Uno differs from all preceding boards in that it does not use the FTDI USB-to-serial driver
chip. Instead, it features the Atmega16U2 (Atmega8U2 up to version R2) programmed as a
USB-to-serial converter.
Power
The Arduino/Genuino Uno board can be powered via the USB connection or with an external
power supply. The power source is selected automatically.
External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or battery.
The adapter can be connected by plugging a 2.1mm center-positive plug into the board's power
jack. Leads from a battery can be inserted in the GND and Vin pin headers of the POWER
connector.
Vin. The input voltage to the Arduino/Genuino board when it's using an external power
source (as opposed to 5 volts from the USB connection or other regulated power source).
You can supply voltage through this pin, or, if supplying voltage via the power jack,
access it through this pin.
5V.This pin outputs a regulated 5V from the regulator on the board. The board can be
supplied with power either from the DC power jack (7 - 12V), the USB connector (5V),
or the VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses
the regulator, and can damage your board. We don't advise it.
3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50
mA.
GND. Ground pins.
IOREF. This pin on the Arduino/Genuino board provides the voltage reference with
which the microcontroller operates. A properly configured shield can read the IOREF pin
voltage and select the appropriate power source or enable voltage translators on the
outputs to work with the 5V or 3.3V.
Memory
The ATmega328 has 32 KB (with 0.5 KB occupied by the bootloader). It also has 2 KB of
SRAM and 1 KB of EEPROM (which can be read and written with the EEPROM library).
Each of the 14 digital pins on the Uno can be used as an input or output, using pinMode(),
digitalWrite(), and digitalRead() functions. They operate at 5 volts. Each pin can provide or
receive 20 mA as recommended operating condition and has an internal pull-up resistor
(disconnected by default) of 20-50k ohm. A maximum of 40mA is the value that must not be
exceeded on any I/O pin to avoid permanent damage to the microcontroller.
The Uno has 6 analog inputs, labeled A0 through A5, each of which provide 10 bits of resolution
(i.e. 1024 different values). By default they measure from ground to 5 volts, though is it possible
to change the upper end of their range using the AREF pin and the analogReference() function.
There are a couple of other pins on the board:
AREF. Reference voltage for the analog inputs. Used with analogReference().
Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset
button to shields which block the one on the board.
Communication
Arduino/Genuino Uno has a number of facilities for communicating with a computer, another
Arduino/Genuino board, or other microcontrollers. The ATmega328 provides UART TTL (5V)
serial communication, which is available on digital pins 0 (RX) and 1 (TX). An ATmega16U2
on the board channels this serial communication over USB and appears as a virtual com port to
software on the computer. The 16U2 firmware uses the standard USB COM drivers, and no
external driver is needed. However, on Windows, a .inf file is required. The Arduino Software
(IDE) includes a serial monitor which allows simple textual data to be sent to and from the
board. The RX and TX LEDs on the board will flash when data is being transmitted via the
USB-to-serial chip and USB connection to the computer (but not for serial communication on
pins 0 and 1).
A SoftwareSerial library allows serial communication on any of the Uno's digital pins.
The ATmega328 also supports I2C (TWI) and SPI communication. The Arduino Software (IDE)
includes a Wire library to simplify use of the I2C bus; see the documentation for details. For SPI
communication, use the SPI library.
Rather than requiring a physical press of the reset button before an upload, the Arduino/Genuino
Uno board is designed in a way that allows it to be reset by software running on a connected
computer. One of the hardware flow control lines (DTR) of the ATmega8U2/16U2 is connected
to the reset line of the ATmega328 via a 100 nanofarad capacitor. When this line is asserted
(taken low), the reset line drops long enough to reset the chip. The Arduino Software (IDE) uses
this capability to allow you to upload code by simply pressing the upload button in the interface
toolbar. This means that the bootloader can have a shorter timeout, as the lowering of DTR can
be well-coordinated with the start of the upload.
This setup has other implications. When the Uno is connected to either a computer running Mac
OS X or Linux, it resets each time a connection is made to it from software (via USB). For the
following half-second or so, the bootloader is running on the Uno. While it is programmed to
ignore malformed data (i.e. anything besides an upload of new code), it will intercept the first
few bytes of data sent to the board after a connection is opened. If a sketch running on the board
receives one-time configuration or other data when it first starts, make sure that the software with
which it communicates waits a second after opening the connection and before sending this data.
The Uno board contains a trace that can be cut to disable the auto-reset. The pads on either side
of the trace can be soldered together to re-enable it. It's labeled "RESET-EN". You may also be
able to disable the auto-reset by connecting a 110 ohm resistor from 5V to the reset line; see this
forum thread for details.
Revisions
Revision 3 of the board has the following new features:
1.0 pinout: added SDA and SCL pins that are near to the AREF pin and two other new
pins placed near to the RESET pin, the IOREF that allow the shields to adapt to the
voltage provided from the board. In future, shields will be compatible with both the board
that uses the AVR, which operates with 5V and with the Arduino Due that operates with
3.3V. The second one is a not connected pin, that is reserved for future purposes.
Stronger RESET circuit.
Atmega 16U2 replace the 8U2.
Relay
Relay is an electromagnetic device which is used to isolate two circuits electrically and
connect them magnetically. They are very useful devices and allow one circuit to switch another
one while they are completely separate. They are often used to interface an electronic circuit
DEPT OF ELECTRICAL AND ELECTRONICS ENGG.
Page 25 of 49
Smart Substation using IOT
(working at a low voltage) to an electrical circuit which works at very high voltage. For example,
a relay can make a 5V DC battery circuit to switch a 230V AC mains circuit. Thus a small sensor
circuit can drive, say, a fan or an electric bulb.
A relay switch can be divided into two parts: input and output. The input section has a
coil which generates magnetic field when a small voltage from an electronic circuit is applied to
it. This voltage is called the operating voltage. Commonly used relays are available in different
configuration of operating voltages like 6V, 9V, 12V, 24V etc. The output section consists of
contactors which connect or disconnect mechanically. In a basic relay there are three contactors:
normally open (NO), normally closed (NC) and common (COM). At no input state, the COM is
connected to NC. When the operating voltage is applied the relay coil gets energized and the
COM changes contact to NO. Different relay configurations are available like SPST,
SPDT, DPDT etc, which have different number of changeover contacts. By using proper
combination of contactors, the electrical circuit can be switched on and off. Get inner details
about structure of a relay switch.
Pin Diagram:
LCD
LCD (Liquid Crystal Display) screen is an electronic display module and find a wide
range of applications. A 16x2 LCD display is very basic module and is very commonly used in
various devices and circuits. These modules are preferred over seven segments and other multi
segment LEDs. The reasons being: LCDs are economical; easily programmable; have no
limitation of displaying special & even custom characters (unlike in seven
segments), animations and so on.
A 16x2 LCD means it can display 16 characters per line and there are 2 such lines. In this
LCD each character is displayed in 5x7 pixel matrix. This LCD has two registers, namely,
Command and Data.
The command register stores the command instructions given to the LCD. A command is
an instruction given to LCD to do a predefined task like initializing it, clearing its screen, setting
the cursor position, controlling display etc. The data register stores the data to be displayed on
the LCD. The data is the ASCII value of the character to be displayed on the LCD. Click to learn
more about internal structure of a LCD.
Pin Diagram:
Pin Description:
Pin
Function Name
No
1 Ground (0V) Ground
2 Supply voltage; 5V (4.7V – 5.3V) Vcc
3 Contrast adjustment; through a variable resistor VEE
4 Selects command register when low; and data register when Register Select
high
5 Low to write to the register; High to read from the register Read/write
6 Sends data to data pins when a high to low pulse is given Enable
7 DB0
8 DB1
9 DB2
10 DB3
8-bit data pins
11 DB4
12 DB5
13 DB6
14 DB7
15 Backlight VCC (5V) Led+
16 Backlight Ground (0V) Led-
L293D Description
L293D is a typical Motor driver or Motor Driver IC which allows DC motor to drive on
either direction. L293D is a 16-pin IC which can control a set of two DC motors simultaneously
in any direction. It means that you can control two DC motor with a single L293D IC. Dual H-
bridge Motor Driver integrated circuit (IC).
The l293d can drive small and quiet big motors as well, check the Voltage Specification
at the end of this page for more info. You can Buy L293D IC in any electronic shop very easily
and it costs around 70 Rupees (INR) or around 1 $ Dollar (approx Cost) or even lesser cost. You
can find the necessary pin diagram, working, a circuit diagram, Logic description and Project as
you read through.
Concept
It works on the concept of H-bridge. H-bridge is a circuit which allows the voltage to be
flown in either direction. As you know voltage need to change its direction for being able to
rotate the motor in clockwise or anticlockwise direction, Hence H-bridge IC are ideal for driving
a DC motor.
In a single l293d chip there two h-Bridge circuit inside the IC which can rotate two dc
motor independently. Due its size it is very much used in robotic application for controlling DC
motors. Given below is the pin diagram of a L293D motor controller.
There are two Enable pins on l293d. Pin 1 and pin 9, for being able to drive the motor,
the pin 1 and 9 need to be high. For driving the motor with left H-bridge you need to enable pin 1
to high. And for right H-Bridge you need to make the pin 9 to high. If anyone of the either pin1
or pin9 goes low then the motor in the corresponding section will suspend working. It’s like a
switch.
TIP: you can simply connect the pin16 VCC (5v) to pin 1 and pin 9 to make them high.
Working of L293D
The 4 input pins for this l293d, pin 2,7 on the left and pin 15 ,10 on the right as shown on
the pin diagram. Left input pins will regulate the rotation of motor connected across left side and
right input for motor on the right hand side. The motors are rotated on the basis of the inputs
provided across the input pins as LOGIC 0 or LOGIC 1.In simple you need to provide Logic 0 or
1 across the input pins for rotating the motor.
Voltage Specification
VCC is the voltage that it needs for its own internal operation 5v; L293D will not use this
voltage for driving the motor. For driving the motors it has a separate provision to provide motor
supply VSS (V supply). L293d will use this to drive the motor. It means if you want to operate a
motor at 9V then you need to provide a Supply of 9V across VSS Motor supply.
The maximum voltage for VSS motor supply is 36V. It can supply a max current of
600mA per channel. Since it can drive motors Up to 36v hence you can drive pretty big motors
with this l293d.
VCC pin 16 is the voltage for its own internal Operation. The maximum voltage ranges
from 5v and up to 36v.
4.4 Miscellaneous
Regulator IC
Resisters
What is a Resistor?
An electric resistor is a two-terminal passive component specifically used to oppose and
limit current. A resistor works on the principle of Ohm’s Law which states that voltage across
the terminals of a resistor is directly proportional to the current flowing through it.
Ohm’s Law: V = IR\
Where V is the voltage applied across resistor,
I is the current flowing through it,
And R is the constant called resistance.
The unit of resistance is ohms.
Types of Resistors:
Resistors can be broadly classified based on the following criteria: the type of material used the
power rating and resistance value.
1. Fixed resistors.
In some scenarios, an electrical circuit may need a lesser amount of current to flow
through it than the input value. Fixed resistors are used in these situations to limit the flow of
current.
1.1 Carbon Composition Resistors:
These resistors are cylindrical rods which are a mixture of carbon granules and powdered
ceramic. The resistor value depends on the composition of the ceramic material. A higher
quantity of ceramic content will result in more resistance. Since the rod is coated with an
insulated material, there are chances of damage due to excessive heat caused by soldering.
High current and voltage can also damage the resistor. These factors bring irreversible
changes in the resistance power of these resistors. This type of resistor is
Rarely used nowadays due to their high cost and are only preferred in power supply and
welding circuits.
Capacitors
What is a Capacitor?
A capacitor is a passive two terminal component which stores electric charge. This
component consists of two conductors which are separated by a dielectric medium. The potential
difference when applied across the conductors polarizes the dipole ions to store the charge in the
dielectric medium. The circuit symbol of a capacitor is shown below:
The capacitance or the potential storage by the capacitor is measured in Farads which is
symbolized as ‘F’. One Farad is the capacitance when one coulomb of electric charge is stored in
the conductor on the application of one volt potential difference.
Q = CV
dQ/dt = d (CV)/dt
I = C (dV/dt)
As you turn on the power supply, the current begins to flow through the capacitor inducing the
positive and negative potentials across its plates. The capacitor continues to charge until the
T]=[-;0liknybtrexhe capacitor is switched off. The charging and discharging of the capacitor is
given by a time constant.
· coupling of two stages of a circuit (coupling of an audio stage with a loud speaker)
· delay applications (as in 555 timer IC controlling the charging and discharging)
· phase alteration.
The conductors offer a series resistance and if the capacitor is constructed using tubular
structure then some inductance is also induced. The dielectric medium between the plates has an
electric field strength limit and also passes a small amount of leakage current which results into a
Breakdown voltage.
Diode
What is a Diode?
A Diode is the simplest two-terminal unilateral semiconductor device. It allows current
to flow only in one direction and blocks the current that flows in the opposite direction. The two
terminals of the diode are called as anode and cathode. The symbol of diode symbol is as shown
in the figure below.
CHAPTER 5
CODE
//////////////////////////////
const int analog_temp = A2; // Analog input pin that the potentiometer is attached to
const int analog_volt = A1; // Analog output pin that the LED is attached to
const int analog_crt = A3; // Analog output pin that the LED is attached to
const int relay = A5;
const int oilswitch = 7;
const int buzzer = 5;
/////////////////////////////
void setup()
{
Serial.begin(9600);
espSerial.begin(115200);
pinMode(relay, OUTPUT);
pinMode(buzzer, OUTPUT);
pinMode(oilswitch, INPUT);
digitalWrite(oilswitch, HIGH);
digitalWrite(relay, HIGH);
digitalWrite(buzzer, HIGH);
lcd.begin(16, 2);
lcd.setCursor(0, 0);
lcd.print("###WEL-COME###");
lcd.setCursor(0, 1);
lcd.print("IOT-TRF-PRCT-PROJECT");
delay(2000);
lcd.clear();
lcd.setCursor(0, 0);
DEPT OF ELECTRICAL AND ELECTRONICS ENGG.
Page 39 of 49
Smart Substation using IOT
lcd.print("Initilization...");
lcd.setCursor(0, 1);
lcd.print("ESP-8266 module");
sensor.calibrate();
//espData("AT+RST", 10000, DEBUG); //Reset the ESP8266 module
espData("AT+CWMODE=1", 2000, DEBUG); //Set the ESP mode as station mode
//espData("AT+CWJAP=\""+ mySSID +"\",\""+ myPWD +"\"", 10000, DEBUG); //Connect
to WiFi network
/* while(!espSerial.find("OK"))
{
//Wait for connection
}*/
delay(1000);
}
void loop()
{
get_sensor_val ();
lcd_display();
take_action();
if (count >= 15)
{
wifi_iot ();
count=00;
}
count++;
delay(1000);
}
void get_sensor_val ()
{
crt_temp=0.00;
DEPT OF ELECTRICAL AND ELECTRONICS ENGG.
Page 40 of 49
Smart Substation using IOT
for(int i=0;i<=1000;i++)
{
voltage = voltage + analogRead(analog_volt);
}
voltage= (voltage/1000);
voltage= (voltage/35);
for(int i=0;i<=1000;i++)
{
temperature = temperature + analogRead(analog_temp);
}
temperature= (temperature/1000);
temperature = (temperature * 0.48828125)-5.0;
AmpsRMS = sensor.getCurrentDC();
if(AmpsRMS < 0.00)
{
AmpsRMS = 0.00;
}
else
{ AmpsRMS = AmpsRMS+0.30;
for(int i=0;i<=1000;i++)
{
crt_temp = crt_temp + analogRead(analog_crt);
}
crt_temp= (crt_temp/1000);
crt_temp = (crt_temp * 0.0048828125);
}
//Serial.print(AmpsRMS);
//Serial.println(" Amps RMS");
DEPT OF ELECTRICAL AND ELECTRONICS ENGG.
Page 41 of 49
Smart Substation using IOT
oillevel = digitalRead(oilswitch);
Serial.print("\n******************************");
Serial.print("\n Trf-Temp=");
Serial.print(temperature);
Serial.print("\n Trf-voltage=");
Serial.print(voltage);
Serial.print("\n Trf-current=");
Serial.print(AmpsRMS);
Serial.print("\n Trf-crt_temp=");
Serial.print(crt_temp);
Serial.print("\n******************************\n\n");
}
void take_action()
{
if ( temperature >= 45)
{
Serial.print("\n Trf trip on high temp");
lcd.clear ();
lcd.setCursor(0, 0);
lcd.print("TRF-TRIP");
lcd.setCursor(0, 1);
lcd.print("TEMP-HIGH:");
lcd.print(temperature);
digitalWrite(relay, LOW);
digitalWrite(buzzer, LOW);
}
else if ( voltage >= 15)
{
Serial.print("\n Trf trip on under Volatge");
DEPT OF ELECTRICAL AND ELECTRONICS ENGG.
Page 42 of 49
Smart Substation using IOT
lcd.clear ();
lcd.setCursor(0, 0);
lcd.print("TRF-TRIP");
lcd.setCursor(0, 1);
lcd.print("OVER-VLTG:");
lcd.print(voltage);
digitalWrite(relay, HIGH);
digitalWrite(buzzer, LOW);
}
else if ( voltage <= 8.5)
{
Serial.print("\n Trf trip on under Volatge");
lcd.clear ();
lcd.setCursor(0, 0);
lcd.print("TRF-TRIP");
lcd.setCursor(0, 1);
lcd.print("UNDER-VLTG:");
lcd.print(voltage);
digitalWrite(relay, HIGH);
digitalWrite(buzzer, LOW);
}
else if ( crt_temp >= 2.5)
{
Serial.print("\n Trf trip on over current");
lcd.clear ();
lcd.setCursor(0, 0);
lcd.print("TRF-TRIP");
lcd.setCursor(0, 1);
lcd.print("OVER-CRT:");
lcd.print(crt_temp);
DEPT OF ELECTRICAL AND ELECTRONICS ENGG.
Page 43 of 49
Smart Substation using IOT
digitalWrite(relay, HIGH);
digitalWrite(buzzer, LOW);
}
else if ( oillevel == LOW)
{
Serial.print("\n Trf trip on oillevel low");
lcd.clear ();
lcd.setCursor(0, 0);
lcd.print("TRF-TRIP");
lcd.setCursor(0, 1);
lcd.print("OIL-LEVEL-LOW");
digitalWrite(relay, HIGH);
digitalWrite(buzzer, LOW);
}
else {
digitalWrite(relay, LOW);
digitalWrite(buzzer, HIGH);
}
}
void wifi_iot ()
{
/* Here, I'm using the function random(range) to send a random value to the
ThingSpeak API. You can change this value to any sensor data
so that the API will show the sensor data
*/
lcd.clear ();
lcd.setCursor(0, 0);
lcd.print("Sending Values to IOT");
lcd.setCursor(0, 1);
DEPT OF ELECTRICAL AND ELECTRONICS ENGG.
Page 44 of 49
Smart Substation using IOT
lcd.print("PLZ wait....!!!");
sendVal = random(1000); // Send a random number between 1 and 1000 voltage temperature
String sendData = "GET /update?api_key="+ myAPI +"&"+ "field1"
+"="+String(voltage)+"&"+ "field2" +"="+String(crt_temp)+"&"+ "field3"
+"="+String(temperature)+"&"+ "field4" +"="+String(oillevel);
espData("AT+CIPMUX=1", 1000, DEBUG); //Allow multiple connections
espData("AT+CIPSTART=0,\"TCP\",\""+ myHOST +"\","+ myPORT, 1000, DEBUG);
espData("AT+CIPSEND=0," +String(sendData.length()+4),1000,DEBUG);
espSerial.find(">");
espSerial.println(sendData);
Serial.print("Value to be sent: ");
Serial.println(sendVal);
espData("AT+CIPCLOSE=0",1000,DEBUG);
delay(1000);
}
String espData(String command, const int timeout, boolean debug)
{
//lcd.clear ();
//lcd.setCursor(0, 0);
//lcd.print(String("CMD:")+ String (command));
Serial.print("\n");
Serial.print("AT Command ==> ");
Serial.print(command);
Serial.println(" ");
String response = "";
espSerial.println(command);
long int time = millis();
while ( (time + timeout) > millis())
{
while (espSerial.available())
DEPT OF ELECTRICAL AND ELECTRONICS ENGG.
Page 45 of 49
Smart Substation using IOT
{
char c = espSerial.read();
response += c;
}
}
if (debug)
{
Serial.print("\n");
Serial.print(response);
}
// lcd.setCursor(0, 1);
//lcd.print("OK");
return response;
delay(1000);
}
void lcd_display()
{
lcd.clear ();
lcd.setCursor(0, 0);
lcd.print(String("V:")+String(voltage)+String(" I:")+String(crt_temp));
lcd.setCursor(0, 1);
if(oillevel == 1)
{
lcd.print(String("T:")+String(temperature)+String(" OL:OK"));
}
else
{
lcd.print(String("T:")+String(temperature)+String(" OL:LOW"));
}
CHAPTER 06
The project “Smart Substation using IOT” was designed such that the devices can be monitored
using IOT module. All the read values from sensor is graphically noted using IOT in the below
image. Thus the proposed concept has been successfully implemented and tested in hardware and
software.
CHAPTER 07
CONCLUSION:
On completion of our project “Smart Substation” we can improve the quality of power
transferred and provide uninterrupted power supply. Sub-station Automation using IOT is an
innovative application of internet of things developed to control home appliances remotely over
the cloud from anywhere in the world. In the proposed project current sensor is used to sense the
current and display it on internet using IOT is achieved. The system updates the information in
every 1 to 2 seconds on the internet using public cloud THINGSPEAK. In the present system,
energy load consumption is accessed using Wi-Fi and it ill help consumers to avoid unwanted
use of electricity. Automation controlled by user command is done esp8266 wifi module. Thus
the project is successfully implemented in both Hardware and simulation.
REFERENCES:
[1]AmitSachan “gsm based Automated Embedded System for Monitoring and Controlling of
Smart grid” International Journal of Electrical, Computer, Energetic, Electronic and
Communication Engineering Vol:7, No:12, 2013.
[2] Gubbi, J., Buyya, R., Marusic, S., &Palaniswami, M, " Internet of Things (IoT): A vision,
architectural elements, and future directions", Future Generation Computer Systems Journal,
Volume 29, Issue 7, ELSEVIER, pp.1645-1660,2013
[7]Qinghai Ou, Yan Zhen ,Xiangzhen Li, Yiying Zhang ,LingkangZeng “Application of Internet
of things in smart grid power transmission 2012