A Project Report Grid
A Project Report Grid
MICROCONTROLLER”
A
THESIS
SUBMITTED TO
I hereby declare that the project entitled “GRID FAILURE PROTECTION SYSTEM
USING MICROCONTROLLER” submitted for the B. Tech. (ECE) degree is myoriginal
work and the project has not formed the basis for the award of any other degree, diploma,
fellowship or any other similar titles.
i
CERTIFICATE
This is to certify that the project titled “GRID FAILURE PROTECTION SYSTEM
USING MICROCONTROLLER” is the bonafide work carried out by Prashant Kumar ,
Kushmesh Mishra, a student of B Tech(ECE) of Ambalika Institute of Management And
Technology, Lucknow (U.P.) affiliated to Dr. A.P.J. Abdual Kalam Technical University,
Uttar Pradesh (Lucknow) during the academic year 2018-19, in partial fulfillment of the
requirements for the award of the degree of Bachelor of Technology(Electronics And
Communication Engineering ) and that the project has not formed the basis for the award
previously of any other degree, diploma, fellowship or any other similar title.
We live in a rapidly changing world where the most visible worldwide trends are, for
example, the abundance of information, technological advancement and the growing average
life expectancy of the population. This has revolutionized the development of new
conceptualized products that are becoming more common and important to business life. In
this study, smart home as an example of those new products was chosen to be the object with
the aim of examining how to properly productize a smart home.
Although used for home automation and assistive technology mostly, the smart home concept
could be applied to all situations where its key features exist. When developing smart homes
for different needs, new product development processes combined with product portfolio
management was the essential. Therefore, the Development Funnel was used as the
theoretical framework for finding the main challenges and solutions of smart home
productization. The qualitative research approach was applied for the empirical part of the
study. In-depth interviews with semi-structured questions were conducted with two
interviewees: a smart home entrepreneur and a designer. Product positioning, customer
definition, cost-speed balancing in R&D were found as the most challenging aspects, whilst
focusing on customer segmentation, holistic user experience with integrated system schemes
and setting the ultimate goal as “being smarter” were seen as the main solutions.
The findings implicated a requirement for adopting the “products guiding market needs”
approach and introducing industrial standards for smart homes and their development.
However, because of the wide-ranging research scope and only a few primary data sources,
the study had its limitations. Further research could use more interviews or study the
efficiency of new product development from the “market-driven” vs “technology-pull”
perspectives.
ACKNOWLEDGEMENT
The success and final outcome of this project required a lot of guidance and assistance from
many people and I am extremely privileged to have got this all along the completion of my
project. All that I have done is only due to such supervision and assistance and I would not
forget to thank them.
I respect and thank Dr. S.Q.Abbas (Director General, AIMT), Dr. Alok Mishra (Director,
AIMT), for providing me an opportunity to do the project work in Ambalika Institute of
Management And Technology, Lucknow and giving us all support and guidance which made
me complete the project duly. I am extremely thankful to Dr. Pankaj Prajapati for providing
such a nice support and guidance, although he had busy schedule managing the corporate
affairs.
I owe my deep gratitude to our project guide Dr. Pankaj Prajapati, who took keen interest on
our project work and guided us all along, till the completion of our project work by providing
all the necessary information for developing a good system.
I would not forget to remember Dawar Hussain Rizvi Sir, of Ambalika Institute of
Management And Technology, Lucknow for their encouragement and more over for their
timely support and guidance till the completion of our project work.
I heartily thank our lab Instructor, Santosh Kumar Yadav, Electronics and communication
for his guidance and suggestions during this project work.
I am thankful to and fortunate enough to get constant encouragement, support and guidance
from all Teaching staffs of Department Of Electronics And Communication which helped us
in successfully completing our project work. Also, I would like to extend our sincere esteems
to all staff in laboratory for their timely support.
TABLE OF CONTENT
i. Declaration
ii. Certificate
iii. Abstract
iv. Acknowledgement
1.INTRODUCTION
Platform used
Aim of the project
Block diagram
Working of the project
Component list
Circuit Description
PCB layout
Printed circuit boards
2. SOFTWARE SPECIFICATION
Program-Studio 6 software v6.09
Areas of use
Overview of the hex editor mode
3. PROGRAMMING
4. SENSING UNIT
Temperature sensor
Microcontroller interface
Special microcontroller features:
Pin diagram
Special features of the Cpu
MCU family reference
CONCLUSION
REFERENCES
Introduction
1. INTRODUCTION
We know that in today’s time there is a big problem regarding failure of our
grid(power distribution system) when a grid fails the electricity of the whole
area get disconnected for days so it is a big problem to be solved that how to
protect our grid before failure. Keeping this point in our mind we are trying to
develop a system which can turn our grid of when dangerous condition occurs.
Sensing these two conditions we regulate all our decisions suppose if the
transformer temperature is less than a particular level then a indication is
provided and even if temperature exceeds a particular level then also a
indication is provided if the problem is not resolved then condition keeps on
going down so the power supply from the grid disconnected and let the grid
getting cooled when normal temperature is attained then grid again starts
functioning. And if grid voltage is increased above a particular level then that
phase of grid will be cut off. If phase voltage of grid is decreased below a
particular level then that phase of grid will be cut off. If phase voltage of grid
limits then that phase of grid will be on. There are three phases which are R
phase, Y phase and B phase.
Platform used
Hardware requirements:
3) Power Supply
4) Resistors
5) Capacitors
6) Transistors
7) LEDs
8) Connectors
9) Relays
12) Buzzer
13) switches
Software requirements:
• INFONICS:
Serial Programmer Software
Hex file editor
ALARMING SYSTEM
FOR OVER LOAD AND
OVER TEMPERATURE
POWER
SUPPLY
TEMPEATUR
E DISPLAY
MICROCONTRO
LLER
FOR
DECISION LCD
DISPLAY
TERMINATIN
G POWER
SUPPLY IN
DANGER
MICROCONTROLLER SECTION:
1. +5v supply: This +5v supply is required for the controller to get start
which is provided from the power supply section. This supply is provided
.
This section includes a buzzer as well as a resistance to limit the current. The
buzzer operates in the range of 20-25mA. The voltage given to the buzzer is 5v
and also the buzzer can operate between 3V-24V. The resistance used is
calculated by using the ohm’s law.
Buzzer is an indicating device which is used for checking the software condition
and also used for indicating any specific condition.
Motherboard : The principal board that has connectors for attaching devices to
the bus. Typically, the mother board contains the CPU, memory, and basic
controllers for the system. On PCs, the motherboard is often called the system
board or mainboard.
Expansion board : Any board that plugs into one of the computer's expansion
slots. Expansion boards include controller boards, LAN cards, and video
adapters.
Reading in and altering data on existing memory chips for, e.g., chip
tuning
In this mode, data can be loaded, processed and stored. Also, data can be
burned onto a chip or read from a chip.
Data can be loaded and saved in the binary, Intel-Hex, Motorola-S and
other formats.
The simple editing of data in the Hex editor with a comparison function
as well as area processing
Serial burn function for the production of large numbers of items with
identical data
#DEFINE RS PORTD,6
#DEFINE EN PORTD,7
#DEFINE MNS PORTD,5
#DEFINE RELAYR PORTD,4
#DEFINE RELAYB PORTC,6 ;INI LOW
#DEFINE LEDR PORTC,5 ;INI HIGH
#DEFINE LEDY PORTC,4 ;INI HIGH
#DEFINE LEDB PORTD,3 ;INI HIGH
#DEFINE LED1 PORTD,2 ;INI HIGH
#DEFINE RELAYY PORTC,7
#DEFINE BUZZER PORTD,1 ;INI HIGH
JMP main
;---------------------------------------------------
;XXXXXXXXXXXX--DECISION--
XXXXXXXXXXXXXXXXXXXXXXXXXXX
;---------------------------------------------------
DECISION
L_CJNGD CHANNEL1L,.180,DEC1
L_CJNLD CHANNEL1L,.250,DEC2
BCF LEDR
BSF RELAYR
BSF BUZZER
GOTO DECISION1
DEC1
DEC2
BSF LEDR
BCF RELAYR
BCF BUZZER
DECISION1
L_CJNGD CHANNEL2L,.180,DEC3
L_CJNLD CHANNEL2L,.250,DEC4
BCF LEDY
BSF RELAYY
BSF BUZZER
GOTO DECISION2
DEC3
DEC4
BSF LEDY
BCF RELAYY
BCF BUZZER
DECISION2
L_CJNGD CHANNEL3L,.180,DEC5
L_CJNLD CHANNEL3L,.250,DEC6
BCF LEDB
BSF RELAYB
BSF BUZZER
GOTO DECISION3
DEC5
DEC6
BSF LEDB
BCF RELAYB
BCF BUZZER
DECISION3
L_CJNL CHANNEL4L,.60,DEC7
BCF LEDR
BSF RELAYR
BSF BUZZER
GOTO DECISION4
DEC7
BSF LEDR
BCF RELAYR
BCF BUZZER
DECISION4
L_CJNL CHANNEL5L,.60,DEC8
BCF LEDY
BSF RELAYY
BSF BUZZER
GOTO DECISION5
DEC8
BSF LEDY
BCF BUZZER
BCF RELAYY
DECISION5
L_CJNL CHANNEL6L,.60,DEC9
BCF LEDB
BSF RELAYB
BSF BUZZER
GOTO DECISION6
DEC9
BSF LEDB
BCF RELAYB
BCF BUZZER
DECISION6
DECISIONEND
return
;**************************************************
;MAIN PROGRAM
;**************************************************
MAIN
MOVLW "G"
CALL WR_LCD
MOVLW "R"
CALL WR_LCD
MOVLW "I"
CALL WR_LCD
MOVLW "D"
CALL WR_LCD
MOVLW ""
CALL WR_LCD
MOVLW "P"
CALL WR_LCD
MOVLW "R"
CALL WR_LCD
MOVLW "O"
CALL WR_LCD
MOVLW "T"
CALL WR_LCD
MOVLW "E"
CALL WR_LCD
MOVLW "C"
CALL WR_LCD
MOVLW "T"
CALL WR_LCD
MOVLW "I"
CALL WR_LCD
MOVLW "O"
CALL WR_LCD
MOVLW "N"
CALL WR_LCD
MOVLW ""
CALL WR_LCD
CALL delay2
MAINLOOP
call HANDLE_DISPLAY
call DECISION
GOTO MAINLOOP
HANDLE_DISPLAY:
;***************************************************************
*******
;DISPLAY FOR R PHASE
;***************************************************************
*******
MOVLW 0X80
CALL SEND_COMMAND
MOVLW "R"
CALL WR_LCD
MOVLW ":"
CALL WR_LCD
MOVLW 0X82
CALL SEND_COMMAND
MOVF CHANNEL1L,W
CALL WR_LCD
MOVLW 0X86
CALL SEND_COMMAND
MOVLW "T"
CALL WR_LCD
MOVLW ":"
CALL WR_LCD
MOVLW 0X88
CALL SEND_COMMAND
MOVF CHANNEL4L,W
CALL WR_LCD
CALL delay2
;***************************************************************
*******
;DISPLAY FOR Y PHASE
;***************************************************************
*******
MOVLW 0X80
CALL SEND_COMMAND
MOVLW "Y"
CALL WR_LCD
MOVLW ":"
CALL WR_LCD
MOVLW 0X82
CALL SEND_COMMAND
MOVF CHANNEL2L,W
CALL WR_LCD
MOVLW 0X88
CALL SEND_COMMAND
MOVLW ""
CALL WR_LCD
MOVLW "T"
CALL WR_LCD
MOVLW ":"
CALL WR_LCD
MOVLW 0X8D
CALL SEND_COMMAND
MOVF CHANNEL5L,W
CALL WR_LCD
CALL delay2
;***************************************************************
*******
;DISPLAY FOR B PHASE
;***************************************************************
*******
MOVLW 0X80
CALL SEND_COMMAND
MOVLW "B"
CALL WR_LCD
MOVLW ":"
CALL WR_LCD
MOVLW 0X82
CALL SEND_COMMAND
MOVF CHANNEL3L,W
CALL WR_LCD
MOVLW 0X88
CALL SEND_COMMAND
MOVLW ""
CALL WR_LCD
MOVLW "T"
CALL WR_LCD
MOVLW ":"
CALL WR_LCD
MOVLW 0X8D
CALL SEND_COMMAND
MOVF CHANNEL6L,W
CALL WR_LCD
CALL delay2
return
wr_lcd:
BSF rs
MOVWF PORTB
BSF en
BCF en
call delay
RET
send_command:
BCF rs
MOVWF PORTB
BSF en
BCF en
call delay
RET
delay:
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
RET
END
delay2:
MOVLW .120
MOVWF DELAY_VARIABLE2
DELAY2
MOVLW .250
MOVWF DELAY_VARIABLE1
DELAY1
NOP
NOP
NOP
NOP
NOP
NOP
NOP
DECFSZ DELAY_VARIABLE1,F
GOTO DELAY1
DECFSZ DELAY_VARIABLE2,F
GOTO DELAY2
RETURN
Sensing unit
TEMPERATURE SENSOR
National Semiconductor’s LM335 IC has been used for sensing the temperature.
It is an integrated circuit sensor that can be used to measure temperature with an
electrical output proportional to the temperature (in oC). The temperature can be
measured more accurately with it than using a thermistor. The sensor circuitry is
sealed and not subject to oxidation, etc.
Features:
PIC16F87XA
Analog Features:
.
fig3:pin diagram of PIC16F874A/877A
PIC16F87XA
3.2.9.3 SPECIAL FEATURES OF THE CPU
All PIC16F87XA devices have a host of features intended to maximize system
reliability, minimize cost through elimination of external components, provide power saving
operating modes and offer code protection. These are:
• Oscillator Selection
• Reset
- Power-on Reset (POR)
- Power-up Timer (PWRT)
- Oscillator Start-up Timer (OST)
- Brown-out Reset (BOR)
• Interrupts
• Watchdog Timer (WDT)
• Sleep
• Code Protection
• ID Locations
• In-Circuit Serial Programming
• Low-Voltage In-Circuit Serial Programming
• In-Circuit Debugger
PIC16F87XA devices have a Watchdog Timer which can be shut-off only through
configuration bits. It runs off its own RC oscillator for added reliability.
There are two timers that offer necessary delays on ower-up. One is the Oscillator
Start-up Timer (OST), ntended to keep the chip in Reset until the crystal oscillator stable.
The other is the Power-up Timer (PWRT), which provides a fixed delay of 72 ms (nominal)
on power-up only. It is designed to keep the part in Reset while the power supply stabilizes.
With these two timers on-chip, most applications need no external Reset circuitry. Sleep
mode is designed to offer a very low current power-down mode. The user can wake-up from
Sleep through external Reset, Watchdog Timer wake-up or through an interrupt. Several
oscillator options are also made available to allow the part to fit the application. The RC
oscillator option saves system cost while the LP crystal option saves power. A set of
configuration bits is used to select various options.
Configuration Bits
The configuration bits can be programmed (read as ‘0’), or left unprogrammed (read
as ‘1’) to select various device configurations. The erased or unprogrammed value of the
Configuration Word register is 3FFFh. These bits are mapped in program memory location
2007h.
It is important to note that address 2007h is beyond the user program memory space
which can be accessed only during programming.
CONCLUSION
en.wikipedia.org
www.batronix.com
Microcontroller Programming
By Julio Sanchez