FYP Final Report
FYP Final Report
(Auto-EProS)
By
Copyright 2012
by
Ahmad Zakwan Hariz Bin Abd Azzis, 2012
CERTIFICATION OF APPROVAL
by
Approved:
__________________________
Ir Dr Nursyarizal Bin Mohd Nor
Project Supervisor
May 2012
i
CERTIFICATION OF ORIGINALITY
This is to certify that I am responsible for the work submitted in this project, that the
and that the original work contained herein have not been undertaken or done by
__________________________
ii
ACKNOWLEDGEMENT
First of all, I would like to express my gratitude to God for giving me the
strength and good health to complete this project. Deepest appreciation to my parents,
father who initiate ideas and helps a lot in this project and mother who support me
financially and not to forget family members for their support.
I would like to thank my supervisor, Ir Dr Nursyarizal Mohd Nor for sharing his
knowledge and giving me support and guidance throughout this project. I also would
like thank other lecturers and staffs, Dr Taib Ibrahim, Ir. Faris Abdullah, Ir Mohd
Fatimi, Mr Mohd Yasin, Mr Mohd Zuraimi and others for their assistance.
Last but not least, my appreciation to those who contribute directly or indirectly
by giving ideas and assistance towards the completion of this project.
iii
ABSTRACT
Power outage is a common problem happened when there are electrical faults
occurred, which would lead to discontinuity of electric supply to domestic building. For
domestic consumers, power continuity is very important since some of their appliances
such as refrigerator, aquarium and alarm system need a continuous electric supply.
However, fault occurred in the system will trip the earth leakage circuit breaker (ELCB)
and disrupt the supply to all the appliances. Fault may occur due to short circuit, ground
fault or overloading. Therefore, fault location detection is essential to ensure power
continuity and reliability in which the fault may be isolated from the system once
detected. An automatic system for fault detection and ELCB reset setting crucial to be
developed to encounter the problem.
iv
TABLE OF CONTENTS
ABSTRACT .................................................................................................................... iv
CHAPTER 1 : INTRODUCTION
1.1 Project Background ................................................................... 1
1.2 Problem Statement .................................................................... 1
1.3 Project Objectives ..................................................................... 2
1.4 Scope of Study .......................................................................... 2
CHAPTER 3 : METHODOLOGY
3.1 Project Flow .............................................................................. 11
3.2 System Plan of Operation ......................................................... 12
v
3.2.1 Power Recovery .............................................................. 12
3.2.2 Fault Location Detection ................................................. 14
3.3 Tools and Equipments Required ............................................... 16
3.4 Components Selection ............................................................... 17
3.5 Prototype Layout Design .......................................................... 17
3.6 Circuit Diagram ......................................................................... 18
REFERENCES .......................................................................................................... 30
APPENDICES .......................................................................................................... 33
vi
LIST OF FIGURES
Figure 1: Illustration of Earth Fault Conditions ............................................................... 4
Figure 2: Residual Current Circuit Breaker ..................................................................... 7
Figure 3: RCD Basic Operation Diagram ........................................................................ 7
Figure 4: Miniature Circuit Breaker ................................................................................. 8
Figure 5: Current Sensor .................................................................................................. 9
Figure 6: Solenoid Plunger .............................................................................................. 10
Figure 7: Project Flowchart .............................................................................................. 11
Figure 8: System Flowchart ............................................................................................. 13
Figure 9: Simple Domestic Electrical Wiring Diagram ................................................... 14
Figure 10: Fault Location Detection Process Flowchart .................................................. 15
Figure 11: Prototype Layout Design ................................................................................ 17
Figure 12: Circuit Diagram of the Prototype ................................................................... 18
Figure 13: Sample Current Reading ................................................................................. 19
Figure 14: Test Circuit and CT Connection ..................................................................... 20
Figure 15: Normal Condition Testing .............................................................................. 21
Figure 16: Auto-Reset ELCB Simulation Test ................................................................ 22
Figure 17: MCB Check Operation ................................................................................... 23
Figure 18: Unknown Fault with MCB Off ....................................................................... 23
Figure 19: Fault at MCB 1 ............................................................................................... 24
Figure 20: Unknown Fault with MCB On ....................................................................... 24
Figure 21: Overall View of the Prototype ........................................................................ 25
Figure 22: DC Motors Configuration ............................................................................... 26
Figure 23: Normal Condition of the Prototype ................................................................ 26
Figure 24: Actual Auto-Reset ELCB Test ....................................................................... 27
Figure 25: Fault Location Detection Test ........................................................................ 28
LIST OF TABLES
Table 1: Hardware Required and Its Functionality .......................................................... 16
Table 2: Software Required and Its Functionality ........................................................... 16
Table 3: Current Sensor Test Result ................................................................................ 20
Table 4: LED Function ..................................................................................................... 21
vii
LIST OF ABBREVIATIONS
AC Alternating Current
CT Current Transformer
DC Direct Current
ELCB Earth Leakage Circuit Breaker
MCB Miniature Circuit Breaker
RCBO Residual Current Circuit Breaker with Overload
RCCB Residual Current Circuit Breaker
RCD Residual Circuit Device
SP Solenoid Plunger
viii
CHAPTER 1
PROJECT BACKGROUND
1
ELCB may also trip when fault occurs in the internal wiring. When electrical
tripping is occurring, ELCB will break the supply to all feeders (appliances). An
automatic system to restore the supply by turning back on the ELCB is required. But
when there is a permanent fault exist is the system, the ELCB would not be able to be
turned back on as it will trip again due to the permanent fault.
This project requires deep understanding in the power system basic theory and
domestic electrical wiring configuration. The main focus is determining the location of
fault in a wiring system where it is important in designing an automatic breaker which
can handle permanent fault and able to isolate the fault.
2
CHAPTER 2
LITERATURE REVIEW
Domestic electrical system refers to electrical system developed for home and
residential, which mostly utilizes single-phase type of power system. In electrical
engineering, the term single phase electric power system refers to the distribution of
alternating current (AC) electric power using a system in which all the voltages of the
supply vary in unison [1].
Although single phase system has safety (earth conductor) but this can’t ensure
perfect protection to the electrical circuit, electrical equipment and also human life from
high voltage. In Malaysia, according to Utusan Malaysia (2011), it is about 191 people
died out of 405 electrical accidents due to electrical faults occurred recorded for year of
2005 until 2011 [4]. Therefore, as part of increasing electrical protection and reducing
accidents due to electrical faults, installation of protection device such as circuit breaker
is required besides exposure on electrical safety and hazard towards the public.
3
This project requires clear understanding on the common fault and the basic
protection system of domestic or home electrical system. Both entities are important to
be understood as to overview the effects of electrical faults and poor electrical
protection system, which commonly lead to injury or death due to electrical shock
besides technical and economical losses due to equipment failure.
In domestic premises, there are three common factors that cause electrical problems
at home that might lead to fatality or equipment failure [5], which are:
• Faulty wiring in the house
• Improper flexible cords
• Faulty appliance
Technically, the above factors cause current/earth leakage fault and overcurrent
fault. Earth leakage fault exist when unintended path is established between the normal
current carrying conductors which has contact directly or indirectly with earth [6].
Direct contact refers to contact with parts that will result an electric shock in normal
operation while indirect contact refers to contact with exposed conductive parts which
result in an electric shock in case of fault [7]. Both conditions are illustrated in Figure 1.
4
Ovecurrent fault occurred when the current exceeds the rated current carrying
capacity of the conductor [8] and can be divided into two types: overload and short
circuit. Overload faults are caused by excessive loads where a larger than intended
electric current exists throughout a conductor, leading to an excessive heat generation,
and the risk of fire or equipment damage [8, 9]. While a short circuit in an electrical
circuit that allows a current to travel along an unintended path, often where essentially
no (or very low) electrical impedance is encountered [10].
Most houses nowadays are protected by circuit breakers rather than fuses [10],
since fuses have to be replaced when it blows and sometimes fuses could create
overheat in a circuit [11]. A circuit breaker that “tripped” can be mechanically reset or
switched on to resume operations once the problem occurred has been resolved. Circuit
breakers also protect branch circuits with size range of 120 Volts or 230 Volts [12].
5
2.4 Earth Leakage Circuit Breaker
6
Figure 2: Residual Current Circuit Breaker [18]
The RCD operates by measuring the current balance between two conductors
using a differential current transformer, as illustrated in Figure 3. Difference between
the current flowing out the live wire (to the load) and the returning current (from the
load) through the neutral wire, also known as residual current, is measured. Current
leakage said to be exist when the difference sum measured is not equal to zero and the
device will open it contacts [18]. As according to the IEC, RCD in buildings must be
installed with residual current rating of 30 mA for protection against shock [19]. The
RCD will trip if the residual current or the difference between current flowing in an out
exceeds 30 mA.
7
2.6 Miniature Circuit Breaker
8
2.7 Current Sensor
It is crucial in this project to have suitable current sensor with the correct rating
and sensitivity as to accurately measure and obtain current value. Inaccurate
measurement may lead to wrong calculation, which is important in detecting fault
location and fault isolation from main line. There are many different types of current
sensor available in the market, one of them is as shown in Figure 5. It is preferable to
have current sensor that able to detect up to 40 A for domestic usage.
A solenoid is a coil wound into a tightly packed helix which able to converts
electrical power into linear mechanical power [24]. A solenoid plunger, as in Figure 6,
is an electromechanical plunger with ability of pulling in or pushing out an iron plunger
out of coil when it is electromagnetically energized.
9
button is released, a spring on the plunger pushes the plunger up, causing it to strike the
other bar, creating a “ding-dong” sound [25].
10
CHAPTER 3
METHODOLOGY
A good project planning will initiate a good project framework, which would
lead to a success of a project. As illustrated in Figure 7, the project is systematically
planned to meet with the specific timeline.
NO
System functioning?
YES
System Implementation & Prototype Fabrication
11
For this project, the sequence begins with Information and Data Gathering of
problem stated as well as getting clear view and understanding on the domestic
electrical wiring, which includes information regarding types of breakers used and
hardware selected. The, proceed with System Plan and Design phase. This is where the
overall system is being drafted, the software and hardware of the system and the overall
system operation.
In the System Plan & Design stage, an automatic system is designed for
domestic electrical system to auto-reset ELCB and auto-detection if any permanent fault
occurred. The system operation is divided into two parts: power recovery and fault
location detection. In Power Recovery part, it covers about the automatic reset of ELCB,
which restore the supply and the Fault Location Detection part will covers how the
permanent fault is being detected and finally isolate it from the main system.
Power recovery is a process of turning back the power on after the power is out
or shut down for a period of time as result of tripping or faulty. Quick power recovery is
important when there are equipments or electrical appliances which require continuous
power supply such as refrigerator, water pump for aquarium, alarm system and few
others. Currently, as for home electrical system, power recovery is manually done. In
other words, a person has to switch on the main switch in distribution board to turn the
power back on after tripping occurred. It becomes a problem when the residents or
owner of the house is out for a period of time and no one is there to turn the power back
on.
12
When electrical tripping is occurring, Earth Leakage Circuit Breaker (ELCB)
will break the supply to all feeders (appliances). An automatic system to restore the
supply by turning back on the ELCB is required. But when there is a permanent fault
exist is the system, the ELCB won’t be able to be turned back on as it will trip again due
to the permanent fault. Therefore, to be able to restore the power supply, a system with
ability of detecting fault location need to be developed and fault need to be isolated.
Once fault detected and isolated, ELCB will be switched on and supply is restored. The
process of power recovery is summarized as in Figure 8.
13
3.2.2 Fault Location Detection
To isolate fault from main line, the location of the fault must be identified first.
This can be done through current comparison, where the amount of current travelling
into the load is not equal to the current travelling out of the load. As in Figure 9, which
illustrated simple domestic electrical wiring diagram, the current in live wire (red line)
is travelling through ELCB and MCB and end at the load. The current is then travel out
from the load to neutral bar and travels back to ELCB. The amount of current travel in
and out is measured and compared.
14
To be able for the MCB of the fault location to be tripped off, a level of current
difference is set up. For instance, difference between current level at live wire and
current level at neutral wire is set to 30 mA. If the difference exceeds 30 mA, then that
particular MCB is turned off and ELCB will be reclosed and power turned back on. The
level of current will be detected by using either current transducer or current clamp.
15
3.3 Tools and Equipments Required
Components/Hardware Functions
16
3.5 Components Selection
Once done with the selection of components, prototype layout is planned and
designed as in Figure 11. This prototype will basically consist of two main
compartments: the main board and the external enclosure. The main components which
comprises of RCCB, MCB, CT and SP will be placed in the main compartment. The
RCCB and MCB are positioned according to the real arrangement of breakers in the
distribution board.
The microcontroller Arduino UNO, LCD display, adapter and battery pack will
be placed in the external compartment. The reason of separating the compartments is to
make easier for the user to change battery and to view the LCD display. The position of
the external component is suggested to be placed beside the main compartment for
shorter wiring and easier installation.
For this prototype, it is preferable to use battery pack as the source instead of
tapping from the main line (from power supplier) for easier installation and portability.
It is also expected that this prototype will be more like “plug and play” hardware
characteristics. The components chosen are also should be able to accommodate with
the expectation, for example using split core current transformer, which can be clamp at
any wire without interruption or disconnection of wiring.
18
CHAPTER 4
To verify the functionality of the current sensor, a test had been carried out. The
test is done with several domestic devices and appliances that commonly used in human
daily life for example lamp, kettle, iron and rice cooker. The current measurement is
taken by using current sensor and current value can be read through the serial display of
the microcontroller as sample reading in Figure 13. According to the datasheet,
accuracy of the current sensor is about ±1%. The result of the test is summarized in
Table 3.
19
Table 3: Current Sensor Test Result
Calculated Current Current Reading
Device Power (Watt)
(Amp) (Amp)
Lamp 70 0.292 0.350
Rice Cooker 450 1.875 1.887
Iron 1000 4.167 4.204
Kettle 1500 6.250 6.265
From the result in Table 2, the reading of the current sensor is in range of
accuracy as in datasheet. The current sensor is valid to be used as measurement device
in this project.
The simulation test is done to test both functions in the system created: the
power recovery function and fault location detection function. The test is done before it
can be implemented in real prototype. There are three tests that will be carried out in
this simulation test: normal condition, auto-reset ELCB, and MCB check operation. To
carry out the simulation test, a simulation circuit connected with current sensor had
been setup as in Figure 14 and the programme had been successfully written and
downloaded to the Arduino board.
20
In the test circuit designed, the desired hardware (motor, solenoid and hand
phone) that should be used in real prototype is currently represented by LED, for testing
purpose. The function of each LED is summarized as in Table 4.
This test is to verify that the system designed is able to detect normal condition,
at which power is ON (or “1”). When the system detects a normal condition, LED 1 will
light up and the LCD will display “Normal Condition” as in Figure 15. Normal
condition means that the circuit is working as usual without fault, or no fault yet had
occurred.
21
4.2.2 Auto-Reset ELCB Test
This part is to test the functionality of automatic ELCB reset operation. During
power outage, at which power is OFF (or “0”), LED 2 will light up to indicate that the
ELCB is tripped or fault condition is occurred. ELCB will undergo maximum of three
times reset testing. To represent the motor that will reset the ELCB, LED 3 is set to be
ON for 3 seconds and OFF for 3 seconds as delay. The 3 seconds delay is to make able
for the microprocessor to check if the power is “1” or “0” and to switch off the motor. If
“1”, the system will be back to normal operation. If “0”, the system will reset ELCB up
to three times. During the reset operation, the LCD will display “ELCB Tripped, Reset
Test: (Test Sequence Number)”. The result of the test is as in Figure 16.
22
4.2.3 MCB Check Operation Test
Once the ELCB reset operation reached “Reset Test: 3”, and the power is still
“0”, the system will check each MCB since MCB is installed at individual circuit. The
system will check if the difference between line current and neutral current exceeds the
limit current allocated. In this project, the limit current is set to 30 mA, as according to
ELCB trip rating. When entering the MCB check operation, LED 3 will turn OFF and
LED 4 will turn ON for 3 seconds while the LCD is displaying “MCB Checking...” as
in Figure 17. LED 4 then will turn OFF, and LED 3will turn ON again for 3 seconds to
reset the ELCB. Assume that once the LED 4 is OFF, the MCB is OFF position.
The process is a representation where when the MCB is switched OFF, the
ELCB will try to reset again. Once reset, the program then will check the power. If the
power is still “0”, the system will trigger call alert to inform the user that a fault has
occurred at her/his house. Phone alert is represented by LED 5. LED 5 will turn ON for
4 seconds to trigger call alert and LCD will display “Unknown Fault; MCB Off” as in
Figure 18 since the cause of fault is unknown.
23
But if power return “1”, or ON, call alert will also be triggered but the LCD will
display “Fault Detected @; MCB 1” as in Figure 19 since the fault is known occurred at
MCB 1. For testing purpose, only one MCB is being used and labelled by “MCB 1”.
More MCB will be added in real prototype.
The previous testing condition only when there is fault occurred at MCB, where
the difference between line current and neutral current exceeds 30 mA. But if the
difference does not exceeds 30 mA, but the power is still OFF or “0”, the LCD will
display “Unknown Fault; MCB On” and call alert will be triggered as in Figure 20. This
is due to unknown fault had occurred but no fault is detected at any MCB checked.
Since there is no fault detected, therefore no MCB will be turned OFF.
24
4.3 Prototype Development
Results from the simulation test had verified that the system developed is well-
functioning. The system developed will then be implemented in real prototype and
hardware. Figure 21 shows the overall view of the prototype designed.
MAIN BOARD
EXTERNAL
ENCLOSURE
The prototype is designed with one ELCB and two MCBs to represent the home
distribution board. There are two main compartments in the prototype, the main board
and the external enclosure. The main board is where the ELCB, MCBs and DC motors
are placed, while the external enclosure contains batteries, Arduino board, LCD display
and other electronic components. Figure 22 shows the DC motors that are being used
for triggering mechanism. Solenoid plungers are replaced by DC motor due to several
circumstances.
A nylon cable is attached between each DC motors with the ELCB and MCBs
for the triggering mechanism. Each DC motor will be driven by a motor drive,
comprises of N-channel power MOSFET, diode, resistor and connector.
25
Figure 22: DC Motors Configuration
26
4.4.2 Prototype Test 2: Auto-Reset ELCB
Once the auto-reset ELCB operation reached reset test number 3, the system will
check for fault at MCB. For testing purpose and real situation demonstration, electrical
fault is intentionally created at MCB 1. Figure 25 shows the flow of MCB checking
operation. Once the system enters the MCB checking stage, it will read current value
obtained the current sensors and check for the current difference at MCB 1.
5.1 Conclusion
5.2 Recommendations
29
REFERENCES
[1] Stevenson, William D., Jr., “Elements of Power Systems Analysis”, McGraw-Hill
Electrical And Electronic Engineering Series (3rd Ed.), New York, 1975
[4] “191 Mati Akibat Kejutan Elektrik”, Newspaper Article, 2011. [Online] Retrieved
from
http://www.utusan.com.my/utusan/info.asp?y=2011&dt=0415&pub=Utusan_Mal
aysia&sec=Dalam_Negeri&pg=dn_10.htm
[5] “Energy Guide Book (For Consumers)”, Published for National Energy Efficient
Awareness Campaign (SWITCH), WECAM, 2009
[6] QO and QOB Miniature Circuit Breakers with Ground Fault Protection,
Schneider Electric, 2009
30
[11] “Difference between Fuse and Circuit Breaker”. [Online] Retrieved from
http://www.wisegeek.com/what-is-the-difference-between-a-fuse-and-a-circuit-
breaker.htm
[12] Donnelly E.L., “Electrical Installation: Theory and Practice”, Thomas Nelson and
Sons Ltd. (3rd Ed.), 1985
[15] Shelton S., “Electrical Installlations”, Nelson Thrones (3rd ed.), 2004
[19] “Residual Current Devices in LV”, Cahier Technique no. 114, Schneider Electric,
2006
[20] “Miniature Circuit Breakers: Application Guide”, ABB Inc., USA, Apr 2009
[21] “What Is Current Sensor and How It Is Used?” [Online] Retrieved from
http://www.ti.com/analog/docs/microsite.tsp?sectionId=560&tabId=2180µs
iteId=7
31
[23] “Open Loop Hall Effect Current Sensor” [Online] Retrieved from
http://www.directindustry.com/prod/honeywell-sensing-and-control/open-loop-
hall-effect-current-sensors-12365-306124.html
32
APPENDIX A
No Detail/Week – FYP I 1 2 3 4 5 6 7 8 9 10 11 12 13 14
1 Selection of Project Topic
Mid-Semester Break
2 Literature Review and Research on Topic Selected
3 Scope and Methodology Analysis
4 Submission of Extended Proposal
5 Prototype Plan & Design: Drafting Stage
6 Proposal Defence
7 Prototype Drafting Continue
8 Interim Report Submission
No Detail/Week – FYP II 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Mid-Semester Break
1 Software & Hardware Development
2 System Functionality Test
3 System Troubleshooting
4 System Implementation & Prototype Fabrication
5 Draft Report
6 Submission & Completion of Project
33
APPENDIX B
void setup()
{
lcd.begin(16,2);
lcd.print(" = Auto-EProS = ");
lcd.setCursor(0,1);
lcd.print("by: Zakwan Hariz");
delay(3000);
pinMode(1,OUTPUT);
pinMode(4,OUTPUT);
pinMode(7,OUTPUT);
pinMode(8,OUTPUT);
pinMode(11,OUTPUT);
pinMode(13,OUTPUT);
pinMode(12,INPUT);
emon1.current(1, 111.1);
emon2.current(2, 111.1);
emon1.current(3, 111.1);
emon2.current(4, 111.1);
}
void loop()
{
int powerValue_int = digitalRead(power); // Checking power
condition
if (count_elcb == 4 && powerValue_int == 0)
{
digitalWrite(trip,HIGH);
digitalWrite(normal,LOW);
int powerValue_fault = digitalRead(power);
if(powerValue_fault == 1)
{
count_elcb = 0;
}
}
/* During trip, power reading is zero, or LOW condition */
34
else if(count_elcb != 4 && powerValue_int == 1)
{
normal_display();
digitalWrite(normal,HIGH); // At normal condition
digitalWrite(trip,LOW);
count_elcb = 0;
int powerValue_0 = digitalRead(power);
if (powerValue_0 == 0 && count_elcb == 0) // First trial
{
lcd.clear();
lcd.print("ELCB Tripped");
lcd.setCursor(0,1);
lcd.print("Reset Test: 1");
trip_reset();
delay(2500);
}
count_elcb = 1;
int powerValue_1 = digitalRead(power);
if(powerValue_1 == 0 && count_elcb == 1) // Second trial
{
lcd.clear();
lcd.print("ELCB Tripped");
lcd.setCursor(0,1);
lcd.print("Reset Test: 2");
trip_reset();
delay(2500);
}
count_elcb = 2;
int powerValue_2 = digitalRead(power);
if(powerValue_2 == 0 && count_elcb == 2) // Third trial
{
lcd.clear();
lcd.print("ELCB Tripped");
lcd.setCursor(0,1);
lcd.print("Reset Test: 3");
35
trip_reset();
delay(2500);
}
count_elcb = 3;
int powerValue_3 = digitalRead(power);
if(powerValue_3 == 0 && count_elcb == 3)
{
lcd.clear();
lcd.print("MCB Checking...");
delay(2000);
currentDiff1 = EEPROMReadInt(memLoc1); //read memory from CT 1
currentDiff2 = EEPROMReadInt(memLoc2); //read memory from CT 2
if(powerTest_MCB == 1)
{
lcd.clear();
lcd.print("Fault Detected @");
lcd.setCursor(0,1);
lcd.print("MCB 1; ");
phone_alert();
count_elcb = 4;
}//difference with power 1
36
{
mcb2();
trip_reset();
int powerTest_MCB = digitalRead(power);
if(powerTest_MCB == 0)
{
lcd.clear();
lcd.print("Unknown Fault");
lcd.setCursor(0,1);
lcd.print("MCB Off");
phone_alert();
EEPROMWriteInt(memLoc,0);
count_elcb = 4;
}//difference with power 0
if(powerTest_MCB == 1)
{
lcd.clear();
lcd.print("Fault Detected @");
lcd.setCursor(0,1);
lcd.print("MCB 2; ");
phone_alert();
EEPROMWriteInt(memLoc,0);
count_elcb = 4;
}//difference with power 2
}// difference during fault loop
}// MCB test loop
}//count!=4
}//void loop
void normal_display()
{
lcd.clear();
lcd.print("Normal Operation");
delay(800);
}
37
void mcb2() //Motor at MCB2
{
delay(1500);
digitalWrite(sp_2,HIGH); // trigger plunger at MCB 1
delay(1000);
digitalWrite(sp_2,LOW); // plunger turns off
}
//Write Function
void EEPROMWriteInt(int p_address, long p_value)
{
byte Byte1 = ((p_value >> 0) & 0xFF);
byte Byte2 = ((p_value >> 8) & 0xFF);
byte Byte3 = ((p_value >> 16) & 0xFF);
byte Byte4 = ((p_value >> 24) & 0xFF);
EEPROM.write(p_address, Byte1);
EEPROM.write(p_address + 1, Byte2);
EEPROM.write(p_address + 2, Byte3);
EEPROM.write(p_address + 3, Byte4);
}
//Read Function
unsigned long EEPROMReadInt(int p_address)
{
byte Byte1 = EEPROM.read(p_address);
byte Byte2 = EEPROM.read(p_address + 1);
byte Byte3 = EEPROM.read(p_address + 2);
byte Byte4 = EEPROM.read(p_address + 3);
38
APPENDIX C
39
APPENDIX D
40
APPENDIX E
41