Design & Implementation of Microcontroller Based Automated Smart Grid System
Design & Implementation of Microcontroller Based Automated Smart Grid System
Design & Implementation of Microcontroller Based Automated Smart Grid System
Supervised By
Md. Rakibul Alam
Lecturer
Department of EEE
Sonargaon University (SU)
Submitted By
i
It is declared hereby that this thesis paper or any part of it has not been submitted to anywhere
else for the award of any degree.
........................................ …..........................................
Mahabub Alam Mahabub Alam
........................................ …............................................
Md. Harun-Or-Roshid Md. Homaiun Kabir
........................................ ...............................................
Md. Hasan Ali Md. Jewel Rana
Under Supervision of
...................................
Md. Rakibul Alam
Lecturer
Department of EEE
Sonargaon University (SU)
Certification
ii
This is to certify that this project entitled “Design & Implementation of
Microcontroller based Automated Smart Grid System” is done by the following
students under my direct supervision. This project work has been carried out by them
in the laboratories of the Department of Electrical and Electronic Engineering under
the Faculty of Engineering, Sonargaon University (SU) in partial fulfillment of the
requirements for the degree of Bachelor of Science in Electrical and Electronic
Engineering.
Supervisor
……………………………………………
ACKNOWLEDGEMENT
iii
The report titled as on Design & Implementation of Microcontroller based Automated Smart
Grid System” has been prepared to fulfill the requirement of our practicum program. In the
process of doing and preparing our practicum report, we would like to pay our gratitude to
some persons for their enormous help and vast co-operation.
At first, we would like to show our gratitude to the University authority to permit us to do our
practicum. Specially, we would like to thank to our honorable teacher Md. Rakibul Alam,
Lecturer, Department of Electrical & Electronics Engineering, SU Sonargaon University,
Dhaka, for his valuable and patient advice, sympathetic assistance, co-operation, contribution
of new idea. Deep theoretical and hardware knowledge & keen interest of our supervisor in
this field influenced us to carry out this project. His endless patience, scholarly guidance,
continual encouragement, constant and energetic supervision, constructive criticism, valuable
advice, reading many inferior draft and correcting them at all stage have made it possible to
complete this project.
Finally, we would like to thanks again to the respected Vice- Chancellor of SU, Professor
Dr. Md. Abul Bashar also thanks to Head of Department of SU , Electrical & Electronics
Engineering, Professor Dr. M. Bashir Uddin because they are designated such an
environment for learning through which we got the opportunity to acquire knowledge under
Bsc in EEE program, and that will be very helpful for our prospective career.
We are, indeed, grateful to all those from whom we got sincere cooperation and help for the
preparation of this report
ABSTRACT
iv
Microcontroller Based Integration of Renewable Energy is a balanced power management
system that maintains several power sources very cleverly. It is very suitable for industry
those have several power sources to provide power to the machineries to get rid of load
shading of national grid or any other power problems. Sometimes it is too difficult to switch
between those power sources. That’s why we came with the idea of Smart Grid System.
A smart grid is an electricity network allowing devices to communicate between suppliers to
consumers, allowing them to manage demand, protect the distribution network, save energy
and reduce costs
TABLE OF CONTENTS
v
Topics Page No
ACKNOWLEDGEMENT IV
ABSTRACT V
CHAPTER NAME VI
LIST OF FIGURES IX
TABLES 11
LIST OF ABBREVIATIONS 12
CHAPTER I: INTRODUCTION
TOPICS Page No.
1.1 Introduction 13
1.2 Background Study 13
1.3 Objectives 17
1.4 Project Organization 17
3.1 Introduction 46
vi
3.2 Block Diagram of the Project 46
3.3 Circuit Diagram & Description 47
3.4 Overview of smart grid technology 50
3.5 Working Principle 53
3.6 Image of Project 56
CHAPTER V: CONCLUSION
5.1 Conclusion 62
5.2 Future Modification 62
References 63
Appendix 64-74
vii
LIST OF FIGURES
viii
2.2.7.2 Output Waveforms of 220V/12V rectifier 30
ix
x
LIST OF TABLE
Table.2.1 Technical specifications of Arduino UNO 19
11
LIST OF ABBREVIATIONS
DC Direct Current
AC Alternating Current.
LCD Liquid Crystal Display
ADC Analog-to-Digital Converter
IR Infrared Receiver
IC Integrated Circuit
LED Light Emitting Diode
PCB Printed Circuit Board
LCD Liquid Crystal Display
12
CHAPTER I
INTRODUCTION
1.1 Introduction
Microcontroller Based Integration of Renewable Energy is a balanced power management
system that maintains several power sources very cleverly. It is very suitable for industry
those have several power sources to provide power to the machineries to get rid of load
shading of national grid or any other power problems. Sometimes it is too difficult to switch
between those power sources. That’s why we came with the idea of Smart Grid System.
1.3 Objectives
The main objective of this system is to introduce a automated smart grid system with
microcontroller technology. The supplementary objectives of this project are as follows:
A Smart Grid integrates electricity, gas, heat and communication networks into a single
system that maximises the generation and distribution of energy and which makes it possible
to utilise a larger share of green energy. Smart grids do a better job of coordinating consumer
demand with the supply of energy from producers. Linear is part of the larger global effort to
study smart grids for supplying energy in the future, and is focusing on the consumer.
13
CHAPTER II
THEORY OF THE PROJECT
2.1 Introduction
This chapter includes the total over view of the device. In this chapter we have followed-up
the theory of Arduino Uno, LCD Display, Resistor, Diode (IN 4007), , Transistor, briefly
describe of Microcontroller (ATMEGA 328P), Crystal, LCD display (16x4), Vero board, and
other components. Here we can know that the total system overview of the projects. And we
will also know that how the equipment are working with each other.
2.2 Theory
We’ve developed the system that can handle this critical switching situation perfectly. Our
system has several voltage, and current sensors to measure any over, under voltage. Based on
those circumstances our system manages that power source switching. For example if any of
those power sources get any problems like under voltage, our system immediately switches
the power source to other power sources that has no problems. It also can provide stable
output voltage depends on the input voltage state.
14
Fig: 2.2.1.1 Arduino UNO Pin Diagram
Technical specifications:
Microcontroller ATmega328P
Operating Voltage 5V
Input Voltage (recommended) 7-12V
Digital I/O Pins 14 (of which 6 provide PWM output)
PWM Digital I/O Pins 6
Analog Input Pins 6
DC Current per I/O Pin 20 mA
DC Current for 3.3V Pin 50 mA
Flash Memory 32 KB (ATmega328P) of which 0.5 KB used
by bootloader
SRAM 2 KB (ATmega328P)
EEPROM 1 KB (ATmega328P)
Clock Speed 16 MHz
15
empowers system designer to optimize the device for power consumption versus processing
speed.
The Atmel AVR® core combines a rich instruction set with 32 general purpose working
registers. All the 32 registers are directly connected to the Arithmetic Logic Unit (ALU),
allowing two independent registers to be accessed in a single instruction executed in one
clock cycle. The resulting architecture is more code efficient while achieving throughputs up
to ten times faster than conventional CISC microcontrollers. The ATmega328/P provides the
following features: 32Kbytes of In-System Programmable Flash with Read-While-Write
capabilities, 1Kbytes EEPROM, 2Kbytes SRAM, 23 general purpose I/O lines, 32 general
purpose working registers, Real Time Counter (RTC), three flexible Timer/Counters with
compare modes and PWM, 1 serial programmable USARTs , 1 byte-oriented 2-wire Serial
Interface (I2C), a 6- channel 10-bit ADC (8 channels in TQFP and QFN/MLF packages) , a
programmable Watchdog Timer with internal Oscillator, an SPI serial port, and six software
selectable power saving modes. The Idle mode stops the CPU while allowing the SRAM,
Timer/Counters, SPI port, and interrupt system to continue functioning. The Power-down
mode saves the register contents but freezes the Oscillator, disabling all other chip functions
until the next interrupt or hardware reset. In Power-save mode, the asynchronous timer
continues to run, allowing the user to maintain a timer base while the rest of the device is
sleeping. The ADC Noise Reduction mode stops the CPU and all I/O modules except
asynchronous timer and ADC to minimize switching noise during ADC conversions. In
Standby mode, the crystal/resonator oscillator is running while the rest of the device is
sleeping. This allows very fast start-up combined with low power consumption. In Extended
Standby mode, both the main oscillator and the asynchronous timer continue to run. Atmel
offers the QTouch® library for embedding capacitive touch buttons, sliders and wheels
functionality into AVR microcontrollers. The patented charge-transfer signal acquisition
offers robust sensing and includes fully debounced reporting of touch keys and includes
Adjacent Key Suppression® (AKS™) technology for unambiguous detection of key events.
The easy-to-use QTouch Suite toolchain allows you to explore, develop and debug your own
touch applications. The device is manufactured using Atmel’s high density non-volatile
memory technology. The On-chip ISP Flash allows the program memory to be reprogrammed
In-System through an SPI serial interface, by a conventional nonvolatile memory
programmer, or by an On-chip Boot program running on the AVR core. The Boot program
can use any interface to download the application program in the Application Flash memory.
Software in the Boot Flash section will continue to run while the Application Flash section is
updated, providing true Read-While-Write operation. By combining an 8-bit RISC CPU with
In-System Self-Programmable Flash on a monolithic chip, the Atmel ATmega328/P is a
powerful microcontroller that provides a highly flexible and cost effective solution to many
embedded control applications. The ATmega328/P is supported with a full suite of program
and system development tools including: C Compilers, Macro Assemblers, Program
Debugger/Simulators, In-Circuit Emulators, and Evaluation kits.
The long term average sunshine data indicates that the period of bright sunshine hours in the
coastal regions of Bangladesh varies from 3 to 11 hours daily. The insolation in Bangladesh
varies from 3.8 kWh/m2/day to 6.4 kWh/m2/day at an average of 5 kWh/m2/day. These
16
indicate that there are good prospects for solar thermal and photovoltaic application in the
country.
With an estimated 40% of the population in Bangladesh having no access to electricity, the
government introduced a scheme known as solar home systems (SHS) to provide electricity to
households with no grid access. The program reached 3 million households as of late 2014
and, with more than 50,000 systems being added per month since 2009, the World Bank has
called it "the fastest growing solar home system program in the world."
The Bangladeshi government is working towards universal electricity access by 2021 with the
SHS program projected to cover 6 million households by 2017.
17
Fig:2.2.4.1: Wind turbine system
18
2.2.5 Generator system
Generators are basically coiling of electric conductors, normally copper wire, that are tightly
wound onto a metal core and are mounted to turn around inside an exhibit of large magnets.
An electric conductor moves through a magnetic field, the magnetism will interface with the
electrons in the conductor to induce a flow of electrical current inside it.
The conductor coil and its core are called the armature, connecting the armature to the shaft of
a mechanical power source, for example a motor, the copper conductor can turn at
exceptionally increased speed over the magnetic field.
19
Fig: 2.2.6.1: LCD Display 16x4
A bridge rectifier circuit is a common part of the electronic power supplies. Many electronic
circuits require rectified DC power supply for powering the various electronic basic
components from available AC mains supply. We can find this rectifier in a wide variety of
electronic AC power devices like home appliances, motor controllers, modulation process,
welding applications, etc.
The
bridge rectifier circuit diagram consists of various stages of devices like transformer, Diode
Bridge, filtering and regulators. The first stage of the circuit is a transformer which is a step-
down type that changes the amplitude of the input voltage. Most of the electronic projects
uses 230/12V transformer to step-down the AC mains 230V to 12V AC supply. Next stage is
a diode-bridge rectifier which uses four or more diodes depending on the type of bridge
rectifier. Choosing a particular diode or any other switching device for a corresponding
rectifier needs some considerations of the device like Peak Inverse Voltage (PIV), forward
current If, voltage ratings, etc. It is responsible for producing unidirectional or DC current at
the load by conducting a set of diodes for every half cycle of the input signal.
20
Fig: 2.2.7.2: Output Waveforms of 220V/12V rectifier
21
CHAPTER III
DESING & FEBRICATION
3.1 Introduction
In this chapter fully cover with discuss design and fabrication of this project. Here we will
discuss about developed block diagram and briefly describe about the circuit description and
also learn about working principle. Total project flow chart is also available in this chapter.
Here's the block diagram of our Microcontroller Based Integration of Renewable Energy
system. We can clearly describe the working process through this block diagram. Firstly we
have two energy sources to supply electricity. One is the Solar and the other is the Wind.
Generally Solar is the first priority of supplying the electricity. Our control system
continuously monitors the voltage and the current of both sources. If any unwanted situation
occurs such as under voltage of a sources, or power failure of any of those sources, our
22
system immediately switches the supply line to another sources that has no problem and vice
versa. If both of the sources lose their voltage to the minimum threshold voltage, it combines
the two sources. A voltage stabilizer keeps the output load voltage always stable as the loads
need. All processes, voltages, current and current source is shown in a LCD display.
23
Fig: 3.3.3.2: Circuit diagram of the Project-2
In our circuit, we've used an Arduino as the controller, 2 voltage sensors to measure the
source voltages. A current sensor is used to measure the load current. A voltage stabilizer is
also used to provide a stable voltage to the loads. We made the voltage sensors using opto-
cupler and 2 voltage dividing resistors.
After power up everything, the voltage sensor continuously read the source voltage and sends
the data to the controller. The controller analyses the data and check if any of those voltage is
under threshold voltage or not. If any of those sources drops their voltage under threshold
voltage, the controller then immediately switches to the source that is stable and has no
problems. It happens immediately.
The current sensor continuously measures the load current and voltages shows it to the LCD
display.
We've used LM317 voltage regulator to make variable voltage source. With that voltage
source we can make under voltage threshold situations. When we turn RV2 or RV3
pot/variable resistor knob, the voltage at the Pin 2 increases or decreases simultaniusly.
Two optocuplers with voltage dividing resistors is used to measure the source voltages.
Optocuplers are used to completely isolate the source circuit from the control circuit. When
the output voltage of the LM317 increases, the LED of the input port of optocupler gets
24
brighter. The light hits the base of photo transistor at the output of the optocupler. The current
flow through collector to emmitter increases so the voltage at the middle of the voltage
divider resistor also increases. The controller (Arduino) reads the analog data from the voltage
divider and calcuate the actual voltages and sends those to the LCD display.
The current sensor senses the current flow of the load and sends an analog data to tha
controller. The controller then calculates the data and measures the actual current and showes
to the LCD display.
Total 5 DPDT relays are used to switching the load line. The relays are labeled as PWR_RL
(Power Relay), GND_RL (Ground Relay), SOLAR_RL (Solar Relay), WIND_RL (Wind
Relay), COMB_RL (Combine Relay). The Q1 to Q5 are the driving transistor along with
current limiting resistor at the base R5, R9-R12 is use to drive the relays. The power and
ground relay is used to separate the sources power line from the combine relay to solar and
wind relay. The Solar relay supplies the solar power to the load and the wind relay supplies
the wind relay to the load. The combine relay combines the solar and wind source in series
and supplies to the load.
When everything goes ok, then by default the Solar source supplies electricity to the load via
Power relay, Ground Relay and Solar Relay. The controller keeps those relay on. If somehow
the solar voltage gets down to the threshold voltage (6v), the controller turns off the Solar
Relay and turns on the Wind Relay keeping the Pwer & Ground Relay turned on. In this time
electricity is being supplied from the Wind Source. If the Solar and Wind sources both drops
their voltage to the threshold volage, then the controller turns off the Power, Ground & Wind
relay and turns on only the Combine relay so electricity is being supplied from both Solar &
Wind source.
The voltage booster & stabilizer module keeps the output load voltage stable as the load
needed. No matter the input voltage is low or high.
On the LCD display it shows which source is currently connected to the load. The voltage
level of both sources (in Volts) and the load current (in Amps).
The controller (Arduino) does the all calculations and process. It reads the analog data from
the analog pins and calcutale & process those data then execute the outputs.
25
Fig: 3.4.4.1: Overview of Smart Grid Technology
After powering up everything these two sources namely Solar (on the left) and Wind (on the
right) supplies power to LM317 voltage regulators (in the pictures below).
The output of these regulators goes to the Power & Ground relay's common pins. Positive
lines to the Power Relay and Ground lines to the Ground relay. These two relays then switch
these power lines either to the Solar & Wind relay or the Combine relay.
The blue potentiometer regulates the output voltage of the LM317 voltage regulators. By
turning the flat screw knob clockwise, we can decrease the output voltage and anticlockwise
we can decrease the voltage.
26
Fig: 3.6.6.1: Real image of the project
In this flowchart we can easily determine the working process of our system. Starting with
some control initializations our control system reads/measures the voltage and current of both
27
energy sources. The voltage and current is shown & updated every second in a LCD display.
The control system continuously checks if the supply voltage is less than the threshold voltage
set by us on the program. If the supply voltage gets down below the threshold voltage, it
switches the supply line to the other source. Or if both sources drops the threshold voltage,
then the controller combines those two sources. For example if somehow solar source drops
the threshold voltage, the controller switches the supply line to the wind source. If wind
source drops the threshold voltage, the controller switches the supply line to the solar source.
If both solar and wind source drops the threshold voltage, the controller combines (in series)
the sources.
3.9 Conclusion
In this chapter we have discussed the block diagram,circuit discription, working principle,
flow chart also show the real image of the project and others. In the later part of this paper we
discussed the result & discussion of the project to make the concept clear to anyone.
Chapter IV
28
RESULT & DISCUSSION
4.1 Introduction
This chapter contains the results obtained and discussion about the project. We have also
covered discussions about advantages, disadvantages and limitation of current version of the
protection system.
4.2 Result
Due to increase in population, Energy demand has been increased and its availability
becomes more crucial than ever before. In developing countries, our suggested
solution might be suitable one.
So, use of solar, Wind energy for power generation is essential to tackle current
energy crisis.
4.5 Discussion
29
By implementing above systems there are various benefits.
By continuously monitoring the status of load, we can control the selection of power
sources.
Conservation of labor: Since the systems are automatic, they do not require
continuous monitoring by labor.
The design is low cost, small size, robust and highly versatile.
This system use microcontroller which make it more convenient than conventional
system.
The main advantage is that the system’s action can be changed according to the
situation (high/Low power consumption of load).
4.7 Applications
Smart grid plays an important role in modern smart technologies. Following are the most
common applications of smart grid technology.
4.8 Conclusion
30
A smart grid is an electricity network allowing devices to communicate between suppliers to
consumers, allowing them to manage demand, protect the distribution network, save energy
and reduce costs.
Chapter V
CONCLUSION
31
5.1 Conclusion
This project is very usefull for industrial automation that will help people to balance the
production during power problems. It mainly helps industries to keep their production ruunig
in any power problem occarance.
Our future plane is to add GSM & GPRS module to keep monitoring the power status through
sms or web.
A smart grid is an electricity network allowing devices to communicate between suppliers to
consumers, allowing them to manage demand, protect the distribution network, save energy
and reduce costs
References
[1] R. Sen, S. C. Bhattacharyya, "Off-grid electricity generation with renewable energy technologies in
India: An application of HOMER", Renewable Energy, vol. 62, pp. 388-398, 2014.
[2]
IEEE Format:
32
Material Type Works Cited
Book in print [1] B. Klaus and P. Horn, Robot Vision. Cambridge, MA: MIT Press, 1986.
Chapter in book [2] L. Stein, “Random patterns,” in Computers and You, J. S. Brake, Ed.
New York: Wiley, 1994, pp. 55-70.
eJournal (from [6] A. Altun, "Understanding hypertext in the context of reading on the
internet) web: Language learners' experience," Current Issues in Education, vol. 6,
no. 12, July 2003. [Online]. Available:
http://cie.ed.asu.edu/volume6/number12/. [Accessed Dec. 2, 2004].
Conference paper [7] L. Liu and H. Miao, "A specification based approach to testing
polymorphic attributes," in Formal Methods and Software Engineering:
Proceedings of the 6th International Conference on Formal Engineering
Methods, ICFEM 2004, Seattle, WA, USA, November 8-12, 2004, J.
Davies, W. Schulte, M. Barnett, Eds. Berlin: Springer, 2004. pp. 306-19.
Conference [8] T. J. van Weert and R. K. Munro, Eds., Informatics and the Digital
proceedings Society: Social, ethical and cognitive issues: IFIP TC3/WG3.1&3.2 Open
Conference on Social, Ethical and Cognitive Issues of Informatics and
ICT, July 22-26, 2002, Dortmund, Germany. Boston: Kluwer Academic,
2003.
Newspaper article [9] J. Riley, "Call for new look at skilled migrants," The Australian, p. 35,
(from database) May 31, 2005. [Online]. Available: Factiva, http://global.factiva.com.
[Accessed May 31, 2005].
Technical report [10] J. H. Davis and J. R. Cogdell, “Calibration program for the 16-foot
antenna,” Elect. Eng. Res. Lab., Univ. Texas,
Austin, Tech. Memo. NGL-006-69-3, Nov. 15, 1987.
Standard [12] IEEE Criteria for Class IE Electric Systems, IEEE Standard 308,
1969.
33
Appendix
Code:
34
C35