0% found this document useful (0 votes)
128 views52 pages

Microcontroller Based Overvoltage and Ov

Uploaded by

fiyoviw911
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
128 views52 pages

Microcontroller Based Overvoltage and Ov

Uploaded by

fiyoviw911
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 52

Microcontroller Based Overload and

Overvoltage Protection and Online


Notification System
A Project and Thesis submitted in partial fulfillment of the requirements for
the Award of Degree of Bachelor of Science in Electrical and Electronic
Engineering

SUBMITTED BY

Md. Mehedi Hasan


ID: 152-33-2625
Partho Das
ID: 152-33-2712

SUPERVISED BY

Dr. Md. Rezwanul Ahsan


Associate Professor and Head
Department of Electrical and Electronics Engineering

Department of Electrical and Electronic Engineering


Faculty of Engineering

DAFFODIL INTERNATIONAL UNIVERSITY


August 2022

©Daffodil International University


CERTIFICATION
This is to certify that the following students worked on the project and thesis
"Microcontroller Based Overload and Overvoltage Protection and Online
Notification System" under my direct supervision and in the laboratories of the
Department of Electrical and Electronic Engineering, Faculty of Engineering, Daffodil
International University, in partial fulfillment of the requirements for the degree of
Bachelor of Science in Electrical and Electronic Engineering.

Signature of the candidates

_____________________
Md. Mehedi Hasan
ID: 152-33-2625

________________________
Partho Das
ID: 152-33-2712

Signature of Supervisor

Dr. Md. Rezwanul Ahsan


Associate Professor and Head

ii
©Daffodil International University
ACKNOWLEDGEMENT

First and foremost, we give thanks to the Almighty. While bringing out this project
to its final form, we came across a number of people whose contribution in various ways
helped us and they deserve special thanks. We would want to take this occasion to thank
our project supervisor, Dr. Md. Rezwanul Ahsan (Associate Professor and Head) of the
Department of EEE, for his commitment to helping and motivating us. Without his helpful
guidance and assistance, this project would be impossible to complete. Thank him also for
giving us the opportunity to select this project.

We would also like to express our gratitude to Professor Dr. M. Shamsul Alam
Dean of the Faculty of Engineering & Professor of the Department of EEE, for his
assistance, support, and consistent encouragement.

Apart from that, we would like to express our gratitude to all of our friends for
sharing their experience and information with us, as well as for assisting us in making this
project a success. Also, thankful for letting we borrow some of their tools and equipment.

We want to express our heartfelt gratitude to our loving family for their
unwavering support, as well as their inspiration and encouragement throughout our time
at this university.

iii
©Daffodil International University
Dedicated
To
Our Beloved Parents

iv
©Daffodil International University
ABSTRACT
The design and modeling of a microcontroller-based overload and over voltage
protection device using a microcontroller, Current sensor, Voltage sensor and other discrete
components are shown in this paper.
The device's heart is a microcontroller, which handles all of the device's essential
functions. The device is easy to use and inexpensive. Our country is rapidly expanding, yet
many of our electrical protection and detection systems are outdated. As a result, we have
prototyped an electrical protection project for various types of loads. The voltage and current of
the load are also being monitored in real time. It can be used to safeguard loads such as
refrigerators, radio sets, computers, VCR/DVD players, and other electronic devices against
unwanted overvoltage circumstances, as well as surges induced by sudden mains power
failure/resumption.
To run the load with a reference value, the voltage delivered to the load, and current
drown must all be continually measured, every 16 seconds, the device updates the online status
of these cases. If the measured value deviates from the reference value, the load is protected by
cutting off power. This change or defect can be viewed on the device's display or via the
internet from anywhere on the globe.

v
©Daffodil International University
CONTENTS

Certification ii

Acknowledgment iii

Dedication iv

Abstract v

List of Figures viii

List of Abbreviations x

List of symbols xi

Chapter 1: INTRODUCTION 1- 5
1.1 Motivation 1
1.2 Procedure 1
1.2.1 Methods of detecting and protecting faults 1
1.2.2 Methods of sending fault data online 4
1.3 Objective 5
1.4 Scope 5

Chapter 2: LITERATURE REVIEW 6-6

2.1 Related Research 6

Chapter 3: DESIGN AND CONSTRUCTION 7-26

3.1 Introduction 7
3.2 Block diagram 8
3.3 Circuit diagram 9
3.4 Flow chart 10
3.5 Hardware 11
3.5.1 Introduction 11
3.5.2 Microcontroller 11
3.5.2.1 Specifications of Arduino Nano 13

vi
©Daffodil International University
3.5.2.2 Specifications of NodeMCU 14
3.5.3 DC-DC buck converter 15
3.5.4 Logic level converter 16
3.5.4.1 Logic level converter pin configuration 17
3.5.5 ZMPT 101B Voltage Sensor 18
3.5.6 220v to 12v Down Step 19
3.5.7 LCD Screen 20
3.5.7.1 Pin Configuration of LCD Screen 20
3.5.8 SCT013 100A Ac current Sensor 21
3.5.9 Load 22
3.5.10 Relay 23
3.5.11 Supporting Elements 23
3.5.12 Programming of the Microcontroller 25
3.5.12.1. Overview 25
3.5.12.2 The Arduino 26

Chapter 4: COST ANALYSIS 29-29

4.1 Component and price list 29

Chapter 5: CONCLUSIONS 30

5.1 Remarks 30
5.2 Implementation 30
5.3 Benefits 30
5.4 Limitations 31
5.5 Work Scope in the Future 32

References 33

Appendix 33

vii
©Daffodil International University
LIST OF FIGURES

Figure Figure Page


Caption
1.1 ZMPT 101B Voltage Sensor. 2
1.2 ZMPT 101B Pin Configuration. 2
1.3 Current sensor circuit. 3
1.4 Connection between microcontrollers and NodeMCU 4
1.5 Internet Data
3.1 Block diagram of power Supply and Load Fault 8
Detection,
Protection and Online Monitoring.
3.2 Circuit diagram of Power Supply and Load Fault 9
Detection, Protection and Online Monitoring.
3.3 Flow chart of power Supply and Load Fault Detection, 10
Protection and Online Monitoring.
3.4 Arduino Nano. 11
3.5 Arduino Nano Pin details. 12
3.6 Node MCU ESP8266. 14
3.7 LM2596 DC-DC Buck Converter. 15
3.8 Logic Level Converter. 16
3.9 ZMPT 101B Voltage Sensor. 17
3.10 Transformer 12-0-12. 18
3.11 12v DC output using Full bridge rectifier. 19
3.12 Output signal using Capacitor. 19
3.13 LCD Screen. 20
3.14 SCT013 100A Current Sensor. 21
3.15 Load. 22
3.16 Relay 5v Module. 23
3.17 Supporting Components (Resistor, Capacitor, 24
Circuit Breaker, Breadboard, Wires)
3.18 Movable Type Regulator. 26
3.19 Arduino IDE Interface. 28
3.20 Final figure of our project. 31

viii
©Daffodil International University
LIST OF TABLES

Table Table Caption Page


3.1 Arduino Nano Specification. 13
3.2 NodeMCU specifications. 14
3.3 Logic level converter pin confirmation. 16
3.4 LCD display pin configuration. 20
4.1 Cost analysis 32

ix
©Daffodil International University
LIST OF ABBREVIATIONS

IC Integrated circuit
DC Direct current
IDE Integrated development environment
PCB Printed circuit board
LIPO Lithium polymer
GND Ground
VCC Voltage common collector
OPAMP Operational amplifier
IR Infrared
RAM Random access memory
I/O Input or output

x
©Daffodil International University
LIST OF SYMBOLS

+ Addition
- Subtraction
°C Degree Celsius
μA Micro ampere
kHz Kilohertz
mA Mill ampere
μs Microsecond
% Percentage
μF Microfarad

xi
©Daffodil International University
CHAPTER 1
INTRODUCTION

1.1 Motivation
Protection systems have become more complex as a result of advancements in
power systems. Traditional protective technologies are inadequate for the future vision of
electrical power networks. Overload and Overvoltage are the most common causes of short
circuits, which can result in fires in both industrial and household settings. Our
technological advancements necessitate a real-time monitoring system that provides
protection in the shortest amount of time. We dreamt a device can make this possible and
can be cost effective as well.

The foregoing factors prompted us to investigate and work on the causes of power
outages and protection. We were able to create a functional prototype. Our system can
continually monitor the voltage and current supplied to any load in real time. The reference
data was taken from the safe operating voltage range and maximum current and set them
in our device. It will compare the current state to the reference values on a regular basis to
detect and defend against defects, as well as to notify the user.

1.2 Procedure
Our project's goal is to make electrical equipment use safer. I'm particularly
interested in the power quality given to the equipment. Overvoltage and overload can and
will harm our electrical and electronic devices. We created a device that can detect, protect,
and notify users of defects via the internet.

1.2.1 Detection and protection method for flaws


Our equipment is capable of detecting two different types of problems. The
following are some of the methods for identifying and protecting faults.

©Daffodil International University 1


Over voltage: It is obvious that we need to be more precise when measuring the voltage to
detect any fluctuation. We choose to use the perfect one that is ZMPT 101B voltage sensor in
our device. This sensor is the best small size voltage sensor and can measure most accurately
up to 250v AC voltage. Within this value if the supply voltage varies this sensor will detect
it and pass it to the Microcontroller. If the voltage level exceeds the threshold voltage the
device detects the fault.

Fig 1.1: ZMPT 101B AC Voltage Sensor Module

There are four pins on the ZMPT101B module:

VCC: 5 V module power supply

GND stands for Ground.

OUT: The analog output of the module.

This module's pinout can be seen in the figure below.

Fig 1.2: ZMPT 101B Pinout

©Daffodil International University 2


Over Load: The load itself is the primary cause of overload. Overloading electronic
devices can be fatal. In the same way that we use an Arduino Uno to detect and decide
on voltage, we use an Arduino Uno to determine and decide on overload and fault. The
draw of high current will cause the voltage to remain constant over load. We are using
a current sensor to measure current. The microcontroller compares the current value
on regular basis, and if it exceeds the threshold value, a fault happens.

Fig 1.3: Current Sensor Circuit

In a series circuit configuration, the current sensor (SCT013) is connected


between the load and the power source. As a result, current flows from the source to the
load through the sensor. This sensor delivers information to the microcontroller, which
measures current in amperes. As a result, if the current rate exceeds the threshold value,
an overload fault occurs. The power from the source to the load will be switched off
right away.

1.2.2 Online fault data transmission method

If our equipment detects a fault, it will automatically transmit messages to an

©Daffodil International University 3


Online server through the internet. Our device is outfitted with a NodeMCU that houses
anEsp8266 WI - fi module. The ESP8266 uses Wi-Fi to connect to the internet.

The ESP8266 includes an 802.11b/g/n HT40 Wi-Fi transceiver, allowing it to


connect to a Wi-Fi network and interact with the Internet, as well as create its own
network for other devices to connect to. This expands the capabilities of the ESP8266
NodeMCU.

Fig 1.4: Connection between Microcontroller and NodeMCU

Microcontrollers identify faults as soon as they occur. This error information is


sent to a second microcontroller that is linked to the NodeMCU. Every 16 seconds, the
Node MCU delivers the current state of our device to the desired or an app that can be
monitored from anywhere around the world.

©Daffodil International University 4


Fig 1.5: Internet Data when the fault detect (Green-Good/Red-Bad)

1.3 Objectives
Overload protection is really overheated protection, which is triggered by a flow of
overcurrent within the circuit for a set period of time.
Overheating damages circuit components and increases the risk of fire, explosion, and
injury. Overheating frequently causes irreversible damage, and the only method to fix it is
to replace some components.
Our goal is to create a functioning prototype of a device that can monitor voltage, and
current and current delivered to a load and protect the load in the event of a power delivery
anomaly, as well as updating the current state power quality online.
i: Creating a fault detection device based on a programmable microcontroller.
ii: In the event of a power outage, the load is protected.
iii: Real-time fault data is uploaded to the internet.

1.4 Scope

The purpose is to keep electrical components safe. However, our gadget includes a
few extra characteristics, including real-time monitoring of voltage, and current data, as
well as digital logging of problem states. All of these aspects are extremely helpful in
protecting against a fault as well as understanding the malfunction so that action can be
taken to resolve the problem.
Our device has a wide range of applications in various industries and residential

©Daffodil International University 5


Appliances as well. Almost all industries employ motors, heaters, and other electrically
powered machinery, which all require some form of protection. We believe our product
will be a valuable addition to all sectors. Data monitoring features can also be utilized to
investigate the behavior of any load.

©Daffodil International University 6


CHAPTER 2
LITERATURE SURVEY

In today's world, difficulties with AC Induction motors are frequent. In this case, a
novel low-cost and reliable protection mechanism is used [1]. When it comes to power
related protection, the major significant elements that are examined in this similar area are
disconnection speed, dependability, and cost [2]. The manual technique of power supply
changeover is still used in most businesses, and it has a number of drawbacks, including
time waste, demanding labor, fire hazard, and high maintenance frequency [3]. The fear
that comes with a persistent or regular power failure or outage limits the amount of money
that can be invested in power-related projects, stifling the growth of companies and
international Operations [4]. Previous research has shown that in the event of a failure with
the AC main power supply, the protection device will automatically turn on and off the
main power supply, removing the need for anybody to operate it manually. Its purpose is
to protect household equipment like fans, televisions, refrigerators, and other electronics
from under and overvoltage in the main power supply [5]. Using a microprocessor,
transistor, and other discrete components, the suggested device protects industrial,
commercial, and residential equipment by monitoring under voltage, overvoltage, and
overcurrent problems. The microcontroller, which performs the majority of the gadget's
control, is at the heart of this protective device [6]. Another breakthrough that we must
address regarding the research which is the Internet of Things (IOT) paradigm enables
access to and control of devices from anywhere and at any time. The trend in this area is
for various devices to interface with the ESP8266 Node MCU module. Further research
has revealed that the gadgets can even be managed in relation to the ESP stations in use
[7]. Voltage fluctuations are one of the most serious power quality issues that industry and
home appliances encounter, and they can cause serious damage to expensive electrical
equipment. Electrical Power System Protection is essential to protect both users and system
equipment from failures; as a result, electrical appliances are not permitted to run without
a protective device installed [8].
.

©Daffodil International University 7


CHAPTER-3
LAYOUT & CONSTRUCTION

3.1 Introduction

Microcontrollers are used in our project to process and act on data. This has been coded by
us and can be programmed again in the future. Our goals are to continuously measure
voltage and current and compare the results to a reference value. If the real-time data
overshoots, the microcontroller will turn off the power to the load. In addition, the fault
state is updated on a regular basis on the website via the internet. We utilized an
Atmega328p microprocessor to prototype our gadget. This is where the device's brain is
located. It contains inputs for data and sensor values, as well as outputs for sending
compliments. We utilized an ESP8266 Node MCU to communicate with the internet and
send data to an online server. This is a microcontroller with a Wi-Fi module attached to it.
It has I/O pins that are used to feed data from the Microcontroller to an online server over
the internet.

©Daffodil International University 8


3.2 Block Diagram

This block diagram depicts how components communicate with one another as well
as the overall process. I'm gathering information from the sensors. Temperature, voltage,
and current sensors are included. Current sensors are connected to the power supply line,
whereas temperature sensors are connected to the load and voltage.

Fig 3.1: Power Supply Block Diagram with Load Fault Detection, Protection, and
Online Monitoring

As a result, this diagram depicts how inputs and outputs are connected, as well as
who they are related to. Sensor data is analyzed in the microcontroller, and the
microcontroller determines whether or not a fault has occurred based on that data. In the
event of a fault, the microcontroller will send a signal to the relay, which will switch off
the power and send data to the NodeMCU, which will interact with the remote server. The
state of the load can be monitored at any time using LCD monitors controlled by the
microcontroller.

©Daffodil International University 9


3.3 Circuit Layout
This circuit diagram depicts the prototype project's actual circuit diagram.

Fig. 3.2: Power Supply, Load Fault Detection, Protection, and Online
Monitoring Circuit Diagram

©Daffodil International University 10


3.4 Flow diagram
The programming logic can be seen in this flow chart. The microcontroller must
program itself based on the data it receives. We are collecting three distinct types of data
from three different sensors. The microcontroller receives data from these sensors on a
regular basis. The data is then compared to the threshold values by the microcontroller.

NO

Yes

Fig 3.3 Power Supply and Load Fault Detection, Protection, and Online Monitoring flow
chart.

©Daffodil International University 11


A problem has occurred if any parameter passes or reaches the threshold value. When the
microcontroller detects a fault, it sends a signal to turn off the power and communicates
fault data to the NodeMCU. Any problem data from NodeMCU is sent to an online server
through the internet. As a result, this is part of the data movement and processing process.

3.5 Equipment
3.5.1 Overview
We utilized a variety of electrical and non-electrical components to construct our
prototype, including PVC board, nuts and bolts, glue, holding brackets, and so on. Because
this was an electrical project, we concentrated on the electrical components.
Microcontrollers have been used to process diverse data in order to identify errors. There
is also a Wi-Fi gadget to connect to the internet and interact. We used a relay that is
controlled by microcontrollers and is used to turn off the electricity when it is no longer
needed. We used two tungsten light bulbs to mimic load and failures. This is the load I
chose because it draws a lot of current and heats up quickly.

3.5.2 Microcontroller
The Arduino Nano is a compact, comprehensive, versatile, and breadboard-friendly
Microcontroller board based on the ATmega328p. It was designed by Arduino.cc in Italy
in 2008 and includes 30 male I/O headers set in the DIP30 manner. There are 14 digital
pins, 8 analog pins, 2 reset pins, and 6 power pins on this board.

Fig 3.4: Arduino Nano

©Daffodil International University 12


The Arduino IDE is used to program it. It gathers information from its pins,
which can be utilized as input or output. When programming the microcontroller, the
mode must be specified. Input mode is frequently set on pins attached to sensors. There
are analog and digital pins on this microcontroller. As our data type is digital, I am only
using digital pins in input mode to collect sensor data.

The Arduino Nano is basically a smaller version of the Arduino UNO, and the two boards
have nearly identical functionality. It has a 5V operational voltage, however the input
voltage can be anywhere between 7 and 12V. The maximum current rating of the Arduino
Nano is 40mA, so the load connected to its pins should not drain more than that.

Fig 3.5: Arduino Nano pin detail.


The flash memory size is either 16KB or 32KB, depending on the Atmega328p board. For
example, the Atmega168 has 16KB of flash memory whereas the Atmega328 has 32KB.
The code is stored in flash memory. A bootloader occupies two kilobytes of the total flash
memory.

©Daffodil International University 13


3.5.2.1 Arduino Nano's specifications are as follows:
Microcontroller ATmega328

Architecture AVR
Operating Voltage 5V
Flash Memory 32kb of which 2kb used by boot load
SRAM 2kB
Clock speed 16MHz
Analog IN Pins 8
EEPROM 1kB
DC Current per I/O Pins 40mA *I/O Pins)
Input voltage 7-12 V
Digital I/O Pins 22 (6 of which are PWM)
PWM Output 6
Power Consumption 19mA
PCB Size 18 × 45 mm
Weight 7g
Product Code A000005
Table 3.1: Technical specification of Arduino Nana

NodeMCU based on ESP8266 was also used. It's a Lua-based open-source firmware and
development board aimed at IoT applications. The ESP8266 Wi-Fi SoC firmware is
included. We are connecting with this module to the internet and sending data to the
"thingspeak" server on the "thingspeak" website, we are uploading and displaying fault
state.

©Daffodil International University 14


Fig 3.6: Node MCU Based on ESP8266

3.5.2.2 NodeMCU Configuration:

No. Pin Category Pin Name Description


1) power  Micro-USB Micro-USB: The USB port can be
 3.3V used to power the NodeMCU.
 GND 3.3V: To power the board, a
 Vin regulated 3.3V can be applied to this
pin.
GND: Ground pins.
Vin: Power Source from Outside.
2) Control Pins  EN The microcontroller is reset using the
 RST pin and button.
3) Analog Pin  A0 Used to measure analog voltage
between 0 and 3.3 volts.
4) GPIO Pins  GPIO1 to GPIO16 NodeMCU's board features 16
general-purpose input-output pins.
5) SPI Pins  SD1 SPI communication is supported by
 CMD four pins on the NodeMCU.
 SD0
 CLK
6) UART Pins  TXD0 NodeMCU has two UART
 RXD0 interfaces, UART0 (RXD0 &
 TXD2 TXD0) and UART1 (RXD1 &
 RXD2 TXD1). UART1 is used to upload
the firmware/program.
Table 3.2: NodeMCU Configuration

©Daffodil International University 15


3.5.3 DC-DC buck converter

The supplied voltage and operational voltage of the components of our or any
device will not be the same, and various components in the same device may have different
voltage levels. Our power source is a 220v stepped down to 12v, but most of our
components require 5 volts to function, so I must scale it down.
We are using a DC-DC buck converter to scale down the voltage. Buck converters
are commonly used to reduce DC voltage. LM2596 buck converter module is the buck
converter we used.

Fig 3.7: LM2596 DC-DC buck Converter.


Feature
• 3.3-V,5-V, 12-V, and Adjustable Output Versions
• Adjustable Version Output Voltage Range: 1.2-Vto 37-V± 4% Maximum Over
Line and Load Conditions
• Available in TO-220and TO-263Packages
• 3-A Output Load Current
• Input Voltage Range Up to 40 V
• RequiresOnly4 External Components
• Excellent Line and Load Regulation Specifications
• 150-kHz Fixed-Frequency Internal Oscillator
• TTL Shutdown Capability
• Low power Standby Mode, IQ, typically 80μA

©Daffodil International University 16


• High Efficiency
• Uses Readily Available Standard Inductors
• Thermal Shutdown and Current-Limit Protection

This buck conversion was chosen since it is inexpensive and readily available. Even
though this model's maximum current flow rate is limited, it won't be an issue because our
equipment uses extremely little power.

3.5.4 Logic level converter


The input to a microcontroller is effectively a voltage level. Data is driven through
signal pins based on voltage and voltage difference. However, not all microcontrollers have
the same voltage level. It differs from one microcontroller to the next. To measure voltage,
current, we used an Atmega328P. When a problem happens, we must submit data over
the internet to the "thingspeak" server. We used an ESP8266-based NodeMCU for this.
The Atmega328P's digital logic voltage is 5 volts, however the NodeMCU's maximum
input and output logic voltage is 3.3 volts.
As a result, we can't connect directly between the Atmega328P and the NodeMCU
since the Atmega328P's 5-volt signal will destroy the NodeMCU. That’s why, the logic
level converter enters the picture.

Fig 3.8: Logic Level Converter.

©Daffodil International University 17


3.5.4.1 Pin arrangement for a logic level converter

No. Pin name Pin Details


1. LV1-LV4 3.3 Voltage side
2. LV 3.3 Voltage reference side
3. GND Ground
4. HV1-HV4 5.0 Voltage side
5. HV 5 Voltage reference side
6. GND Ground
Table 3.3: Configuration of the logic level converter pins.

3.5.5 ZMPT 101B AC Voltage Sensor Module

A voltage transformer, the ZMPT101B, is perfect for measuring AC voltage. It


measures voltage and power with high precision and consistency, and it can measure up
to 250V AC. It's easy to use and includes a multi-turn trim potentiometer for fine-tuning
the ADC output.

Fig 3.9: ZMPT101B Voltage Sensor.

Its auxiliary circuitry, which is focused on the LM358 twin op-amp chip, also
includes an inbuilt multiturn trim pot for modifying the isolated analog output. The
module's recommended operating voltage is 5VDC.

©Daffodil International University 18


Configuration:

 Analog 0 - 5V output signal


 Dimensions: 49.5 mm x 19.4 mm (mm)
 Temperature range: 40°C to 70°C

3.5.6 220v AC to 12 DC transformer


A 12v step-down transformer with three secondary terminals is known as a 12-0-
12 transformer. A center tap transformer is another name for this type of transformer. The
input voltage is 220 to 230 volts, and the output voltage is 12v-0-12 volts. Each side
terminal from 0v is 12v, and the center wire terminal is considered 0v.

Fig 3.10 220v AC to 12 DC transformer

To get 12 volts from a 12-0-12 transformer, connect the transformer’s two side
terminal wires to the diodes and leave the transformer’s center terminal alone. There is no
way to link anywhere. Using a 12-0-12 transformer, this connection produces a full-wave
12v output. There will be no reduction in current. As we used full bridge rectifier to get
12V, we need to add a filter capacitor and the reason is that there is no full AC conversion
into DC during the rectification process; some AC signals arrive without conversion and
behave like harmonic noise or ripple at the load section. The important attribute of a
capacitor is that it only allows AC to pass through while blocking DC. As a result,

©Daffodil International University 19


unwanted AC signals are removed by the bypass across the capacitor, resulting in a
smoother DC signal.

Fig 3.11: 12v DC output using 12-0-12 transformer full bridge rectifier.

Fig 3.12: Output Signal after using Capacitor.

©Daffodil International University 20


3.5.7 LCD screen

We are showing the real data of two parameters: voltage and current on a 3.5.5
LCD display. We're also employing a 16x2 "Liquid Crystal Display" to show these
numbers.

Fig 3.13: LCD Screen

A liquid crystal display, or LCD, gets its name from its definition. It is made up of
two different states of matter: solid and liquid. A liquid crystal is used to create a visible
image on an LCD. Liquid crystal displays (LCDs) are ultra-thin display screens that are
commonly seen in laptop computers, televisions, cell phones, and portable video games.

3.5.8.1 LCD Display pin configuration


No Pin name Pin Details
.
01. Pin1 Ground pin
02. Pin2 Voltage supply pin
03. Pin3 V0/VEE/Control Pin
04. Pin4 Register Select/Control
Pin
05. Pin5 Read/Write/Control Pin
06. Pin6 Enable/Control Pin
07. Pin7 to Data Pins
Pin14
08. Pin15 +ve pin of the LED
09. Pin16 -ve pin of the LED
Table 3.4 LCD Pin Configuration

©Daffodil International University 21


3.5.8 SCT-013 100A AC Current Sensor Clamp Type
We must measure current to assess overload. We used the SCT 013 100A split core
current transformer to measure alternating current or electricity consumption. This non-
invasive current sensor can measure a load up to 100 amps when clamped around the
supply line. To measure current, simply clip it around the current source and it will emit a
(very) modest AC voltage equivalent to the current. On one end, the cable is terminated
with a conventional 3.5mm jack (like a headphone jack).

Fig 3.14 SCT-013 100A AC Current Sensor

Specifications:

 Input Current: 0~100A AC


 Output Mode: 0~50mA
 Non-linearity: ±3%
 Turn Ratio: 100A:0.05A
 Resistance Grade: Grade B
 Work Temperature: -25°C ~ 70°C
 Leading Wire in Length: 1m
 Non-invasive current transformer
 Suitable for lighting equipment, AC motors, air compressors, monitoring, current
measurement, and protection

©Daffodil International University 22


 Two form of output current, voltage (voltage output built-in the sampling resistor)
 Non-linearity ±3% (10%-120% rated input current)
 Model: SCT-013-000
 Dielectric Strength: 6000V AC/1min
 Input Current: 0A-100A
 Mechanical strength: opening and closing times, no less than 1000 times (20 ℃)
 Opening Size: Approx. 0.51 * 0.51inch / 13 x 13mm

The split core type, such as the CT shown above, is ideal for our purpose since it can be
clipped directly on to either the live or neutral wire coming into the building without
requiring any high-voltage electrical work.

3.5.9 Load
We need to create false fault to prove that our project works. For this we need a
load and it can be anything.

Fig 3.15: Loads


The reason for choosing this type of load is because they draw a lot of current and
also gets hot, so simulating over load and over heat is easier. Also, they are easy to find
and also cheap. Our threshold current is set to handle only one light at a time so when two
of them are turned at the same time overload fault occurs.

©Daffodil International University 23


3.5.10 Relay
A relay is an electrically operated switch. The relay we're employing is an
electromechanical relay that's operated by an electromagnet. It's a widely used gadget in
a variety of electrical applications.

Fig 3.16: Relay 5v Module

We are utilizing a 5v operate relay, which implies that if the coil is powered by 5
volts, the relay will flip positions. The reason for using a relay in our project is that it is
simple to control with a microcontroller and has a rapid switching response time. In the
event of a fault, the microcontroller sends a signal to the relay, which turns off the power
supply to the load.

3.5.11 Supporting Elements


To finish this project, various passive and active components are used. The
majority of these components are fundamental electrical circuit requirements, with a few
exceptions such as circuit breakers. This breaker will switch off the electricity if any faults
arise while our device is working for our safety.

©Daffodil International University 24


Fig 3.17: Resistor, Wires, I2C Module, Capacitor, Circuit Breaker, Breadboard.

3.5.11.1 Circuit Breaker


A circuit breaker is made up of both permanent and movable contacts. When the
circuit is closed, these contacts are in contact with each other and transporting the current.
The current carrying connections, known as electrodes, engaged each other under the
pressure of a spring when the circuit breaker was closed. We used the circuit breaker as a
overall protection from any uncertain situation.

3.5.11.2 Capacitor
A capacitor is a device that stores a small amount of charge. It has a wide range of
applications. We are utilizing capacitors in our project to fill in power gaps and smooth out
voltage curves.

3.5.11.3 Resistor
It opposes current flow, as the name implies. The resistance of a resistor is
determined by its resistivity in Ohm (Ω) and the voltage applied across it. A resistor is
required in almost every electronic circuit. I used resistors in our project for a variety of
purposes, including pull down resistors, LCD led current limiters, and so on.

©Daffodil International University 25


3.5.11.4 I2C Module
Inter-Integrated Circuit is the abbreviation for I2C. It's a serial communication bus
interface connection protocol that's built into devices. It was first created in 1982 by Philips
Semiconductor. It has recently become a popular protocol for short-distance
communication. I2C sends data in the form of messages. Frames of data are used to break up
messages. Each message consists of an address frame with the slave's binary address and one
or more data frames containing the data to be delivered. Between each data frame, the message
includes start and stop conditions, read/write bits, and ACK/NACK bits.

3.5.11.5 Electrical Wires


Electrical wire allows current to pass from one component to another. Electrical
wires are made of conductive metal that can conduct electricity. We utilized a breadboard
and electrical wires for electrical communication.

3.5.11.6 Regulator

We have used a movable type fan regulator to increase and decrease the voltage
level. As we have to show the under voltage faults and over voltage faults we have
selected a threshold value. When we move the regulator anti-clock wise the voltage
decrease because of the capacitor inside the regulator discharging slowly and it will show
the under voltage fault once comes down the lower threshold value. It is used for the

Fig3.18: Movable type Regulator.

Demonstration only
©Daffodil International University 26
Our system whenever detect the changes comparing the threshold value the relay will trip
and the appliance will be cut off.

3.5.12 Microcontroller Programming


We utilized the Atmega328p as our microcontroller, which is used to control our
device, and I programmed it using the Arduino IDE.

3.5.12.1 Overview
Our goal is to create a smart wheel chair that is both economical and safe. To
create this project, we used a variety of electrical components, sensors, and other
materials. The microcontroller is one of the most important components. It serves as the
project's brain. This is where all of the data from the user to the sensors is processed. It
sends an output signal to the motor driver, which drives the motors, based on the values
of the inputs.
We used the "Arduino IDE" to program the microcontroller. The Arduino
Integrated Development Environment (IDE) is a cross-platform application for Windows,
macOS, Linux, and other operating systems written in C and C++. It's used to write and
convert projects to Arduino feasible sheets, as well as other merchant advancement sheets
with the help of outsider centers.

We used easyEDA to create our circuit diagrams. EasyEDA is a more


straightforward ground-breaking PCB design tool that allows gadget engineers,
instructors, understudies, producers, and fans to plan and share their projects. This is a
strategy tool that incorporates LCSC components inventory and JLCPCB PCB
administration and helps clients to set aside time to turn their ideas into real things.

©Daffodil International University 27


3.5.12.2 The Arduino IDE
The Arduino Integrated Development Environment (IDE) includes a word
processor for writing code, a message area, a book support, a toolbar with catches for
standard capacities, and a series of menus. It connects to Arduino equipment to transfer
programs and communicate with it. Arduino programming can be used to modify the clever
microcontroller unit known as Arduino Uno. There are no prerequisites for learning other
programming languages beyond Arduino. Select "Arduino Uno" from the Devices, Board
menu right away (as per the microcontroller on your board). The ATmega328 IC used in
the Arduino Uno comes pre-programmed with a boot loader that allows you to transfer
fresh code to it without the use of an external device.

Fig 3.19 Interface for the Arduino IDE

©Daffodil International University 28


The STK500 protocol is used for communication. We may also program the chip
without using the boot loader by using the in-circuit Serial Programming header. The
source code for the ATmega328p firmware is also available. The DFU boot loader is
installed on the ATmega16U2/8U2. On Rev1 boards, this can also be engaged by
connecting the jumper on the back of the board, which will then reset the 8U2. There is a
resistor on subsequent boards that pulls the 8U2/16U2 HWB line to the ground, making it
easier to enter DFU mode.
One of the most recent microcontroller units is the Arduino Uno. It includes a lot
of options for interacting with a computer, other Arduinos, and microcontrollers. With
serial connection, the ATmega328 may deliver UART TTL at 5 volts. Which is also
available on digital pins 0 and 1, often known as RX and TX, respectively, for receiving
and transmitting data. This serial communication is channeled through a USB cable by an
ATmega16U2 on the board, which appears to software on the PC as a virtual COM port.
There is no need for an extra driver because the firmware uses the standard USB COM
driver. An inf file is also required on Windows. The Arduino software features a serial
monitor that can be used to send and receive simple text data to and from the Arduino
board.
When data is delivered over the USB to the serial chip and USB connection to the,
the RX pin and TX pin LEDs on the board will light up. Software The serial library enables
serial communication on any Uno digital pin. I2C and SPI communication are supported
by the ATmega328. The Wire library in the Arduino software allows you to use the I2C
bus. Arduino programs are written in C or C++, and the code for Arduino is referred to as
a sketch. To compile all of the programs, the Arduino IDE uses the GNU toolchain and
AVR Lib, and to upload the applications, it uses avrdude. The Arduino platform employs
Atmel microcontrollers, and software for the chip can be written using Atmel's
programming environment, AVR Studio, or the power Atmel Studio.
The microcontroller simulation in Proteus is accomplished by applying a hex or
debug file to the microcontroller portion. It is then co-simulated with any attached analog
and digital circuits. It can be used in a wide range of prototyping tasks, including motor
control, temperature control, and user interface design. It's also useful in the hobby world.

©Daffodil International University 29


Because no hardware is required. As a result, it is suitable for use as a training or teaching
tool. Co-simulation of the following is supported:
● PIC10, PIC12, PIC16, PIC18, PIC24, and dsPIC33 Microcontrollers from
Microchip Technologies.
● Microcontrollers such as the Atmel AVR (and Arduino), the 8051, and the
ARM Cortex-M3
● Texas Instruments MSP430, PICCOLO DSP, and ARM Cortex-M3
● Microcontrollers. NXP 8051, ARM7, ARM Cortex-M0, and ARM Cortex-
M3 Microcontrollers.
Parallax Basic Stamp, Free scale HC11, 8086 Microcontrollers.

©Daffodil International University 30


CHAPTER 4
Results and Discussion

4.1 Assembling our project


We arranged our every equipment carefully from the local market and also from few
online shop with proper ratings. At the very beginning we thought to innovate the project by
drawing in Vero board but as it is our prototype we go for the basic implementations. We
used a hard board for mounting our equipment’s as per the circuit diagram.

Our first focus was on the protection of the equipment’s we used so we have added a
circuit breaker for any uncertain situation. A 240V to12v ac to dc transformer was added then
to get the desired voltage 5V to run the heart of our project the ‘Microcontroller’. As we
stated above the operating voltage is 5V for the microcontroller.

To get the 5V DC we have added a DC to DC buck converter to scale the 12V dc. As
we have used two microcontroller, one to detect the data another to command the Relay to
trip.

Fig: 3.20: Our Project

©Daffodil International University 31


4.2 List of components and prices

This project was built with a variety of electronics and electrical components. The
following is a price list:
No. Name of the component Price Quantity Total price
1. Atmega328p 80 tk 4 pc 650 tk
2. NodeMCU 350 tk 1 pc 350 tk
4. Capacitor 470uf 5 tk 2 pc 10 tk
6. Logic level converter 180 tk 1 pc 180 tk
7. 220v ac to 12v dc 230 tk 1 pc 230 tk
transformer
8. LCD 16x2 90 tk 2 pc 180 tk
9. DC-DC buck Converter 150 tk 1 pc 150 tk
10. Relay 80 tk 1 pc 80 tk
11. ADS1113 250 tk 1 pc 250 tk
12. Registers 0.001 tk 8 pc 0.008 tk
13. Bulb 50 tk 1 pc 50 tk
14. SCT-013 100A AC 350 tk 1pc 350 tk
current sensor clamp
type
15. Wire 3 tk 5 set 15 tk
16. Ac Voltage sensor 180 tk 1 pc 180 tk
Total 2645.008 tk
Table 4.1: Price List

©Daffodil International University 32


CHAPTER 5
Remarks

5.1 Conclusion

Our goal was to provide something new, better, and more modern to protect
electrical loads from problems. Our project uses the internet to identify, protect, and notify
real-time electrical issues, as well as to continuously update the power state.
Microcontrollers are being used to measure real-time data such as voltage, current, and
temperature. We utilize those characteristics as our reference values because every load
has safe operating parameters (voltage, temperature, etc.). When a malfunction occurs, the
microcontroller turns off the power to the load immediately, saving the load. It is critical
to inform/monitor the state of the defect before taking action to rectify it. Every 15 seconds,
we update the state of fault or no-fault circumstances over the internet.
Moreover, the device can detect faults and monitor real-time metrics, as well as
send out alerts via the internet when a fault occurs.

5.2 Implementations
Our project has a wide range of applications because it provides protection for any delicate
electrical and electronic equipment. Here are a few examples:

• Factories that use a lot of pricey electrical equipment.


• Difficult to reach/work/remote sites since it can deliver data automatically
• For distance monitoring of power supply quality

5.3 Benefits
Our device is cutting-edge and outperforms standard options. The following are a few
advantages:
• The response time is quite quick.
• Because there are no mechanical parts, there is no mechanical wear and tear.
• Data is sent over the internet and may be viewed from any location.

©Daffodil International University 33


• Lessening human effort
• Re-programmable.

5.4 Limitations
Nothing is perfect, and every device has limitations, but I will continue to strive to improve
it in the future. The following are a few drawbacks:

• When compared to a fuse/circuit breaker, the price is higher.


• Internet access is required.
• Microcontroller specialists are required to program / re-program.

5.5 Work Scope in the Future


There are only a few places where we can improve it. At the moment, it just sends
fault states, not values. So, with some research, we will be able to submit the parameter
values. The capacity and quantity of loads can be simply increased as well. In addition, the
device can be made more compact and smaller by reducing the number of microcontrollers
utilized, lowering the device's price significantly.

©Daffodil International University 34


REFERENCES
[1] Shivpuje, R. M., & Patil, S. D. (2017, June). Microcontroller based fault detection
and protection system for induction motor. In 2017 International Conference on Intelligent
Computing and Control Systems (ICICCS) (pp. 1187-1191). IEEE.

[2] Arpit Rana, Jeet Shah, Anuradha Deshpande, “Simulation for Power Transformer
Protection Using Microcontroller Relay.” International Journal of Scientific Engineering
and Technology, Volume-4. ISSN: 2277-1581. June 2015.

[3] Amuzuvi, C. K., & Addo, E. (2015). A microcontroller-based automatic transfer


switching system for a standby electric generator. GMJ, 15(1).

[4] Ehiabhili, John. C and Ezeh, Chioma. V and Orji, Onyeka. V, Single Phase
Microcontroller-Based Automatic Changeover Switch (February 28, 2018). International
Journal of Electronics, Communication & Instrumentation Engineering Research and
Development (IJECIERD), Vol. 8, Issue 1, Feb 2018, 7-16.

[5] Sarder, M. A., Rahman, M., Mostakim, M. N., Rahman, M. M., & Islam, M. S. A
Prototype of AC Voltage Measurement and Over & Under Voltage Protector Using
Arduino.

[6] Naik, S. G., Ravi, V., & Arshiya, R. (2018). Programmable protective device for
LV distribution system protection. Protection and Control of Modern Power Systems, 3(1),
1-6.

[7] Naik, S., Ravi, V. & Arshiya, R. Programmable protective device for LV
distribution system protection. Prot Control Mod Power Syst 3, 28 (2018).
https://doi.org/10.1186/s41601-018-0101-5

[8] Raju, K. L., Chandrani, V., Begum, S. S., & Devi, M. P. (2019, March). Home
automation and security system with node MCU using internet of things. In 2019
International Conference on Vision Towards Emerging Trends in Communication and
Networking (ViTECoN) (pp. 1-5). IEEE.

©Daffodil International University 35


APPENDIX
In our project, we employ two types of microcontrollers: the Atmega328p and the
NodeMCU ESP8266. We used the "C" programming language and the "Arduino IDE"
compiler. The following are the codes:

#include <ESP8266WiFi.h>
#define LEDonBoard 2
String apiKey = "O53XW0J11ACKUWBY";
const char* ssid = "MiNAKAMiKA 2G";
const char* password = "0000000X";
const char* server = "api.thingspeak.com";
WiFiClient client;
void setup() {
Serial.begin(115200);
delay(500);
delay(500);
WiFi.begin(ssid, password);
Serial.println("");
pinMode(LEDonBoard, OUTPUT);
digitalWrite(LEDonBoard, HIGH);
Serial.print("Connecting");
while (WiFi.status() != WL_CONNECTED) {
Serial.print(".");
digitalWrite(LEDonBoard, LOW);
delay(250);
digitalWrite(LEDonBoard, HIGH);
delay(250);
}
digitalWrite(LEDonBoard, HIGH);
Serial.println("");

©Daffodil International University 36


Serial.print("Successfully connected to : ");
Serial.println(ssid);

pinMode(4, INPUT);
pinMode(5, INPUT);

}
void loop() {
int A = digitalRead(4);
int B = digitalRead(5);
//int V = digitalRead(14);
if (client.connect(server, 80)) {
String postStr = apiKey;
postStr += "&field1=";
postStr += String(A);
postStr += "&field2=";
postStr += String(B);
postStr += "\r\n\r\n";

client.print("POST /update HTTP/1.1\n");


client.print("Host: api.thingspeak.com\n");
client.print("Connection: close\n");
client.print("X-THINGSPEAKAPIKEY: " + apiKey + "\n");
client.print("Content-Type: application/x-www-form-urlencoded\n");
client.print("Content-Length: ");
client.print(postStr.length());
client.print("\n\n");
client.print(postStr);

Serial.print("A: ");
Serial.print(A);

©Daffodil International University 37


Serial.print(" B: ");
Serial.print(B);

}
client.stop();
Serial.println("Waiting...");
digitalWrite(LEDonBoard, LOW);
delay(250);
digitalWrite(LEDonBoard, HIGH);
delay(750);
}
#include <Wire.h>
#include <LiquidCrystal_I2C.h>

#include "EmonLib.h"
#define VOLT_CAL 480
#define CURRENT_CAL 36
EnergyMonitor emon1;

LiquidCrystal_I2C lcd(0x27, 16, 2);

void setup()
{
Serial.begin(9600);
emon1.voltage(1, VOLT_CAL, 1.7);
emon1.current(0, CURRENT_CAL);

lcd.begin();

©Daffodil International University 38


lcd.clear();
pinMode(9,OUTPUT);
pinMode(10,OUTPUT);
pinMode(11,OUTPUT);
}
void loop()
{
emon1.calcVI(20,2000);

float currentDraw = emon1.Irms;


float supplyVoltage = emon1.Vrms;

Serial.print("Voltage: ");
Serial.println(supplyVoltage);

Serial.print("Current: ");
Serial.println(currentDraw);

Serial.print("Watts: ");
Serial.println(currentDraw * supplyVoltage);
Serial.println("\n\n");

if (currentDraw>5 || supplyVoltage>250)

{
digitalWrite(9,LOW);
if(currentDraw>2){
digitalWrite(10,HIGH);
lcd.setCursor(0,1);
lcd.print("OVER LOAD");
delay(500);

©Daffodil International University 39


lcd.clear();
}
if(supplyVoltage>180){
digitalWrite(11,HIGH);
lcd.setCursor(0,0);
lcd.print("OVER VOLTAGE");
delay(500);
lcd.clear();
}
delay(500);
lcd.clear();
}else{
digitalWrite(9,HIGH);
digitalWrite(10,LOW);
digitalWrite(11,LOW);

lcd.setCursor(0,0);
lcd.print("V=");

lcd.setCursor(2,0);
lcd.print(supplyVoltage);

lcd.setCursor(0,1);
lcd.print("I=");

lcd.setCursor(2,1);
lcd.print(currentDraw);

lcd.setCursor(11,0);
lcd.print("Watts");

©Daffodil International University 40


lcd.setCursor(11,1);
lcd.print(currentDraw * supplyVoltage);
delay(1000);
lcd.clear();
}
}

©Daffodil International University 41

You might also like