Journal DesignEngineering Masthead
African Electrical Engineering Journal

Design And Construction of an Automatic Phase Selector

SALIFU ISHAQ SONPAWUNI, ELECTRONIC ENGINEERING, PROJECT SUPERVISOR
Published2024-08-15
CorrespondenceSALIFU ISHAQ SONPAWUNI
Intelligent automatic phase selector using ATmega328P-PU microcontroller
Automatically switches between power phases during disruptions
Cost-effective prototype with relays, sensors, and LCD display
Successfully tested for phase failure detection and seamless switching
SALIFU ISHAQ SONPAWUNIMetadata pending review
ELECTRONIC ENGINEERINGMetadata pending review
PROJECT SUPERVISORMetadata pending review
Abstract

Ensuring a reliable power supply is essential for critical infrastructure, especially in urbanised areas where power demands are high. However, an inconsistent power supply can cause serious interruptions, harm to electrical equipment, and monetary losses. Conventional approaches to power supply management frequently experience challenges in addressing these issues, which results in instability and frequent power outages. This project presents an intelligent automatic phase selector designed to maintain a continuous power supply automatically switching between available power phases during disruptions. It is made up of an ATmega328P-PU Microcontroller, Transistors (TIP41) relay, current sensors, voltage sensors, phase detectors, and 16x2 LCD to develop and implement the intelligent automatic phase selector. The project was then implemented and tested successfully. Test results showed that This system effectively detects phase failures and automatically switches to the most stable and available phase, thereby preventing downtime and protecting sensitive equipment from power interruptions. The prototype is cost-effective and achieves the required automatic functionality.

Full Text

UNIVERSITY OF MINES AND TECHNOLOGY TARKWA SCHOOL OF RAILWAYS AND INFRASTRUCTURE DEVELOPMENT RAILWAY AND ALLIED ENGINEERING PROGRAMS A PROJECT REPORT ENTITLED DESIGN AND CONSTRUCTION OF AN AUTOMATIC PHASE SELECTOR BY SALIFU ISHAQ SONPAWUNI SUBMITTED IN PARTIAL FULFILMENT OF THE REQUIREMENTS FOR THE AWARD OF THE DEGREE OF BACHELOR OF SCIENCE IN ELECTRICAL AND ELECTRONIC ENGINEERING PROJECT SUPERVISOR ………………………………………………….. TARKWA, GHANA SEPTEMBER, 2024 DECLARATION I declare that this project work is my own work. It is being submitted for the degree of Bachelor of Science in Electrical and Electronic Engineering in the University of Mines and Technology (UMaT), Tarkwa. It has not been submitted for any degree or examination in any other University. ……………………………………………. (Signature of Candidate) …….. day of September, 2024. i ABSTRACT Ensuring a reliable power supply is essential for critical infrastructure, especially in urbanised areas where power demands are high. However, an inconsistent power supply can cause serious interruptions, harm to electrical equipment, and monetary losses. Conventional approaches to power supply management frequently experience challenges in addressing these issues, which results in instability and frequent power outages. This project presents an intelligent automatic phase selector designed to maintain a continuous power supply automatically switching between available power phases during disruptions. It is made up of an ATmega328P-PU Microcontroller, Transistors (TIP41) relay, current sensors, voltage sensors, phase detectors, and 16x2 LCD to develop and implement the intelligent automatic phase selector. The project was then implemented and tested successfully. Test results showed that This system effectively detects phase failures and automatically switches to the most stable and available phase, thereby preventing downtime and protecting sensitive equipment from power interruptions. The prototype is cost-effective and achieves the required automatic functionality. ii DEDICATION I dedicate this project work to my entire family and friends. iii ACKNOWLEDGEMENT I am most grateful to Almighty Allah for my life and for allowing me to complete my four-year study program and project work successfully. I am grateful to all the lecturers at UMaT for being very supportive. May the good Lord bless you abundantly. My heartfelt thanks go to my supervisor, Mr. Isaac Kofi Mensah Prah, whose wise counsel, patience and motivation enabled me to complete this project work. God bless you abundantly. My deepest appreciation also extends to Volta River Authority/Northern Electricity Distribution Company, Kintampo for their support which played a significant role in shaping my decisions for this project. Undoubtedly, this project has been a great learning experience for me. As I look back on this project, I am filled with a sense of accomplishment. It has taught me valuable lessons in perseverance, hard work and dedication. May Allah continue to bless all those who have contributed to the success of this project and may it serve as a stepping stone to greater achievements in the future. iv TABLE OF CONTENTS Contents Pag e DECLARATION ABSTRACT ii DEDICATION iii ACKNOWLEDGEMENT iv TABLE OF CONTENTS v LIST OF FIGURES viii LIST OF TABLES ix LIST OF ABBREVIATIONS x LIST OF SYMBOLS xi INTERNATIONAL SYSTEM OF UNIT (SI UNITS) xii CHAPTER 1 INTRODUCTION Error! Bookmark not defined. 1.1 Background Study 1 1.2 Statement of the Problem 1 1.3 Objectives of the Project 2 1.4 Methods Used 2 1.5 Facilities Employed 2 1.6 Report Organization 2 CHAPTER 2 LITERATURE REVIEW 4 2.1 Introduction 4 2.2 Automatic Three-Phase Selection 4 2.3 Control Type of Phase Selector 5 2.3.1 Manual Control Phase Selector 5 2.3.2 Sequential Logic Control Phase Selector 6 2.3.3 Microprocessor-Based Control Phase Selector 6 2.3.4 Comparator Control Phase Selector 7 2.4 Components of Automatic Phase Selector 8 2.4.1 Transformer 8 2.4.2 Diodes 9 v 2.4.3 Relay 9 2.4.4 Operational Amplifier 10 2.5 Related Works 11 2.6 Summary 11 CHAPTER 3 METHODOLOGY 14 3.1 Introduction 14 3.2 System Design and Operation 14 3.2.1 Design Concept 14 3.2.2 Design Circuit 21 3.6 Simulation of Design Circuit 22 3.3 Components Selection and Functions 22 3.3.1. Power Supply Section: 16 3.3.2 Microcontroller (ATMEGA328P-PU): 16 3.3.3 Phase Lines 17 3.3.4 Relays or Transistors (TIP41) 17 3.3.5 Output Section 17 3.3.6 16x2 LCD 17 3.3.7 Reset and Oscillator 18 3.4 PCB Circuit Design 18 3.5 Component Placement on PCB 19 3.6 Assembly Process 19 3.7 Summary 23 CHAPTER 4 RESULTS AND DISCUSSIONS 24 4.1 Introduction 24 4.2 Results of the Implementation of Automatic Phase Selector 24 4.2.1 Establishment of Condition One 24 4.2.2 Establishment of Condition Two 25 4.2.3 Establishment of Condition Three 25 vi 4.3 Final Product 26 4.4 Cost Analysis 26 4.5 Summary of Findings 27 CHAPTER 5 CONCLUSIONS AND RECOMMENDATIONS 28 4.1 Conclusion 28 5.2 Recommendation 28 5.3 Future Work 28 REFERENCES 29 APPENDIX 31 APPENDIX A ARDUINO CODE FOR AUTOMATED PHASE SELECTOR 31 vii LIST OF FIGURES Figure Title Page 2.1 Automatic Three Phase Selector 5 2.2 Manual Control-Phase Selection 5 2.3 Sequential Logic Control Phase Selector 6 2.4 Microprocessor-Based Control Phase Selector 7 2.5 Comparator Control Phase Selector 7 2.6 Transformer Output Low Voltage AC 8 2.7 Block Diagram of Power Supply 8 2.8 Switching Mode of the Power Supply 9 2.9 Symbol and Structure of Diode 9 2.10 Relay Device in Circuit 10 2.11 Relay Op-amp Structure and Pinout Configuration 10 3.1 A Block Diagram of Automatic Phase Selector 14 3.2 A Schematic Diagram of Automatic Phase Selector 16 3.3 Simulation of Phase Selector 17 3.4 7805 Voltage Regulators 18 3.5 ATMEGA328P-PU 18 3.6 Relays or Transistors (TIP41) 19 3.7 16x2 LCD 19 3.8 Circuit Diagram of the Automatic Phase Selector 20 3.9 PCB Layout Design for the Automatic Phase Selector 21 3.10 The Prototype for the Automatic Phase Selector 22 4.1 The Prototype Shows Phase One is in Use 23 4.2 The Prototype Shows Phase Two is in Use 24 4.3 The Prototype Shows Phase Three is in Use 24 4.4 Final Casing of the Prototype 25 viii LIST OF TABLES Table Title Page 2.1 Review of Related Works on Automatic Phase Selector 12 4.1 Total Cost of Implementation of Automatic Phase Selector System 25 ix LIST OF ABBREVIATIONS Abbreviation Meaning AC Alternating Current CPU Central Processing Unit DC Direct Current EDA Electronic Deign Automation IC Integrating Circuit LED Light Emitting Diode OP-amp Operational Amplifier PCB Printed Circuit Board PLC Programmable Logic Controller ROM Random Access Memory SMS Short Message Service USD United States Dollar x LIST OF SYMBOLS Description Symol Cedi Currency ₵ xi INTERNATIONAL SYSTEM OF UNIT (SI UNITS) Quantity Unit Symbol Electric Current Ampere A Electric Voltage Volts V Frequency Hertz Hz Length Metre m Temperature Celsius C Time Seconds s xii CHAPTER 1 GENERAL INTRODUCTION 1.1 Background to the Research Power instability and phase failure have become major issues in developing nations that need to be addressed to improve their socioeconomic conditions (Adedokun and Osunpidan, 2010). Nearly all businesses, including commercial, industrial, and residential loads, rely on the public power supply, which can lead to a variety of issues such as phase failure, imbalances between phases, or even total power outages caused by various technical challenges in the power generation, transmission, and distribution system (Muhammad, 2014). The majority of power consumers use single-phase equipment for operational purposes, which is significantly impacted by unbalanced voltages, undervoltage, or overvoltage. An automatic phase selector is one such solution; this study aims to design and implement an intelligent phase selector to maintain the power supply by switching between available power phases during disruptions. By using state-of-the-art technology with a microcontroller, transformer, comparators, and a relay device, an intelligent phase selector can be created that saves a significant amount of time and prevents serious problems with the machines or the production process. Additionally, standby manpower would always be required to change over the supply voltage line. 1.2 Statement of the Problem In many areas, power reliability is a serious problem that impacts both the residential and commercial sectors. According to Boylestad and Mashelskey (1996), an inconsistent power supply can cause serious interruptions, harm to electrical equipment, and monetary losses. Conventional approaches to power supply management frequently experience challenges in addressing these issues, which results in instability and frequent power outages. To provide a steady and dependable power supply, an intelligent phase selector system is required to automatically transition between various power phases. This project aims to design and implement an intelligent phase selector that uses switching mode power systems and microcontroller techniques to enhance power reliability, thereby mitigating the adverse effects 1 of power instability. This study is crucial in ensuring power sustainability to improve operational productivity. 1.3 Objectives of the Project The objectives of the project work are to: i. Design of an efficient and reliable automatic phase selector for a single-phase power system; ii. Implement a reliable and affordable physical system with appropriate power electronics circuits; and iii. Ensure a constant energy supply. 1.4 Methods Used The methods used for this project work are as follows: i. Review of relevant literature; ii. Design of intelligent phase detector to enhance power reliability; and iii. Simulating the built model using proteus software version 8.1; and iv. Implementation of the proposed design. 1.5 Facilities Employed The facilities used for the project work are as follows: i. UMaT library and internet facilities. ii. Electrical Workshop at UMaT; and iii. Computer with an installed Proteus software version 2021 1b. 1.6 Report Organization There are five chapters in the project report. The first chapter covers the project's general introduction, which covers the project's history, the topic it is studying, its objectives, the methods it employed, the facilities it was working in, and its organizational structure. A overview of the relevant literature is provided in Chapter 2. This chapter examined the current state of intelligent phase selector systems and the associated drawbacks. The several approaches taken to accomplish the project's goals are covered in Chapter 3. The results are shown in 2 Chapter 4 along with a discussion of them. Chapter 5 concludes with conclusions and suggestions. 3 CHAPTER 2 LITERATURE REVIEW 2.1 Introduction Depending on the utility supply, electrical and electronic appliances can be programmed to detect when the voltage dips below a specific level. The automatic phase selector's job is to monitor the voltage arriving from the public supply and determine which phase or load is capable of operating correctly. A device known as the intelligent phase selector compares three phases and can automatically switch to any one of the three phases. This chapter reviews the fundamentals of the main electronic components needed to design the system under discussion and provides an overview of the methods required to create an intelligent phase selector system. This chapter also includes a review of a few similar titles. 2.2 Automatic Three-Phase Selection The intelligent automatic three-phase selector is known to be a device or electrical circuit capable of comparing three phases and switching over the phases automatically. The use of the automatic three-phase selector did not just start-up so easily. In the earlier days, electric power consumers always used manual methods to operate these phases. Without knowing if there is high voltage on the supply in the other phases. Then there came the need for automatic phase selectors of the phases. Other than this selecting or switching from one. phase to another might be done automatically and quickly, an electrical device was designed and constructed to do the work quickly and reliably. The apparatus was dubbed an "Automatic three-phase selector." Because it compares input or phase voltage and chooses the one with the best voltage value for supply, it is also known as an "intelligent phase selector." It can also automatically transition to a different phase if the current phase fails. As stated by Muhammad Ajman, Ph.D. (2007). "He discussed the three-phase application, stating that each phase's input lines (Red, Yellow, Blue) must have a fuse with the appropriate rating. Figure 2.1 is an automatic three-phase selector 4 Figure 2.1 Automatic Three-Phase Selector Circuit 2.3 Control Type of Phase Selector There are several methods of phase selector control which include; i. Manual control; ii. Sequential logic control; iii. Microprocessor control; and iv. Comparator control (operational amplifier LM 741) 2.3.1 Manual Control Phase Selector Traditionally, a cut-off (an electrical connector device) has been used to manually pick the necessary phase in a three-phase system as shown in Figure 2.2. This is utilized by manually plugging into a premeasured or detected voltage, connecting the ends suitably, and choosing between the phases. This method of phase selection is referred to as the standard approach. The phase selector for manual control, however, has numerous drawbacks. It requires a lot of effort to use, and manual usage damages the equipment. The usage of a manual control phase selector may start a fire. It frequently generates a lot of noise during the switchover and wears down the three-phase manually, necessitating more frequent maintenance. 5 Figure 3.2 Manual Control-Phase Selection 2.3.2 Sequential Logic Control Phase Selector While the measurement can be done manually or equally automatically using the same sequential circuit, sequential logic control is employed to affect the phase voltage detection and control. This method often includes a sizable amount of both manual and automatic control. It is therefore more effective than using only manual control. Figure 2.2 is a sequential logic control phase selector. Figure 2.3 Sequential Logic Control Phase Selector 2.3.3 Microprocessor-Based Control Phase Selector A central processing unit (CPU) that employs implanted software and stored memory (read- only random-access memory (ROM) is utilized to affect control in the microprocessor-based control system. Microcontroller-based control is the two facets of microprocessor control. control via a computer. The ATEmega328 microcontroller was utilized in this project. Figure 2.3 is a microprocessor-based control phase selector. 6 Figure 2.4 Microprocessor-Based Control Phase Selector 2.3.4 Comparator Control Phase Selector Figure 2.5 is comparator control phase selector comparator is an operational amplifier circuit without negative feedback that makes use of the very high open loop voltage gain of an operational amplifier (op-amp). Two input voltages, one non-inverting and one inverting and one output voltage make up a comparator. Typically, a comparator circuit consists of two input terminals and one output terminal. The signal at the output is determined by the voltage across the input terminals. The comparator circuit has the following two characteristics. Figure 2.5 Comparator Control Phase Selector 7 2.4 Components of Automatic Phase Selector A phase selector is a component that connects the three phases and switches to the load. This makes it possible to use the remaining stages if the primary source is unavailable. This may arrive with a single phase or a three-phase The following list contains some crucial parts of the automatic three-phase selector: i. Transformer; ii. Diodes; iii. Operational amplifier; and iv. Relay. 2.4.1 Transformer In a three-phase electrical system, three-phase transformers are used to convert three-phase voltage, and their windings can be connected in a variety of ways. For instance, there could be a connection between the primary and secondary in Wye or vice versa in Delta. Figure 2.6 shows a transformer output low voltage AC Figure 2.6 Transformer Output Low Voltage AC Power supplies made from these blocks are described below with a circuit diagram and a graph of their output: Figure 2.7 Block Diagram of Power Supply 8 According to the blocks diagram; Transformer - steps down high voltage AC mains to low voltage AC. Rectifier - converts AC to DC, but the DC output is varying. Smoothing - smooth the DC from varying greatly to a small ripple. Regulator - eliminates ripple by setting DC output to a fixed voltage. Figure 2.8 Switching Mode of the Power Supply 2.4.2 Diodes An electronic component called a diode controls electricity flow in a single direction. These are the fundamental parts of semiconductors and are referred to as "active components". They can extract signals from radio waves, maintain a steady voltage, and control the flow of electricity. The diode's symbol and structure are shown in Figure 2.7. Figure 2.9 Symbol and Structure of Diode 2.4.3 Relay A relay keeps an eye on the circuit's current, voltage, and frequency while searching for unusual operating circumstances. Relays function by using an electrical signal to drive an electromagnet, which in turn links or disconnects two circuits. When a monitored value falls outside of the designated range, the relay sends a signal to a device (like a switch) to open or close before the electrical system is impacted. Relays are useful in a wide range of industrial applications thanks to this versatility. The project's workload is distributed among several phases based on each phase's availability. It is used to create a phase shifter or phase selector 9 that avoids short-circuiting the three phases that offer under-voltage protection by choosing the phase based on its availability. Figure 2.8 shows a relay device in a circuit. Figure 2.10 Relay Device in Circuit 2.4.4 Operational Amplifier An operational amplifier (op-amp) is an integrated circuit (IC) that amplifies the difference in voltage between two inputs. It is so named because it was developed to perform arithmetic operations. The Working Principle of an Operational Amplifier is that the two signals one at the inverting terminal and the other at the non-inverting terminal applied then, the Op-Amp amplifies the difference between the two applied signals. This difference between the two input signals is called differential input voltage. Figure 2.9 is an Op-amp structure and pins. Figure 2.11 Relay Op-amp Structure and Pinout Configuration 10 2.5 Related Works The review covers the components or procedures employed as well as any limitations that each work may have. Table 2.1 provides a summary of related works on automatic phase pickers, including single and three phases. 2.6 Summary Having optimal power reliability is essential for home, business, and industrial applications. The fundamental way of operation of the automatic phase selectors is covered in this chapter. Furthermore, in order to fill a gap in the literature and highlight contemporary designs of single and three-phase selector systems, suggested design modules are also examined. It was evident from the literature review that additional effort was required to address the switching losses and settling time. 11 Table 2.1 Review of Related Works on Automatic Phase Selector Methods / Components SN Title Results Limitations Author Used 1 Automatic Phase Developed using Effective in providing Response time and Johnson et al. Selector for microcontroller-based uninterrupted power complexity of (2017). Uninterrupted Power systems with voltage supply microcontroller Supply sensors. programming. 2 Smart Phase Selector Utilized programmable Efficient phase High cost and specialized Lee et al. for Industrial logic controllers (PLCs) for transitions in industrial programming knowledge (2018). Applications phase management. settings. required. 3 Struggled with high Low-Cost Phase Used basic electronic Affordable solution power loads and Kumar and Selector for Domestic components to minimize for domestic use. fluctuating voltages. Singh (2019). Use costs. 4 Real-Time Phase Employed fuzzy logic Improved reliability in Complexity in designing Ahmed et al. Selector Using Fuzzy controllers to enhance switching phases. fuzzy logic algorithms. (2020). Logic decision-making. 12 Table 2.1 Review of Related Works on Automatic Phase Selector cont’d Methods / Components SN Title Results Limitations Author Used 6 Wang and Li Intelligent Phase Combined IoT devices for Real-time data and Security concerns with (2021). Selector with IoT enhanced monitoring and improved system IoT devices. Integration control reliability. 7 Limited processing Smith et al. Arduino-Based Used Arduino Cost-effective and easy power of Arduino. (2015). Automatic Phase microcontrollers for to implement. Selector automation. 8 I Green and Solar-Powered Phase integrated solar panels to Reduced reliance on Performance is Martin (2018). Selector power the phase selector. grid power. dependent on solar availability. 9 Brown et al. Hybrid Phase Selector Implemented machine Enhanced accuracy in High computational (2019). Using Machine learning algorithms to phase selection. requirements. Learning predict optimal phases 10 Taylor and Adaptive Phase Used adaptive algorithms Better handling of Complexity in designing Evans (2020). Selector for Variable to manage varying fluctuating power adaptive algorithms. Loads electrical loads. demands. 13 CHAPTER 3 METHODOLOGY 3.1 Introduction This chapter provides a detailed account of the methodology used in the design, construction, and testing of the automatic phase selector. The methodology covers the hardware components, the design of the circuit, the PCB layout, and the assembly process. The final section includes a comprehensive explanation of the system's operation. 3.2 System Design and Operation 3.2.1 Design Concept Fig 3.1 depicts the automatic phase selector system’s block diagram. As input sources, the ATMEGA 328P-PU microprocessor communicates with the relays to allow the active phase to pass through as output. Figure 3.1 A Bock Diagram of Automatic Phase Selector These inputs are crucial as they represent different power lines that can supply electricity to the load. To manage this, the phase selector employs phase sensing circuits, which continuously monitor the voltage levels of each phase. These sensing circuits, often comprising voltage dividers and protective components, measure the voltage of each incoming phase. This real- time data collection is vital for determining the availability and stability of each phase. If a phase experiences a drop in voltage or a complete failure, the sensing circuits immediately 14 detect the anomaly. The information gathered by these circuits is then relayed to the control unit, typically a microcontroller, for further processing. At the heart of the automatic phase selector is the microcontroller, which acts as the system’s brain. In this role, the microcontroller processes the voltage data from the phase-sensing circuits and executes a pre-programmed algorithm designed to select the best available phase. This decision-making process is crucial, as it directly affects the reliability of the power supply to the load. The algorithm within the microcontroller compares the voltage levels of the three phases. It may prioritize phases based on pre-set criteria such as voltage stability. Once the microcontroller identifies the optimal phase, it triggers the next step in the process activating the switching mechanism to connect the selected phase to the load. The switching mechanism in an automatic phase selector typically consists of relays and such transistors like the TIP41. These switches are controlled by the microcontroller and are responsible for physically connecting the chosen phase to the output that powers the load. When the microcontroller issues a command, the corresponding switch is activated, disconnecting any previously connected phase and establishing a connection with the new, optimal phase. This switching process is designed to be seamless and rapid, ensuring that the load experiences no interruption in power supply. The smooth operation of the switching mechanism is essential for the overall effectiveness of the phase selector, as any delay or malfunction could result in a brief power outage, which may be detrimental in critical applications. 3.3 Components Selection and Functions The design of the automatic phase selector revolves around key hardware components that enable the system to monitor and switch between power phases effectively. The main components are: i. Microcontroller (ATmega328P-PU): Acts as the central control unit, processing input from voltage sensors and controlling the relays based on programmed logic. ii. Relays: Used to switch the load between different phases. Each relay is controlled by the microcontroller and corresponds to one of the three phases. iii. voltage Sensing Circuits: Monitor the voltage levels of each phase and provide input to the microcontroller. 15 iv. Power Supply Unit: Converts the AC mains voltage to regulated DC voltages required by the microcontroller and other components. v. LCD Display: Shows the active phase, system status, and fault alerts for user monitoring. 3.3.1. Power Supply Section: The 7805 voltage regulators are used to step down and stabilize the input voltage to 5V, which is necessary to power the microcontroller and other components. Capacitors smooth out any fluctuations in the voltage. Figure 3.4 7805 Voltage Regulators 3.3.2 Microcontroller (ATMEGA328P-PU): This is the brain of the system, which monitors the input phases and controls the relays or switches to select the best available phase. It receives inputs from the phases and makes decisions based on pre-programmed logic. The power supply for the ATMEGA328P-PU is 5 V. Figure 3.5 ATMEGA328P-PU 16 3.3.3 Phase Lines These lines represent the three input phases. The microcontroller monitors the voltage levels on these lines to determine which phase is available or the best to use. 3.3.4 Transistors (TIP41) These components are used to switch the connection to the selected phase. TIP41 transistors are likely used here as electronic switches, controlled by the microcontroller to connect the appropriate phase to the output. Figure 3.6 is the Transistor (TIP41) component. Figure 3.6 Transistor (TIP41) 3.3.5 Output Section The selected phase is then passed to the output, which is connected to the load. 3.3.6 16x2 LCD LCD In electronic projects, this alphanumeric display is employed. With its sixteen columns and two rows, it can display up to 32 characters at once. This LCD uses a 5V power source and has 16 pins. In this project, the voltage readings are displayed. The figure 3.7 is a 16x2 LCD. Figure 3.7 16x2 LCD 17 3.3.7 Reset and Oscillator The crystal oscillator provides the clock signal for the microcontroller, ensuring proper timing for operations. The reset pin ensures the microcontroller can be restarted if need 3.4 PCB Circuit Design The design of the PCB circuit is fundamental to the operation of the automatic phase selector. The circuit integrates all the hardware components into a cohesive unit, with the microcontroller at its core. Figure 3.8 below shows the PCB circuit diagram of the automatic phase selector, which was designed using electronic design automation (EDA) software. The diagram illustrates how the microcontroller, relays, voltage sensing circuits, power supply, and LCD are interconnected. Figure 3.8 PCB Circuit Diagram of the Automatic Phase Selector i. Phase Detection: Voltage sensing units detect the voltage levels from each phase and relay this information to the microcontroller. The system is designed to step down the high voltage to a level safe for the microcontroller to process. ii. Relay Control: The microcontroller activates the appropriate relay to switch the load to the most stable phase, ensuring an uninterrupted power supply. iii. Power Supply: Provides the necessary DC voltages to power the microcontroller and relays, ensuring stable operation. 18 3.5 Component Placement on PCB The printed circuit board (PCB) design is crucial in transforming the circuit diagram into a functional device. The PCB design consolidates all the components onto a compact and efficient board, ensuring proper connectivity and minimizing electrical noise. Figure 3.9 shows the PCB layout designed for the automatic phase selector. The design includes traces, pads, and vias that connect the various components as per the circuit diagram. Figure 3.9 PCB Layout Design for the Automatic Phase Selector i. Component Placement: The components were strategically placed to minimize the length of critical signal paths and reduce the possibility of interference. ii. Trace Width: The width of the traces was chosen to handle the expected current levels without excessive heating. iii. Ground Plane: A ground plane was incorporated to enhance the stability of the circuit and reduce noise. 3.6 Assembly Process The assembly of the automatic phase selector involved soldering the components onto the PCB and connecting them as per the design specifications. The assembly process was conducted in the following steps: 19 i. Soldering of Components: The microcontroller, relays, voltage sensing components, and other discrete components were soldered onto the PCB using a soldering iron. Special care was taken to avoid cold solder joints and ensure good electrical connections. ii. Connecting External Components: External components such as transformers, the LCD display, and the power supply were connected using appropriate connectors and cables. The connections were checked for correctness and stability. iii. Initial Testing: After assembly, the system was powered on to check for proper operation. This included verifying that the microcontroller was receiving power, the relays were functioning correctly, and the LCD was displaying the correct information. 20 3.7 Design Circuit Figure 3.2 A Schematic Diagram of Automatic Phase Selector 21 3.8 Simulation of Design Circuit The Proteus software simulation of the design is shown in Figure 3.3. The small components in the circuit were simulations of the real components. An Arduino Uno board and a few more discrete parts are used in the actual circuit on a breadboard. A DC voltage was used to represent each of the three phases, and it was sent into the microcontroller for comparison via a variable resistor. LEDs were used to represent the output. It was observed that the optimal phase with the optimal phase voltage was chosen when the input voltage was changed using the variable resistor. Figure 3.3 Simulation Diagram of the Proposed Automatic Phase Selector 3.9 Implementation After assembly, the system was subjected to rigorous testing to ensure it operated as intended. The tests involved simulating various power conditions and observing the system's response. 22 Figure 3.10 The Prototype for the Automatic Phase Selector 3.10 Summary This chapter offered an overview for designing and constructing the automatic phase selector involving several key steps, including circuit design, PCB layout, assembly, and testing. Each step was meticulously planned and executed to ensure the final product met the required specifications. The use of the ATmega328P-PU microcontroller for phase detection and relay control, combined with a well-designed PCB, resulted in a robust and reliable phase selector sys