ZERO CROSSING DETECTOR AND TIMER BASED SUPPLY VOLTAGE AT PEAK BREAKER

In this study, a supply voltage at peak breaker is made to do the plug discharge test. Plug discharge (capacitor residual voltage) testing on IEC 60335-1 is a challenge for engineers. Requirement for the test are disconnecting supply voltage from the Equipment Under Testing (EUT) at its peak va lue. Most laboratory did this test manually, so the test might be carried out repeatedly so that the requirement is obtained. This system is using zero crossing detector and timer for detect the peak waave. The zero crossing detector circuit find the time when the voltage cross the 0 volt as the initial reference for termination. Microcontroller with Timer feature is used to delay the disconnection time from the 0 volt point or a quarter period of the power line. Relays are used as voltage breakers. From the experiments, it is necessary to add a compensation time due to the relay response time so that the system could do the supply voltage break at it’s peak wave. This system works properly with error 1.6% and with this means plug discharge testing could be finished in only one trial. Kata kunci: ARDUINO UNO, plug discharge, IEC 60335-1.


INTRODUCTION
Safety is the most important aspect of human life, including safety in using electrical equipment (Lee, 1971). The example of applying safety is the presence of safety standards, such as SNI IEC 60335-1 which is the standard of safety of electrical household appliances. One of the clause is capacitor residual voltage (plug discharge) test. This test also could be found in other safety standards such as IEC 60745-1, IEC 60065, IEC 60950-1, IEC 61010-1. This test aims to measure the remaining voltage on a device's supply plug when released from socket outlet, so the possibility of an electric shock can be estimated.
The test requirement is to plug the electricity off (removing the plug from the socket outlet) when the power line voltage reaches its peak voltage ("Internationale International Standard," 2006). It is very difficult to be done manually by human. The frequency of the power line is 50 Hz or 60 Hz while the response time of ordinary human to detect visual stimulus is about 200 ms (Jain, Bansal, Kumar, & Singh, 2015). Human response time could not catch up the power line frequency. This situation resultting the testmight be done repeatedly and the results were uncertainly, just the matter of luck.In Balai Riset dan Standardisasi Industri Surabaya Laboratory , average number of trial to get the right cut is about 10-15 times, and the test repeated 10 times, so it's very time consuming. Therefore, an aid is needed to do the voltage break automatically and precisely so that the test could done in one trial.
In this paper, an automatic power supply breaker at its wave peak is proposed. This system is light but reliable. The voltage supply for the test is 220 V 50 Hz. This Research take place in Balai Riset dan Standardisasi Industri Surabaya. This paper is structured as follows: In section II discussed references related to this research. The proposed method is described in Section III and the results of the experiment are outlined in section IV. Also in section IV is included testing the system with several variables. And finally Chapter V shows the final conclusions.

LITERATURE REVIEW
A Tool which is often used for automation is microcontroller. Microcontroller is single-chip microcomputer, more suited for control or automation process (Deshmukh, 2005). Microcontroller have central processing unit(CPU), memory, input/output, timer, counter and many other (Cady, 2009) depend on the features. The more features, the more expensive in price. Many researcher utilizing microcontroller in their project in many field, such as in farm (Shomefun, Awosope, & Ebenezer, 2018) and energy (Suripto, Mujahid, Putra, & Apriyanto, 2018). ARDUINO UNO is one of microcontroller with many features. Its hardware and software are both open-source. It could be programmed via USB port and there is an active community of user world wide. So it is suitable for beginner to study microcontroller (Galadima, 2014). In this paper, Arduino Uno is used because of its benificity mentioned above.
Designing this voltage breaker, there are two methods that can be taken, they are amplitude base dan time based. The first is amplitude based. The peak voltage will be detected using peak detector (Petrovic, B., 2013) (Ngamkham, Manmek, & Wongtaychatham, 2004) then the voltage will be disconnected if the peak voltage were reached again (Ibrahim, 2011). This method needs a fast breaker. Two component which can do this work are relay (Kaur & Prof, 2010) (Hamed, 2012) and MOSFE T (Nguyen, Crebier, Mitova, Aujbard, & Schaeffer, 2005) (Labella & Lai, 2014). Relay have near zero voltage drop but not to fast and MOSFET have a fast respond but the voltage drop is quite large. This methods have a disadvantages, if the line power is unstable, the peak voltage will be varies (Supriyanto, Setyantoko, & Silaturokhim, 2015) . Therefore, in our proposed system, relay is used to do the breaking supply voltage.
The second methods is time based. If the voltage reachs 0 volts is detected, a delay equal to a quarter period of the power line will be added before do the termination. To detect a 0 voltage can be done using Analog to Digital convert er sensing or by using a zero crossing detector sensing (ZCD) (Wall, 2003) (Gupta, Thakur, & Murarka, 2013) (Vorobyov & Vitols, 2014). Zero crossing detector is used because its less expensive than using ADC. ADC need an external hardware to read it. Delay can be done using one shot multivibrator (Tuwanut, Koseeyaporn, & Wardkein, 2007) or timer from microcontroller (Bekiroglu, 2008) (Adeel, Alimgeer, Inam, & Hameed, 2013). Therefore, in our propos ed system, delay by microcontroller's timer is used because it can be simply adjust by software editing.

METHODS
The system proposed in this paper is illustrated in Figure 1. The power line is connected parallel with switches and Equipment Under Testing (EUT) and zero crossing detector (ZCD). The 0 voltage on the EUT is detected by ZCD. Than microcontroller start delay utilizing timer function around a quarter period of the power line. After the delay is completed, microcontroller activates the switch which is disconnecting the voltage from power line to the EUT. The shape of the signal is describing in Figure 2.

A. Switch
Two switches/relays are used,the first is placed between the power lines and the EUT and the second placed between the EUT and ZCD. The first relay used to disconnect the EUT from the power line. The second relay used to disconnect the ZCD from the EUT so that ZCD did not become load to the EUT after the disconnection from its supply. Both the first and second relay are triggered at the same time. The relay type was used is SRD-05VDC-SL-C.

B. Zero Crossing Detector
The ZCD circuit is used to determine time when the alternating current (AC) voltage crossing 0 volt, also could be used to detect 0 volt voltage. The output of this circuit is pulse wave andits phase will change everytime when the voltage across 0 volts. ZCD circuit is shown in Figure 3. The combination of resistors and diodes is used to protect the op-amp from overload. Op-amp in ZCD is configurated as an open loop amplification. According to op-amp datasheet, open loop amplification at least 50.000 times. Therefore, whatever the input will generate output at max value i.e. Vsat. C. Microcontroller In this system, microcontroller have 3 function, i.e. to receive input from ZCD, make a delay and control the switch. Output from ZCD is an input for microcontroller at P3 pin because its functions as an interruption. For AC voltage, time interval between 0 volt and peak value is a quarter period. So if the power line uses a frequency of 50 Hz, the delay before termination is 5 ms. Delay is made utilizing feature Timer1. Prescalar 64 is choosen and the Output Compare Register value is 1249. Both switch directly connected to pins P4 and P5 of the microcontroller.

RESULTS AND DISCUSSIONS
In this chapter, the results of each part and the whole of the proposed system will explained. 3 conditions of EUT were used in experiments to test of the whole system performance i.e. capacitive loads, no load, and water pump load. Capacitive load was chosen because it can store energy in the form of voltage. So when the supply is disconnected, this load will maintain the last voltage level. An artifact oflaboratory proficienc y test i.e plug discharge test held by IFM with code 15E27 terminal A is choosen as a capasitive load. And water pump was chosen because it is an example of product of IEC 60335-1. Than the system tested with various supply voltage between 0.9 until 1.1 scale from 220 Vrms to check the accuracy of the peak breaker. We capture the signal from all the test with a proper osciloscope.

A. Switch
The response of the relay circuit is shown in Figure 4. The x-axis is time (5 ms / div) and the yaxis is voltage (5 V / div). The yellow line is external trigger, while the blue line is the relay response. There is a time delay between the trigger and the response for 4 ms, shown with both white dotted line. The cause is mechanical relays need time to connect or disconnect. According to the datasheet, the maximum time required is 10 ms, depending on the power of the trigger. In this system, the trigger directly from the microcontroller pin, which is TTL 5 Vdc. If the trigger did not change, neither did the time delay. Figure 4 Relay response. B. Zero Crosssing Detector ZCD circuit response is shown in Figure 5. The xaxis is time (0.1 ms / div) and the y-axis is voltage (10 V / div). The blue line is input to ZCD, while the yellow line is the output. The input is sine wave from power line which frequency is 50 Hz. The output is square wave which value is only +Vsat or -Vsat of the op-amp, depend on the phase of the input. Both input and output signal cross the 0 value at the same time. The rise time of the output signal is less than 12 µs, so that can be ignored.

C. Microcontroller
In this system, the microcontroller is used to read input, do the delay than write output.The delay needed for this system is a quarter period of the power line which is 5 ms. Program was made to make a time delay of 5 ms utilizing Timer1 function. The generated delay is shown in Figure  6. The x-axis is time (1 ms / div) and the y-axis is voltage (5 V / div). It can be seen that the positive pulse generated is equal to 5 ms, shown with both white dotted line.   Figure 7. The x-axis is time (2 ms / div) and the y-axis is voltage (200 V / div). It can be seen that the voltage break did not occur at the peak of the sinusoidal voltage but 4 ms thereafter. This condition is match with what has been discussed in sub-chapter A that relay requires an operating time for 4 ms. Therefore,a time compensation for 4 ms precede is needed. The length of time delay is changed to 1 ms. And the results are as shown in Figure 8. The x-axis is time (5 ms / div) and the y-axis is voltage (200 V / div). It can be seen that with a time compensation addition, the voltage break occurs at peak wave. This experiment have been repeated 10 times, and the result is all the same.  The second condition, system was tested without EUT as a load. The result is shown in Figure 9. The x-axis is time (5 ms / div) and the yaxis is voltage (200 V / div). It can be seen that the cut occurs at the peak wave. After that remain noise of the oscilloscope probe. This noise occur because after the voltage break, osciloscope probe become in a floating condition i.e. didn't connected to anything. This experiment have been repeated 10 times, and the result is all the same. The third condition, system was tested with a water pump as load (EUT) with specifications Vin = 220 Vac and Pin = 250W. The result is shown in Figure 10. The x-axis is time (200 ms / div) and the y-axis is voltage (200 V / div). It can be seen that the voltage break occurs at peak wave, then the voltage decrease exponentially . After the break, motor of the water pump slowly stop turning because of the friction. Therefore the voltage still in a sinusoidal waveform. If the motor stop turning, there will no voltage left. The system also tested with various supply voltage from 0.9 to 1.1 scale from 220 Vrms to measure the accuracy of the peak breaker. The result is shown in Tabel 1. Deviation between break value and peak value is increasing along with supply voltage. However the scale between deviation and peak value is almost constant about 1.6%. We could call this as an error.

CONCLUSION
Zero Crossing Detector and Timer Based Supply Voltage Breaker at Peak waveis presented in this paper.This device is an aid to do the plug discharge test of IEC 60335-1. This system utilizing a simple Arduino microcontroller to do the process and general relay as the switch. Time compensation for 4 ms precede is needed to overcome the relay response. With three condition of the EUT (load), this system can do the voltage break at the peak wave of the supply voltage, and reliable. This system have an error 1.6% from peak value but it could be resolved by adding more time compensation by the timer. With this system, plug discharge test could be done in single try, therefore the time test would be more efficient.