# Design and Development of Automated Electronic Switching System for Energy Regulation Abstract-Electricity was one of the most important discoveries of science. Humanity in these generations depends much on the usage of electricity. The modern technology cannot exist without this electricity. Energy consumption was higher with manual controllers as compared to automated controllers. Around 300% increased when the said manual controllers were not managed carefully, especially during weekends. Study shows that during weekend some of the employees leave the room forget to check the switch status especially when the power failure occurs during the last hour of office time. The use of automated controllers was more efficient as compare to manual controllers. The design consideration of automated controllers includes the power management of the controller itself was necessary in order to minimized fires caused by appliance. Most of the available design of the automated controllers in the market had a standby power that may cause electrical power consumption and fire. As the appliance become older some of the parts may produce heat and when this heat were accumulated this generate fire. [3] For this reason, most of the consumers unplug their appliances from wall outlet. The main objective of this research project was to develop an automated electronic switch that can be used to disconnect the appliance load automatically when the room was not occupied to minimize the cause of fire and save energy. The specific objective of the research project includes assessment of the existing electrical system in the room, designing the electronic circuit for the automated control switch, simulating the design model circuit, developing the prototype hardware circuit, testing the efficiency of the automated electronic switch, calculating the energy saving with the automated electronic switch and the efficacy of the system. The project was very significant in reducing fire hazard caused by electrical appliance, reducing energy consumption losses due to unawareness of the status of manual controllers, automate the control for all electrical power within the specified room, and the minimal implementation cost of the project due to locally available materials were used. # I. Introduction thiopia is Africa's oldest independent country and it is second largest in terms of population. [2] Some advance countries like USA, Germany, Britain, Korea and even China starts introducing different technologies to improve the lifestyle of the people. And most people in this country are adopting these technologies. But this technology requires power in order to operate. Due to these requirements of technologies, people around the country in the offices or even homes plugin the appliances unattended. Most people around the country have different appliances in home or even in the offices. Some office workers both in private and government left their lights and electrical appliance switch-on even when they are not using it. One of the biggest challenges of electrical engineers of the country is designing a system that disconnects the appliances connected from the line in absence of consumers in the area. Many automated switches are available in the market today, but these available automated switches consume power even when the appliances are already turned off. Thus, these switches consume a standby power. The most common switch is the occupancy switches. This switch detects the presence of people inside the room and turn on the appliance automatically. Using this type of switches are not 100% safe in terms of fire because it always requires power in order to detect the presence of consumers inside the room. According to the fire protection agency (FPA), the most causes of fire in the building or homes are those appliances which are unattended. Thus leaving the appliances connected to the line while the users are not present. According to MekonnenKassa of the Ethiopian Rural Energy Development and Promotion Center, there are lots of energy losses based on the un-attended uses of electricity. [1] Most people may leave the room or offices without switching off the lights or other electrical consuming devices. In order to ensure that all lights are switch off and the appliances are disconnected from the outlet, an automated switches are used to control the lights and appliances. Research shows that most common available automated controls in the market require power in order to sense the occupancy of the certain room. The aim of this study is to design an automated switch that will also switch off all the lights and disconnect the appliances from the outlet in the room including the controller. Thus, in this way all the loads in the room are totally disconnected from the power source. # II. Materials & Methods a) Hardware and Software Components of Automated Electronic Switching System The block diagram of automated electronic switching system is shown in figure 1. The microcontroller was the heart of the circuit. Embedded programs were stored in the controller. Any microchip product microcontroller can be used in the study. A 16 pin microcontroller was preferred in the study in order to minimize the size of the hardware. The controller controls the solid state relay by giving some voltage across its control input. The solid state relay (SSR) used to connect from the power source to the load and to power the controller. The low voltage power supply gives power to the controller. The SSR supply power from the source to the controller via low voltage power supply. Room sensor was used to detect whether the room was occupied or not. The sensor gives signal to the controller to activate the SSR. It was known that the only way to access the room at normal procedure was through the door. The sensing of the occupancy of the room was based on the opening of the door. Power sensor detects the presence or absence of the power from the system. The power sensor activates the other SSR when the circuit was turned off. These give an alternative power for the controller during the total shutdown period of the system and regain the power from the power source. The two SSR are form of logical OR in the system. The operation of the said SSR follows the logical OR gate function in the digital system. The sensor used in the design was a reed switch. The reed switch reacts with magnet. Thus, the reed switch was used as occupancy sensor for the room. The reed switch was place in the door of the room. And the other side of the door was a small magnet. The reed switch detects the door status. The normal procedure of entering the room was using the door. Thus, the proponent decided to use the door also to monitor the occupancy of the room. The buzzer in D3 was used to trigger the alarm informing the occupant that the door was open and closed. The SW1 was used as the reset switch to turn off the alarm. The output of the microcontroller was connected directly to the SSR driver circuit. # ii. Solid State Relay The SSR circuit was shown in figure 3. The SSR was used to minimize the arcing effect of the electromagnetic relay. The proponent design uses the MOC3041 as the driver to the triac. The triac serves as the switching mechanism in turning on and off the loads. The value of R1 was based on the datasheet of the manufacturer. The value of R1 was 180 ohm as per recommendation of the manufacturer. The input side was directly connected to 220Vac and gives an output of 220Vac likewise. The value of R2 was computed using the equation below. R= (E-Vd)/Id Where: R = the series resistance of the opto-coupler E= the source voltage, normally the voltage output of the microcontroller which was 5v Using the above equation, the value of R2 is equal to 330 ohms. # b) Embedded Program The embedded software was written in C, and then compiled to machine language using mikroC compiler. Design and Development of Automated Electronic Switching System for Energy Regulation Vd = the maximum voltage of the LED inside the optocoupler, normally it was found out equal 1.7 V Id = the current for the LED inside the opto-coupler, basically the design uses 10 mA as the working current of the opto-coupler. Figure 4 shows the program flow chart for the automated switch. The primary aim of the program was to determine wither the room was vacant or not. And when it was vacant it automatically disconnects the load and including the system from the power source. And it continues until the user terminates the system. # c) Simulation of the Hardware and Software The design hardware and software were simulate din PROTEUS. And the results show in figure 6 below. Design and Development of Automated Electronic Switching System for Energy Regulation The simulation works as it was expected. The switch sensor works after some debugging in the embedded program. 0 0 0 1 1 0 1 0 0 1 0 1 1 1 0 1 Table 1 shows the logic output of the controller. The '1' and '0' represents the on and off state of the controller. The sensor represents the opening and closing of door. This also identifies the occupancy of the room. The value '0' from the sensor means that the room was open and there is a person inside the room. The value '1' from sensor means that the room was closed and there is nobody inside the room. The SW 1 represents the reset switch. This allows the microcontroller determine that the room was not empty. The value of '0' from the SW1 means that nobody inside the room. The value '1' from the SW1 means that someone inside the room. The alarm was only activated when the door was closed and nobody inside the room. The alarm turns on for 10 seconds and turn off. The output value of '1' means that the microcontroller trigger the SSR and '0' means turn off the SSR. This allows the load be connected and disconnected from the power source. # d) The development of the prototype hardware circuit After simulating the circuit using PROTEUS software, the circuit board was prepared. The layout was developed using ARES software. It uses single sided PCB. The prototype controller circuit was shown in figure 7. The board size of the controller circuit was 1.3 in x 1.7 in. The PIC16F84A was used in the controller. The LED 3.5mm was also used as the power indicator for the circuit. The TRIAC was connected directly to the power source and the load. The power going to the load was being controlled by the TRIAC as per instruction of the controller. The final prototype of the controller was shown in figure 10. The box was made of the electronic chime which was available in the area. All the parts and components in this project were locally available. The box was modified in order that the other modules can be placed. # III. Implementation Results # a) The test of functionality and efficiency The prototype hardware was tested for two months. And it was found out that it works as what it was expected. During the testing stage, the project seems to work on and off. There are cases that the output seems intermittent fault occurs. The hardware was operated for 24/7 without interruption. The hardware was also experienced the power failure due to power interruption in the area. This was used to test its functionality even in most critical cases. And it was found out that during the first three days of operation, it works fine. The sensor and the output works as it were expected. But after three days, the sensor and the output were not working. It was found out that the sensor had a thermal breakdown. This was the cause of transient effect of the load. Since the load was an inductive load, a transient current was very high. This current was being absorbed by the sensor. The correction was made by using a sensor that can handle 80 per cent of the current passing to it. The equation for calculating the efficiency was used. And it was calculated that the efficiency of the hardware was 99 per cent. # b) The energy saving The energy saving of a certain load was computed based on the equation. # Energy saving = Total Energy Consumption -Energy losses The energy loses was the term used as the energy consumption that was not actually used by consumer. But still the consumers pay for that consumption. Not all of the total consumption was the actual used by the consumer. Most cases the energy losses were higher as compared to the used energy. One specific sample was the room that has a manual control and the room that had an automated control. It was found out that the said room had 4 sets of 40W fluorescent lamp and a corresponding ballast of 40W. Each set had 2 lamps with corresponding ballast. The each set had a total power consumption of 320 watts. The total power consumption of the said room per official day was calculated of 1280 watts for lighting alone. The total energy per week based on the official time was calculated 256 kW-Hr. This was only based on the official time of the office. Figure 11 shows one of the office rooms that uses manual control for the lightings. Most cases power interruption occurs in the buildings and all the rooms in those particular buildings had no power. The staff assigned to that room suddenly leave the room without checking the switch if it was already turned off. One building was randomly checked and records the instances on the total number of hours of lighting operation in every room. One of the rooms had a greater number of utilization of lighting. The said room was not merely switched off the lights when there was no power within the week. There were cases that every Friday the power failures mostly occurs around 3:00 pm or sometimes 4:00 pm. The staff usually went out during that time. They usually don't checked the switch wither it was turned off. When they don't switch off the light before going out, and the power came back after 2 hours and the room was already empty, the tendency the lights were switch on for 24 hours on Saturday and Sunday. In this case it was known based from the study. One office room was constantly observed that during Saturday and Sunday all the lights in that particular room were switched on. Since the room was locked, it can't be switch off unless the staff member who was The current rating for the sensor was increase by 80 per cent of its maximum current. This was made in order to protect the sensor. According to some experts, all components must have a safety factor as an allowance of its current carrying capacity. In this case, 80 per cent safety factor was used.After the correction was made, the output still not working as it was expected. Until the ten days testing was conducted. It was found out that the solid state relay was not working as it was expected. The solid state relay composed of opto-coupler and TRIAC. The TRIAC input and output connection was being interchange. That causes the TRIAC thermal break down. The calculation of the TRIAC current missed the safety factor of the component. The 80 per cent safety factor was also applied on the TRIAC current carrying capacity. After all the adjustment the project works as being expected. The hardware was been continuously connected and operated until this day. The operating current of the system was measured 1 mA. And when it shut down the load, the system also automatically shut off with the load. The input current to the hardware was measured 1.001 mA. assigned in that room came and do that turning off the lights. Figure 12 shows the comparison of the power consumption with the used of automated control and manual control. The graph shows that the losses for 2 days had a great effect on the power consumption on the room. With the automated control the losses were minimized and it was found out that almost the same with the official time power consumption. While for manual control it was found out that more than 300% of the power consumption in two days losses. 12![Figure 1: Block Diagram of Automatic Electronic Switching System i. Controller CircuitThe hardware design of the controller circuit was shown in figure2. The circuit uses PIC16F84A as main controller. The circuit design uses 4 MHz crystal oscillator. And based from the datasheet of PIC16F84A, the manufacturer recommends a 22 pF ceramic capacitor as filter capacitor in the crystal oscillator, and 10 kilo ohm resistance for the pull down resistor in the input side of the microcontroller.](image-2.png "Figure 1 :FFigure 2 :") 3![Figure 3: Solid State Relay (SSR)](image-3.png "Figure 3 :") 4![Figure 4: The Program Flow Chart](image-4.png "Figure 4 :") 5![Figure 5: The MikroC Environment Figure 5 shows the mikroc compiler environment. The software automatically compiled the output program to hex files. This hex file was used in the microcontroller.](image-5.png "Figure 5 :") 6![Figure 6: Simulation of the Circuit Model](image-6.png "Figure 6 :") 7![Figure 7: Prototype of Controller Circuit The prototype hardware of the SSR was shown in figure 8. The board size was 1 in x 1.15 in. The circuit uses a zero crossing opto-isolator to interface with the AC source. The TRIAC was controlled by the opto -](image-7.png "Figure 7 :") 8![Figure 8: Prototype of Solid State Relay](image-8.png "Figure 8 :") 9![Figure 9: The Reset Switch Figure 9 shows the reset switch. The reset switch was developed by modifying internal structure of the push button switch. The push button switch used was a normally open type. A 10 K? resistor was connected in the switch as pull down resistor. The other terminal of the switch was directly connected to the +5V supply on the controller.](image-9.png "Figure 9 :") 10![Figure 10: Prototype of the Controller Switch](image-10.png "Figure 10 :") ![Eff= (Power Output)/ (Power Input) x 100](image-11.png "") 11![Figure 11: Office Room in ASTU](image-12.png "Figure 11 :") ![Design and Development of Automated Electronic Switching System for Energy Regulation](image-13.png "") 1SensorSw1AlarmOutput © 2016 Global Journals Inc. (US) * An Overview To The Energy Situation In Ethiopia, Economic Focus Mekonnenkassa V3 * TonyCafé Electrical AccessedFires Date Oct. 12, 2016 * California Energy Commission, Energy Saving Tips for School 2002-2016, access date Feb. 10, 2016 * Home Structure Fires Involving Electrical Distribution or Lighting Equipment, National fire Protection Association JohnRHallJr March 2008 * Md Kamrul Hassan Majumdar Md. Haider AliHimelbiswas Shaim KaziTanvirAhmmed, Automated Energy Saving and Safety System 10 April 2014. 2016 * VinylHooquino 2005 Computerized Lighting Control of AMA Computer Learning Center for Energy Regulation, Philippine e-Library * PIC16F84A Data Sheet Microchip Technology Inc 2001 * Microcontrollers and TRIAC-based dimmers STMicroelectronics 2009 * Unplugging These 6 Gadgets Will Cut Your Electricity Bill KieraButler MAY 21, 2012, access date: 18 October 2016 * Volume XVI Issue VII Version I