Design and Implementation of AC Mains Voltage Fluctuation Indicator for Home Appliances

Citation: Andrian LM, Simatupang JW (2018) Design and Implementation of AC Mains Voltage Fluctuation Indicator for Home Appliances. Int J Electron Device Phys 2:004 Copyright: © 2018 Andrian LM, et al. This is an open-access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited. *Corresponding author: Joni Welman Simatupang, Electrical Engineering Study Program, President University, Jalan Ki Hajar Dewantara, Jababeka Education Park, Cikarang Bekasi, West-Java, 17550, Indonesia

• Flickering, is a rapid deviation between 90% and 110% of nominal RMS voltage or more can produce a phenomenon known as flickering. The quick changing of light level produced by flickering has to be perceivable by the human eye for it to be considered as such. Perceived flickering has been proven to be capable of causing extreme disturbance and anxiety.
• Overvoltage, typically happened when a mains voltage exceeded 110% of its nominal RMS value for more than 1 minute. Every electrical equipment has a given rated voltage which will then carry a current limited by resistance from various source, but still large enough for it to get the wire hot. However, when the voltage started rising beyond, wire insulation may start to fail.
• Undervoltage, is said to occur when the mains voltage dropped below 90% of its nominal RMS value for more than 1 minute. The most common cause of undervoltage is heavy electrical demand. This period of excessive load causes electrical utility to decrease amount of voltage being fed into each load to compensate for the high demand. In order, to maintain wattage level, current level will in turn increase, potentially exceeding its allowed rating.
Currently, the author believes that the most accessible, meaning the easiest and the fastest way of detecting such fluctuation is by the use of a Multimeter. However, a Multimeter makes use of a measuring probe as point of contact with the electrical socket. This might at times prove to be dangerous to perform. Thus, this project is done to rectify this safety issue by proposing alternative measuring equipment to the Multimeter that is much safer, while emphasizing on an even better accessibility in indicating voltage fluctuation. As such, instead of a numeric display commonly used by the Multimeter, the alternative equipment in this project will make use of 12 LEDs instead as means of voltage level indicator. However, the dynamic voltage indication must still be retained without any noticeable delay. Additionally, the equipment is also aimed to be plug & play requiring minimal physical operation.

Comparison with Multimeter
Multimeter is an electronic measuring equipment that is capable of measuring several measurement units in one package. Typically, the most common units that Multimeter can measure  Figure 1: Survey on source of power quality problems [3]. the author to theoretically pre-calculate this DC voltage using existing formulas. Firstly, each LED is going to be assigned a specific RMS Voltage value as shown in Table 2.
In accordance to the components that can be used, these RMS values will be reduced to smaller, manageable values through a series of formula.

Step down transformer
In their basic conception, transformers are devices which two separate, but still in close proximity, windings or coils of insulated wire on an iron core [8]. One winding is connected to the power source, and referred to as the "primary" winding. The other provides the transformed power to the load, and is designated as the "secondary". Energy transfer from one winding to the other is thus done through magnetic induction. When one winding has more turns in its winding as compared to the other, it will generate more impedance and hence higher voltage although at the cost of current. This applies vice-versa and thus approves that power rating stays constant across the board.
Conversely, a step down transformer is when the secondary winding has lesser turns than the primary winding, thus providing lower voltage with higher are voltage, current, and resistance. There are currently two types of Multimeter:

Analog multimeter
This Multimeter makes use of a moving pointer which moves about a given range indicator that usually measures up to microammeter for current. Although this Multimeter is of older design, it is still preferred by many engineers or technicians. This is due to its excellent sensitivity and tracking capability to even the slightest change of values in an electrical circuit, while in many of such cases, the digital Multimeter may miss or be difficult to read from.

Digital multimeter
The most common type and being the newer design of the Multimeter. The values are displayed in the form of decimal number with predefined digit plus an embedded decimal point. Some digital Multimeter also may in addition come with a bar graph display reflecting the measurement value. The digital Multimeter is more common due to its lower cost and better precision when measuring constant or fixed values.
Both types of Multimeter are capable of measuring AC Voltage with the use of rectifier, in which the negative half cycle of an AC waveform is inverted, resulting in a non-zero DC Voltage whose value is the Root Mean Square (RMS) of its peak. Table 1 shows the comparison of some basic properties and attributes of a typical Multimeter with the authors' device prototype/equipment in this project [7].

Rectification into DC
For safety and practicality reason, the AC voltage will be stepped down into smaller value which is then rectified into DC voltage. Considering that the value required to turn ON each LED of this project is the stepped down and rectified DC value and that these values has to be defined in the Arduino coding for each respective LED, it is imperative for

Rectification into DC
A rectifier is a device which converts AC current, which periodically changes direction, into DC, which only flows in one direction [9]. This project will use the full-wave rectification for its higher average voltage output. This is due to full-wave rectification converting the negative polarity of the AC wave into positive, unlike the half-wave rectification which simply deletes the negative side. Figure 2 shows the comparison between half-wave and fullwave rectification.
As the transformer the author used is not center tapped, the four-diode bridges configuration will be used for rectification. The resulting DC voltage is more or less equal to 90% of its RMS value. Equation 3 shows the formula in determining the RMS value of peak AC Voltage: Transformer AC Output Peak Transformer AC Output RMS = The following equation shows the method in determining the average DC output (unsmoothed) of a rectifier relative to its original AC peak value as shown in Equation 4. By approximating the area under the curve of a sinusoidal AC waveform using integration, we can determine the average rectified DC voltage:

Combining Equation 3 and 4, we can form Equation 5:
Unsmoothed Average V DC = 0.9 Transformer AC Output (RMS) (5) Figure 3 shows the configuration of typical bridge rectifier.
During the positive half of the cycle, D1 and D4 conducts in series, while D2 and D3 is switched OFF due to being reverse biased. During negative half of the cycle, vice-versa happens. Since, at any given state of the cycle, the whole circuit passes through two diodes in forward bias, voltage drop of twice that of a single diode being used is present as shown in Equation 6: The voltage ripple is in fact vastly negligible which will be shown in detail through calculation in Section 4. Therefore, the ripple will not be included in the final formula.
As a result of capacitor smoothing, the DC Voltage output now roughly follows Equation 8 formulas: Combining the equations 2, 5, 6, and 8, a unified equation can be formed into Equation 9: Applying Equation 9 into Table 2, we can theoretically reduce the RMS values into as shown

Smoothing capacitor
With the help of filtering capacitor charge, it is possible to improve the average output of the DC voltage [9]. As seen from Figure 3, there are still gaps in between each half cycle where resulting voltage drops to zero. The fully charged capacitor will then attempt to discharge, filling the gaps during this instance, making the value closer into its original AC peak value. The smoothing capacitor is connected in parallel to the load after the bridge rectifier. Figure 4 shows the resulting DC output after being smoothed by capacitor.
The Ripple Voltage, a small residual unwanted variation of the DC output still present after filtering through capacitor can be approximated using the following Equation 7 [9]:

Design implementation
The following are a brief explanation of how each main component in the schematic work and if necessary the required calculation that comes along with it.
Step down transformer: A 220-30 V center tapped transformer will be used. The 30 V tap will be used as the input for the variable voltage regulator, in which the output of said regulator will act as the input reading for the Arduino. As for the half or 15 V tap, this will be run into a series of regulators, whose final output will later be used for powering the VCC of the Arduino.

Variable voltage regulator kit (LT-1083):
The output of the stepped down 30 VAC from the transformer will be run into this kit. The kit contains the following components: • A DC rectifier bridge (4 × 10 A10 Diodes) which rectifies AC input into DC • A series of capacitors to smooth the DC output from rectifier closer into its original AC peak value • The variable voltage regulator LT-1083 which is capable of regulating and outputting voltage from 0 to 30 V.
• W502 potentiometer in order to adjust the output of the regulator. Figure 5 shows the schematic of the Variable Voltage Regulator.
in Table 3.
The V DC value on the table is going to be applied in the Arduino programming which serves as the minimum voltage requirement for each LED to turn ON.

Design Specification and Implementation
For testing purposes, the circuit of the equipment is going to be modified. A Variable Voltage Regulator will be incorporated in between the Diode Bridge and Arduino Input, allowing the V DC input value to be manually adjusted instead of being dependent on the current state or level of the V RMS . This modification will later on prove crucial on identifying major flaws of the equipment in its current state.  Arduino UNO: An Arduino UNO is used to control the turning ON and OFF of the 12 LEDs. The voltage divided output of the variable regulator is connected into the analog pin which is programmed as the analog input for the Arduino. This value is however multiplied back into its original value before the voltage divider through the programming of the Arduino. It is then displayed on the I2C LCD which is connected to the Arduino through SCL and SDA pins. Digital pin D2 -D13, which is programmed as output, are each connected to a single LED. Each pin is programmed to be set to HIGH when a different but increasing voltage levels are reached, thus turning ON the corresponding LED. Pin AREF will be connected to a capacitor to ground in order to provide a short burst of charge when digital pins are switching from LOW to HIGH. Figure 7 displays the Arduino pin configuration.
I2C LCD: An I2C LCD having the address of 0 × 3 F is programmed for displaying the voltage value received by analog reading the Arduino input pin, which has been multiplied back to its original value before voltage divider through programming. This serves as a comparison with the value shown in the digital voltmeter module. The I2 C LCD used is shown in Figure 8.  Table 3 previously.

Design implementation
First of all, the equipment will receive input from power line (220 V) through the electrical R1 150 kΩ and R2 10 kΩ: Before going into the Arduino input pin, the output of the variable regulator kit will be run into two series resistors R1 and R2. These resistors are purposed as voltage divider in order to prevent the Arduino input from exceeding 5 V. A junction will be formed in between R1 and R2 which is paralleled into Arduino input pin. A formula using Kirchhoff Voltage Law can then be formed in order to calculate the value entering the input pin as shown in Equation 10. Note that the voltage divided values will be multiplied back to original through multiplication in Arduino code.

Digital voltmeter module:
The module is connected in parallel to the variable regulator output before the voltage divider. This measures the DC voltage at this particular point. The value shown will later act as a comparison with the value interpreted by the Arduino shown in I2C LCD. Figure  6 shows the image of the LCD used.

LM7812 and LM7805:
The stepped down 15 VAC output from the transformer will be first rectified and regulated into 12 VDC through diode bridges (4 × 1N4007) and LM7812 regulator. The 12 V output from this regulator is regulated again into 5 VDC through LM7805. The reasoning behind the use of two regulators instead of one is for stability purpose, considering that going from 16 V to 5 V is a lengthy way down. The resulting 5 V output will be used to power the VCC of Arduino and the I2C LCD.  closer into its AC peak value using capacitor. The resulting DC voltage is then regulated into 12 VDC using the transistor LM7812. The output from this regulator is regulated again into 5 VDC using the transistor LM7805. The reasoning behind the two step regulation instead of a single direct regulation is for output stability and overheating prevention. The 5 VDC output is used to power the VCC of the Arduino Uno and I2 C LCD.
On the other hand, the 30 VAC from the transformer is run into a variable voltage regulator kit. In this section, the 30 VAC is rectified into DC voltage using Diode Bridge and is smoothed into its AC peak value using capacitors as well. The resulting DC voltage is run into the input pin of the variable regulator LT-1083. The adjustable pin of the LT-1083 is connected to the W502 potentiometer which will allow the output pin of the LT-1083 to be adjusted plug. This input is then stepped down through a multi-tap transformer into 30 VAC and 15 VAC. The 15 VAC output is run through a Diode Bridge in order to rectify it into DC and is smoothed   the Arduino coding. The SCL and SDA pin is used for displaying the input voltage at A0 in a 16 × 2 I2C LCD and is thus connected to the corresponding pin in the LCD. This display will serve as a comparison with the value displayed by the digital voltmeter module. The digital pin D2 -D13 are each connected to 12 5 mm LEDs with the help of a male to female connector. Each LEDs are limited with resistors to prevent current flowing into it from exceeding its allowable rating. Lastly, AREF pin is connected to a capacitor to ground in order to filter the potential noise present when analog reading the input in A0.
The system's working of this project will be compiled below in a form of Block Diagram as shown in Figure 9: Figure 10 shows the schematic from 0 up to 30 V in DC using the potentiometer itself. A digital voltmeter module is paralleled to the output of this regulator to display the current voltage level at this particular point. However, since the input voltage going into an Arduino pin cannot exceed 5 V, the author decided to scale down the voltage using voltage divider. This is achieved by running the variable regulator output through two series resistors, namely R1 (150 kΩ) and R2 (10 kΩ).
The now scaled down output due to voltage divider follows the Equation 10. The resultant scaled down voltage is now connected to the A0 analog pin of the Arduino and will act as the input. Please note however, that this value will later be scaled up or multiplied back into its original value through across the chassis so that the I2C LCD, the jumper connectors and the 12 LEDs can be pushed through outward and then glued, allowing it to be viewed from outside. The rest of the schematic will be rest on a plain of acrylic. A jumper cable is used of the equipment created using EAGLE software.

Finished product overview
Some section of the circuit will be enclosed inside a plastic box chassis. Holes will be made   to connect the equipment from the acrylic to the plastic chassis, hence the purpose of the jumper connectors located across the plastic chassis. The overall overview of the equipment can be seen on Figure 11.

Results
Below images on Figure 12, Figure 13 and Figure  14 will show observation at three voltage intervals taken from three points of views: Digital Voltmeter Module, I2C LCD, and the 12 LEDs. Please note that LED 1 to LED 12 is read from the right to left.
Upon observation at each interval, each LED indeed turns ON during each set minimum voltage level defined in Table 2. However, when the values at the I2C display are compared with those of at Digital Voltmeter Module, there appeared to be unaccounted voltage between them at any point of voltage. This Voltage drop is documented on Table 4 at random voltage point in between each

Discussions
The results according to the images shown above inferred that the test-use version of the equipment with the help of Arduino programming is indeed able to turn ON each LED only when specific voltage level are reach which are increasingly different for each LED. As soon as the next voltage requirement is reached, the next corresponding LED immediately turns ON with no perceptible over-delay. The Digital Voltmeter Module, I2C LCD and all LEDs also turn ON with no noticeable overload or short circuit indication as soon as the circuit is powered up with 220 VAC through the electrical plug. This strongly showed that the circuit is safe to use. However, upon closer inspection, the equipment shows two major flaws based on data collection and the author's visual observation of   Appendix A for detail), will make the value displayed on I2C LCD and hence the value used to turn ON and OFF each LED to be much closer to the value in B instead of A. Table 5 shows the result if this gradient value is multiplied into A in comparison to the value at B.

Rate of Change A vs B
The second major flaw is that during data collection, the authors notice a random downward fluctuation of value in B or I2C LCD. This is potentially due to the noise caused by the internal analog pin impedance of the Arduino. Although the capacitor connected at AREF pin is hoped to minimalize this, the fluctuation apparently still exists. Additionally, this might also be caused by bad accuracy the resistors used by the author for voltage dividers. As a possible solution, the authors suggest the use of is already well documented in Table 4. The author presumed this is due to an internal resistance or impedance present within the Arduino analog pin. One possible sure-fire method of alleviating the first problem is through plotting a line graph of A (I2C LCD) against B (Digital Voltmeter Module). Figure 16 shows the resulting line graph using data from Table 4.
With the help of Microsoft Excel, a linear regression of Figure 16 in which a linear line that best fit all of the data is approximated. The resulting line chart is shown in Figure 17. Although it is nothing significant.
• The transformer that the author used is too bulky, heavy and not PCB mountable. This hampers portability.
• The test-use version of the equipment built in this project leaves some section of the schematic outside the encased plastic chassis. This also effectively hampers portability.
• The purpose of the equipment is limited to indication and at best warning. Any form of protection system is thus not present.
• The home-use version of the equipment is yet to be tested in practice.
• Observation results are not recorded in the Arduino.

Applications
An ideal application of the authors' equipment would be on housing area of middle or low class society and company building which are using high electricity consumption, but at the same time cannot afford the use of voltage stabilizer. As instability and problems in power supply is without a doubt still a major socioeconomic concern particularly in developing countries [10], the authors' equipment is hoped to raise awareness in areas where in the power quality is poor and hardly maintained.
According to Eaton's blackout tracker, citizens in the US were reporting 2,840 outage affecting 13 million people in 2009 [11]. Fast forward to 2017, Eaton reports that nearly 37 million people were affected by 3,526 outage events with 2018 still in data collecting. Although it takes someone experienced to fix power quality problems, it might also take someone equally knowledgeable to identify or operate the tools required to detect the problems in the first place. The authors' equipment is aimed to provide the bridge on this particular difficulty, making it accessible for people with little or no background in electricity. Thus, allowing them to also participate in identifying the power quality problems.
capacitor having larger capacitance so that it can charge faster, or by increasing the delay of the value being displayed at I2C LCD so that the capacitor can finish fully charging first. For reference, the current delay for displaying voltage value to I2C LCD used by the author is 1 millisecond.

Strength and weakness
The strengths of this project are: • The equipment is made from readily available material.
• Plug and play, as soon as the circuit is powered up, the LEDs will immediately turn ON depending on the present voltage input level.
• The use of standard electrical plug allows this equipment to be used safer than a Multimeter would and practically anywhere that supplies electricity in Indonesia.
• With observation being in the form of number of LEDs turning ON, make the equipment accessible to everyone even with little to none background in studying electricity. Although labeling of dangerous voltage level may be required for such cases.
• LEDs turning ON and OFF, as voltage level transition from one another, is dynamic without perceptible delay.
• Aside from the transformer, the equipment is perfectly portable.
The weaknesses of this project however are: Taking another example [12], findings in Nigeria has revealed that most companies, particularly multinationals, failed to pay enough attention to the effects that can be caused due to the poor power quality on their plant and equipment. This matter has couples of times lead to high production and maintenance cost, averaging to $50.000 annually owing only to equipment damage due to the poor power quality. With the use of the authors' equipment, it is hoped that such expenses can be minimized, alerting users before the damage has been done.

Conclusion and Recommendation Conclusion
As shown by the authors' observation and images from data collection, each the 12 LEDs can be safely turned ON at each specified voltage level as soon as the device is plugged in, exhibiting its safe and plug & play criteria. When the voltage level is changed in the middle of the device being active, the 12 LEDs will dynamically reflect the changes without any manual operation required, making it accessible to any kinds of user. However, results from data collection also shown two major problems of the equipment. Firstly, there are unaccounted voltage drops in the Arduino analog pin when compared to the voltage from the regulator. After plotting a table comparing the voltage difference at each voltage point, a linear regression line of the voltage drops can be formed with this equation: Y = 1.0281x -0.0492. Secondly, a random downward fluctuation of maximum 5% from its original value is present within the Arduino analog pin, affecting readings at each voltage point as observed in the I2C display. Analysis and subsequent solution to this phenomenon mandate a separate research regarding the Arduino or Atmega pins. Despite having room for improvements, the authors' device/ equipment indeed has the potential to indicate and detect critical changes in voltage level.

Recommendation
Below are some of the possible suggestions for future research on this project: • Integrate the equation attained from linear regression analysis (Y = 1.0281x -0.0492) into the Arduino coding in order to calibrate the voltage drops.
• A version of the equipment where the variable voltage regulator is removed should be tested