Vol. 8 No. 2 Juni 2025 Rang Teknik Journal http://jurnal. id/index. php/RANGTEKNIKJOURNAL DESIGN OF PLC-BASED AUTOMATIC TRANSFER SWITCH CONTROL SYSTEM FOR ELECTRICITY SUPPLY FROM SOLAR. WIND. BATTERY. AND GRIDS ALBENI FAKHRI1. MUHAMMAD NASIR2. ADRIANTI3 Electrical Engineering Department. Faculty of Engineering. Andalas University1,2,3 Email: albenifakhri30@gmail. DOI: http://dx. org/10. 31869/rtj. Abstract: This research aims to design and implement a PLC-based control system for an Automatic Transfer Switch in a hybrid power supply network, integrating solar and wind energy sources with battery storage and the national grid. This research uses the experimental method, with the subject being the design and testing of a PLC-based control system for a hybrid power supply integrating solar, wind, battery, and grid energy. The research shows that the designed system functions well from design to testing stages. It integrates components such as an automatic on-off battery charging circuit. ATS control based on PLC, and power sources like solar, wind, and batteries. The system effectively manages energy flow and ensures proper Testing confirmed smooth power transitions and accurate voltage readings with an average error of 0. 52%, indicating high system efficiency and reliability in energy distribution. In conclusion, this research successfully develops a reliable PLC-based control system for an Automatic Transfer Switch in a hybrid power supply network, ensuring efficient energy Keywords: Battery. Grid. PLC. Solar Power. Wind Power. Introduction The increasing demand for electrical energy in Indonesia continues to grow annually, becoming an integral part of daily life. Electrical power supports various sectors, including household, commercial, public services, and industrial needs (Golmohamadi, 2022. Strielkowski et al. , 2. With the rapid advancements in technology, industry, and information systems, the significance of electrical energy has become more pronounced. However, the reliance on conventional power generation systems, primarily utilizing fossil fuels such as coal, diesel, and gas, poses significant environmental challenges (Kabeyi & Olanrewaju, 2022. Zhang, 2. These sources contribute to greenhouse gas emissions, which exacerbate global warming. Addressing this issue requires transitioning to renewable energy resources that are environmentally friendly and sustainable (Bhuiyan, 2022. Mustakim & Effendi. Renewable energy technologies offer promising alternatives, such as Solar Power Plants and Wind Power Plants. Solar Power Plants utilize solar energy to generate electricity through photovoltaic systems, while Wind Power Plants harness wind energy to drive turbines (Hassan et al. , 2023. Saswat et al. Shafiullah et al. , 2. Both technologies are advantageous due to their abundant availability and minimal environmental impact. Despite these benefits, challenges persist in optimizing their efficiency and ensuring reliable integration with the existing power grid. Studies have highlighted the importance of Maximum PowerPoint Tracking algorithms in improving Solar Power Plants performance by maximizing energy output under varying environmental conditions (Iweh et al. , 2021. Kataray et al. , 2023a. Shahzad & JasiEska, 2. Similarly, research on Wind Power plants focuses on addressing intermittency issues, where energy storage systems play a crucial role in maintaining stability and supply. Energy storage systems, particularly battery-based solutions, are essential for managing the fluctuating nature of renewable energy sources (Kataray et al. , 2023b. Saldarini et al. , 2. Batteries store excess energy generated during peak production periods and provide a backup supply during low production times. Effective management of these storage systems requires advanced control mechanisms to prevent overcharging ISSN 2599-2081 EISSN 2599-2090 Fakultas Teknik UM Sumatera Barat Vol. 8 No. 2 Juni 2025 Rang Teknik Journal http://jurnal. id/index. php/RANGTEKNIKJOURNAL and over-discharging, which can degrade battery performance and lifespan (Dai et al. , 2021. Nor. Programmable Logic Controllers (PLC) have been identified as an effective tool for automating control systems, ensuring seamless operation and efficient energy utilization. Research efforts have explored various aspects of integrating renewable energy systems with energy storage and grid networks. The use of Automatic Transfer Switches (ATS) in conjunction with PLCs has shown potential in optimizing the operation of hybrid energy systems (A. Adrianti et al. , 2023. Chandra et al. , 2. This approach enables automatic switching between different energy sources, ensuring a continuous and reliable power supply (Sutopo et al. , 2. Furthermore, studies have demonstrated the effectiveness of integrating DC-DC converters to enhance the performance of solar and wind energy systems, contributing to the overall efficiency of energy distribution (Alam et al. , 2. The primary objective of this research is to design and implement a PLC-based control system for the operation of ATS in a hybrid power supply network (Frank et al. , 2024. Kamil et al. , 2. The network integrates Solar and Wind Power Plants, batteries, and the national grid to achieve a reliable and sustainable energy solution (T. Adrianti et al. , 2023. Jha et al. , 2. By addressing the challenges associated with renewable energy integration, this research aims to enhance the operational efficiency of hybrid systems and promote the utilization of clean energy resources. This study is expected to contribute to the development of advanced control systems for renewable energy applications, supporting IndonesiaAos transition towards a sustainable energy future. Research Methods This experimental research aims to design and test an operation control system based on a Programmable Logic Controller (PLC) for a hybrid power supply system integrating Solar Power. Wind Power, batteries, and the public grid. The study evaluates system reliability and efficiency, starting with a literature review and problem identification to establish the theoretical foundation. Conducted in the Electrical Engineering Laboratory at Andalas University, the research progresses through multiple stages. The software was developed using Ladder programming for the PLC to automate and optimize the energy flow between renewable energy sources, batteries, and the public grid. System testing was conducted to evaluate operational performance, including automatic source switching based on energy The experimental results provided critical insights into system reliability and efficiency, forming the basis for the final analysis and evaluation of the hybrid power supply systemAos effectiveness. Results And Discussion The results of the research start from system design, system creation and system testing with the following details. System Design The design of sysem represents the integration of various components designed to work cohesively within a coordinated system. This system combines the automatic on-off battery control circuit, the PLCbased ATS control circuit, and various power supply circuits, including those for the Solar Power Plant. Wind Power Plant, and batteries. The system manages energy flow from multiple sources, regulates power distribution, and ensures that each component operates according to its designated function. It includes automatic controls for disconnecting or balancing energy flow based on requirements, integrating both manual and automated controls to maintain safe and efficient operation. This integration is achieved using PLC as the central controller, along with relays, contactors, timers, and measurement devices, ensuring optimal functionality under various operational conditions. The wiring diagram is designed to facilitate the realization of the system, as shown in Figure 1 ISSN 2599-2081 EISSN 2599-2090 Fakultas Teknik UM Sumatera Barat Vol. 8 No. 2 Juni 2025 Rang Teknik Journal http://jurnal. id/index. php/RANGTEKNIKJOURNAL Figure 1. Overall PLC Based Monitoring and Control System Wiring Diagram DesignIn the system design process, various tools and materials are utilized to ensure that the circuits and components function properly and meet the desired design specifications. The tools and materials used in constructing the system are categorized into several subsystems. For the Switching Circuit, the main ISSN 2599-2081 EISSN 2599-2090 Fakultas Teknik UM Sumatera Barat Vol. 8 No. 2 Juni 2025 Rang Teknik Journal http://jurnal. id/index. php/RANGTEKNIKJOURNAL components include a PLC Omron CP1E-N30DR-Ai. Omron LY4N 220VAC relays. Omron H3cr-Ai8 220VAC timers. Mitsubishi 20A and ABB AX25-30-10 contactors, and various control devices such as selector switches, push buttons, and an emergency stop. A DC to AC power inverter, single-phase MCBs, and a switching power supply complete the circuit. The Solar Power System includes a 200Wp monocrystalline solar panel. SCC solar controller. XH-M609 low voltage disconnects, relays, contactors, digital voltmeters, and other components designed to manage solar energy efficiently. Similarly, the Wind Power System utilizes a wind turbine. PWM wind turbine controller, low voltage disconnects, relays, contactors, and digital voltmeters to harness wind energy. For the Battery System, key components include a 12V DC 100Ah battery for energy storage, supported by relays, contactors, a battery capacity tester, and associated control devices. The Output System ensures energy utilization through incandescent bulbs, pilot lamps. AC voltmeters, and a kWh meter to monitor energy output. To support the overall system, essential materials include steel panel boxes of various sizes. DIN rails, cable ducts, terminal blocks, and rolls of NYAF cables in different thicknesses, along with wire lugs for proper connectivity. These components are integrated to construct a functional and efficient system. The PLC Omron CP1E-N30DR-Ai serves as the main control unit, while relays and contactors manage electrical flows. Renewable energy components like solar panels and wind turbines, coupled with timers, inverters, and manual control devices, ensure the system operates seamlessly. All parts are organized in panel boxes, with secure connections using terminal blocks and NYAF cables, ensuring a reliable and effective system The design process involves creating a PLC Ladder Diagram to program the on-off control system for managing battery charging and an Automatic Transfer Switch (ATS) between the inverter and the This diagram regulates the activation and deactivation of relays and components based on sensor inputs, allowing users to design control logic for synchronized operation. For instance, when sensors detect specific battery voltage levels, relays switch power sources between the solar power system, wind power system, battery, inverter, and grid, ensuring optimal energy utilization. The ladder diagram simplifies the logical operations required for automatic battery charging and ATS switching by defining precise conditions, ensuring efficient, accurate processes while maintaining battery health and longevity. This system design integrates functionality and efficiency for reliable energy management. Ladder design in PLC diagram that has been designed can be seen in Figure 2. ISSN 2599-2081 EISSN 2599-2090 Fakultas Teknik UM Sumatera Barat Vol. 8 No. 2 Juni 2025 Rang Teknik Journal http://jurnal. id/index. php/RANGTEKNIKJOURNAL Figure 2. Ladder diagram design The Results of the System Fabrication The system design process was completed, and the results demonstrated that all components and circuits functioned as intended. The system integrates key elements, including power circuits connected to renewable energy sources such as solar panels and wind turbines, alongside an efficient energy ISSN 2599-2081 Fakultas Teknik UM Sumatera Barat EISSN 2599-2090 Vol. 8 No. 2 Juni 2025 Rang Teknik Journal http://jurnal. id/index. php/RANGTEKNIKJOURNAL storage system utilizing batteries. The PLC-based switching and control system (Omron CP1E-N30DRA) effectively managed power flow and ensured automated system operations. Testing confirmed smooth switching between energy sources and precise activation of loads according to predefined conditions. Measurement tools, including voltmeters. PZEM-015, and PZEM-022, accurately monitored voltage, current, and battery capacity, ensuring stable performance across various operational scenarios. All additional components, such as push buttons, pilot lamps, and NYAF cables, also functioned reliably, maintaining overall system integrity and safety. The results of the device fabrication can be seen in . Figure 3. The results of the device fabrication include: . Front View, and . Internal View. The battery charging control system uses an on-off mechanism designed with components like PLC. PZEM. CT, relays, and voltage sensors. The PZEM measures current, voltage, and energy, while the CT monitors AC. A 12V relay handles logic functions, and an Omron relay switches between power sources . nverter and the gri. The PLC manages the operation of the Solar Power System. Wind Power System, batteries, and the grid, ensuring switching based on voltage thresholds. All components are housed in a durable, water-resistant panel box for proper organization and protection. System Testing System testing was conducted in three stages: testing the contactor for each generator, testing battery voltage levels, and testing load current values. The contactor testing ensured that all components operated as specified, with procedures designed to evaluate the contactor's performance and response under various conditions. This involved connecting the contactor to a power source, monitoring its response to open and close commands, and measuring current, voltage, and response time using sensors. Results were compared with manufacturer specifications to verify compliance with standards. The contactor was also tested under full load, half load, and no load conditions to confirm its reliability and efficiency. Additionally, the contactorAos ability to switch power sources between the inverter. PLN . ational power gri. , and battery, which stores energy from solar and wind power systems, was tested. Simulations ensured seamless transitions between power sources without interruptions, confirming the systemAos reliability for automatic battery charging and energy management. ISSN 2599-2081 EISSN 2599-2090 Fakultas Teknik UM Sumatera Barat Vol. 8 No. 2 Juni 2025 Rang Teknik Journal http://jurnal. id/index. php/RANGTEKNIKJOURNAL . Figure 4. Testing of the Contactor . PLN, . Solar Power Plant, . Wind Power Plant and . All Sources The testing focused on ensuring the contactor operated without overheating and maintained mechanical durability through repeated activation cycles. Temperature measurements and performance evaluations confirmed the system's reliability, with adjustments made as needed to optimize battery charging under various conditions. The results of the contactor testing can be seen in Table 1. Table 1. Source Contactor Test Results Solar Wind Batter Inverter PL Voltage Sensor Load Status Powe Turbin y Supply N Description Suppl Suppl (LVD) Suppl Suppl y 1 No Load Off Off Off Off On 12. 10 V without load 2 No Load Off Off 12. 57 V without load 3 No Load Off Off Off On 12. 40 V without load 4 No Load Off 12. 68 V without load 5 5 Watts . Off Off Off 12. 92 V with 5-watt load Solar Wind Battery Inverter PL Voltage Sensor ISSN 2599-2081 EISSN 2599-2090 Fakultas Teknik UM Sumatera Barat Vol. 8 No. 2 Juni 2025 Rang Teknik Journal http://jurnal. id/index. php/RANGTEKNIKJOURNAL Load Status 6 5 Watts . 7 5 Watts . 9 10 Watts . 10 10 Watts . 11 10 Watts . 12 10 Watts . 13 15 Watts . 14 15 Watts . 15 15 Watts . 16 15 Watts . 17 20 Watts . 18 20 Watts . 19 20 Watts . 20 20 Watts . 21 No Load 22 No Load 23 5 Watts . 24 15 Watts . 25 20 Watts . Power Supply Off Off Off Off Off Off Off Off Off Off Off Off Turbine Supply Supply Description (LVD) Supply Suppl Off Off On 12. 47 V with 5-watt load Off 12. 67 V with 5-watt load Off Off 12. 90 V with 10-watt load Off Off On 12. 33 V with 10-watt load Off Off Off On 12. 45 V with 10-watt load Off Off On 12. 16 V with 10-watt load Off 12. 80 V with 15-watt load Off Off On 12. 35 V with 15-watt load Off Off 12. 55 V with 15-watt load Off Off On 12. 28 V with 15-watt load Off 12. 70 V with 20-watt load Off Off On 12. 25 V with 20-watt load Off Off Off On 12. 45 V with 20-watt load Off Off Off On 12. 18 V with 20-watt load Off 13. 8 V without load Off Off On 11. 5 V without load Off 13. 2 V with 5-watt load Off Off 12. 5 V with 15-watt load Off Off Off On 11. 8 V with 20-watt load Table 1 shows that the system consistently manages power supply transitions effectively across various load conditions and power sources. Voltage levels remain stable, generally above 12. 5V, ensuring reliable operation. This indicates the system's capability to maintain efficiency and stability under different configurations and load demands. The second test involved measuring battery voltage with a calibrated digital multimeter to assess the accuracy of the battery charge transfer system. The voltage readings from the multimeter were compared to those displayed by the system, and the difference was used to calculate the percentage of discrepancy, ensuring the system's reliability and performance. Figure 6. Display of Voltage Values on Measuring Instruments from the Panel Door and Digital Multimeter Measuring InstrumentsThis test involved multiple measurements under varying conditions to ensure data consistency and accuracy. The results were analyzed to identify any system inaccuracies or anomalies. The battery voltage test with the digital multimeter provided insights into ISSN 2599-2081 EISSN 2599-2090 Fakultas Teknik UM Sumatera Barat Vol. 8 No. 2 Juni 2025 Rang Teknik Journal http://jurnal. id/index. php/RANGTEKNIKJOURNAL the performance of the charge transfer control system, allowing for adjustments to improve accuracy and system reliability. It also contributed to system calibration and refinement for more consistent results. The comparison of voltage values can be seen in Table 2. Tabel 2. Comparison of Voltage Values on Digital Multimeters and Digital Multimeters on Tools No. Incandescent Lamp Digital Digital Multimeter on Err Load Multimet Device (V) Error er (V) (V) No load 1 Bulb . W) 05 V 0. 2 Bulbs . W) 05 V 0. 3 Bulbs . W) 10 V 0. 4 Bulbs . W) 10 V 0. 5 Bulbs . W) 10 V 0. Total Averag From Table 2, it can be seen that under no-load conditions, both the digital multimeter and the digital multimeter on the device showed the same voltage value of 13. 8 V, resulting in no difference or error, with a 0% error rate. This indicates that the charge transfer control system and the digital multimeter provided consistent results under no-load conditions, which is important for ensuring measurement As the load was applied, such as a 5 W incandescent bulb, the digital multimeter showed 13. V, while the digital multimeter on the device indicated 13. 55 V, resulting in a voltage difference of 0. V and a 0. 37% error. Similar trends were observed when the load increased to 2 bulbs . W), 3 bulbs . W), and 4 bulbs . W), with small voltage differences and error rates ranging from 0. 37% to Even with a higher load of 5 bulbs . W), the voltage difference remained at 0. 10 V, resulting in a 81% error. Overall, the total voltage difference was 0. 40 V, with an average error rate of 0. indicating that the charge transfer system maintained good accuracy across various load conditions. The results also suggest that the system remained reliable and efficient for battery charging and maintenance, demonstrating consistent and accurate performance even with different load conditions, and achieving an overall accuracy of 99. The final test conducted was the load current test, aimed at determining how well the charge transfer control system could measure the current flowing through various loads with accuracy. In this test, the current was measured using a digital multimeter and compared to the current displayed by the charge transfer control system. The test was carried out using several different incandescent light bulb loads, starting from no load up to the maximum allowed load. The results of the load current testing can be seen in Figure 6. Figure 6. Load Current Value Display ISSN 2599-2081 EISSN 2599-2090 Fakultas Teknik UM Sumatera Barat Vol. 8 No. 2 Juni 2025 Rang Teknik Journal http://jurnal. id/index. php/RANGTEKNIKJOURNAL The measurement was carried out under several load conditions, with each load consisting of different incandescent light bulbs connected as the load. The current measured by the digital multimeter was recorded and then compared with the current displayed by the control system. The results of this comparison were analyzed to determine the percentage of error in the current measurement. The results of the load current comparison are presented in Table 3, which shows the results of the load current testing. Tabel 3. Load Current Test Results Incandescent Digital Digital Multimeter Differenc Bulb Load Multimet on Device (A) e (A) Error er (A) No load 1 bulb . W) 2 bulbs . W) 3 bulbs . W) 4 bulbs . W) 5 bulbs . W) Total Averag From Table 3, it can be concluded that the load current test evaluates the performance of the ATS device in measuring current through various loads. Using a digital multimeter, the current measured is compared with the values shown by the charge controller. The test involves different lamp loads, from no load to the maximum allowed. The differences between the multimeter readings and the charge controller values are minimal, with the largest difference occurring at a 20-watt load, resulting in a 2. The overall error percentage is 13. 90%, with an average error of 2. These results indicate that the charge controller has a high accuracy of 97. 68%, making it suitable for automated battery charging and power distribution systems. The overall analysis of the charge controller and battery charger system, including the automatic power source switching system, involves a comprehensive evaluation of the system's performance and efficiency based on test results. This system is designed to manage power sources from various renewable energy sources, such as solar and wind, and ensure optimal battery charging with electricity from the Key electronic components, including voltage and current sensors, relays, and PLCs, play an essential role in achieving this objective. The voltage and current measurement results show that the system has high accuracy, with minimal error, demonstrating its reliability for monitoring and managing battery charging. The system can efficiently switch between power sources, responding to load and supply conditions with a high accuracy rate of 97. 68%, making it an effective tool for energy management and battery The system also demonstrates robust performance in switching power sources and ensuring a stable power supply. The PLC program enables responsive control over the power source switching based on load and supply availability, ensuring that energy from solar, wind, or battery sources is utilized The contactor functionality test confirms the systemAos ability to reliably switch between power sources, maintaining continuous energy supply without disruptions. Additionally, the system is housed in a protective panel box, ensuring durability and safe operation in various environmental conditions. Overall, the system is highly efficient in managing energy, preventing overcharging or undercharging of batteries, and extending battery lifespan. It offers great potential for larger-scale energy management applications, such as residential or small industrial systems, with the flexibility to integrate various energy sources for optimal energy use. ISSN 2599-2081 EISSN 2599-2090 Fakultas Teknik UM Sumatera Barat Vol. 8 No. 2 Juni 2025 Rang Teknik Journal http://jurnal. id/index. php/RANGTEKNIKJOURNAL Conclusion Based on the results of the tests and analysis conducted, it can be concluded that this automatic power source switching system, designed to manage power from renewable energy sources such as solar power plants, wind power plants, batteries, and the grid, performs exceptionally well and is ready for implementation. The system efficiently regulates energy sources with high accuracy and ensures optimal battery charging. Testing results indicate a high level of precision in measuring voltage and current from various energy sources, with a failure rate as low as 0. The PLC ladder diagram used in the system enables responsive and automatic adjustments to changes in load and power source conditions, ensuring both efficiency and stability. Additionally, the use of high-quality, water- and dust-resistant panel boxes provides adequate protection for sensitive electronic components, allowing the system to operate reliably in various environmental conditions. Contactor tests demonstrate that the system effectively switches power sources from the inverter to the grid as required, ensuring continuity of power supply and preventing disruptions in battery charging. Designed with a focus on safety, the system incorporates accurate relays and sensors to prevent overcharging or undercharging of the batteries. Overall, the system exhibits excellent and stable performance, with the potential for application on a larger scale, such as in energy management systems for residential or small industrial use. References