Dinesh Project
Dinesh Project
Project Report on
SUBMITTED BY:-
CERTIFICATE
In our/my opinion, this work has reached the standard fulfilling the
requirements for the award of the degree of Bachelor of Technology in accordance
with the regulations of the university.
Signature of Signature of
Internal Examiner External Examiner
Degree for which the Major Project is submitted: FINAL YEAR PROJECT
We do here by declare that the presented major project represents large your
own ideas, work and words. Where others ideas or words have been included, we have
adequately cited and listed in the reference materials. The major project has been prepared
without resorting to plagiarism. We have adhered to all principles of academic honesty and
integrity. No falsified or fabricated data have been presented in the project. We do understand
that any violation of the above will cause for disciplinary action by the institute and university,
including revoking the conferred degree, if conferred, and can also evoke penal action from the
sources which have not been properly cited or from whom proper permission has not been
taken.
My sincere gratitude to The Principal of our institute Prof. (Dr.) Gouri Shankar
Mohapatro for his constantly is supporting our goals which helped us to climb the ladder of
success.
I extend my thankfulness to all the faculty members of Electrical Engineering department for
their immense support during the project work and to all well-wishers those who have
contributed directly and indirectly for the completion of this work.
At last but not the least, I thank almighty and my parents for their blessings without
which the completion of this project would not have been possible.
In this project we are designing a protection system in Smart Grid. In this smart Grid we are
designing a system considering various hazardous parameter. In this kit, if anyone enters the
restricted zone of transformer, Power line will get tripped using Relay. An alert will be created for
the response team. If any magnetic material detected near Transformer, which actually a threat in
restricted zone, it will trip the supply and make an alert. Same if any fault occurs, same output will
be considerable.
Here we will use magnetic sensor, Motion sensor and fault switch which will be connected with
relay and alert system. An appliance will be connected in circuit to define power line switching. All
sensors will work in +5V. Relay and appliance will be having AC power rating of 220V. Whole Data
will be updated in an IoT server using Wi-Fi.
Whenever fault will be corrected, system will reset itself to original instruction and the same will be
updated in the IoT server.
CONTENT
Sl No TITLE Page no.
i List of Figures ii
1 Introduction 1
2 Basic Theory 2-6
3 Sensors 7
4 IR Sensors 7-10
5 Working Principle 10
6 Connections 11
7 Applications 11-12
8 Note 12
9 Features 13-14
10 Introduction NodeMCUV3 14-17
11 How to power Node MCUV3 17
12 Programming 18-28
13 Buzzer 29-31
14 Conclusion & Future scope 32
15 References 33
i
No. FIGURE Page No
v. Smoothing 4
vii. Regulators 6
x. Active IR sensors 8
xii. IR sensor 10
xiii. Diode 10
xvi. Connection 11
ii
CHAPTER-1
1. INTRODUCTION
An embedded system is not a computer system that is used primarily for processing, not a
software system on PC or UNIX, not a traditional business or scientific application. High-end
embedded & lower end embedded systems. High-end embedded system - Generally 32, 64 Bit
Controllers used with OS. Examples Personal Digital Assistant and Mobile phones etc .Lower
end embedded systems - Generally 8,16 Bit Controllers used with an minimal operating
systems and hardware layout designed for the specific purpose.
Here in this project The sensor network data collecting node module is connected with
Temperature sensor, voltage sensor separately. When the temperature sensor senses any over
temperature in a power transformer, it alerts the buzzer and shows it in the LCD. Once the
sensor network center node receives alarm signal, it will cut the faulty part from the healthy
part of the system.
1
CHAPTER-2
BASIC THEORY
1. POWER SUPPLY
Description:
Power supply is the circuit from which we get a desired dc voltage to run the other
circuits. The voltage we get from the main line is 230V AC but the other components of our
circuit require 5V DC. Hence a step-down transformer is used to get 12V AC which is later
converted to 12V DC using a rectifier. The output of rectifier still contains some ripples even
though it is a DC signal due to which it is called as Pulsating DC. To remove the ripples and
obtain smoothed DC power filter circuits are used. Here a capacitor is used. The 12V DC is
rated down to 5V using a positive voltage regulator chip 7805. Thus a fixed DC voltage of 5V
is obtained.
(Figure-1)
2.1 TRANSFORMER
Transformer is the electrical device that converts one voltage to another with little loss of
power. Transformers work only with AC. There are two types of transformers as Step-up and
2
Step-down transformer. Step-up transformers increase voltage, step-down transformers reduce
voltage. Most power supplies use a step-down transformer to reduce the dangerously high
mains voltage to a safer low voltage. Here a step down transformer is used to get 12V AC from
the supply i.e. 230V AC.
2.2 RECTIFIERS
A rectifier is a circuit that converts AC signals to DC. A rectifier circuit is made using diodes.
There are two types of rectifier circuits as Half-wave rectifier and Full-wave rectifier
depending upon the DC signal generated.
2.2.1 Half-wave Rectifier: It is the rectifier circuit that rectifies only half part of the AC
signal. It uses only a single diode. It only uses only positive part of the AC signal to produce
half-wave varying DC and produce gaps when the AC is negative.
(Figure -2)
(Figure -3)
3
2.2.2 Full-wave Rectifier: It is also called as Rectifier. A center tap rectifier can be made
using two individual diodes. It is called a full-wave rectifier because it uses the total AC wave
(both positive and negative sections).
(Figure -4)
(Figure -5)
2.3 SMOOTHING
Smoothing is performed by a large value electrolytic capacitor connected across the DC supply
to act as a reservoir, supplying current to the output when the varying DC voltage from the
rectifier is falling. The diagram shows the unsmoothed varying DC (dotted line) and the
smoothed DC (solid line). The capacitor charges quickly near the peak of the varying DC, and
then discharges as it supplies current to the output. Here a capacitor of 330uF is used as a
smoothing circuit.
4
(Figure -6)
5
2.4.2 NEGATIVE VOLTAGE REGULATORS:
Mostly available negative voltage regulators are of 79xx family. The mainly available 79xx
IC's are 7905, 7912. 1.5A output current short circuit protection ripple rejection are the other
features of 79xx IC's.
(Figure -7)
Many of the fixed voltage regulators have 3 leads and look like power transistors, such as the
7805 (+5V 1A) regulator shown on the above. If adequate heat sinking is provided then it can
deliver up to maximum 1A current. For an output voltage of 5v-18v the maximum input
voltage is 35v and for an output voltage of 24V the maximum input voltage is 40V.For 7805
IC, for an input of 10v the minimum output voltage is 4.8V and the maximum output voltage is
5.2V. The typical dropout voltage is 2V.
2.CIRCUIT DIAGRAM
(Figure-8)
6
3. SENSORS
A sensor, as the name suggests, is used to sense any type of disturbances e.g. sensors are sound
sensor, temperature sensor, photo detector, PIR sensor etc. A sensor can give analog as well as
digital value.
A sensor (also called detector) is a device that measures a physical quantity and converts it into
a signal which can be read by an observer or by an instrument. A sensor is a device which
receives and responds to a signal.
A sensor's sensitivity indicates how much the sensor's output changes when the measured
quantity changes. Sensors that measure very small changes must have very high sensitivities.
Sensors also have an impact on what they measure; for instance, a room temperature
thermometer inserted into a hot cup of liquid cools the liquid while the liquid heats the
thermometer.
Sensors need to be designed to have a small effect on what is measured; making the sensor
smaller often improves this and may introduce other advantages. Technological progress
allows more and more sensors to be manufactured on a microscopic scale as micro sensors
using MEMS technology. In most cases, a micro sensor reaches a significantly higher speed
and sensitivity compared with macroscopic approaches.
4. IR SENSORS
DEFINITION
IR stands for “Infra Red”. Infrared detectors/sensors are transducers of radiant energy.IR Sensor
is a sensor that sends and detects IR Radiation/Signals. Infrared radiation is the portion of
electromagnetic spectrum having wavelengths longer than visible light wavelengths, but smaller
than microwaves, i.e., the region roughly from 0.75µm to 1000 µm is the infrared region. Infrared
waves are invisible to human eyes. The wavelength region of 0.75µm to 3 µm is called near
infrared, the region from 3 µm to 6 µm is called mid infrared and the region higher than 6 µm is
called far infrared. (The demarcations are not rigid; regions are defined differently by many).
(Figure -9)
“Visible”: 0.3 – 1.0 μm;
Near-IR: 1.0 – 5.2 μm;
Mid-IR : 8 – 25 μm;
Far-IR: 25 – 1000 μm; airborne, space
7
4.1 TYPES OF IR SENSORS:
4.1.1 Active IR Sensors:
Active IR Sensors are the type of IR Sensors that employs an IR source & IR detectors (emitter &
receiver). They operate by transmitting energy from either a light emitting diode (LED) or a laser
diode. A phototransistor is used as an active IR detector. In these types of IR sensors, the LED or
laser diode illuminates the target, and the reflected energy is focused onto a detector. Photoelectric
cells, Photodiode or phototransistors are generally used as detectors. The measured data is then
processed using various signal-processing algorithms to extract the desired information.
Active IR detectors provide count, presence, speed, and occupancy data in both night and day
operation.
4.1.2 Passive IR Sensors:
These are basically IR detectors; they don’t use any IR source. These form the major class of IR
sensors/detectors.
A passive infrared system detects energy emitted by objects in the field of view and may use
signal-processing algorithms to extract the desired information. It does not emit any energy of its
own for the purposes of detection. Passive infrared systems can detect presence, occupancy, and
count.
(Figure -10)
This principle is used in intrusion detection, object detection (measure the presence of an object in
the sensor’s FOV), barcode decoding, and surface feature detection (detecting features painted,
taped, or otherwise marked onto the floor), wall tracking (detecting distance from the wall), etc.
8
It can also be used to scan a defined area; the transmitter emits a beam of light into the scan zone,
the reflected light is used to detect a change in the reflected light thereby scanning the desired
zone.
It consist of a pair of IR sensors –
-Transmitter
- Receiver
The transmitter transmits the IR signals & the receiver receives the ir signal.
IR
TRANSMITTER
IR RECEIVER
(Figure -11)
4.2.2 Transmitter:
Transmitter = LED (Light Emitting Diode)
( Figure -12)
It is similar to normal LEDs but emit infra-red light its glow can be seen with a digital
camera or mobile phone camera.
4.2.3 Receiver:
Receiver = Photodiode/IR Transistor.
9
(Figure -13)
A photodiode is a diode that conducts only when light falls on it
5. WORKING PRINCIPLE
(Figure-14)
(Figure -15)
10
6. CONNECTIONS
(Figure -16)
7. APPLICATIONS:
Magnetic Sensor
Magnetic Sensor - The AD22151 is a linear magnetic field transducer. The sensor output is a
voltage proportional to a magnetic field applied perpendicularly to the package top surface. The
sensor combines integrated bulk Hall cell technology and instrumentation circuitry to minimize
temperature related drifts associated with silicon Hall cell characteristics. The architecture
maximizes the advantages of a monolithic implementation while allowing sufficient versatility to
meet varied application requirements with a minimum number of components. Principal
features include dynamic offset drift cancellation and a built-in temperature sensor. Designed for
11
single 5 V supply operation, the AD22151 achieves low drift offset and gain operation over –
40∞C to +150∞C. Temperature compensation can accommodate a number of magnetic
materials commonly utilized in economic position sensor assemblies. The transducer can be
configured for specific signal gains to meet various application requirements. Output voltage can
be adjusted from fully bipolar (reversible) field operation to fully unipolar field sensing. The
voltage output achieves near rail-to-rail dynamic range, capable of supplying 1 mA into large
capacitive loads. The signal is ratio-metric to the positive supply rail in all configurations.
MC-38 Wired Door Window Sensor Magnetic Switch Home Alarm System can be used as a
door or window security system. It produces the signal when moved away from each other
which can be fed to the microcontroller to perform the desired action as per requirement.
This sensor suitable to use for trigger alarm or ON/OFF light inside a cupboard sliding door.
This wired sensor is trigger by the magnet. When the magnet is closed by, the circuit is closed
or open if the magnet far from the sensor.
8. Note :
(Figure -17)
12
9. Features:
1. Easy to install
2. Strong concealment
3. Magnetic sensor alarm, control the switch of the circuit via the built-in magnet
4. Alarm when someone intrudes into your places
5. Can be used in places like apartment, hotel, office, etc.
6. Ideal for residential or commercial use.
7. Designed to do embedded in the door or window frame.
(Figure-18)
The best way to develop quickly an IoT application with less Integrated circuits to add is to
choose this circuit “Node MCU”. Today, we will give a detailed Introduction on Node MCU
V3. It is an open-source firmware and development kit that plays a vital role in designing a
proper IoT product using a few script lines.
The module is mainly based on ESP8266that is a low-cost Wi-Fi microchip in corporating
both a full TCP/IP stack and microcontroller capability. It is introduced by manufacturer
Espress if Systems. The ESP8266 Node Mcu is a complex device, which combines some
features of the ordinary Arduino board with the possibility of connecting to the internet.
Arduino Modules and Microcontrollers have always been a great choice to incorporate
automation into the relevant project. But these modules come with a little drawback as they
13
don’t feature a built-in WiFi capability, subsequently, we need to add external WiFi protocol in
to the se device stomake them compatible with the internet channel.
This is the famous Node MCU which is based on ESP8266 WiFi SoC . This is version 3 and
it is based on ESP-12E (An ESP8266 based WiFi module). Node MCU is also an open-source
firm ware and development kit that helps you to proto type your IOT product within a few
LUA script lines, and of course you can always program it with ArduinoIDE.
In this article, We will try present useful details related to this WiFi Development Kit, its
main features, pin out and everything we need to know about this module and the
application domain.
The interface of the module is mainly divided into two parts including both Firm ware
and Hardware where former runs on the ESP8266 Wi-Fi SoC and later is based on the ESP-
12module.
The firm ware is based on Lua–Ascripting language that is easy to learn, giving a simple
programming environment layered with a fast scripting language that connects you with a
well-known developer community.
14
And open source firmware gives you the flexibility to edit, modify and rebuilt the existing
module and keep changing the entire interface until you succeed in optimizing the moduleas
per your requirements.
USB to UART converter is added on the module that helps inconverting USB data to
UART data which mainly understands the language of serial communication.
Instead of the regular USB port, Micro USB port is included in the module that connects it
with the computer for dual purposes: programming and powering up the board.
The board incorporates status LED that blinks and turns off immediately, giving you
the current status of the module if it is running properly when connected with the
computer.
The ability of module to establish a flawless WiFi connection between two channels makes it
an ideal choice for incorporating it with other embedded devices like Raspberry Pi.
Node MCUV3Pinout
Node MCU V3 comes with a number of GPIO Pins. Following figure shows the Pinout of the
board.
(Figure-19)
15
1. USB to UART converter
2. GPIO pins
3. Arduino-like hard ware IO
4. Advanced API forhard ware IO,which can dramatically reduce there dun dant work for
configuring and manipulating hardware.
5. Code like arduino, but interactively in Lua script.
As mentioned above, a cable supporting micro USB port is used to connect the board. As you
connect the board with a computer, LED will flash. You may need some drivers to be
installed on your computer if it fails to detect the Node MCU board.
Note: We use Arduino IDE software for programming this module. It is important to note that
the pin configuration appearing on the board is different from the configuration we use to
program the board on the software i.e. when we write code for targeting pin 16 on the
Arduino IDE, it will actually help is laying out the communication with the D0 pin on the
module.
Following figure the shows the pin configure at ion to use in ArduinoIDE.
16
(Figure-20)
11. How to Power Node MCUV3
We can see from the pin out image above, there are five ground pins and three3V3 pins on
the board. The board can be powered up using the following three ways.
USB Power. It prove stoan ideal choice for loading program sunless the project you aimto
design requires separate inter face i.e. disconnected from the computer.
Provide 3.3V. This is another great option to power up the module. If you have your own
off-board regulator, you can generate an instant power source for your development kit.
Power Vin. This is a voltage regulator that comes with the ability to support upto 800mA. It
can handle some where between 7 to 12V. You can not power the device so pe rating at
3.3V, as this regulator unable to generate as was 3.3V.
17
12.0 Programming
Step1: Installing the Firmware
In Node MCU Boards the first thing you need is to install the Firmware to the board the
following method works for all Node MCU Boards.
1. Open the Node MCU flasher master folder than open the win 32/win 64 folder as
your computer. Now open the folder Release than double click ESP8266Flasher.
18
Step2: Preparing the ArduinoIDE
After Installing the firmware you are ready to do the programming with the ESP8266
20
#include"ESP8266WiFi.h"
voidsetup(){
Serial.begin(115200);
// Set WiFi to station mode and disconnect from an AP if it
waspreviouslyconnected
WiFi.mode(WIFI_STA);WiFi.dis
connect();delay(2000);Serial.
println("Setupdone");
}
voidloop(){
Serial.println("scanstart");
Serial.print(i +
1);Serial.print(":
");Serial.print(WiFi.SSID(i));Seri
al.print("
(");Serial.print(WiFi.RSSI(i));Se
rial.print(")");
Serial.println((WiFi.encryptionType(i)==ENC_TYPE_NONE)?"":
"*");
delay(10);
}
}
Serial.println("");
21
12.1Serial Communication Between Node MCU and Arduino
(Figure-26)
12.2Projects and Applications
NodeMCU V3 is mainly used in the WiFi Applications which most of the other embedded
modules fail to process unless incorporated with some external WiFi protocol. Following a
resome major applications used for Node MCUV3.
22
Internet Smoked Alarm
VR Tracker
Octopod
ESP Lamp
Incubator Controller
Security Alaram
23
12.3 Application Example:
Node MCUESP-12E Arduino IDE Digital Input Tutorial
12.4 Connect the Circuit
You may wish to power your Node MCU another way .You can read about it HERE.
(Figure-26)
12.5 RELAY
A relay is an electrically operated switch. Current flowing through the coil of the relay
creates a magnetic field which attracts a lever and changes the switch contacts. The coil
current can be on or off so relays have two switch positions and they are double throw
(changeover) switches.
Relays allow one circuit to switch a second circuit which can be completely separate
from the first. For example a low voltage battery circuit can use a relay to switch a
230V AC mains circuit. There is no electrical connection inside the relay between the
two circuits; the link is magnetic and mechanical.
The coil of a relay passes a relatively large current, typically 30mA for a 12V relay, but
it can be as much as 100mA for relays designed to operate from lower voltages. Most
ICs (chips) cannot provide this current and a transistor is usually used to amplify the
24
small IC current to the larger value required for the relay coil. The maximum output
current for the popular 555 timer IC is 200mA so these devices can supply relay coils
directly without amplification.
Relays are usually SPDT or DPDT but they can have many more sets of switch contacts,
for example relays with 4 sets of changeover contacts are readily available. For further
information about switch contacts and the terms used to describe them please see
the page on switches.
Most relays are designed for PCB mounting but you can solder wires directly to the
pins providing you take care to avoid melting the plastic case of the relay.
The supplier's catalogue should show you the relay's connections. The coil will be
obvious and it may be connected either way round. Relay coils produce brief high
voltage 'spikes' when they are switched off and this can destroy transistors and ICs in
the circuit. To prevent damage you must connect a protection diode across the relay
coil.
The animated picture shows a working relay with its coil and switch contacts. You can
see a lever on the left being attracted by magnetism when the coil is switched on. This
lever moves the switch contacts. There is one set of contacts (SPDT) in the foreground
and another behind them, making the relay DPDT.
The relay's switch connections are usually labeled COM, NC and NO:
COM = Common, always connect to this, it is the moving part of the switch.
NC = Normally Closed, COM is connected to this when the relay coil is off.
NO = Normally Open, COM is connected to this when the relay coil is on.
Connect to COM and NO if you want the switched circuit to be on when the
relay coil is on.
Connect to COM and NC if you want the switched circuit to be on when the
relay coil is off.
25
(Figure-23)
Transistors and ICs must be protected from the brief high voltage produced when a
relay coil is switched off. The diagram shows how a signal diode (e.g. 1N4148) is
connected 'backwards' across the relay coil to provide this protection.
(Figure-24)
26
Current flowing through a relay coil creates a magnetic field which collapses suddenly
when the current is switched off. The sudden collapse of the magnetic field induces a
brief high voltage across the relay coil which is very likely to damage transistors and
ICs. The protection diode allows the induced voltage to drive a brief current through
the coil (and diode) so the magnetic field dies away quickly rather than instantly. This
prevents the induced voltage becoming high enough to cause damage to transistors and
ICs.
(Figure-25)
Like relays, transistors can be used as an electrically operated switch. For switching
small DC currents (< 1A) at low voltage they are usually a better choice than a relay.
However transistors cannot switch AC or high voltages (such as mains electricity) and
they are not usually a good choice for switching large currents (> 5A). In these cases a
relay will be needed, but note that a low power transistor may still be needed to switch
the current for the relay's coil! The main advantages and disadvantages of relays are
listed below:
Advantages of relays:
Relays can switch AC and DC, transistors can only switch DC.
Relays can switch high voltages, transistors cannot.
Relays are a better choice for switching large currents (> 5A).
Relays can switch many contacts at once.
27
Disadvantages of relays:
28
13.0 BUZZER
A buzzer or beeper is an audio signaling device, which may be mechanical,
electromechanical, or piezoelectric. Typical uses of buzzers and beepers include alarm
devices, timers and confirmation of user input such as a mouse click or keystroke.
(Figure-26)
BLOCK DIAGRAM:
MOTION SENSOR
POWER
CUT
MAGNETIC
SENSOR NODE BUZZER
MCU
FAULT
SWITCH LOAD
29
13.1 CONTINUITY TEST:
Devices that can be used to perform continuity tests include multi meters which
measure current and specialized continuity testers which are cheaper, more basic
devices, generally with a simple light bulb that lights up when current flows.
An important application is the continuity test of a bundle of wires so as to find the two
ends belonging to a particular one of these wires; there will be a negligible resistance
between the "right" ends, and only between the "right" ends.
This test is the performed just after the hardware soldering and configuration has
been completed. This test aims at finding any electrical open paths in the circuit after
the soldering. Many a times, the electrical continuity in the circuit is lost due to
improper soldering, wrong and rough handling of the PCB, improper usage of the
soldering iron, component failures and presence of bugs in the circuit diagram. We use
a multi meter to perform this test. We keep the multi meter in buzzer mode and connect
the ground terminal of the multi meter to the ground. We connect both the terminals
across the path that needs to be checked. If there is continuation then you will hear the
beep sound.
30
13.2 POWER ON TEST:
This test is performed to check whether the voltage at different terminals is according
to the requirement or not. We take a multi meter and put it in voltage mode. Remember
that this test is performed without microcontroller. Firstly, we check the output of the
transformer, whether we get the required 12 v AC voltage.
Then we apply this voltage to the power supply circuit. Note that we do this test
without microcontroller because if there is any excessive voltage, this may lead to
damaging the controller. We check for the input to the voltage regulator i.e., are we
getting an input of 12v and an output of 5v. This 5v output is given to the
microcontrollers’ 10th pin. Hence we check for the voltage level at 10th pin. Similarly,
we check for the other terminals for the required voltage. In this way we can assure that
the voltage at all the terminals is as per the requirement
31
14.0 Conclusion & Future Scope
In this project we have designed a protection system for transformer. Here we have
developed protection from magnetic effect, fault and trespasser motion. Once fault
occurs, relay will trip and power transmission will stop until faults will be normalized.
In future we may connect various sensor for different type of fault sensing and their
protection
32
15.0 Bibliography
-D.V. Prasad
WEB Resources:
www.atmel.com
www.alldatasheet.com
1. Elements of electronic engineering by N N Rao.
2. www.wikipedia.com
http://en.wikipedia.org/wiki/Transistor
http://en.wikipedia.org/wiki/Bipolar_junction_transistor
http://en.wikipedia.org/wiki/zener_diode
http://en.wikipedia.org/wiki/resistor
http://en.wikipedia.org/wiki/diode
http://en.wikipedia.org/wiki/Transformer
http://en.wikipedia.org/wiki/potentiometer
http://en.wikipedia.org/wiki/capacitor
http://en.wikipedia.org/wiki/LED
http://en.wikipedia.org/wiki/relay
33