ABSTRACT This project “Design and Construction of reliable device that takes over the task of human intervention in electrical and electronic appliances when connected to power. It can also be used as a home automation system to ensure energy saving by shutting off from the main supply in such a way that it will switch off the loads once it counts down to zero. The working principle is such that a preset time, usually between 1minute and 99minutes, is set using the appropriate buttons and made to start operation when the start button is hit. The preset time counts down to zero and disconnects automatically from the main supply to conserve power usage. The microcontroller does the countdown which is displayed on the 7-segment display. At the completion of the task, audio and visual signals are indicated to signify completion. In case of a power outage, a backup battery is provided to serve as a time stamp holder. The system continues from the saved time when power is restored. The device is divided 4 main parts: The power supply unit consists of a 5V D.C regulated power supply including a backup battery. Display unit, which serves as the visual display for the time spent/remaining. The Control unit is mainly the microcontroller that takes up the whole operation controlling the system. Connection/Operation, which is where the appliances are connected. TABLE OF CONTENT
Page TITLE PAGE i DECLARATION ii APPROVAL iii DEDICATION iv ACKNOWLEDGEMENT v ABSTRACT vi TABLE OF CONTENT vii LIST OF FIGURES x LIST OF TABLES xi
CHAPTER ONE 1. INTRODUCTION 1.1. BACKGROUND INFORMATION 1 1.2. AIM AND OBJECTIVES 2 1.3. PROJECT MOTIVATION 2 1.4. METHODOLOGY 3 1.5. BLOCK DIAGRAM 5 1.6.ADVANTAGES OF THE PROJECT 6 1.7.MODEL OF THE PROJECT 6 1.8. FUTURE DEVELOPMENT 7
CHAPTER TWO 2. LITERATURE REVIEW 2.1.BRIEF HISTORY OF MICROPROCESSORS 8 2.2. BRIEF HISTORY OF SOCKET OUTLET 2.2.1. THE BRITISH RING FINAL CIRCUIT SYSTEM AND BS 1363 10 2.3. PROGRAMMABLE CONTROL TIMER vi 2.3.1. INTRODUCTION 11 2.3.2. REVIEW OF PAST WORK 12 2.3.3. CRYSTAL OSCILLATOR 14 2.3.4. LOGIC CONTROL UNIT 16 2.3.5. COUNTER UNIT 18 2.3.6. DISPLAY UNIT 19 2.3.7. ZERO DETECTOR 20 2.3.8. OUTPUT UNIT 21 2.3.9. POWER SUPPLY UNIT 22 2.4. THE PIC16F877 23
CHAPTER THREE 3. DESIGN ANALYSIS AND CALCULATIONS 3.1. INTRODUCTION 27 3.2.DESIGN OF POWER SUPPLY UNIT 27 3.2.1. TRANSFORMER SELECTION 28 3.2.2. RECTIFIER SELECTION 30 3.2.3. FILTER SELECTION 30 3.2.4. REGULATOR SELECTION 33 3.3.THE VISUAL DISPLAY UNIT 33 3.3.1. COMPONENTS USED 34 3.3.2. DESIGN CALCULATION FOR LEDs 35 3.4. SOFTWARE DESIGN 3.4.1. PSEUDOCODE OF THE PROGRAM 37 3.4.2. PROGRAM FLOWCHART 38
CHAPTER FOUR 4. CONSTRUCTION, TESTING, AND PRINCIPLE OF OPERATION 4.1. INTRODUCTION 39 4.2. COMPONENT TESTING 39 4.3. THE CONSTRUCTION 41 4.3.1. SOLDERING PROCEDURES AND PRECAUTIONS 43 4.4. OVERALL SYSTEM TESTING 43 viii 4.5. THE SYSTEM OPERATION 43 4.6. CASING CONSTRUCTION 44 4.7. PROGRAM DEBUGGING 44 4.8. PROGRAM SIMULATION 45 4.9. PROGRAM LOADING 45 4.10. RESULT 46
CHAPTER FIVE 5. CONCLUSION, LIMITATION, AND RECOMMENDATION 5.1. CONCLUSION 47 5.2. LIMITATION 47 5.3. RECOMMENDATION 47 REFERENCES 48 APPENDIX I –CIRCUIT DIAGRAM 50 APPENDIX II –PROGRAM CODE 51 APPENDIX III –SYSTEM RELIABILITY 55
CHAPTER ONE INTRODUCTION 1.1 BACKGROUND INFORMATION As the world becomes concerned with conserving electric power and the fuels that generate electricity, there is a growing need for conscientious homeowners to keep an eye on and minimize their power usage. Vampire or standby power is loosely defined as the “electrical power consumed by appliances while they are switched off (but are designed to draw some power) or in a standby mode. This only occurs because some devices claimed to be “switched off” on the electronic surface, but are in a different state from switching off at the plug, or disconnecting from the PowerPoint”. Switching off at the PowerPoint is effective enough to control the vampire power, there is no need to disconnect all the devices from the PowerPoint [1]. Some devices utilize vampire power in a useful manner to provide persistence features such as maintaining clock settings between active sessions, convenience features such as powering the necessary hardware to respond to remote controls and eliminating long initialization times by keeping the hardware in a semi-powered state. Other devices have no beneficial use of vampire power, such as a powered but disconnected mobile device charger or an uninterruptible power supply (UPS) with no active system connected. With the advancement of technology, things are becoming simpler and easier for us. Automation is the use of control systems and information technologies to reduce the need for human work in the production of goods and services [2]. 2 The case of the MICROCONTROLLER TIMER SOCKET OUTLET helps in conserving the vampire power. Electrical and electronic appliances are connected to the socket-outlet and programmed to be in power for a specific duration based on the user’s discretion. This goes a long way in conserving energy as the device(s) is/are disconnected after the specified duration. It is very useful in cases whereby the user has to keep in touch with what he or she had connected earlier and due to the multitasking nature of human beings, we tend to forget what had been connected to attend to other things in the household or wherever we find ourselves.
1.2 AIM AND OBJECTIVES OF THE PROJECT The aim of this project is to; Design and construct an automatic socket outlet with an operational timer incorporated into it using a microcontroller. The objectives of this project are as follows: 1. To conserve electrical power domestically. 2. To reduce and subsequently prevent electrical hazards on the home front. 3. To control the use of electrical power domestically. 4. Through conservation and control of electrical power, electricity bills are reduced.
1.3 PROJECT MOTIVATION Since the advent of socket outlet manufacturing in developing countries like Nigeria, the solution has been found for power conservation or regulation. There is yet to be an effective socket outlet for timing domestic socket outlets. The failure to have an operational timer for the socket outlets has 3 caused a lot of electrical hazards. This has claimed the lives and properties of many people. The user often forgets to look after what he/she had connected and due to incessant power outages, he/she often forgets to switch off appliances earlier connected to power when leaving his/her home or due to carelessness of the user. Due to this negligence, the connected appliances continue to build up, when power is restored, even after completing their purpose of connection and when it gets beyond control, it damages the appliances. Repeated occurrences of these hazards have led to the loss of valuable things worth millions of naira. However, with the help of a timer socket outlet, an effective solution is provided to these problems. An effective control timer for the socket outlet makes it safer and easier to use and also helps to reduce the hazard rate. The use of a microcontroller comes to play in this motivation. Every micro controller has a timer unit inside. A timer is nothing more than a time-counting device fabricated inside the microcontroller unit. A wide range of practical applications requires a timer in action. For example, we need to turn a motor ON for 5 minutes and then turn it OFF, how will we do that? A timer inside a microcontroller unit aids us in implementing this perfectly.
1.4 METHODOLOGY The circuit employs the use of various electrical and electronic components like resistors, capacitors, light-emitting diode (LED), switches, piezoelectric buzzer, 13-amp socket outlet, jumper wires, 7-segment display, battery, relay, Vero board, and most importantly, the Peripheral Interface Microcontroller 16F877 microcontroller (PIC 16F877). The microcontroller is programmed using the “MikroC” software. It is programmed in such a way to communicate with all the other components on the board. 4 The switches are used to input instructions into the microcontroller. The instructions are basically the SET TIME, START, RESET and STOP. The SET TIME instructions are displayed on the 7-segment display. The START button signifies the beginning of the entire timing process. If a wrong time is set in, the RESET button helps to restore it to default. The STOP button helps to stop the timing process, this is necessary as there could be a change of mind after the process has started. The battery serves as a temporary memory holder. If during the process, there is a power outage and the set instruction has not been reached, it will help the circuit start from where it stops when power is restored. For example, a 12,000-litre reservoir fills to the brim in 30minutes, the set instruction will be 30minutes and if there is a power outage after the 23rd minute, the battery helps to continue from where it stopped (23rd minute) to the 30th minute. However, a major limitation to this is in the use of a boiling ring, or for the purpose of boiling. If experimentally, pure water boils in exactly 10mins, and a power outage occurs in the 7th minute for as long as 30minutes, when power is restored, the water cannot boil in 3minutes again. So this is where the STOP button comes to play. The buzzer and the LED serve as audio and visual indicators respectively. They indicate the completion of the timing process. They indicate that the process was completed according to the set instruction. After completion, the circuit automatically shuts the relay off which stops the supply of power to the circuit thereby conserving power. 5 The 13-amp socket is used for appliances with fuses rated 13A and below, examples are phone chargers, television, etc. The microcontroller, capacitors, transformer, relay, etc. serve different purposes which will be discussed in subsequent chapters.