Report Content-1
Report Content-1
Report Content-1
The intention of transformer protection is to identify the faults or abnormal operating conditions
to prevent entering towards transformer unit. Relays plays a vital role in sensing and sending
signal to trip circuit. Since the fault cannot be prevented by relay. Its main purpose is to identify
the fault and isolate to reduce the damages of equipment in the system. The voltages and
currents are the most essential parameters which reflect the presence of fault at the terminals.
Project’s main intension is to build a transformer protection with ATmega32 microcontroller
and GSM technology. In case of fault, the microcontroller will detect the fault immediately and
it will take the necessary required actions. C language program which has been developed that
will exhibit towards protection of the transformer algorithm. The main intention of selecting An
ATmega32 microcontroller was because of its universal synchronous asynchronous receiver and
transmitter (USART) and inbuilt ADC functionalities. For
running the system properly without any hindrance the most priority is given to software design
and implementation of code.
CHAPTER 1-INTRODUCTION
1.1 BACKGROUND
Protection opposing the fault in power systems (PS) is most important and essential for better performance. A
power part of the system is said to be in faulty situation when certain condition occur. Therefore the power system,
where the error or fault situation will be overload, overcurrent, overvoltage etc.
The power transformer is one of the foremost important component inside electrical power mechanism, and
transformer protection is a vital part for the overall system protection. Transformers are used in some sort of
applications like small distribution transformers produces one or more other consumers to very large systems which
are an integral part for the most part of the power system (Anderson, 1998, P.673).
The increase in demand for power, the existing systems may get overloaded. The overloading part of voltages and
currents at the consumer part of the system occurs at the transformer’s terminals which may cause severe effects in
its efficiency and protection systems. One of the reported damage or fault of the distribution transformer is because
of the thermal overload. To escape away from the issues of the transformer because to the overloading at the
consumer end, it depends on the control against overcurrent part of tripping of the distribution transformer. Where
the existing technology has given us a chance to use the latest systems like microprocessor and microcontrollers
are one that are used for the day requirements to be used within the protection of the transformer.
The main purpose of power system protection is to detect faults and issues or abnormal conditions and to start
proper action. Relays should be ready to correct a sort of parameters to determine for that perfect action is required.
Obviously, a relay cannot avoid the fault. Its main purpose is to detect and sense the fault and take necessary
actions to prevent the damage to the component or to the part of the system. The foremost most commonly
parameters which displays the existing of a fault are the voltages and currents at the terminals of the apparatus that
is to be protected or at the zone boundaries that is to be protected (Grigsby, 2007).
The Protective relays require perfect value of the abnormal and normal situations inside the power system for
accurate sensing purpose and function. This input from the power systems are most probably taken from the
Current Transformer (CT) and Voltage Transformer (VT).
Furthermore, for the past years, fuse, circuit breakers and electromechanical relays are used as the devices for the
power system protection. The protective fuses and electrometrical relays provide several drawbacks.
Alternatively, experiments were conducted onto the relay which can be inbuilt to the microprocessors such that it
can wash away the drawbacks of the present type of protective techniques (Bashi, 2007) which leads to
improvements in transformer protection in terms of installation and cost of maintenance, accurate reliability,
protection and faster control of restoration of outages.
Therefore an accurate solution must be chosen to build a microcontroller depending on transformer overload
protection prototype due to the microcontrollers based relays results in better flexibility, more tunable settings,
increased characteristics range and high accuracy, size reduction, and lower costs with many functions, such as
control in logic, fault location data, event recording, self-checking, self-monitoring, etc.(Blackburn,2006).
1.2 MOTIVATION / PROBLEM STATEMENT
An essential part of concern in protection of transformer is that the increase in cost of the transformer and therefore
the relative lengthy outage time that occurs when a huge transformer fails. The accurate sort of protection of
transformer can often sense initial faults before they become major faults thereby preventing major damage and
longer outage times (Anderson, 1999, P.67).
Transformers face faults which results in getting worse and aging of performance and failure in the transformer’s
winding which leads to insulation failures, one among them is that of the over current. Because of the overload and
externally applied situations including over current conditions and external short circuit in the system results in rise
in temperature in both oil in the transformer and it’s windings (Bashi, 2007).
Whenever the temperature in the winding increases and goes beyond transformer’s thermal limits, the insulation
will undergo aging and should fail accordingly. Continuous over temperature conditions might make the insulation
in the transformer weak, leading to rapid loss in the transformer’s life.
Over excitation (an increase in voltage system), internal faults can lead to weakening, aging in acceleration and
trips occurring due to faults in function of transformer protection (Reza, 2003).
Similarly, transformers must not allowed to be interfaced to prolonged overvoltage condition. For maximum
efficiency these are operated near to the knee of curve of saturation, so at voltages above 110% of value of the rated
voltage, the current that is to be excited increases. Just a few percentage in increase in voltage results in a very large
increase in current. These very large values of currents can damage the unit part of the circuit if they are not
decreased. (Blackburn, 2006)
Therefore, engineers and scientist have found out a solution in many ways on how the transformer should be
secured and protected; one of the best ways is to use a relay. Therefore, a control system idea is built by the use of
microcontroller for the transformer’s protection.
Aim:
The aim of this project is to design a circuit which protects the transformer by fault conditions
Objectives:
To design the over load, over voltage and over temperature, sensing circuit is connected to the microcontroller for
operating.
For conditions like over load, over voltage and over temperature develop a code and an algorithm to the
microcontroller and it will transmit parameters to the user’s number.
By using appropriate simulation software system performance can be analysed.
The main intention of this project is to build a circuit that protects the transformer from fault conditions like over
load, over voltage and over temperature. Output of that is fed into ADC pin of the microcontroller and observing
conditions value through mobile phone via GSM.
The entire project is divided into two parts, the first part of the project is to design a circuit that is simulation and
second part is hardware of the system. The components are Microcontroller, LCD Display, Current Sensor,
Transformer, Relay .Power supply that will convert AC into constant 5V DC output voltage. To activate the
Microcontroller LCD, Relay and the C language program is developed and the program is dumped into
microcontroller through its pins and it will satisfy transformer operation conditions algorithm.
The development of this system will also monitor and be concentrating on expansion and designing a suitable
transmitter module. Using Transformer protection circuit for this project AT32 microcontroller was selected
because of its universal synchronous asynchronous receiver and transmitter and it has inbuilt ADC function.
In 2003 Ali Reza Fereidunian designed a module based on a digitally based differential relays for transformer
protection by referring Walsh series and least square methods. The Two methods for transformer protection has
been developed by using the Walsh series and least square methods and algorithms. The transformer’s internal fault
(short circuit) protection operation depends on the performance of the differential relay. The functionality of the
mentioned relay was conducted and tested for all types of faults and transformer’s over current. In their work the
digital differential relaying method has filter, pre-process, acquisition data system and a fast feasibility. The
protective relay performs the operation of making decision about the faulted or non-faulted situations.
The transformer’s both faults i.e internal and external faults were performed on the differential relay, and the results
of this performance trials and tests displayed the performance of the system. Also, it was observed that both
algorithms i.e Walsh series and least square methods performed their function of operation accurately, but the
Walsh series worked well better than least squares algorithm method (Ali Reza et al., 2003).
In 2007 S.M. Bashi et al, proposed a design and implemented a transformer protection system using
microcontroller. The system provides space for eliminating the issues like currents(internal fault current and
magnetizing inrush current), protection(differential protection and over current protection) has been included.
The performance of the designed system has been conducted and from the readings and experimental observation, it
was concluded that the designed system monitors and checks the transformer whenever there is a fault occurring in
the system ( Bashi et al 2007).
In 2010 V. Thiyagarajan and T.G. Palanivel designed a module to train a system using a microcontroller which was
used for checking and controlling the current passing through a distribution transformer which are present in
substations and to guard the module from the rise in current because of overloading. The distribution transformer’s
protection is done by switching off the whole unit using the provision of communication in radio frequency.
The performance of the designed system has been conducted using three different types of loading which has been
added to the transformer. From the tested observations and calculations it is concluded that, the designed system
checks and controls the transformer in an feasible and easy method. Whenever an over current situation happens,
the system monitors the issue while checking the transformer, it connects the main station to switch off the
transformer and thus protecting that particular unit from any serious faults (Thiyagarajan et al 2010).
In June 2006 Atthapol Ngaopitakkul and Anantawat demonstrated a detection system consisting of transformer
consisting of discrete wavelet and neural networks which is used for detection, classification and determination of
internal and external faults during a two winding three-phase transformer. The fault situations in the transformer are
functioned using ATP/EMTP so as to get signals. The process of training for the neural network and fault decision
is implemented using Proteus 8 Professional.
It was found that the designed step resulted in a feasible accuracy and may be used for building of a differential
relay for transformer protection module(Ngaopitakkul et al, 2006).
Larner et al issued a paper that presents a brief review about the method of concept of application of fuse on power
transformer of high voltage. A connection between a power transformer onto a transmission line using fuse is
determined and came to know that the fuse illustrates many problems in the transformer protection. One of the
problem is that the fuse cannot easily find out a fault in the current which results in a faults like turn-to-turn inside a
transformer that is protected which is below the current rating of the load of the transformer (Larner et al 1959).
In 2010 Mazouz et al represented a new way of method for transformer differential protection that provides secured
maintenance and protection for faults like external faults, currents like inrush currents and over conditions like
overexcitation and includes a provision for dependability for faults like internal faults. This way of method consists
of programmable logic controllers (PLCs) to demonstrate protection of differential transformer.
It was said that the PLCs provided the protection circuits a bit more feasibility and reliability which makes their
functionality with certain other protection and control circuits feasible and came to know that using PLCs based on
differential protection gave more sensitivity and stability for faults like internal faults and more stability for faults
like external faults and inrush magnetizing currents like inrush magnetizing currents (Mazouz et al 2010).
Finally in 2000 Vaccaro et al represented an article on system on neural diagnostic for thermal overload protection
of transformer. The research on the article was performed because power system relaying committee in IEEE were
missing accuracy in the observation and probability of maximum winding power transformer’s temperature in the
existence of overload conditions. The designed module was depending on a Radial Basis Function Network
(RBFN) which when taken into consideration, the top part of the oil temperature increases over the ambient
temperature and other meteorological parameters like meteorological parameters, permits recognition of
temperature pattern.
The Radial Basis Function Network (RBFN) using the algorithm was built and trained, such that to determine the
temperature in winding transformer from observation of the experimented oil temperature in the top part, condition
in the weather and data on the load current has been determined from the mineral-oil-immersed transformer.
Finally, the RBFN-based algorithm for the determination and observation in power transformers in dynamic
thermal overload had been built and was found that the stability was accurate and improved than compared with the
observations and calculations obtained from the power system relay committee of IEEE (Vaccaro et al 2000).
From the above design and methods, it can be concluded that research done on the protection of transformer have
some disadvantages in it; thereby using microcontroller based approach, the transformer’s protection will be
accurate to be in a good position due to the use of microcontroller in protecting transformer against over conditions
like over current and over voltages is rapidly raising.
From the reviewed papers, researchers and journals, based on S.M. Bashi’s work, this project main intention is to
design, implement, analyze and built the system consisting of hardware. Accordingly, it’s understandable that the
topic of research is a tough area of engineering in power systems protection which is generally studied by engineers
in power engineering specialization.
This research and project is based on transformer protection using microcontroller via PC/mobile which helps in
transformer’s parameters monitoring capabilities. This transformer protection is focused on the transformer’s
parameters fed into the Analog-Digital Converter part of the microcontroller and controlling the transformer’s
voltage, current and temperature through PC/mobile via SMS by GSM module. The transformer is passed on across
a variable AC input source using an autotransformer or 100k ohm potentiometer which can be varied from
0250VAC. The output of the transformer that is to be protected will be connected to loads i.e. 60W electric bulbs in
this project. The current in the load will be found out by connecting a current sensor in series between the load and
the side of the transformer that is to be protected. The voltage from the transformer are going to be determined and
checked through a rectifier and that output from the rectifier is passed onto a step down 230-12VAC transformer to
a pure 5V DC and then feed to the microcontroller’s Analog-Digital Converter pin for monitoring and checking of
voltage levels. The input from the step-down transformer will be connected to autotransformer/100k ohm
potentiometer and therefore the output will be a pure 5V AC by using a 5V voltage regulator(IC 7805).
Whenever we vary the input voltage, the microcontroller displays the voltage value on the LCD and also on the
Personal Computer(PC) or through the user’s mobile/smartphone via GSM. As input level of the voltage is
increased above 230V AC, the microcontroller detects faults like over voltage and under voltage faults and it
displays a trip signal to the 5V relay for protecting the transformer and the loads that are connected.
Similarly, the microcontroller monitors the conditions of current and conditions of temperature of the transformer
and shows the values on LCD and through Personal Computer/mobile/smartphone. The current at the secondary
side increases whenever loads are added to the side of the transformer that is to be protected. As the current in the
load exceeds the rated current rating of the transformer, the temperature of the winding of the transformer that is to
be protected increases, therefore sending a message to the LCD and it displays the message.
CHAPTER 3-SYSTEM
3.1 Overview
230 V AC input is supplied to the primary sides of 230/12 V and 230/160 V step down transformer
And the secondary side of the 230/160 V transformer is connected to the load such as bulb,fan etc. In this project
we are using 60W bulb as load.
A 230/12 V transformer is rectified to constant 5V DC voltage by using Bridge Rectifier and 780s voltage regulator
and fed to the microcontroller for the monitoring .
The current sensor is connected in between the secondary side of 230/160 V step down transformer and load to
measure the current passing through the load and output of the current sensor is fed to the ADC pin of
microcontroller.
To display the overload, over voltage, under voltage and temperature value we are using LCD display and GSM
module is used to send the SMS to user’s number.
While operating when load current exceeds the rated current of the transformer the microcontroller will detect the
over current fault and it will trip the relay and the transformer is protected by getting damaged.
By considering the various reviews on transformer protection number of components required to build circuit are.
3.2.1 Microcontroller
The transformer information such as temperature, voltage and current through the LCD display, GSM Module and
triggering the relay when there is any fault is monitored by microcontroller. Power networks require accurate and
reliable protective schemes.
In order to fulfill these requirements, Microcontroller-based protective schemes are used which are superior to
electromagnetic and static relays. These schemes have more flexibility thanks to their programmable way in
comparison with the static relays they have hardwired circuitry.
ATmega32 microcontroller was chosen to achieve this task, because of its features for this project such as speed,
universal synchronous asynchronous receiver transmitter (USART) functionality, Power Consumption, size of
RAM and ROM on the chip and in built ADC.
ATmega32 maybe a low-power 8-bit microcontroller supported with the AVR enhanced RISC architecture. It has a
High Endurance Non-volatile Memory segments such as 32K Bytes of In-System Self-programmable Flash
program memory, 2K Byte Internal SRAM.
ATmega32 microcontroller has 40 I/O pins, these I/O pins are used for the purpose of connecting ADC chip, LCD
display, alarm buzzer and in this case the port A pins were used to take care of ADC input since we are using three
different analogue signals, one for the voltage transformer, one for the current transformer and the other for the
temperature sensor.
The transformer protection by over current is concerned with detection and measurement of fault current, here it is
not possible to use ammeter because of large value of fault current, the current sensor is the best replacement.
ACS 756 current sensor is used because it provides precise solution for AC or DC current sensing commercial and
industrial system. The application of this sensor is load detection, motor control and overload fault protection.
The current sensor is capable of measuring up to 50A and the output current value obtained from current sensor is
connected to ADC pin of the microcontroller and it will display onto the LCD display when it’s overloaded the
relay will trip automatically and over current fault is protected.
The 230/12V AC step down voltage transformer is used to identify the voltage fault by measuring load voltage and
it is connected to ADC pin of the microcontroller after the rectification process is done.
The voltage protection circuit is designed for the voltage level of 220-230V AC, less than 220V for
under voltage, more than 230V for over voltage. Voltage is increased or decreased manually by
using the potentiometer, output is fed to the ADC pin of microcontroller.
Microcontroller detects whether the system is under voltage or over voltage fault and sends the trip
signal to the relay, relay turns off and protects the transformer.
3.2.4.1 Design calculations for over voltage protection circuit
The secondary voltage of the transformer is 12V AC and connected to a bridge rectifier, therefore the DC output is
approximately:
VDC = V AC
− (2 0.7)
VDC = 12 − 1.4 = 15
From above equations, the VAC is the RMS value of voltage and the 0.7V is the voltage drop across the Diode, for
each half cycle two diodes will conduct.
3.2.5 Relay
Relay is an electrically operated switch used for controlling purpose in electrical circuit.
The rating of the relay is 5 or 6 V and it requires around 12 mA current to energize but the microcontroller pin
cannot provide sufficient amount of current to drive the relay by considering a coil resistance of 500 ohm and 6V
DC voltage. The V/R ratio is 6V/500ohm = 12mA is required to drive the relay, microcontroller pins provide
maximum of 1-2 mA current so transistor is the best replacement for relay driver where the collector of transistor is
connected to a 2k ohm (R5) resistor which is then connected in parallel to a diode to remove the voltage spikes
from the relay and the base of transistor is connected to a 2.2k ohm resistor (R1), relay driver is present in between
microcontroller and relay of the circuit.
The main function of the driver circuit is to provide the necessary current to the relay to energize, here the transistor is
used as driver, the value of base resistor (R1) is set such that transistor should go into the saturation region when the
input is applied to it, it should energize the relay. The voltage drop across the transistor is kept minimum so that the
transistor is at saturation region and thereby dissipating required amount of power.
To remove the voltage spikes, protection diode is used in parallel to collector-resistor (R5) and it will protect the
transistor during switch off time from reverse current.
3.2.5.3 Relay driver circuit Design calculations
The microcontroller output to the relay of 5V to energize it when the transistor is used as relay driver circuit.
𝑅𝐵 = 𝑉 𝑐𝑐5 ×× 𝐼ℎ𝐿𝑓𝑒
𝐼𝐿 = 𝑅𝑉𝑠𝐿
6𝑉
𝐼𝐿 = 500 = 12𝑚𝐴
ℎ𝑓𝑒 = 5 × 𝐼 𝑖𝑛𝑝𝑢𝑡𝐼𝐿
ℎ𝑓𝑒 = 5 × 12 2𝑚𝐴𝑚𝐴 = 30
𝑅𝐵 = 𝑉𝑐𝑐5 ×× 𝐼ℎ𝐿𝑓𝑒
𝑅𝐵 = 5×512×30𝑚𝐴 = 2.5𝐾Ω
The design of power supply circuit is the important part of the project. The Microcontroller, Relay, LCD, GSM
module etc. will not be activated without power supply. The bad or poor power supply may cause the damages of
equipment used for circuit.
It is designed by using 230/12 V step down transformer , it is subjected to power supply board , it contains Bridge
Rectifier which converts AC to pulsating DC and capacitive filters is used to remove ripples and 7805 voltage
regulator is used to get constant 5V DC output.
The temperature sensing device chosen for this project is LM35, these LM35 series temperature sensors are
precision integrated-circuit, whose output voltage is linearly proportional to the Celsius temperature. Therefore the
LM35 has a plus over linear temperature sensors calibrated in degree Kelvin because the user isn’t required to
subtract an outsized constant voltage from its output to get Celsius scaling with a rated operating temperature range
of -55° to +150°C.
To find out the temperature these sensors use a solid-state technique.to mention, they don’t use mercury, bimetallic
strips nor do they use thermistors. Instead, they use the fact, as temperature increases, voltage across a diode
increases.
As LM35 can measure temperature more accurately so it is chosen over thermocouples, it gives a maximum output
voltage than the thermocouples.
The output voltage of LM35 linearly varies with the temperature.an equation is shown below to
calculate the temperature which is used to convert the output voltage to temperature in Celsius.
Transmitter section consists of the MAX232 IC and therefore Atmega32 TX pin. The PC has
been interfaced to the microcontroller using MAX232 through RS232 serial communication.
RS232 supports both asynchronous, synchronous transmissions of data. MAX232 is a chip that
converts transistor–transistor logic (TTL) to RS232 and RS232 to TTL voltage levels compatible
with digital logic circuit. For monitoring purpose the serial data sent from the microcontroller is
then fed to the GSM module through RS232.
As mentioned in chapter 3, the circuit section consists of AVR microcontroller, step down
transformer circuit for voltage sensing, current sensing circuit, relay circuits, a temperature
sensor, RS232 and the max232 circuit.
The step-down transformer used is a 230VAC to 12VAC transformer and is employed for the aim
of sensing the input voltage to the main transformer that is to be protected with a voltage rating
of 230VAC to 160VAC. The step-down transformer is been rectified and filtered to a pure dc
which matches onto the microcontroller ADC for monitoring the input voltage. For the purpose
of current sensing, a current sensor is used for that purpose. It through rectification and filtering
process then directly connected to the microcontroller ADC for monitoring the load current.
The microcontroller sends the monitored parameters to LCD display and also transmit them to a
personal computer. The transmission to PC was made possible by interfacing the microcontroller
with the PC using MAX232 through RS232 serial communication. RS232 (recommended
standard 232) supports both synchronous and asynchronous transmission and its user data is sent
as a series of time bits.
While monitoring the parameters, whenever a fault occurs which could be high voltage or over
current, the microcontroller sends a trip signal to the relay and thereby protecting the transformer
from burning.
CHAPTER 5- CONCLUSIONS
In this project, the protection of transformer using a microcontroller via GSM is designed. For
voltage and current sensing in the transformer, circuits like voltage sensing circuits and current
sensing circuits were designed and the results have been evaluated in Proteus 8 Professional
simulation. Hardware including with an Arduino UNO microcontroller with ATmega32 IC is
used to verify the designed technique and the conduction of the real time based hardware is
slightly compared with the model in Proteus 8 professional software. Through the transformer
current process, we can conclude that the current in the transformer rises as the efficiency in the
load increases, whenever the current in the load rises above the rated current in the transformer,
the microcontroller finds out a current fault like overcurrent and it transmits a trip signal to the
relay therefore protecting the transformer from damaging. As the current in the load drops below
the rated current of the transformer, the microcontroller signals normal by sending a message to
the relay. Moreover, through the transformer voltage analysis, we also can check out that the
transformer’s voltage increases as the transformer’s input voltage is increased through varying a
potentiometer. Whenever the input voltage rises above the rated voltage of the transformer
(230VAC), the microcontroller finds out an voltage fault like over voltage and it transmits a trip
signal to the relay part and the relay trips the output thereby protecting the transformer from
damaging. The results show that the transformer protection using microcontroller via GSM
achieves many merits over the systems which are now in use: 1) speed response, 2) accurate
isolation, 3) better detection of the fault.
HARDWARE
6.1 List of hardware:-
• Low profile
• Space saving and lightweight due to high efficiency toroidal design.
• Low Electro-Motive Force radiation.
• Dual secondaries for series or parallel connections
6.1.2 LM317:-
Temperature Sensor
The Temperature Sensor 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.
GSM
GSM is an international standard for mobile telephones. It is an acronym that stands for Global
System for Mobile Communications. It is also sometimes referred to as 2G, as it is a second-
generation cellular network.
To use GPRS for internet access, and for the Arduino to request or serve webpages, you need to
obtain the Access Point Name (APN) and a username/password from the network operator. See the
information in Connecting to the Internet for more information about using the data capabilities of
the shield.
Among other things, GSM supports outgoing and incoming voice calls, Simple Message System
(SMS or text messaging), and data communication (via GPRS).
The Arduino GSM shield is a a GSM modem. From the mobile operator perspective, the Arduino
GSM shield looks just like a mobile phone. From the Arduino perspective, the Arduino GSM
shield looks just like a modem.
AT COMMANDS
AT
OK
AT+CMGF=1
OK
SendMessage() – is the function we created in our arduino sketch to send an SMS. To send an SMS,
we should set our GSM module to Text mode first. This is achieved by sending an AT Command
“AT+CMGF=1” We send this command by writing this to SoftwareSerial port. To achieve this we
use the mySerial.println() function. mySerial.println writes data to software serial port (the Tx pin of
our Software Serial – that is pin 10) and this will be captured by GSM module (through its Rx pin).
After setting the GSM module to Text mode, we should the the mobile number to which we shall
send the SMS. This is achieved with AT command “AT+CMGS=\”+91xxxxxxxxxx\”\r” – where you
may replace all x with the mobile number.
In next step, we should send the actual content of SMS. The end of SMS content is identified with
CTRL+Z symbol. The ASCII value of this CTRL+Z is 26. So we send a char(26) to GSM module
using the line mySerial.println((char)26); Each and every AT command may be followed by 1
second delay. We must give some time for GSM module to respond properly. Once these commands
are send to GSM module, you shall receive an SMS in the set mobile number.
RecieveMessage() – is the function to receive an SMS (a live SMS). The AT command to receive a
live SMS is “AT+CNMI=2,2,0,0,0” – we just need to send this command to GSM module and apply
a 1 second delay. Once you send this command, try sending an SMS to the SIM card number put
inside GSM module. You will see the SMS you had sent displayed on your Arduino serial monitor.
There are different AT commands for different tasks. If you want to read all SMS’s stored in your
SIM card, send the following AT Command to gsm module – “AT+CMGL=\”ALL\”\r”
Wi-Fi
The ESP8266 Wi-Fi Module is a self-contained SOC with integrated TCP/IP protocol stack that can
give any microcontroller access to your Wi-Fi network. The ESP8266 is capable of either hosting an
application or offloading all Wi-Fi networking functions from another application processor. Each
ESP8266 module comes pre-programmed with an AT command set firmware, meaning, you can
simply hook this up to your Arduino device and get about as much Wi-Fi-ability as a Wi-Fi Shield
offers (and that's just out of the box)! The ESP8266 module is an extremely cost effective board with
a huge, and ever growing, community.
This module has a powerful enough on-board processing and storage capability that allows it to be
integrated with the sensors and other application specific devices through its GPIOs with minimal
development up-front and minimal loading during runtime. Its high degree of on-chip integration
allows for minimal external circuitry, including the front-end module, is designed to occupy minimal
PCB area. The ESP8266 supports APSD for VoIP applications and Bluetooth co-existence
interfaces, it contains a self-calibrated RF allowing it to work under all operating conditions, and
requires no external RF parts.
There is an almost limitless fountain of information available for the ESP8266, all of which has been
provided by amazing community support. In the Documents section below you will find many
resources to aid you in using the ESP8266, even instructions on how to transform this module into an
IoT (Internet of Things) solution!
6.1.7 Voltage Regulator:-
1 Fixed End This end is connected to one end of the resistive track
2 Variable End This end is connected to the wiper, to provide variable voltage
3 Fixed End This end is connected to another end of the resistive track
The output current of this integrated circuit can go up-to 1.7A. Therefore suitable arrangements
should be made for the heat sinks to avoid heat losses.
6.1.8 100K Ohm Potentiometer: -
Features
• Type: Rotary POT
• Wide range of available of type of resistance in the market
• Power Rating: 0.3W
• Maximum Input Voltage: 180V DC
• Rotational Life Expectancy: 200K cycles
Working of Potentiometer
Potentiometers often called as POT, these are variable resistors. Varying the rotary knob of
potentiometer head we can change the value of voltage levels. The resistor value depends on how
much it must limit the flow of current. The greater value of resistance the current flow will be
reduced as minimum as possible. There are wide selection of potentiometer available in markets.
The main factor to be noticed is that the power ranting of the resistor, the power rating of
potentiometers is 0.3W and hence can be used only for low current circuits
Pin Number Pin Name Description
1 Coil 1 To trigger the Relay, Normally one end is connected to 5V and the other end to ground
2 Coil 2 To trigger the Relay, Normally one end is connected to 5V and the other end to ground
4 Normally Close (NC) The other end of the load is either connected to NO or NC. If connected to NC the load remains connected before trigger
5 Normally Open (NO) The other end of the load is either connected to NO or NC. If connected to NO the load remains disconnected before trigger
5V Relay Specifications:
• Trigger Voltage is 5V (DC)
• Trigger Current is 65mA
• Maximum AC load current is 10A at 250/125V AC
• Maximum DC load current: 10A at 30/25V DC
• It is compact and has 5-pin as its configuration
Working of Relay
One of the switching device in electronics is the relay. The voltage required to turn on the relay is
known as trigger voltage, once the voltage is triggered the contacts of the relay from
NC(Normally Closed) to NO(Normally Open). Apart from this, current and load voltage must be
noted and the relay contacts NO and NC to be observed in this project.
6.1.10 Temperature Sensor(LM35):-
Pin Configuration
Pin Description
Numbe Pin Name
r
Pin Configuration
Specifications
• It measures currents such as AC as well as DC
• Wide range of modules available in market
• It is easy to merge with microcontroller unit
Working of Current Sensor
The ACS712 module uses the integrated IC with respect to using of the hall effect by the
measurement. The ACS712 module can measure any current whether AC or DC current ranging
from +5A to -5A, +20A to -20A and +30A to -30A. One should select the right and accurate
range for the project since have to match off accuracy for higher range modules. This modules
outputs gives analog voltage based on the current flowing through the wire. Therefore it is very
easy and simple to interface this module with any microcontroller.
The Arduino Uno pin diagram is shown below. It comprises 14-digit I/O pins. From these pins, 6-
pins can be utilized like PWM outputs. This board includes 14 digital input/output pins, Analog
inputs-6, a USB connection, a power jack, USB Connection and RST button.
The power supply of the Arduino can be done with the help of an exterior power supply otherwise
USB connection. The exterior power supply (6 to 20 volts) mainly includes a battery or an AC to DC
adapter. The connection of an adapter can be done by plugging a center-positive plug (2.1mm) into
the power jack on the board. The power pins of an Arduino board include the following
• VIN - The input voltage to the Arduino 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 - The regulated power supply used to power the microcontroller and other components on the
board. This can come either from VIN via an on-board regulator, or be supplied by USB or another
regulated 5V supply.
• 3V3 - A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50 mA.
• GND - Ground pins.
Arduino Uno includes 14-digital pins which can be used as an input otherwise output by using the
functions like pin Mode (), digital Read(), and digital Write(). These pins can operate with 5V.
Serial Pins
The serial pins of an Arduino board are TX (1) and RX (0) pins and these pins can be used to transfer
the TTL serial data. The connection of these pins can be done with the equivalent pins of the
ATmega8 U2 USB to TTL chip.
PWM Pins
The PWM pins of an Arduino are 3, 5, 6, 9, 10, & 11, and gives an output of an 8-bit PWM with the
function Analog Write ().
Gas Sensor
A gas sensor is a device which detects the presence or concentration of gases in the atmosphere.
Based on the concentration of the gas the sensor produces a corresponding potential difference by
changing the resistance of the material inside the sensor, which can be measured as output voltage.
Based on this voltage value the type and concentration of the gas can be estimated.
The type of gas the sensor could detect depends on the sensing material present inside the sensor.
Normally these sensors are available as modules with comparators as shown above. These
comparators can be set for a particular threshold value of gas concentration. When the concentration
of the gas exceeds this threshold the digital pin goes high. The analog pin can be used to measure the
concentration of the gas.
Different Types of Gas sensors
Gas sensors are typically classified into various types based on the type of the sensing element it is
built with. Below is the classification of the various types of gas sensors based on the sensing
element that are generally used in various applications:
Gas Sensor Construction
Of all the above-listed types, the most commonly used gas sensor is the Metal oxide semiconductor
based gas sensor. All Gas sensors will consist of a sensing element which comprises of the following
parts.
The below image illustrates the parts present in a metal oxide gas sensor
The purpose of each of these elements is as below:
Gas sensing layer: It is the main component in the sensor which can be used to sense the variation in
the concentration of the gases and generate the change in electrical resistance. The gas sensing layer
is basically a chemiresistor which changes its resistance value based on the
The concentration of particular gas in the environment. Here the sensing element is made up of a Tin
Dioxide (SnO2) which is, in general, has excess electrons (donor element). So whenever toxic gases
are being detected the resistance of the element changes and the current flown through it varies
which represents the change in concentration of the gases.
Heater coil: The purpose of the heater coil is to burn-in the sensing element so that the sensitivity
and efficiency of the sensing element increases. It is made of Nickel-Chromium which has a high
melting point so that it can stay heated up without getting melted.
Electrode line: As the sensing element produces a very small current when the gas is detected it is
more important to maintain the efficiency of carrying those small currents. So Platinum wires come
into play where it helps in moving the electrons efficiently.
Electrode: It is a junction where the output of the sensing layer is connected to the Electrode line. So
that the output current can flow to the required terminal. An electrode here is made of Gold (Au –
Aurum) which is a very good conductor.
Tubular ceramic: In between the Heater coil and Gas sensing layer, the tubular ceramic exists
which is made of Aluminum oxide (Al2O3). As it has high melting point, it helps in maintaining the
burn-in (preheating) of the sensing layer which gives the high sensitivity for the sensing layer to get
efficient output current.
Mesh over the sensing element: In order to protect the sensing elements and the setup, a metal mesh
is used over it, which is also used to avoid/hold the dust particles entering into the mesh and prevent
damaging the gas sensing layer from corrosive particles.
Gas Sensor Working
The ability of a Gas sensor to detect gases depends on the chemiresister to conduct current. The
most commonly used chemiresistor is Tin Dioxide (SnO2) which is an n-type semiconductor that has
free electrons (also called as donor). Normally the atmosphere will contain more oxygen than
combustible gases. The oxygen particles attract the free electrons present in SnO2 which pushes them
to the surface of the SnO2. As there are no free electrons available output current will be zero. The
below gif shown the oxygen molecules (blue color) attracting the free electrons (black color) inside
the SnO2 and preventing it from having free electrons to conduct current.
When the sensor is placed in the toxic or combustible gases environment, this reducing gas (orange
color) reacts with the adsorbed oxygen particles and breaks the chemical bond between oxygen and
free electrons thus releasing the free electrons. As the free electrons are back to its initial position
they can now conduct current, this conduction will be proportional the amount of free electrons
available in SnO2, if the gas is highly toxic more free electrons will be available.
How to use a Gas sensor?
A basic gas sensor has 6 terminals in which 4 terminals (A, A, B, B) acts input or output and the
remaining 2 terminals (H, H) are for heating the coil. Of these 4 terminals, 2 terminals from each side
can be used as either input or output (these terminals are reversible as shown in the circuit diagram)
and vice versa.
These sensors are normally available as modules (shown right), these modules consist of the gas
sensor and a comparator IC. Now let’s see the pin description of the gas sensor module which we
will generally use with an Arduino. The gas sensor module basically consists of 4 terminals
As discussed earlier the output of a gas sensor alone will be very small (in mV) so an external circuit
has to be used in order to get a digital high low output from the sensor. For this purpose, a
comparator (LM393), adjustable potentiometer, some resistors and capacitors are used.
The purpose of LM393 is to get the output from the sensor, compare it with a reference voltage and
display whether the output is logically high or not. Whereas the purpose of the potentiometer is to set
the required threshold value of the gas above which the digital output pin should go high.
The below diagram shows the basic circuit diagram of a gas sensor in a gas sensor module
Here A and B are the input and output terminals (these are reversible - means any of the paired
terminals can be used as input or output) and H is the Heater coil terminal. The purpose of the
variable resistor is to adjust the output voltage and to maintain high sensitivity.
If no input voltage is applied to the heater coil, then the output current will be very less (which is
negligible or approximately 0). When sufficient voltage is applied to the input terminal and heater
coil, the sensing layer wakes up and is ready to sense any combustible gases nearby it. Initially let’s
assume that there is no toxic gas near the sensor, so the resistance of the layer doesn’t change and the
output current and voltage are also unchanged and are negligible (approximately 0).
Now let’s assume that there is some toxic gas nearby. As the heater coil is pre-heated it is now easy
to detect any combustible gases. When the sensing layer interacts with the gases, the resistance of the
material varies and the current flowing through the circuit also varies. This change in variation can be
then observed at the load resistance (RL).
The value of load resistance (RL) can be anywhere from 10KΩ to 47KΩ. The exact value of the load
resistance can be selected by calibrating with the known concentration of the gas. If low load
resistance is selected then the circuit has less sensitivity and if high load resistance is selected then
the circuit has high sensitivity.
SOFTWARES:
ARDUINO IDE
Arduino IDE is an open-source software that is mainly used for writing and compiling the
It is an official Arduino software, making code compilation too easy that even a common
person with no prior technical knowledge can get their feet wet with the learning process.
It is easily available for operating systems like MAC, Windows, Linux and runs on the Java
Platform that comes with inbuilt functions and commands that play a vital role for debugging,
A range of Arduino modules available including Arduino Uno, Arduino Mega, Arduino
The main code, also known as a sketch, created on the IDE platform will ultimately generate
a Hex File which is then transferred and uploaded in the controller on the board.
The IDE environment mainly contains two basic parts: Editor and Compiler where former is
used for writing the required code and later is used for compiling and uploading the code into the
1. Menu Bar
2. Text Editor
3. Output Pane
As you download and open the IDE software, it will appear like an image below.
File - You can open a new window for writing the code or open an existing one. Following
table shows the number of further subdivisions the file option is categorized into.
As you go to the preference section and check the compilation section, the Output Pane will show
that will send to the Arduino Board for the specific task you aim to achieve.
Edit - Used for copying and pasting the code with further modification for font
Tools - Mainly used for testing projects. The Programmer section in this panel is used for
Help - In case you are feeling skeptical about software, complete help is available from
The check mark appearing in the circular button is used to verify the code. Click this once
The arrow key will upload and transfer the required code to the Arduino board.
window that acts as an independent terminal and plays a vital role for sending and receiving the
Serial Data. You can also go to the Tools panel and select Serial Monitor, or pressing Ctrl+Shift+M
all at once will open it instantly. The Serial Monitor will actually help to debug the written Sketches
where you can get a hold of how your program is operating. Your Arduino Module should be
EMBEDDED C
Embedded C is most popular programming language in software field for developing electronic
gadgets. Each processor used in electronic system is associated with embedded software.
Embedded C programming plays a key role in performing specific function by the processor. In day-
to-day life we used many electronic devices such as mobile phone, washing machine, digital camera,
etc. These all device working is based on microcontroller that are programmed by embedded C.
Port0 of microcontroller.
In embedded system programming C code is preferred over other language. Due to the following
reasons:
Easy to understand
High Reliability
Portability
Scalability
Blynk
Blynk is a platform that allows you to quickly build interfaces for controlling and monitoring your
hardware projects from your iOS and Android device. After downloading the Blynk app, you can
create a project dashboard and arrange buttons, sliders, graphs, and other widgets onto the screen.
Using the widgets, you can turn pins on and off or display data from sensors.
APLLICATION
Metal sensor detects bullet attack on robot.
Fire detector and buzzer alerts soldiers regarding fire accidents.
Detect the poisonous gas.
REFERENCES
[4] Raj Kumar, D. T. Shahani, Ambrish Chandra, “Recognition of Power Quality Disturbances
Using STransform Based ANN Classifier and Rule Based Decision Tree”, 2014 IEEE.