Chapter 3
Chapter 3
METHODOLOGY
The step by step process on how the to achieve the goals and objectives of
the researchers that is to make a device that is capable of identifying the appliance
base on the current and voltage relationship, otherwise known as phase difference
or phase angle. To achieve such goals the researchers must follow the following
steps.
Common appliances were selected and sampled. The following are the
common appliances:
Netbook
Flat iron
Electric fan
Study lamp
20
The prototype that the researchers are proposing is a device that can
characterize the set of appliances to a known appliance and to unknown appliance
base on their corresponding power factor. If the device recognizes the power
factor of the appliance current and voltage will continue to be supplied to the
appliance. On the other hand, if the power factor of the appliance is not
recognized the power supplied to the appliance from the source will be cut off
automatically by the use of relays.
The overall operation of the prototype is plain and simple. As current and
voltage is supplied to a specific or set of appliances, it produces a phase difference
between voltage and current, that difference will be analyzed by the prototype and
will scan its memory for any featured appliances base on the phase difference
supplied, if the featured appliance is present on its memory the current and voltage
supply will continue to flow to the appliance, otherwise, if the power factor is not
present, the voltage and current supply will cut off automatically.
To measure the phase difference between the voltage and current we must
first find the power factor of the appliance with the help of a microcontroller and
other components. The sinusoidal output of the current and voltage transformer is
sent to their respective zero crossing detection circuit (ZCD) which is simply an
Operational Amplifier circuit (Op-Amp) it is also known as comparator. An Ideal
comparator compares two input voltage or current and produces a logic output
signal whose value depend on which the two sinusoid is larger [7]
22
The op-amp converts the sinusoidal signal to square waves. The reason for
the conversion of the sinusoidal signal to square waves is that the two square
waves are fed to an exclusive OR (XOR) logic gate and compare the two signals.
Since the logic gate can only read digital signals, it is required to convert the
sinusoidal signal to digital signal. The output of the XOR gate is the time
difference between two waves from the point they cross the zero point.
XOR gate output will be 1 just when the inputs have different signals so
when the load is resistive XOR gate output is zero because both voltage and
current phases start and ends in the same time, but when the load is inductive or
capacitive XOR output is 1 because there is a phase shift between current and
voltage. Hence, the power factor is measured by measuring the 1 state of the XOR
gate. Once the power factor is determined, by following the formula of the power
factor cos (f ∗dt∗360). Where cos(phi) is the power factor, f is the frequency of
the measured supply, dt is the time difference between the waves and 360 is the
constant use to give an answer in degrees.
The prototype will be using a regulated power supply rated at 5 volts. The
main components used in this power supply is a full bridge rectifier, filtering
capacitors and a voltage regulator rated at 5 volts with the maximum current
output of 1 ampere.
Transformer – figure 3.3 shows that the transformer that will be used on the
prototype will be the same transformer that will be used for the power supply.
Full bridge rectifier - the function of the diode is to allow current flow in one
direction. The diode ratings must be higher than the peak forward current and
peak inverse voltage expected in the circuit. If the forward current rating of the
diode is exceeded, the diode overheats, leading to failure. [7]
The diode to be used on this study for the full bridge rectifier is a 1n4002
General-Purpose rectifier diode with a peak forward current of 100 volts and peak
forwards current of 1 ampere.
Filtering Capacitor – to store the charge pulses that flow through the diodes. A
large capacitance discharges only slightly between current pulses. Thus, the
capacitor maintains a nearly constant output value. [7]
The capacitor will filter the ripple produced by the rectifier circuit to a
smoother DC output. The capacitor to be used is a two 4700uF capacitor and once
100uf capacitor all rated at 50 volts.
Voltage regulator – a voltage regulator is the one that provides a more stable
regulated output or in this case a 5-volt DC output.
3.5.2 Transformers
The use of the XOR gate is that it will compare the two signals that are
being produce by the two operational amplifiers and send the comparison to the
microcontroller for identification.
29
3.5.5 Relay
The relay will be the one to disconnect the load from the power source
automatically when the prototype will detect a foreign appliance or when a power
factor of a certain appliance is not registered to the prototype.
30
3.5.6 Microcontroller
3.6 Prototyping
The researchers were able to test the prototype starting from the
transformers up to the Arduino to check if the prototype is working as it should
be.
Before the potential transformer was used for the prototype, the
researchers were able to test the polarity of the PT. The required polarity of the
transformer must be an additive polarity and the subtractive polarity of the
transformer is not desired because it can cause problems on detecting the power
factor of the appliance. Figure 3.15 shows the correct way to test the polarity of
the transformer
.
32
Figure 3.16 Input Voltage (yellow) VS Output Voltage of the Transformer (blue).
For the ZCD setup the researchers chose LM324 as its comparator.
The LM324 series are low−cost, quad operational amplifiers with true
differential inputs. They have several distinct advantages over standard
operational amplifier types in single supply applications. The quad
amplifier can operate at supply voltages as low as 3.0 V or as high as 32
V.
The researchers were able to utilize two LM324, one for the
potential transformer and one for the current transformer. The output of
the current and potential transformer was connected to input 1 and input 2
of the lm324 and the output will then be connected to the XOR gate.
The output of the two comparators is now then fed to the XOR gate
and compare the two signals.
The researchers chose a 4070B CMOS XOR gate for the prototype.
The 4070B contains four independent Exclusive OR gates. The output of
the two LM324 will be connected to pins 1 and 2 and then the output at
pin 3 will be connected to the digital input 13 of the Arduino Uno
microcontroller.
The wave form figure 3.21 is to be sent to the CMOS exclusive or gate to
combine the two digital waves and then sent to the microcontroller.
37
Once the output of the XOR gate is connected to the digital input
of the microcontroller, the microcontroller must be able to translate the
input pulse from the XOR gate to its corresponding power factor, for this
to happen a series of codes were used by the researchers to achieve its
goal. Before that the researchers must be able to communicate with the
Arduino. Using a free software for the Arduino called Arduino IDE, by
this, researchers are able to communicate with the Arduino board and
send its corresponding codes to the device via USB cord.
38
The following codes are used to translate the pulse from the XOR
gate to its corresponding power factor.
Figure 3.23 shows the first part of the code, which is to declare the
variables that are needed for the code
39
Figure 3.25 shows the void loop setup. There, the codes are looped
all throughout the program and important condition and statements are
present in this area.
40
Once the pulse is now converted into power factor the 16*2 LCD
display will show what is the corresponding power factor. The displayed
power factor of the appliance will now be subjected to profiling.
Figure 3.27 shows the method on how to profile the power factor
of the corresponding appliance by using IF-statements. If the power factor
is present on the statement the voltage and current source will continue to
flow to the appliance, but when the power factor is now present on the
41
statement the relay will automatically cut off the voltage and current
supplied to the load.
Figure 3.29 shows the if statement used to change the appliance status to
unknown.
3.7.4 Netbook