Arduino Uno-Based Automatic Transfer Switch: Vol. 66, 4, Pp. 219-224, Bucarest, 2021

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Rev. Roum. Sci. Techn.– Électrotechn. et Énerg.

Vol. 66, 4, pp. 219–224, Bucarest, 2021

ARDUINO UNO-BASED AUTOMATIC TRANSFER SWITCH


WALUYO1, KAMAL SALAM SYAH1, SITI SAODAH2, DECY NATALIANA1

Keywords: Arduino Uno, Automatic transfer switch, Backup source, Functional test, Voltage.
An automatic transfer switch (ATS) automatically transfers electrical power from a primary to a backup supply during power
failure. However, there are some inconsistencies associated with this transfer method. Therefore, this research designed,
constructed and tested an Arduino Uno R3 board based ATS prototype for the automatic transfer of electricity. This model
generally consists of electrical equipment, electronic devices, and programming software. Furthermore, a ladder diagram in
SoapBox Snap software, integrated with IDE software used to test the prototype. The ac relays were for the main and generator
supply sensors, while the dc relays were for the generator switching, starting, and stopping processes. Basically, the capacities of
the components for the main and backup generator supplies were based on 900 VA, 220 V, 4.09 A, and 50 Hz for power, voltage,
current, and frequency, respectively. Four functional tests were conducted on a normal, main supply outage, generator failure,
and main supply conditions. The result showed that the main-to-backup supply switching time was 15.13 s, closed to the
standard time of 15 s. The average statistical error was 1.11 % and used as a third-class category of measuring instruments.
Meanwhile, the operational voltage range was between 135 V and 245 V on loading conditions.

performance was also tested in case interference appeared


1. INTRODUCTION between the primary and backup power sources with the
The main electrical energy supply is not always standard transfer delay of 15 seconds [27]. Furthermore, the
continuous [1], therefore, it is necessary to use an ATS to surge currents need to be overcome in the primary source
transfer an alternative or backup power source to a load [2– and failure of the generator to start.
4]. This tool controls backup generators and an automatic
main failure (AMF) [5,6]. It reduces downtime and 2. DESIGN AND IMPLEMENTATION METHODS
increases electrical power supply reliability [7]. Several Figure 1 shows the block diagram of the ATS operational
ATSs have been designed using a programmable logic system consisting of input, process, and output. The first
controller (PLC) [8], triode for alternating current (TRIAC) part is the main source and generator, while the second is
[9], PIC16F877 series [10–12], ATMEL ATtiny2313 [13], the control system. The ac relay sensor was used to detect
8051 [14], ATMega 8535 [15], AVR ATMega16 [16], the main supply and backup generator, further processed by
ATmega328 (on Arduino Uno board) [17], and 8052 [18] the Arduino Uno R3, which included ATmega 328
microcontrollers. Generally, these ATSs serve as a transfer- microcontroller as relay controller of on-off operations.
switch backup generator and are also used to turn on diesel
pumps [19] and PV batteries [20].
Furthermore, microcontrollers are used to control various
applications, such as data acquisition [21], microscope [22],
solar tracking [23], battery management [24] systems,
digital-controlled electronic load [25] and medical
applications [26].
The statement above implies that microcontrollers have
several benefits. However, the designed ATSs were not Fig. 1 – ATS system block diagram.
realized using SoapBox Snap software and tested not more
than 15 times. In this research, the design, construction and The maximum limit of the primary source and backup
testing of an ATS prototype control system were carried out generator power requirement settings was necessary to
using an Arduino Uno R3 board with ATmega328 avoid ATS component damages. Basically, the design was
microcontroller, SoapBox Snap for making ladder diagram, based on 900 VA, 220 V, 50 Hz, 0.8 lagging, for power,
and carry out functional testing based on new ideas. This voltage, frequency, and power factor, respectively, both for
prototype was tested to show the time needed to transfer the main and alternative sources. Therefore, the minimum
electrical energy from the primary to backup source, current capacity was 4.09 A.
supposing the main power did not supply the load. Its

Fig. 2 – a) Voltage relay sensor circuit diagram; b) physical 250 V ac relay.

1
Department of Electrical Engineering, Institut Teknologi Nasional Bandung (Itenas), Bandung, Indonesia, email: [email protected]
2
Department of Energy Conversion, Politeknik Negeri Bandung (Polban), Bandung, Indonesia.
220 Arduino Uno-based automatic transfer switch 2

The hardware subsystem consisted of a sensor, data The load subsystem was used to describe the ATS
processing, relay, and load. Figure 2a is a voltage sensor output. The lamps indicate the loading in the main supply
relay circuit diagram connecting the main supply and or backup generator. The ATS used a 5 W LED, while the
backup generator. Meanwhile, Fig. 2b shows the physical visual indications consisted of the load, backup generator
condition of the relay. In accordance with the energized stopping, and starting relay control indicator lamps.
coil, the relay is connected to the board. The ATS programming was performed using a ladder
The Arduino Uno R3 board serves as the data processing diagram (LD) of SoapBox Snap software. It was also
centre and controller. It required a 5 V dc operating voltage stimulated by LDmicro software without connecting to the
of power supply, connected to several hardware subsystem hardware. The ladder design was based on 4 conditions,
circuits, and located on a specified port according to the namely the normal, extinct, failed to start, and revived main
corresponding function. Figure 3 shows the Arduino Uno supplies. However, the LD circuit was functional under
R3 pin locations. normal conditions, while the main source was ready to
supply the load. In accordance with this condition, the auto
push button was on normally closed (NC). However, when
the main supply goes extinct, the backup generator fails to
operate. Figure 5 shows the corresponding flow chart.

Fig. 3 – Arduino Uno R3 pin locations.

The Arduino Uno R3 board receives the input signals


from the pushbuttons and sensing relays. Meanwhile, the
output signals are from the indicator lamps and relays, such
as starting, stopping, and loading. The dc modules are used
for switches controlled by hardware. There are 2 subsystem
relay types, which consist of the on and off starting and
stopping backup generator and the on and off central source Fig. 5 – Failing and starting main supply flowchart.
control relays.
Figure 4a shows the dc relay module circuit diagram. In the case of a revived main supply, all relays are bound
The input was connected to the Arduino Uno R3 board, to start functioning. The flow chart describes this condition
while the output, which is in the form of a switch, moves in Fig. 6.
the supplied energy from the main supply to the load in
case the main source becomes extinct. Figure 4b indicates
the physical 2-channel relay.

(a)

Fig. 6 – Revived primary source flowchart.

3. RESEARCH RESULTS AND DISCUSSION


Figure 7 shows the overall circuit diagram design,
(b) consisting of the main components, namely microcontroller
Fig. 4 – a) Circuit diagram and b) two-channel 5-volt dc relay. and relays.
3 Waluyo et al. 221

This process was carried out by connecting 2, 5 and 9 V,


power supplies to the main supply of the Arduino Uno R3
board and dc relay circuits. The relay contacts were
connected to a load of lamps through the terminal board.
Conversely, the LEDs were connected in parallel to the
main supply and the backup generator relay contacts.
Furthermore, 2 incandescent lamps were connected to the
ac source, starting from the relay contacts and the backup
generator. To prevent the power source from extinction,
some equipment was also tested and A power plant for
emergency service needs to be able to reach full speed and
carry load within 15 s after receiving the initial signal. The
entire load also needs to be transferred within the next 30
seconds, or a total duration of 45 s [27]. In accordance with
the standard basis, the ATS testing was carried out within
15 s. The main supply consists of 3 conditions, namely
above, below and same as 15 s. It was further stimulated to
Fig. 7 – Overall ATS circuit diagram. determine the power outage of the main supply that lasted
the duration. Based on the test data above 15 s, the ATS
Figure 8 shows the ATS packaging, on the (a) outer and operated properly, by the switching from the main supply to
(b) inner parts, which consists of previously mentioned the backup generator and vice versa. The test data below 15
components. s proved that the power outage of the main supply took
place within a short time, under the ATS switching
duration. The ATS below the 15 s operated adequately
fulfilling the design. At the time of the main supply
extinction, the backup generator started and functioned for
15 s, and the main supply came on before the time elapsed.
The ATS ensured that the main supply was ready to transfer
the load. After the 15 s waiting time, the relay turned off
the backup generator.
The test data at the 15th second shows that the main
(a) supply was extinct, and at the same time, the backup
generator was ready to start immediately, according to the
standard, PUIL 2011 part 8 [27]. Based on the test data
within the same duration, the ATS design was properly
operated. It waited for the same duration to ascertain the
availability of the voltage from the main supply. In the case
of the extinct main supply voltage, the ATS initiated to start
the backup generator for 15 s. In addition, the voltage
supplied the load, which was also tested to certain
occurrences. These include the inability of the generator to
start and bringing the main supply back to life.
(b)
Figure 10 is a sample of a part ladder diagram under
Fig. 8 – Yielded ATS: a) outside and b) inside. normal conditions using LDmicro software. The circuit and
In addition, testing of components was used to determine the main supply were ready to function and transfer the
the ATS equipment’s feasibility, as shown in Fig. 9. load. In this condition, the auto push button was on a
analyzed, both operating voltage and statistical error. normally close (NC).

Fig. 10 – A sample of LDmicro ladder diagram.

Figure 11 shows the timing diagram for the healthy or


Fig. 9 – ATS testing circuit. normal condition. The result shows a turned on ATS and
222 Arduino Uno-based automatic transfer switch 4

load relay. It also illustrated the duration of the main active


supply. Simultaneously, the backup generator was unable to
handle the loss of power supply to the load. The experiment
duration for the healthy condition was 120 s.

Fig. 13 – Return on a supply timing diagram.

Figure 14 shows the results of the test carried out when


the generator failed to start. During this analysis, the main
Fig. 11 – Healthy condition timing diagram.
supply and sensor were turned on instead of the load relay.
Figure 12 shows the timing diagram of extinct main The generator relay, which was turned on, indicates that it
supply. The sensor becomes functional as the main supply tried to start. However, it failed, and the relay had to wait
is switched turned. Afterwards, the main supply was no for 5 s, which depicts a first failed process. The relay was
longer available, and both load and supply sensor relays turned on to carry out other starting processes, and the
were turned off. The generator relay started for 15 s, after generator failed to start again before being turned off for
which it was ready to supply the load. The timing diagram another 5 min. Moreover, the relay was turned on again to
describes the transfer time from the main supply to the initiate a third starting process. It failed to start, and the
generator, turned on for 15 s, and assuming the starting relay waited for another 5 s. Therefore, both the buzzer and
relay turned off, it was active for 2.5 s. The starting and indicator lamp were turned on, indicating a problem with
warming of the generator lasted for the same duration. At the backup generator.
35th second, the supply turned on, followed by the load and
sensor relays, for 87.5 s.

Fig. 14 – Failed generator to start timing diagram.

Fig. 12 – Extinct main supply timing diagram. The main supply, relay, and sensor were set for 40 s. The
generator relay turned on for 2.5 s, and the waiting time
Figure 13 shows the timing diagram, which indicates the was 7.5 s to detect whether the generator failed. The
transfer duration from the generator to the main supply. starting of the generator was carried out 3 times to review
This test was carried out for a returning state of the main whether or not it failed. After the 3rd time at the 70th second,
supply to life. In this test, the main supply was extinct; the it still failed to start, the buzzer and indicator lights were
generator, load and sensor relays were turned on. Also, the turned on, thereby depicting that the backup generator was
main supply came back to life and was still turned on the problem.
because it detected a voltage while the generator sensor The main supply was above 15 s, while the starting
relay was still active. It also failed to transfer the voltage signal duration was an average of 15.13 s. Conversely,
until 15 s of set time to ensure that the main supply was when the main supply went out for less than 15 s, the ATS
fully ready to convey the load. After the stipulated time, the test data proved that the starting signal was an average of
main supply relay was turned on, while the generator was 15.20 s. It was further proven that the main source went off
turned off simultaneously. Furthermore, the generator at 15 s, with a starting signal of 15.07 s. This case was in
started to cool for 15 s before getting turned off. The accordance with PUIL 2011, Section 8 [27], which stated
generator was turned on for 75 s, while the load and sensor that the power plant needs to be ready to supply load within
relays were turned on for 45 s. At the 30th second, the main 15 s of receiving signal.
supply was turned on, and the timer waited for fifteen The main supply needs to be revived, irrespective of the
seconds to ascertain this fact. The generator was ready to fact that the generator failed to start to avoid going extinct.
supply power to the load. At the 45th second, the main Based on the healthy condition, the system was ready to
supply conveyed electricity to the load, and the generator respond to any interference. The extinct condition described
started cooling down and finally stopped at the 60th second. the transfer time from the main supply to the backup
5 Waluyo et al. 223

generator. Consequently, assuming the main supply was of 1.47 % and close to the fourth category. This was caused
extinct, it conveyed the load to the backup generator within by failures of the starting conditions, despite starting the
15 s, according to the standard PUIL 2011 part 8 [27]. generator 3 times in a reasonably long time.
Although, when the main supply was revived, it was ready 4
to supply the load. Finally, after 15 s, it moved from the Off source & starting generator
Source return On & load supply
Generator cooling down & Off
backup generator to the main supply. Its inability to start Starting failed generator
3
led to a continuous trial of 3 more times before turning on
the buzzer and indicator.

Time (s)
The ATS statistical and error tests are aimed to acquire 2
the actual values. The error limit was listed on the
measuring instruments with the electrical tools classified 1
according to IEC 62053-21 standard [28]. The measuring
instruments accuracy consists of 8 classes, namely 0.05,
0
0.1, 0.2, 0.5, 1.0, 1.5, 2.5 and 5. These describe the error 0 20 40 60 80 100
magnitudes of the instruments on the measuring limits of Testing Order
±0.05 %, ± 0.1 %, ±0.2 %, ±0.5 %, ±1.0 %, ±1.5 %,
Fig. 16 – ATS error percentages.
±2.5 %, ±5 %, to the maximum values. Based on these
classes, the measuring instruments were classified into 4 The ATS service working voltage variation was set to
groups according to the user criteria. +5 % and –10 % maximum and minimum nominal voltage
1. Groups of 0.05, 0.1, and 0.2 classes include the highest [30]. Based on the quotation of SPLN 1995, Article 4, the
precision measuring instrument. They are used as test was carried out by adjusting the working voltage of 50
laboratory standards. to 250 V on the ATS. It showed that the load supplied 50 to
2. The 0.5 measuring instrument class has the next lower 134 V, while turning off their load condition. Meanwhile,
level of precision after the 0.2 class. This measuring the voltage range of 135 to 245 was also turned on.
instrument is portable and commonly used for
precision measurements. 4. CONCLUSION
3. The 1.0 class has a lower level of precision than that of
the 0.5. This is commonly used on small portable or In conclusion, an Arduino Uno-based automatic transfer
panel measuring instruments. switch prototype was successfully designed in this research.
4. The 1.5, 2.5, and 5 classes are used on panels that do This prototype included SoapBox Snap software in the
not pay much attention to precision and accuracy. design, implementation and functional testing stages.
The yielded data for the main supply and generator were
22
acquired 100 times. The main supply produced power, and
the backup generator was cooled down and turned off.
20 Meanwhile, the failure rate of the backup generator was
Off source & starting generator
Source return On & load supply
1.11 %. This case followed the standard [28] the yielded
Time (s)

Generator cooling down & Off ATS was classified in the third class and closed to 1.0 %.
18
Starting failed generator This precision was commonly used on portable or panel
measuring instruments.
16 The operating voltage data range from 50 to 134 led to
the turned-off load condition. However, within the range of
14
135 to 245 V, it was turned on. This was proven to be
0 20 40 60 80 100 greater than the standard [30], whereas the variation of the
Testing order service voltage was set at +5 % and –10 % for the
maximum and minimum of the nominal voltages,
Fig. 15 – ATS testing results.
respectively. For future occurrences, it is better to design a
The testing process was carried out by measuring the prototype that reduces the starting time.
response time of each part, which was carried out Received on February 9, 2021
100 times. The parts include the extinguished main source
and starting generator, revived main supply and load. On REFERENCES
the contrary, the starting generator handled the cooling
1. E. Susanto, Automatic Transfer Switch (An Overview) (in Indonesian),
down and turning off, while the backup failed to start. Jurnal Teknik Elektro, 5, 1, pp.18-21, 2013.
Figure 15 shows the ATS testing results. 2. L. Olatomiwa, R. Olufadi, Design and development of a low-cost
Equation (1) is used to calculate the percentage of errors automatic transfer switch (ATS) with over-voltage protection,
from the ATS system [29]. Journal of Multidisciplinary Engineering Science and Technology
(JMEST), 1, 4, pp. 190-196, 2014.
3. P.H. Ginting, E.W. Sinuraya, Design of automatic transfer switch (ATS)
Xn − Xo
error = 100 [%], (1) transition parameters in the form of voltage and frequency with
Xo Atmega 16 microcontroller (in Indonesian), Transmisi, 16, 3, pp.
128-134, 2014.
where Xn and Xo are the nth and initial data, respectively. 4. P.H. Ginting, T. Sukmadi, E.W. Sinuraya, Design of automatic transfer
The results of the error percentages are shown in Fig. 16. switch (ATS) mode of transition open-transition re-transfer with
The mean value of the ATS error was 1.11 %, and it has a transition parameters in the form of voltage and frequency (in
Indonesian), Transient, 3, 1, pp. 70-75, 2014.
reasonably small percentage error because it has a 5. N.W. Rasmini, Automatic Transfer Switch (ATS)-automatic main failure
systematized approach to the third class. The mistakes (AMF) panel in BTDC director houses (in Indonesian), Jurnal
found in the generator's inability to start were at an average Logic, 13, 1, pp. 16-22, 2013.
224 Arduino Uno-based automatic transfer switch 6

6. S. Suhanto, Design of automatic transfer switch and automatic system 18. E.C. John, E.V. Chioma, O.V. Onyeka, Single phase microcontroller-
mains failure in generator set 80 kVA with deep sea electronics based automatic change over switch, Int. J. of Electronics,
4420 (in Indonesian), Proc. SENIATI, Malang, 3 Feb., 2018. Communication & Instrumentation Engineering Research and
7. E.T. Santosa, M. Sibarani, Suripto, Basic design of automatic main failure Development (IJECIERD), 8, 1, pp. 7-16, 2018.
and automatic transfer switch systems for building meeting room 71 19. I.W. Suwardana, T.A. I Ketut, I.G.W.A. Kurniawan, Automatic start
(in Indonesian), Proc. of Nuclear Device Engineering Scientific control planning hydrant pump in Bali State Polytechnic (in
Meeting, PRPN-BATAN, Serpong, 30 Nov., 2011. Indonesian), Jurnal Logic, 13, 2, pp. 106-114, 2013.
8. F. Rahman, A. Natsir, G.W. Wahyu, Design of ATS/AMF as automatic 20. Asriyadi, A.W. Indrawan, S. Pranoto, A.R. Sultan, R. Ramadhan,
power supply transfer based programmable logic control (in Design of hybrid automatic transfer switch (ATS) system (in
Indonesian), Dielektrika, 2, 2, pp. 164-172, 2015. Indonesian), Proc. SNTEI, Makassar, 3 Nov. 2016, pp. 408-414.
9. A.B. Bimo, H. Santoso, Soemarwanto, Designing automatic transfer 21. V. Croitoru, I.A. Tihon, O. Leonte, V. Ciocoiu, T. Voica, M. Aranghel,
switches on motorbike gasoline generator-set 1 phase 2.8 kW 220 I. Vonica, Data acquisition system based on mobile sensor
Volt 50 Hertz (in Indonesian), J. EECCIS, 1, 1, pp. 1-6, 2007. networks, Rev. Roum. Sci. Techn.– Électrotechn. et Énerg., 52, 1,
10. M.Q. Azeem, H.-ur Rehman, S. Ahmed, A. Khattak, Design and analysis pp. 67-80, 2007.
of switching in automatic transfer switch for load transfer, 22. S.L. Stănescu, V. Sava, P.D. Cristea, M.V. Udrea, Firmware for laser
International Conference on Open Source Systems and surgical ophtalmic microscopes, Rev. Roum. Sci. Techn.–
Technologies (ICOSST), Lahore, 15-17 Dec., 2016, pp. 129-134. Électrotechn. et Énerg., 55, 4, p. 445-453, 2010.
11. C.K. Amuzuvi, E. Addo, A microcontroller-based automatic transfer 23. S. Das, P.K. Sadhu, S. Chakraborty, S. Banerjee, T. Saha, Design and
switching system for a standby electric generator, Ghana Mining implementation of an intelligent dual axis automatic solar
Journal, 15, 1, pp. 85-92, 2015. tracking system, Rev. Roum. Sci. Techn.– Électrotechn. et Énerg.,
12. A.F. Agbetuyi, A.A. Adewale, J.O. Ogunluyi, Design and construction 61, 4, pp. 383-387 (2016).
of an automatic transfer switch for a single phase power 24. B. Anton, A. Florescu, Ş.G. Roşu, Standalone analog active cell-
generator, Int. J. of Engi. Science, 3, 4, 2011. balancing circuit for automotive battery management systems,
13. B. Anto, A low cost microcontroller-based automatic transfer switch Rev. Roum. Sci. Techn.– Électrotechn. et Énerg., 63, 3, pp. 306-313,
for portable generator, Proceedings SNPPTI, Jakarta, 28 April 2018.
2012, pp. 239-245. 25. V.-M. Placinta, F. Babarada, C. Ravariu, L.G. Alecu, Digitally
14. C. Obasi, O.B. Odeyinde, J.J. Agidani, V.O. Ibiam, C.U., Osichinaka, controlled electronic load for testing power supplies, Rev. Roum.
Design and implementation of microcontroller based Sci. Techn.– Électrotechn. et Énerg., 64, 2, pp. 131-136, 2019.
programmable power changeover, Computer Engineering and 26. L. Breniuc, C.G. Haba, V. David, embedded platform for developing
Intelligent Systems, 6, 12, pp. 51-56, 2015. medical applications, Rev. Roum. Sci. Techn.– Électrotechn. et
15. A.P. Harahap, W. Dwiono, N. Harpawi, SMS based power source Énerg., 65, 1-2, pp. 123-129, 2020.
switching hardware series (in Indonesian), J. Elektronika Industri, 27. National Standardization Body (BSN), SNI 0225, General electrical
5, pp. 40-49, 2010. installation requirements (PUIL) 2011, 8-21: Emergency (genset)
16. A.W. Indrawan, Hamdani, Nuraminah, Design of ATS/AMF control generator installation, ICS90.140.50, Jakarta, 2011, pp. 573-580.
and monitoring systems in the transfer of electric energy sources 28. IEC, Electricity metering equipment (a.c.) – Particular requirements,
through the internet network (in Indonesian), Proceedings SNTEI, IEC 62053-21, 1st Ed., Geneva, pp. 19-32, 2003.
PNUP, 3 IT_020, Makassar, 3 Nov., 2016 pp. 262-271. 29. S.C. Chapra, Applied numerical methods with MATLAB® for
17. R. Pakpahan, D.N. Ramadan, S. Hadiyoso, Design and implementation engineers and scientists, 4th Ed., McGraw-Hill Education, New
automatic transfer switch (ATS) using Arduino Uno and Relay (in York, NY, USA, 2018, pp. 100-103.
Indonesian), J. Elektro Telekomunikasi Terapan, 3, 2, pp. 332-341, 30. P.T. PLN (Persero), Standard Voltages, SPLN 1, Jakarta, 1995,
2016. p. 5.

You might also like