A PROJECT DESIGN & IMPLEMENTATION REPORT ON VOICE CONTROLLED HOME APPLIANCES USING BLUETOOTH ON ANDROID MOBILE By Noura AL-Mas AL-Maskari, 10f6184 Guided by Miss Vimala Elumalai A Project report submitted in partial fulfillment of the requirements for the award of Bachelors in Electronics and Telecommunication Engineering MIDDLE EAST COLLEGE Knowledge Oasis Muscat, Muscat, Oman July, 2016 i A PROJECT DESIGN & IMPLEMENTATION REPORT ON VOICE CONTROLLED HOME APPLIANCES USING BLUETOOTH ON ANDROID MOBILE By Noura AL-Mas AL-Maskari, 10f6184 July, 2016 ii DECLARATION I, “Noura AL-Mas AL-Maskari”, hereby declare that the work presented herein is genuine and has not been copied in part or in whole from any other source except where duly acknowledged. As such, all use of previously published work (from books, journals, magazines, internet, etc.) has been acknowledged within the main report to an item in the references or bibliography lists. Copyright Acknowledgement I acknowledge that the copyright of this project and report belongs to MEC. Student Name Student ID iii Signature APPROVAL FORM The project design & implementation report entitled VOICE CONTROLLED HOME APPLIANCES USING BLUETOOTH ON ANDROID MOBILE submitted by Noura AL-Mas AL-Maskari, (10f6184) is approved in partial fulfillment of the requirements for degree of Bachelors of Engineering Telecommunication. _________________________ Supervisor Full name: Department: Date: _______________________ Examiner 1 Full name: Department: Date: _______________________ Examiner 2 Full name: Department: Date: iv in Electronics and ACKNOWLEDGEMENT First of all, I would to thank Allah who gives us the knowledge to achieve the success of my work and finish the report. I am pleased to extend thanks to the authority persons of Middle East College for supporting me with the knowledgeable teachers and providing me beneficial facilities. Also, I happiness to thank everyone who assisted me in this project. First Mr Chendra Head of Department of Engineering for allowing me to do this project and supporting me. Also special thanks for my supervisor Miss Vimala Elumalai for guidance, support, help and patience. My greatest thanks are to all who wished me success we express my gratitude to Allah who bestowed self-confidences, ability and strength to complete my work. v ABSTRACT Now days everything became technological and we can use this technology to improve and help many things to be better and easier. The aim of this project is to reduce the human efforts. “Voice controlled home appliances using Bluetooth on android mobile” This project can be operated in two ways, the first way is the user speak through the micro phone which directly connected to electronic circuit. The second way is the user can speak to android phone or any other device which send command to the project through a wireless communication technique. This project will be designed to control home appliances through android mobile Bluetooth where the user will give some voice command to the application on android mobile than this application will send the command to the designed project, after receiving the command by the receiver the decoder will decode the command and will give it to 8051 microcontroller. Depending on command the microcontroller will decide which device to be controlled and what to be do. vi TABLE OF CONTENTS Contents DECLARATION ........................................................................................................... iii APPROVAL FORM ...................................................................................................... iv ACKNOWLEDGEMENT .............................................................................................. v ABSTRACT ................................................................................................................... vi TABLE OF CONTENTS .............................................................................................. vii LIST OF FIGURES ........................................................................................................ ix LIST OF TABLES .......................................................................................................... x LIST OF ABBREVIATIONS ........................................................................................ xi LIST OF SYMBOLS .................................................................................................... xii 1. INTRODUCTION ....................................................................................................... 1 Background of the Project .................................................................................... 1 Project Objectives ................................................................................................ 1 Project Limitations ............................................................................................... 2 Overview of the Project Report ............................................................................ 2 2. METHODOLOGY ...................................................................................................... 3 3. LITERATURE REVIEW/THEORY .......................................................................... 4 4. BUDGETING AND PROJECT MANAGEMENT .................................................... 6 Project Budget ...................................................................................................... 6 Project Schedule ................................................................................................... 7 Risk Management ............................................................................................... 10 5. DESIGN AND ANALYSIS ...................................................................................... 11 System Initial Design ......................................................................................... 11 vii Technical Requirements ..................................................................................... 14 Schematic Diagram ............................................................................................ 22 System Design & Analysis................................................................................. 24 6. SIMULATION, TESTING AND IMPLEMENTATION ......................................... 39 System Simulation.............................................................................................. 39 System Testing ..................................................................................................... 4 System Implementation/Prototyping .................................................................. 47 7. CRITICAL EVALUATION .................................................................................. 48 8. LEGAL, SOCIAL AND ETHICAL ASPECTS RELATED TO THE PROJECT 51 9. CONCLUSIONS AND RECOMMENDATIONS ................................................ 53 REFERENCES .............................................................................................................. 54 Appendix A ................................................................................................................... 56 viii LIST OF FIGURES Figure4.2 Gantt chart 9 Figure5.1.1 system block diagram 11 The figure 5.1.2 system flowchart 12 Figure 5.2.1.1 pin description 16 Figure 5.2.1.2 AT98S51 16 Figure5.2.1.3 AT98S51block diagram 16 Figure 5.2.1.4 LCD 16*2 (LM016L) 17 Figure 5.2.1.5 relay 18 Figure5.2.1.6 MAX232 PIN descriptions 19 Figure 5.2.1.7 11.0592MHz crystal 20 Figure 5.2.1.8 HC- 05 Bluetooth 20 Figure 5.2.1.1 AMR_ voice application 21 Figure 5.3 schematic diagram 22 Figure 5.4.1 system design 24 Figure 5.4.2 power supply design 26 Figure 6.1.1 Circuit simulation 39 Figure6.1.2 Main part U vision simulation 40 Figure 6.1.7 ISIS Working simulation 42 Figure 6.2.1 breadboard testing 45 Figure 6.3.1 project implementation 47 ix LIST OF TABLES Table4.1 Project budget 6 Table4.2 Project schedule 7 Table 5.2.1.1 Hardware component 14 Table 5.2.1.2 LCD pin discretion 17 x LIST OF ABBREVIATIONS CMOS Complementary Metal Oxide Semiconductor UATR Universal Asynchronous Transmitter Receiver ISP In-System Programmable LCD Liquid Crystal Display SPDT Single Pole Double Throw RAM Random Access Memory PCB Printed Circuit Board xi LIST OF SYMBOLS F Farad V Voltage I Current RB base resistor IL Vm load current maximum voltage xii 1. INTRODUCTION The purpose of this project is to control the home appliances by the human voice, this chapter will contain back ground of the project, objective, limitation, and overview of the project report. Background of the Project Now days everything became technological and we can use this technology to improve and help many things to be better and easier. The aim of this project is to reduce the human efforts. “Voice controlled home appliances using Bluetooth on android mobile” This project will be designed to control home appliances through android mobile Bluetooth where the user will give some voice command to the application on android mobile than this application will send the command to the designed project, after receiving the command by the receiver the decoder will decode the command and will give it to 8051 microcontroller. Depending on command the microcontroller will decide which device to be controlled and what to be do. This project is very help full for elder people and people who are physically handy cap also it is good project where it can control the devises without going near to it. This project can reduce the human efforts which can help people who are physically disable or senior citizens. Project Objectives When this system is ready they are many outputs are expected. The main objectives of this system (project) are: 1. Control devices without going near the device. 2. This project can reduce the human efforts. 3. Very helpful for physically disable people, people who cannot move or walk. 1 Project Limitations Each project to be done, they are some limitations: 1. Mobile Bluetooth work for limited distance. 2. If mobile buttery is off, the devices can not to be controlled without going near to the device. 3. An android mobile has to insulate voice recognize application. Overview of the Project Report This report consists of six chapters. The first chapter is content of project background, objective, limitation and overview of the project report. The methodology will be discuss in second chapter, the third chapter will discuss the literature review/theory, the fourth chapter is about budgeting and project management which will discuss the project budget, schedule and risk management. Design and analysis is the fifth chapter which will discuss the System Initial Design, Technical Requirements, Schematic Diagram and System Design & Analysis, the finale chapter is the conclusion of the report. 2 2. METHODOLOGY Methodology is a chapter where show the steps of doing the project, at first will be start with initiating the project than do planning and designing, final step is testing and implementing. The methodology which has been chose to carry this project is a bottom up type, this type has been chosen because it is a new project and it its dealing with a new information, so that mean it will start from zero and the final design not fixed it will go step by step. Before selecting the topic: 1. Search in many sources A. Book B. Internet C. Advices from senior student 2. Create a list of topics 3. Discuss the topics with supervisor 4. Choose and approve the final topic Then start doing methodology for approving the topic, in first step which is initiating it start with collected information and get the proper block diagram for submit the proposal after that start doing the planning by making plan for each task, circuit block diagram and flow chart. After planning come the step of designing in designing it start with preparing the software and hardware requirement, where in software requirement the coding and simulation will be acquire, and in hardware requirement it has to prepare the equipment and connect it. After that combining the software and hardware requirement to go to the next step which is testing and solving the error, finally comes the step to implement the project. 3 3. LITERATURE REVIEW/THEORY Everyday new technology and machines are born in the worlds. There are thousands of electronic device and home appliances available in market today. Home appliance device such as air conditioning, oven, lamps and ext play an important role in human life. It provides convenience and it save the people time. Many organization starts deliver home automation system to make the human life more flexible and convenient. The following are examples of automatic home appliance control project. Hemang, (2012) has presented in engineers garage website system to control the home appliances by using the human voice. This system is used to control home appliances such as television, fan, oven, light, heater and ext by using the human voice rather than using them hand. The technology that is used in this project to convert the human voice into machine code is voice recognize module. (Engineers Garage, 2012) This project is very useful for the handicap people. In this case they will be able to use them voice rather than used on/off switch. This project is fairly good, but it has some disadvantages. The user should be near the device to switch it on or off and it need more time to take the command. Another publication has mentioned in diy hacking web site about home appliances device control. The idea of the project is to switch all devices on when any one enter the room or home and switch off when the people leave the home or room. ( DIY Hacking,2015) The advantage of the project is that, the electronic device will switch on immediately when the people enter the room without interface with anyone. The disadvantage of this project is that when the people will enter the room, all electronics device will switch on and that is will make the usage electricity more. 4 ASCAS, (2016) has represented in instructable website a system to control appliances using human voice. This project using android UNO chip and it control appliances which powered by buttery, it is very simple where it using HC-05 Bluetooth, 5 LED, android UNO and cable jumper. The Disadvantages of this project is that it designed to control simple appliances which working by a buttery power splay. (Instructable, 2016) There are many projects that were made in order to control the home appliances and this project is also used to control the home electronic device. this idea of this project is as follows: This project will be designed to control home appliances through android mobile Bluetooth where the user will give some voice command to the application on android mobile than this application will send the command to the designed project, after receiving the command by the receiver the decoder will decode the command and will give it to 8051 microcontroller. Depending on command the microcontroller will decide which device to be controlled and what to be do. This project can be developed and used for security purpose after modification (we can control gate system or we can interface wireless camera and can control it using our mobile) and also by developing the transmitter form Bluetooth to wireless long distance transmitter and receiver Automatic production machinery could be controlled even during odd hours with your mobile phone also Voice interactive services can be added to offer better interaction with user. 5 4. BUDGETING AND PROJECT MANAGEMENT This chapter include coast list of hardware component that will used to implement the project, project schedule and Risk management. Project Budget The following table shows the project budget. Component Type IC IC89S51 LED Quantity budget total coast 1 3.800 O.R 3.800 O.R Red 2 0.050 O.R 0.100 O.R Relay 12V OJ-SH-112DM 5 1.200 O.R 6.000 O.R LCD LM016L 1 4.000 O.R 4.000 O.R Transistor BC547 6 0.100 O.R 0.600 O.R Crystal 11.0592 MHz 1 0.200 O.R 0.200 O.R Capacitor 10microF 1 0.050 O.R 0.050 O.R Capacitor 1000microF 1 0.100 O.R 0.100 O.R Capacitor 100microF 2 0.050 O.R 0.100 O.R Connector 16 pin 1 0.100 O.R 0.100 O.R IC Base 16 1 0.100 O.R 0.100 O.R IC Base 40 1 0.200 O.R 0.200 O.R Capacitor 1microF 4 0.050 O.R 0.200 O.R Capacitor 33microF 2 0.025 O.R 0.050 O.R Resistor 1K 6 0.075 O.R 0.450 O.R Diode 1N4007 9 0.050 O.R 0.450 O.R IC MAX232 1 2.500 O.R 2.500 O.R Variable resistor 10k 1 0.150 O.R 0.150 O.R Resistor 10k 1 0.075 O.R 0.075 O.R Breadboard Whit 3 2.000 O.R 6.000 O.R Battery 5v 1 0.500 O.R 0.500 O.R Clamp pins Green 7 0.100 O.R 0.700 O.R Transformer 1 4.500 O.R 4.500O.R Bulb 5 1.500 O.R 7.500O.R 6 4 pin connector Voltage regulator 7805 Voltage regulator 7812 PCB Printed PCB Bulb holder Bluetooth receiver Hc-05 Buzzer 1 0.050 O.R 0.050 O.R 1 0.500 O.R 0.500 O.R 0.500 O.R 0.500 O.R 1 15.500 O.R 15.500 O.R 5 0.700 O.R 3.500O.R 1 4.500 O.R 4.500O.R 1 0.300 O.R 0.300 O.R Total coast 63.275 O.R Table 4.1 project budget Project Schedule In this part they are a project schedule and project Gantt chart which will show the time line of this project. WBS Task Name Duration Start Finish 1 Voice controlled home appliances 190 days 7/ 10/ 2015 28/ 6/ 2016 35 days 7/ 10/ 2015 24/ 11/ 2015 1.1 Initiation of project Predecess ors 1.1.1 Define topic 30 days 7/ 10/ 2015 17/ 11/ 2015 1.1.2 Collect information 3 days 18/ 11/ 2015 20/ 11/ 2015 3 1.1.3 Submit proposal 2 days 23/ 11/ 2015 24/ 11/ 2015 4 39 days 25/ 11/ 2015 18/ 1/ 2016 8 days 25/ 11/ 2015 4/ 12/ 2015 1.2 1.2.1 Planning Discuses with senior engineering student 1.2.2 Taking work shop 4 days 7/ 12/ 2015 10/ 12/ 2015 7 1.2.3 Interviews engineering employees 7 days 11/ 12/ 2015 21/ 12/ 2015 8 1.2.4 Start writing report 25 days 22/ 12/ 2015 25/ 1/ 2016 17 days 21/ 1/ 2016 17/ 2/ 2016 1.3 Designing project 1.3.1 Write microcontroller code 7 days 26/ 1/ 2016 3/ 2/ 2016 1.3.2 Design circuit 10 days 4/ 2/ 2016 17/ 2/ 2016 54 days 18/ 2/ 2016 3/ 5/ 2016 1.4 1.4.1 Implementing the project Design circuit ISIS or protues 8 days 7 29/ 2/ 2016 9 12 program 1.4.2 Getting the component 12 days 1/ 3/ 2016 16/ 3/ 2016 15 1.4.3 Connect the circuit and test it 20 days 17/ 3/ 2016 13/ 4/ 2016 16 1.4.4 Design PCB layout 4 days 4/ 5/ 2016 19/ 4/ 2016 17 1.4.5 Implementing the circuit 10 days 20/ 4/ 2016 3/ 5/ 2016 18 35 days 4/ 5/ 2016 21/ 6/ 2016 1.5 Testing 1.5.1 Testing the circuit 10 days 4/ 5/ 2016 17/ 5/ 2016 1.5.2 Writing the report 35 days 18/ 5/ 2016 5/ 7/ 2016 21 Table 4.2 project schedule Time management does not mean to handle a lot of work on one time. It means to concentrate and focus on one work at a time. The aims of the plan are to organize and order the work from most important to low important. To manage this project and to keep to the original plan they are the rules which have been followed: Concentrate on high-quality work, not on high quantity on one time Make plans of goals that needed to achieve Giving each task suitable and enough time to be accomplished. Starting from more difficult task to the less difficult task. 8 Figure 4.2 Gantt chart 9 Risk Management Risk identification, analysis and mitigation plan. Did any risk actually materialise? This part is about risk management, risk is anything that may disturb our work and risk management is process of identifying, analyzing and try to get the proper solution of those problems which we face it during our work. They are some example of risk that may place during this project with it solution: 1. Defining the project (idea of project) it is a difficult task where the project objective has to be defined properly so that can take the project in right way. To solve this problem it has to give suitable time and search in many resources to clarify the idea and get the proper information. 2. Time is one of risks that may be not enough to do this project and write the project report. Solution of this problem can be by avoiding unnecessary tasks and give that time to tasks which is more important for the project. 3. Getting software programs that need to design, code and implement the project may be difficult or coasting or it may be insulated as trail for short time. Using the time before implementation semester to gather and get all that programs and do a proper budget for it, it can be a good solution for this problem. 10 5. DESIGN AND ANALYSIS Design and analysis chapter include system initiate design, technical requirements, schematic diagram and system design and analysis, this chapter shows all important requirement to design and apply this project. System Initial Design 5.1.1 System Block Diagram Each project need to be defined by proper block diagram which show main functionality and also defined by prober flow chart which show the process steps of project. Figure 5.1.1 system block diagram The functionality of this system start by insulating the android application to the android mobile which the command will send form it, than the Bluetooth has to be work able in that mobile, than we have to give the voice command to the android application where this application will send that command to the project, in the other said the Bluetooth receiver will receive that command and pass it to the microcontroller, than the microcontroller will send the needed action to the prober relay according to received command. 11 5.1.2 System Flow chart In this part the diagrammatic representation of system shows how the system will process step by step when it will receive the command. 12 The figure 5.1.2 system flowchart The figure 5.1.2 is showing the flowchart of hardware design after initializing the system, it will display the project title on LCD than it will read the voice command from Bluetooth module, than the command will be checked by the microcontroller, the microcontroller will take action only if the command received is numbers from 1 to 6, according to command received it will decide which device needed to turned on or off. At first time command received it will turn on the device, if again same command has been received it will turn off the same device. 13 Technical Requirements 5.2.1 Hardware components This table show the major component which will be used to implement this system. Component Type IC IC89S51 LED Red Relay 12V OJ-SH-112DM LCD LM016L Transistor BC547 Crystal 11.0592 MHz Capacitor 1000microF Capacitor 100microF Capacitor 33microF Capacitor 10microF Capacitor 1microF Resistor 1K Resistor 10K Diode 1N4007 IC MAX232 Variable resistor 10k Resistor 10k breadboard Whit battery 5v transformer Voltage regulator 7805 Voltage regulator 7812 Bluetooth receiver Hc-05 Table 5.2.1.1 hardware component 14 Microcontroller (8051): Microcontroller is the major part of this system, it is maintains humidity, temperature and light intensity to desired value. 8051 has one serial port which receives and transmits data. Microcontroller is the heart of the system which controls all the inputs and controls all outputs by taken action. AT89s51 is the microcontroller which used in this system. AT89s51 is a very power full microcontroller because of the combination between a versatile 8-bit CPU and in-system programmable flash which is on a monolithic chip, for many embedded control applications AT89s51 provide cost-effective solution and high flexible features.(Atmel, 2008) Feature of AT89s51: Operating rang (4.0v to 5.5v) Three level program memory lock Internal RAM (128* 8 bit) Two 16 bit timer/counters Full duplex UART serial channel Interrupt recovery from power-down mode Power off flag Fast programming time Dual data pointer Low power idle and power down modes Six interrupt sources 32 programmable I/O line Full static operation(0Hz to 33MHz) 15 k Figure 5.2.1.1 pin description Figure 5.2.1.2 AT98S51 Figure 5.2.1.3 AT98S51 block diagram 16 LCD: LCD is standard for liquid crystal display it is an output device which will be used to display between one or two lines only, this device can display numbers, alphabets and some symbols which is in LCD. In this project 16*2 alphanumeric displays will be used so the LCD can display 16 characters in one line, and it can display only two line maximum. (innovation of enginners,2015) Figure 5.2.1.4 LCD 16*2 (LM016L) Table 5.2.1.2 LCD pin discretion. (innovation of enginners,2015) 17 Relay: Is a device which will use in this project to control the operations of turn on and turn off the connected devices to the project, so it will work as switch and the relay will be driven by BC547 transistor. Figure 5.2.1.5 relay MAX232: “The MAX232 device is a dual driver/receiver that includes a capacitive voltage generator using four capacitors to supply TIA/EIA-232-F voltage levels from a single 5V supply. Each receiver converts TIA/EIA-232-F inputs to 5- V TTL/CMOS levels. These receivers have a typical threshold of 1.3 V, a typical hysteresis of 0.5 V, and can accept ±30-V inputs. Each driver converts TTL/CMOS input levels into TIA/EIA-232-F levels. The driver, receiver, and voltage-generator functions are available as cells in the Texas Instruments LinASIC™ library. Outputs are protected against shorts to ground.”(Texas instruments, 2015) “Features of MAX 232: Meets or Exceeds TIA/EIA-232-F and ITU Recommendation V.28 Operates From a Single 5-V Power Supply With 1.0-µF Charge-Pump Capacitors Operates up to 120 kbit/s Two Drivers and Two Receivers ±30-V Input Levels Low Supply Current: 8 mA Typical ESD Protection Exceeds JESD 22 – 2000-V Human-Body Model (A114-A) Upgrade with Improved ESD (15-kV HBM) and 0.1-µF Charge-Pump Capacitors is Available With the MAX202 Device.” (Texas instruments, 2015) 18 Figure 5.2.1.6 MAX232 PIN description 19 Crystal 11.0592 MHz: It is an electronic oscillator circuit, it used to create or generate a signal which has very specified frequency. Features of 11.0592 MHz Crystal Oscillators: Stability in frequency. Small in size. Low cost. Easy of interfacing. Applications of 11.0592 MHz Crystal Oscillators: Resonance circuit. DIY projects. Electrical/electronic projects. Clock generator for microcontroller. DTMF decoder.” (ropomart, 2015) Figure 5.2.1.7 11.0592MHz crystal Bluetooth module hc05: it is a wireless technology used to transmit and receive information in bidirectional way. It transmit data between electronic devices, it is available at cheaper rates, it need power of 5v, it is work at 10 meter range, is use ULRT interference technology. (Nerokas, 2016) Figure 5.2.1.8 HC- 05 Bluetooth 20 5.2.2 Software components The software program which required simulating and implementing this project it showed her with it description. PROTUES software: Protues software is software used to simulate or design circuit diagram with microcontroller it is very famous and popular because it has almost all microcontrollers. In protues we can simulate our programming of microcontroller; also by protues we can directly make the PCB design after circuit simulation. It is useful software and the latest version (protues 8) is for free cost available on internet.(Geius devils, 2016) “KEIL µvision 4 software: KEIL µvision it is a software program which make use to write the program and code in it. It compile, debug, simulate the program and check the mistakes to give chance to solve the errors and get a perfect program. KEIL µvision is specially designed for 8051 microcontroller it make use to compile the program which written in assembly and C language to a machine language by creating a HEX file. (International journal of research in advent technology, 2014) AMR_ voice application: AMR_ voice application is an application can insulate to any android mobile, it uses to recognize the voice and pass the voice command to the robot piers with Bluetooth serial model, it can work with any microcontroller which can handle strings. For example when saying “one” the android mobile will return a string “one” to Bluetooth model and indicate the start and stop bits.(google play, 2016) Figure 5.2.1.1 AMR_ voice application 21 Schematic Diagram Figure 5.3 schematic diagram Circuit diagram shows that the microcontroller is connected to different devices such as the XTAL1 and XTAL2 pins are connected to 11.0592 crystal, where the RST pin is connected to reset circuit which is consist of 10micro F capacitor along with 10Kohm resistor (capacitor positive side is connected to +5v DC power supply and the other side is connected to 10K ohm resistor) while resistor is grounded. P0.0 pin is connected to 1K ohm resistor and the other side of resistor connected to the base of Q2 transistor (the emitter is grounded and the collector is connected to the relay1). P0.1 pin is connected to 1K ohm resistor and the other side of resistor connected to the base of Q3 transistor (the emitter is grounded and the collector is connected to the relay2). P0.2 pin is connected to 1K ohm resistor and the other side of resistor connected to the base of Q5 transistor (the emitter is grounded and the collector is connected to the relay4). 22 P0.3 pin is connected to 1K ohm resistor and the other side of resistor connected to the base of Q4 transistor (the emitter is grounded and the collector is connected to the relay3). P0.4 pin is connected to 1K ohm resistor and the other side of resistor connected to the base of Q transistor (the emitter is grounded and the collector is connected to the relay). P0.5 pin is connected to 1K ohm resistor and the other side of resistor connected to the base of Q1 transistor (the emitter is grounded and the collector is connected to the buzzer). Microcontroller is also connected to LCD by pins p1.0, p1.1and all pins from p2.0 to p2.7. Two pins of microcontroller(p3.0, p3.1) is connected to Bluetooth receiver and EN pin is powered by Vcc, Where pins of PSEN, ALE, (P3.2 to P3.7) and (p1.2 to p1.7) are not connected. after initializing the system, it will display the project title on LCD than it will read the voice command from Bluetooth module, than the command will be checked by the microcontroller, the microcontroller will take action only if the command received is numbers from 1 to 6, according to command received it will decide which device needed to turned on or off in same time it will be display which device has been taken the action on it and what action is taken. At first time command received, it will turn on the device; if again same command has been received it will turn off the same device. 23 System Design & Analysis 5.4.1 Hardware design and analysis 1 RL1 OJ-SH-112DM VSS RN1 L2 10k CRYSTAL U2 19 18 XTAL2 10u 33pF 9 RST R3 29 30 31 C2 C5 1u C1+ T1IN R1OUT T2IN R2OUT VS+ VS- Q4 VSINE BC547 1k VSS RL2 OJ-SH-112DM VSS V6 D8 1N4007 V3 D11 RL?VSINE 1N4007 AT89S51 OJ-SH-112DM L1 Q3 R7 12V BC547 VSINE 1k R? Q? BC547 1k VSS C2+ OJ-SH-112DM 5 C3 4 VSS L3 RV2 1 2 3 1u V5 MAX232 C2- C4 11 12 10 9 VSINE R8 10 11 12 13 14 15 16 17 P3.0/RXD P3.1/TXD P3.2/INT0 P3.3/INT1 P3.4/T0 P3.5/T1 P3.6/WR P3.7/RD 1N4007 BC547 1k 7 8 9 10 11 12 13 14 2 6 C1T1OUT R1IN T2OUT R2IN P1.0 P1.1 P1.2 P1.3 P1.4 P1.5 P1.6 P1.7 Q2 R6 4 5 6 14 13 7 8 1 1 2 3 4 5 6 7 8 D10 +88.8 3 U5 RL3 V4 kRPM 1u PSEN ALE EA 1N4007 21 22 23 24 25 26 27 28 P2.0/A8 P2.1/A9 P2.2/A10 P2.3/A11 P2.4/A12 P2.5/A13 P2.6/A14 P2.7/A15 10k VSS OJ-SH-112DM 39 38 37 36 35 34 33 32 P0.0/AD0 P0.1/AD1 P0.2/AD2 P0.3/AD3 P0.4/AD4 P0.5/AD5 P0.6/AD6 P0.7/AD7 +88.8 C9 C1 XTAL1 D7 kRPM 33pF 12V 10 9 8 7 6 5 4 3 2 X1 C8 1u D9 RL4 12V D0 D1 D2 D3 D4 D5 D6 D7 RS RW E 1k VSS VDD VEE 1N4007 BUZ1 R9 Q5 BC547 1k CTS RTS R1 V2 LCD1 Q1 BC547 BUZZER 1k R5 LM016L TXD VSINE 10k RXD Figure 5.4.1 system design The figure 5.4 is shows the hardware design of project on ISIS Protues software where it show the connection of relay driver circuits, LCD and the Bluetooth receiver which has been replaced by virtual terminal. Relay driver circuit To design this system diode will be connected which is going to protect the transistor from reverse current which generated by coil which is in relay. When the relay is in off mode.(Learning about Electronics, 2015) To design this system RB need to be calculated. to calculate RB at the first the load current to be calculate which is given by IL =Vs/RL , after that I have to calculate hFE (minimum) >5*( IL/Iinput ) Iinput base of transistor 24 than chose the transistor which it Ic is greater than current gain hFE and greter than IL RB can be gated by (0.2*RL* hFE) if transistor power supply is (Vs) Also RB by (Vcc* hFE)/(5* IL) 89s51 have to operate a 12v relay with 160 ohm coil, so the supply voltage for transistor is 12v and supply voltage for Ic is 5v so Ic can supply maximum current of 2mA IL =Vs/RL = 12/160 = 75 mA hFE= 187.5 so transistor to be chosen with hFE =200 and Ic= 100mA the second formula used to get RB because Vcc used not Vs RB = (Vcc* hFE)/(5* IL) RB = 1333.3 ohm Chosen resistor is 1K ohm 1N4001 diode can be used as protective diode or any general diode In this project BC 547 transistor will be used and 12v relay coil, and 1k ohm resistor connected between microcontroller and base of transistor so the transistor will get minimal drop of voltage that main the transistor will pass little power to 12v coil relay. 25 Power supply: Transformer 230v AC 5VDC Rectifier Filter Voltage (Bridge) Capacitor Regulator U4 7812 7805 VO D3 D1 VO 1N4007 CONN-SIL2 D2 D4 1N4007 1N4007 C6 C7 1000u 100u X1 CRYSTAL C1 Figure 5.4.2 (power supply design) 3 C10 2 1N4007 1 2 VI 3 2 TRANSFORMER VI GND 1 GND 1 100u U2 19 18 XTAL1 XTAL2 10u 9 RST P0.0/AD0 P0.1/AD1 P0.2/AD2 P0.3/AD3 P0.4/AD4 P0.5/AD5 P0.6/AD6 P0.7/AD7 39 38 37 36 35 34 33 32 A 230 -15 AC volte step down transformer is used to get output of 15 volt this output R3 10k P2.0/A8 P2.1/A9 P2.2/A10 P2.3/A11 P2.4/A12 P2.5/A13 P2.6/A14 P2.7/A15 21 22 23 24 25 26 27 28 goes to bridge rectifier which formed of 1N4007 diodes. DC voltage which consist a lots 29 30 31 PSEN ALE EA Q R8 BC 1k of ripple is got as output from bridge rectifier. So to remove that ripple a capacitor filter C2 1 2 3 4 5 6 7 8 P1.0 P1.1 P1.2 P1.3 P1.4 P1.5 P1.6 P1.7 P3.0/RXD P3.1/TXD P3.2/INT0 P3.3/INT1 P3.4/T0 P3.5/T1 P3.6/WR P3.7/RD 10 11 12 13 14 15 16 17 is used, finally 7805 and 7812 IC is used to get pure 12 and 5 DC volt. (Engineersgarage, Bluetooth module 1u 2012) J1 1 2 3 Design of power supply: 14 13 7 8 12v is required for relay. 2 6 3 1 C1- C1+ T1OUT R1IN T2OUT R2IN T1IN R1OUT T2IN R2OUT U5 11 12 10 9 AT89S51 R? VS+ VS- Q? BC54 1k C2- C2+ Minimum input for 7805 is =output required + C5dropC4 across 7805 IC C3 4 MAX232 RV2 1 2 3 = 5 v +3 v= 8v 5 7 8 9 10 11 12 13 14 1u 4 5 6 1u Drop across 0.7 v diode for 2 diode conducts 1.4 v 1.4+8v =9.4v so 10v is required at secondary part. To design filter capacitor. 26 D0 D1 D2 D3 D4 D5 D6 D7 1k RS RW E As input for 7805 IC 8v is required. VSS VDD VEE 1u 1 2 R1 Q1 BC5 LCD1 LM016L 1k C= (Il* time ) /vr Il =load current Time = when capacitor discharge by load current Vr = 10% of output voltage = 1 v Ɵ = sin-1 (E min/ E max ) Ɵ = sin-1 (10 -.7/ 10 +.7 ) = 60o To get time for 50 Hz freq T= 1/50 =20 ms for 360o =20ms so for 180o =10ms and for 60o =3.4ms T1= time 90o + T for Ɵ = 5ms+ 3.4ms =8.4 ms Il =output load current supplied to IC = 89s51 + display + max 232 =71ms +15.2ms + 30 ms = 116.2 mA C= (116.2 mA * 8.4ms) / 1v = 976.08 *10-6 So 1000 micro capacitor is selected Diode design PIV =Vm =E max +(0.7)*2 = 10.7 +1.4 =12.1v Io = Il /2 = 116.2 mA /2 =58.1mA Peak repetitive current I= Il (T+T1) /T1 T1 =time for 90o – Ɵ = 5ms -3.4ms =1.2ms I= 116.2 mA(8.4ms +1.2ms)/1.2ms =929.6 mA 27 I = 1A So diode chosen is 1N4007 PIV = 100v 5.4.2 software design and analysis KEIL Microcontroller Programming software has been used to write the program which will be installing in the AT98S51 microcontroller to manage the system functions The software code is used to declare the LCD component to display the assign message associated with some actions: (Singh.M, 2013) void cmd_lcd (unsigned char dat) // function to write command at lcd port { DATA=dat; RS=0; //clear RS (ie. RS=0) to write command E=1; // send H-L pulse at E pin delay(100); E=0; delay(100); } void data_lcd (unsigned char dat) // function to write data at lcd port { DATA=dat; RS=1; E=1; // set RS=1 to write DATA // send H-L pulse delay(100); E=0; delay(100); } 28 at E pin void init_lcd() // function to initialize the LCD at power on time { cmd_lcd(0x38); // 2x16 display select delay(50000); cmd_lcd(0x0c); // display on cursor off command delay(1000); cmd_lcd(0x06); // automatic cursor movement to right delay(1000); cmd_lcd(0x01); // lcd clear command delay(5000); } void string_lcd(unsigned char *str) // function to display string to lcd { while(*str!='\0') // '\0' is null char as last char of pointer is null { data_lcd(*str); str++; } } The software code is used to declare the delay component to make gap between the assign message associated with some actions and between actions to be taken: void delay(int num) { int a; for(a=0;a<=num;a++); } The software code is used to declare the main program:(Slideshare, 2016) 29 #include<reg51.h> (REG51.H Header file for generic 80C51 and 80C31 microcontroller. Copyright (c) 1988-2002 Keil Elektronik GmbH and Keil Software, Inc. All rights reserved.) #include <stdio.h> (STDIO.H Prototypes for standard I/O functions. Copyright (c) 1988-2002 Keil Elektronik GmbH and Keil Software, Inc. All rights reserved.) #define DATA P2 sbit RS=P1^0; sbit E=P1^1; sbit Fan = P0^0; sbit Light = P0^1; sbit AirCon = P0^2; sbit Heater = P0^3; sbit TV = P0^4; sbit Buzz = P0^5; char flag_Fan ='0'; char flag_Light ='0'; char flag_AirCon ='0'; char flag_Heater ='0'; char flag_TV ='0'; char flag_Buzz ='0'; unsigned char r_byte; #include"delay.h" #include"lcd.h" void main() 30 { SCON = 0x50; /* SCON: mode 1, 8-bit UART, enable rcvr TMOD = 0x20; /* TMOD: timer 1, mode 2, 8-bit reload TH1 = 0xfD; TR1 = 1; TI = 1; /* TH1: reload value for 2400 baud /* TR1: timer 1 run /* TI: set TI to send first char of UART */ //init_serial(9600); delay(10000); init_lcd(); cmd_lcd(0x80); string_lcd("APPLIANCE CNTRL"); cmd_lcd(0xc0); string_lcd(" BY ANDROID"); // delay(30000); // cmd_lcd(0x01); // delay(30000); Fan = 1; Light = 1; AirCon = 1; Heater =1; TV = 1; Buzz = 1; while(1) { r_byte = _getkey(); //rec_serial(); putchar(r_byte); */ //trans_serial(r_byte); if (r_byte == '*'){ r_byte = _getkey(); //rec_serial(); switch (r_byte){ 31 */ */ */ case '1': cmd_lcd(0x01); if(flag_Fan=='0') { Fan=0; cmd_lcd(0x80); string_lcd("DEVICE 1"); cmd_lcd(0xc0); string_lcd("TURNED ON"); flag_Fan='1'; delay(30000); cmd_lcd(0x80); string_lcd("APPLIANCE CNTRL"); cmd_lcd(0xc0); string_lcd(" BY ANDROID"); } else { Fan=1; cmd_lcd(0x80); string_lcd("DEVICE 1"); cmd_lcd(0xc0); string_lcd(" TURNED OFF"); flag_Fan='0'; delay(30000); cmd_lcd(0x80); string_lcd("APPLIANCE CNTRL"); cmd_lcd(0xc0); string_lcd(" BY ANDROID"); 32 } break; case '2': cmd_lcd(0x01); if(flag_Light=='0') { Light=0; cmd_lcd(0x80); string_lcd("DEVICE 2"); cmd_lcd(0xc0); string_lcd("TURNED ON"); flag_Light='1'; delay(30000); cmd_lcd(0x80); string_lcd("APPLIANCE CNTRL"); cmd_lcd(0xc0); string_lcd(" BY ANDROID"); } else { Light=1; cmd_lcd(0x80); string_lcd("DEVICE 2"); cmd_lcd(0xc0); string_lcd(" TURNED OFF"); flag_Light='0'; delay(30000); cmd_lcd(0x80); string_lcd("APPLIANCE CNTRL"); 33 cmd_lcd(0xc0); string_lcd(" BY ANDROID"); } break; case '3': cmd_lcd(0x01); if(flag_AirCon=='0') { AirCon=0; cmd_lcd(0x80); string_lcd("DEVICE 3"); cmd_lcd(0xc0); string_lcd("TURNED ON"); flag_AirCon='1'; delay(30000); cmd_lcd(0x80); string_lcd("APPLIANCE CNTRL"); cmd_lcd(0xc0); string_lcd(" BY ANDROID"); } else { AirCon=1; cmd_lcd(0x80); string_lcd("DEVICE 3"); cmd_lcd(0xc0); string_lcd(" TURNED OFF"); flag_AirCon='0'; delay(30000); 34 cmd_lcd(0x80); string_lcd("APPLIANCE CNTRL"); cmd_lcd(0xc0); string_lcd(" BY ANDROID"); } break; case '4': cmd_lcd(0x01); if(flag_Heater=='0') { Heater=0; cmd_lcd(0x80); string_lcd("DEVICE 4"); cmd_lcd(0xc0); string_lcd("TURNED ON"); flag_Heater='1'; delay(30000); cmd_lcd(0x80); string_lcd("APPLIANCE CNTRL"); cmd_lcd(0xc0); string_lcd(" BY ANDROID"); } else { Heater=1; cmd_lcd(0x80); string_lcd("DEVICE 4"); cmd_lcd(0xc0); string_lcd(" TURNED OFF"); 35 flag_Heater='0'; delay(30000); cmd_lcd(0x80); string_lcd("APPLIANCE CNTRL"); cmd_lcd(0xc0); string_lcd(" BY ANDROID"); } break; case '5': cmd_lcd(0x01); if(flag_TV=='0') { TV=0; cmd_lcd(0x80); string_lcd("DEVICE 5"); cmd_lcd(0xc0); string_lcd("TURNED ON"); flag_TV='1'; delay(30000); cmd_lcd(0x80); string_lcd("APPLIANCE CNTRL"); cmd_lcd(0xc0); string_lcd(" BY ANDROID"); } else { TV=1; cmd_lcd(0x80); string_lcd("DEVICE 5"); 36 cmd_lcd(0xc0); string_lcd(" TURNED OFF"); flag_TV='0'; delay(30000); cmd_lcd(0x80); string_lcd("APPLIANCE CNTRL"); cmd_lcd(0xc0); string_lcd(" BY ANDROID"); } break; case '6': cmd_lcd(0x01); if(flag_Buzz=='0') { Buzz=0; cmd_lcd(0x80); string_lcd("DEVICE 6(BUZZER)"); cmd_lcd(0xc0); string_lcd("TURNED ON"); flag_Buzz='1'; delay(30000); cmd_lcd(0x80); string_lcd("APPLIANCE CNTRL"); cmd_lcd(0xc0); string_lcd(" BY ANDROID"); } else { Buzz=1; 37 cmd_lcd(0x80); string_lcd("DEVICE 6(BEZZER)"); cmd_lcd(0xc0); string_lcd(" TURNED OFF"); flag_Buzz='0'; delay(30000); cmd_lcd(0x80); string_lcd("APPLIANCE CNTRL"); cmd_lcd(0xc0); string_lcd(" BY ANDROID"); } break; } } } } 38 6. SIMULATION, TESTING AND IMPLEMENTATION System Simulation As a first step, the circuit was simulated in ISIS Protues, The circuit of this project has been designed in ISIS Protues where all component has been connected to AT89S51 microcontroller as shown in figure 6.1.1. TR1 V1 230v L4 U1 VI D2 D4 1N4007 1N4007 VI VO 3 VO 2 GND 1N4007 R2 10k R4 2 D3 1N4007 VSINE VSS 3 GND 1 D1 1 C6 C7 1000u 100u 2.2k C10 100u D5 D6 LED RL1 1 LED OJ-SH-112DM VSS RN1 L2 10k CRYSTAL U2 19 18 P0.0/AD0 P0.1/AD1 P0.2/AD2 P0.3/AD3 P0.4/AD4 P0.5/AD5 P0.6/AD6 P0.7/AD7 XTAL2 10u 33pF 9 RST R3 P2.0/A8 P2.1/A9 P2.2/A10 P2.3/A11 P2.4/A12 P2.5/A13 P2.6/A14 P2.7/A15 10k 29 30 31 C2 C5 1u C4 VS+ VS- 11 12 10 9 21 22 23 24 25 26 27 28 V5 Q4 VSINE BC547 1k VSS RL2 OJ-SH-112DM VSS V6 D8 1N4007 V3 D11 RL?VSINE 1N4007 AT89S51 OJ-SH-112DM L1 Q3 R7 12V BC547 VSINE 1k R? Q? BC547 MAX232 1k C2- C2+ 5 4 VSS OJ-SH-112DM C3 VSS L3 RV2 1u D9 RL4 12V D0 D1 D2 D3 D4 D5 D6 D7 RS RW E VSS VDD VEE 1N4007 1k BUZ1 R9 Q5 BC547 1k CTS RTS VSINE R8 10 11 12 13 14 15 16 17 1 2 3 1u C1+ T1IN R1OUT T2IN R2OUT P3.0/RXD P3.1/TXD P3.2/INT0 P3.3/INT1 P3.4/T0 P3.5/T1 P3.6/WR P3.7/RD 1N4007 BC547 1k 7 8 9 10 11 12 13 14 2 6 C1T1OUT R1IN T2OUT R2IN P1.0 P1.1 P1.2 P1.3 P1.4 P1.5 P1.6 P1.7 D10 Q2 R6 4 5 6 14 13 7 8 1 1 2 3 4 5 6 7 8 RL3 V4 +88.8 3 U5 1N4007 kRPM 1u PSEN ALE EA VSS OJ-SH-112DM 39 38 37 36 35 34 33 32 +88.8 C9 C1 XTAL1 D7 kRPM 33pF 12V 10 9 8 7 6 5 4 3 2 X1 C8 12V V7 7812 7805 TRAN-2P2S R1 V2 LCD1 Q1 BC547 BUZZER 1k R5 LM016L TXD VSINE 10k RXD Figure 6.1.1 Circuit simulation The above figure shows the circuit connected in ISIS proteus with all the components, the Bluetooth receiver part has been replaced by virtual terminal component. This virtual terminal is going to act as input to AT89S51 microcontroller. 39 The next step in simulation is to write a program for the microcontroller to carry out the process. The microcontroller programming was done in keil 𝜇vision 4 software. Figure 6.1.2 Main part U vision simulation The above figure shows the main part of the simulation program. The main program connects all the sub programs (LCD & delay) within the keil 𝜇𝑣𝑖𝑠𝑖𝑜𝑛. when the complete program builds and runs successfully, it is transferred into HEX files and loaded into the microcontroller. The microcontroller is tested with the HEX code file which is the last stage in simulation. 40 Last step in simulation is simulate the circuit in ISIS after the microcontroller AT89S51 is loaded with HEX file as shown in 6.1.6 figure Figure 6.1.6 Insert HEX file to AT89S51 41 Figure 6.1.7 ISIS Working simulation The above figure shows the working simulation of project where the first command ("APPLIANCE CNRL BY ANDROID") is displayed on LCD and the output pins is waiting for input from virtual terminal part. 42 Figure 6.1.8 Device 1 turned on VCC RL1 OJ-SH-112DM D10 L2 1N4007 12V D7 1N4007 V4 R8 100 Q1 2N2222 VSINE Figure 6.1.8.1 Light on Input (number 1) has given through virtual terminal as a respective output the relay number 1 worked as switch and turns light on, in same time the LCD display the respective command ("DEVICE 1" “TURNED ON") as shown in figure 6.1.8, it is goes with same process for other inputs. 43 Figure 6.1.9 Device 1 turn OFF Input (number 1) has given again through virtual terminal as a respective output the relay number 1 worked as switch and turns light off, in same time the LCD display the respective command ("DEVICE 1" " TURNED OFF") as shown in figure 6.1.9, it is goes with same process for other inputs. With all this process the simulation part has been done successfully and it worked as what has been respected from this project. 44 System Testing After all the system outputs were tested in the ISIS program, the system was implemented on the breadboard. The figure 6.2.1 shows the complete connection of the circuit, where DC voltage regulator has been used as a power supply to the all circuit parts, also the relay driver circuit plus the LCD has been connected to main circuit as an output parts, in second hand the Bluetooth receiver has been connected as an one input to the main circuit. For testing purpose, devices are powered with battery and connected to the relay. On the other side the AMR_voice application has been downloaded from google store and installed on an android mobile phone where the voice command will be send from it. Figure 6.2.1 breadboard testing After setting the circuit properly and the LCD has display the first command, now it need to connect to mobile application to the main system as shown in figure 6.2.2 where the device has been chosen and connected to the system successfully. Figure 6.2.2 connecting Bluetooth 45 As shown in figure 6.2.3 the first voice command has been passed to the main circuit from mobile phone to the Bluetooth receiver, according to the command received the microcontroller has been taken the action and turned the device on respectively to the command received, where in same time LCD display which device has been taken action on it and what action exactly taken. Figure 6.2.3 Device 1 is ON Now if same command is repeated to the system, it will perform the function opposite to the one taken before that is, it will turn off the same device and the LCD screen will display the operation performed on that device as shown in figure 6.2.4 Figure 6.2.4 evice 1 OFF 46 System Implementation/Prototyping The project has been soldered on a printed BCP with help of breadboard connection and circuit diagram. Figure 6.3.1 project implementation As shown in figure 6.3.1 all main component microcontroller, LCD, Bluetooth receiver and transformer has been fixed on the printed circuit, also the devices which work with 230v has been connected to the circuit. Finally the project has been powered and starts working. 47 7. CRITICAL EVALUATION The idea of this project to control devices using Bluetooth on android by voice command. The main objective has been achieved by match the output of the project to the objective which has listed in chapter 1. The expected objective mentioned in chapter one is achieved where the appliances can be controlled by any human voices which reach the microcontroller to turn on and turn off the devices by the Bluetooth receiver. This project became successful to control five different home appliances which work with 230 V AC power supply. There are many projects that were made in order to control the home appliances where some of them have used the human voice and other used human sensing systems and they are some other project which use to control appliances powered by battery. Projects which based on human voice has disadvantages that is lack time to proceed the action after receiving command, where project based on human sensing system make profusion of electricity because while person enter the room all the devices turned on in chance it needed to turn on or not also the projects which control buttery based appliances cannot control appliances which work with 230v ac volt. This project it designed to overcome the disadvantages of previous project where the advantages of this project is that it take the action direct after the command received, also it work accordingly to human needs, also it support to control appliances which work with 230v ac volt, this project designed to control five devices. Further, it can control more than five by some modification in programing and adding few more components to the output ports, which is not in my project scope. It can be implemented as a future project work. As a disadvantages of this project the buzzer which use as part to check the system if it working or not it make a loud noise, also the power supply part producing un necessary heat which may damage the component. 48 Each project has technical problems while developing the project the following point discusses the technical problems and how they were resolved. 1. At the beginning while testing the working of circuit no action has been tacking from microcontroller, the problem solved by checking the wiring connection of microcontroller and getting the unconnected pin which is pin 31 which must be connected to Vcc to make the microcontroller able to use the program which has been saved in the internal memory. 2. The LCD was not working well where it was only lighting with no command displaying after testing has been known that the variable resister has been damage, and the problem solved by replacing it by anew variable resistor. 3. While testing some time the circuit not working, where the power supply part is not feeding the circuit at some of times, it may happened because of connection lose so to make sure in each and every time that if they any problem in power supply part the LED has been add to each suction of power out point. 4. The MAX232 has been removed because MAX232 is voltage level shifter and it is required only when we are dealing with different voltage levels (for example TTL and PC serial port). As the Bluetooth module we are using is TTL compatible device we don't need MAX232. Any project can be done better by overcome drawbacks/limitations, and there are following point discuss how this project can be done better: 1. .internet or a wireless technic can be used as a controller in Adriano mobile to solve the limitation of the limited distance of Bluetooth. 49 2. As a solution of mobile buttery dead the Adriano application can be downloaded in any other device such as tab, laptop ext, to control the project and devices or a wireless charger can be applied. 3. Buzzer which used time by time to check if circuit working well, it make loud sound so that make a noise the buzzer can be replaced by laser light. 4. In chance the user leaved the place and forget to turn off one or more of devices, human sensing system can be used to sense and send message to the user that no one is their please turn off the specific device which is on. Why not use to turn off directly if they are no one? Because may the user is leaved but he need some devices to be on for his work. When handling a new project that mean there are a new experience, knowledge and information. The following points are some of benefits which that gained from this project: Learning a new language to program the project. Dealing with new component “high level component” such as AT89S51 microcontroller, 16*2 LCD and HC-05 Bluetooth receiver. Dealing with new software component like keil µvision and ISIS proteus. Getting experience to manage and guide the project over a specified time. Dealing and mitigating of any problem or risk that not expected during the project implementation. It needs to be a multitasking person. 50 8. LEGAL, SOCIAL AND ETHICAL ASPECTS RELATED TO THE PROJECT As an electronic engineer it is not easy to do any project, there are many things has to be considered in the engineering environment. Aspect is an important part has to be put in engineer mind when doing any new project, the most important aspect are the legal, social and ethical aspects. The following discussion shows how this project was implemented with respect to the legal aspect, social aspect and ethical aspect. Legal aspect Using the legal way all stages of this project have been done. Where all data and information which attached in this report was obtained using reliable and legal sources as well this project has been implemented by using and including legal component, the bandwidth to transform and receive the signals it was fixed by the Bluetooth receiver. Therefore, there are no legal issues or problems preventing the implementation and use of this project. Social aspect The engineer has to interconnect with the society before doing any new project to know about the needs of his project from the social side and what may be the reaction of society from his project also to get a clear idea to develop the social process. Now days everything became technologically and we can use this technology to improve and help many things, to be better and easier, this project is very helpful in social said where it Controlling the devices without going near to the device, which make use to reduce the human efforts and it is Very helpful for physically disabled people, people who cannot move or walk. As a disadvantage of this project in a social aspect that some people may become lazy and they may totally depend on the system and they will not move so is make bad effect for their health. 51 Ethical aspect Engineers today works in different environments and field, and they directly can affect the environment either in a positive way or negative way, in our professional life ethics act as an important part, especially for professional life of an engineer. For that the engineer to impact the society positively, he must be committed to principles of ethical aspect. As an engineer of electronics and telecommunication, the ethical principles have been followed while creating this new project as showing following: 1. The aim of this project was to reduce the human efforts and help the physically disabled people to control the home appliances with no need to move. 2. This project includes justified work in all stages of the project: planning, invention, execution and testing. 3. For any organization, it is not used any confidential data in this project. 4. While writing this report has been used many sources as support, all that sources which used, it has been cited and mentioned in the reference list. 5. Using reliable manner this system and the report of this project has been done and there is no untrustworthy method has been followed. 6. The environment and people safety have been taking care By mentioning the limitations and disadvantages of this project in this project. In short, while managing any project the legal, social and ethical aspects must to be considered because it's most important elements which affect the people and the environment. Using this aspect the project will get it place and value in society then the society can get benefit from such project. 52 9. CONCLUSIONS AND RECOMMENDATIONS Now days everything became technological and we can use this technology to improve and help many things to be better and easier. The aim of this project is to reduce the human efforts. “voice controlled home appliances using Bluetooth on android mobile” where it implemented successfully and the five devices is controlled by any human voice without going near to it where any person can controlled using their on mobile phone it only need to download the mobile application from google store. This project is very help full for elder people and people who are physically handy cap also it is good project where it can control the devises without going near to it. This project can reduce the human efforts which can help people who are physically disable or senior citizens. When handling a new project that mean there are a new experience, knowledge and information like Learning a new language to program the project, Dealing with new component, Dealing with new software component, Dealing and mitigating of any problem or risk and Getting experience to manage and guide the project over a specified time, Also It need to be a multitasking person. this project can be done better by using internet or a wireless technic as a control way in Adriano mobile to solve the limitation of the limited distance of Bluetooth, also In chance the user leaved the place and forget to turn off one or more of devices, human sensing system can be used to sense and send message to the user that no one is their please turn off the specific device which is on. Why not use to turn off directly if they are no one? Because may the user is leaved but he need some devices to be on for his work. 53 REFERENCES Atmel (2008) 8bit microcontroller with 4k byts in-system programmable(AT98s51) [online] available from<http://www.atmel.com/images/doc2487.pdf> [9 December 2015]. DIY Hacking (2015-2016) PIR Motion sensor auto mation [online] available from <http://diyhacking.com/pir-motion-sensor-automate-home/> [27 November 2015]. EngineersGarage (2012) Home Appliances control by human voice [online] available from <http://www.engineersgarage.com/contribution/home-appliances-control-by-humanvoice> [27 November 2015]. Engineersgarage (2012) How to Design a Regulated Power Supply [online] available from<http://www.engineersgarage.com/contribution/ambhatt/how-to-designregulated-power-supply> [29 April 2016]. Giorgos Lazaridis (2009) Basic transistor circuit [online] available from< http://www.pcbheaven.com/userpages/basic_transistor_circuits/> [14 January 2016]. Genius devils (2016) what is proteus software? [online] available from<http://geniusdevils.com/2013/03/what-is-proteus-software/> [6 January 2016]. Google play (2016) BT Voice Control for Arduino [online] available from <https://play.google.com/store/apps/details?id=robotspace.simplelabs.amr_voice> [25 march 2016]. 54 Innovation of engineering (2015) LCD16*2 (LM016L) [online] available from<https://embeddedcenter.wordpress.com/ece-study-centre/display-module/lcd16x2-lm016l/> [24 December 2015]. International journal of research in advent technology (2014) KEIL Microcontroller Programming Software [online] available from< http://www.ijrat.org/downloads/april2014/paper%20id-24201428.pdf > [ 1 January 2016]. Learning about Electronics(2015) How to Build a Relay Driver Circuit [online] available from <http://www.learningaboutelectronics.com/Articles/Relay-driver- circuit.php> [17 December 2015] Nerokas (2016) bluetooth module hc05 [online] available from <http://store.nerokas.co.ke/index.php?route=product/product&product_id=1075> [4 march 2016]. Robomart (2009-2015) 11.0592MHz crystal [online] available from<https://www.robomart.com/11.0592mhz-crystal-oscillators> [30 December 2015]. Singh.M (2013) 16×2 LCD Interfacing in 8bit mode [online] available from <https://learningmsp430.wordpress.com/2013/11/13/16x2-lcd-interfacing-in-8bitmode/> [2 may 2016]. Slideshare (2016) Embedded C programming based on 8051 microcontroller [online] available from < http://www.slideshare.net/GauravVerma3/embedded-c-for-8051- compatibility-mode> [5 may 2016]. Texas instruments (2015) MAX232 [online] available from<http://www.ti.com/lit/ds/symlink/max232.pdf> [30 December 2015]. 55 APPENDIX A Transmitter / controlling unit Bluetooth enabled android mobile 56 Pull up resistors: Diagram: - Working: - the microcontroller pins cannot be connected to the 7-segment display and motor driver circuit directly because the microcontroller cannot supply all the required current so the required remaining current is provided through the pull-up resistors. They are designed to supply just the enough current to the motor driver circuit. 57 RESET CIRCUIT: Diagram: - Working: - The circuit gives the required starting pulse to the microcontroller to start the operation from the very beginning. The 89C2051 microcontroller requires the active high reset pulse. So the capacitor is connected to positive supply and the resistor is grounded. CRYSTAL CIRCUIT: Diagram: - Working: - The circuit consists of one crystal and two capacitors. The crystal is used to give the microcontroller the required periodic pulses to make it function properly. The crystal used in the project is of 12 MHz The two capacitors are connected to two pins of the crystal and are grounded at the other ends 58 What is Bluetooth? Bluetooth is a wireless technology used to transfer data between different electronic devices. The distance of data transmission is small in comparison to other modes of wireless communication. This technology eradicates the use of cords, cables, adapters and permits the electronic devices to communicate wirelessly among each other. Bluetooth technology permits hands free headset for incoming voice calls, ability of printing and fax, and automatic synchronization of PDA. The key features of Bluetooth technology: Less complication Less power consumption Available at cheaper rates Robustness History of Bluetooth 1998 - Birth of Bluetooth with the formation of Bluetooth Special Interest Group - Bluetooth is officially adopted as the name for the technology. 1999 - 1.0 Specification is officially released. - Bluetooth is declared the "Best of Show Technology Award" by COMDEX. 2000 - For the first time, Bluetooth-enabled mobile phone, PC card, mouse, headset and laptop are unveiled. - USB dongle prototype unveiled at COMDEX. 2001 - Bluetooth SIG Inc. Is formed. - First hands-free car kit is launched. 2002 - First GPS receiver and Bluetooth enabled digital camera. - IEEE approves 802.15.1 specification for Bluetooth technology. 2003 - First Bluetooth-enabled MP3 player launched. - First FDA-approved Bluetooth-enabled medical system. 2004 - Bluetooth SIG adopts Enhanced Data Rate (EDR). - Bluetooth technology embedded in 250 million devices. - First Bluetooth-enabled stereo headphones launched. 2006 - Bluetooth is installed in 1 billion devices. 59 Bluetooth Decoder This module enables you to wireless transmit & receive serial data. It is a drop in replacement for wired serial connections allowing transparent two way data communication. You can simply use it for serial port replacement to establish connection between MCU or embedded project and PC for data transfer. This board operates on 5V and has LED indication. Features · 5V power operation · UART interface · 10 meters range · Status LED Product Specifications · Bluetooth protocol v2.0 · Baud Rate: 9600 bits per second · Power Supply: +5 VDC 50ma · Operating Temperate: -20C to +55 C · Dimensions: 26.9 mm x 13 mm x 2.2 mm 60 Waveforms for Power supply module We get 230 volts A.C. supply from the power grid (Electricity board). The voltage amplitude is of 230 volts and the frequency is 50 Hz. By using a Step down transformer we are lowering the 230 volt AC supply to a lower value (e.g., 15 V) using a transformer. This lower voltage is still AC. The voltage amplitude is reduced but the frequency is same, which is 50 Hz Then rectification is done by a set of 4 diodes (Bridge rectifier), this rectifier transforms this AC voltage into pulsating voltage. The negative half cycles of transformer output are converted to positive half cycles. 61 The next step is filtering, which is done by an electrolytic capacitor of 100microF, this filter capacitor transforms this pulsating voltage into almost DC. This is having ripples. The voltage obtained after the capacitor oscillates a little bit (this oscillation is called ripple), so a voltage regulating stage is necessary, done by a voltage regulator IC. After this stage the output is true DC voltage PCB LAYOUT A printed circuit board, or PCB, is used to mechanically support and electrically connect electronic components using conductive pathways, tracks or traces etched from copper sheets laminated onto a non-conductive substrate. It is also referred to as printed wiring board (PWB) or etched wiring board. A PCB populated with electronic components is a printed circuit assembly (PCA), also known as a printed circuit board assembly (PCBA). Printed Circuit Boards play a vital role here in determining the overall performance of the electronic equipment. A good PCB design ensures that the noise introduced as a result of component 62 placement and track layout is held within limits while still providing components years of assembly maintenance and performance reliability. Where and Why are PCB’s used? Printed circuits boards are used to route electric signals through copper track which are firmly bonded to an insulating base. Advantages of PCB over common wiring are: 1. PCB’s connecting are a necessary large number for of electronic components in a very small area with minimum parasitic effects. 2. PCB’s are simulated with mass production with less chance of writing error. 3. Small components are easily mounted. 4. Servicing in simplified. Base Materials used for PCB The base materials used for PCB’s are glass epoxy, epoxy paper, polyester etc. Copper foil used for copper clad is manufactured by the process of electronic deposition. Preparation of Single Sided PCB In single sided PCB conductor tracks are present on one side of copper clad board. So crossing of conductors is not allowed. It is mechanically & chemically cleansed. The photo resist is an organic solution which when exposed to light of proper wavelength, changes their solubility in developer but after exposure to light is not soluble. 63 Laminate coating of photo resist is done by: (i) Spray coating (ii) Dip coating (iii) Roller coating. The coated copper clad and laminated film negative is kept in intimate contact with each other. The assembly is exposed to UV light and is rinsed in the developer tank. Proper developer has to be used for a particular photo resist and then the PCB is dyed in a tray. The dye reveals the flux to be used for a particular photo resist. Then the PCB is dyed in a tray. FABRICATION The required circuit is designed and the layout of the circuit is done on the component side as well as the copper clad side. Spaces are provided for holes to insert the respective components. Etch resistant ink coatings are given on the interconnecting marks. ETCHING The copper clad PCB is etched with ferrous chloride solution containing a small amount of Hydro Chloric Acid for increasing activeness Ferric Chloride in of etching. Wherever the varnish coating is there the copper remains. Then it is washed with water and Oxalic Acid. The vast majority of printed circuit boards are made by bonding a layer of copper over the entire substrate, sometimes on both sides, (creating a "blank PCB") then removing unwanted copper after applying a temporary mask (e.g. by etching), leaving only the desired copper traces. A few PCBs are made by adding traces to the bare substrate (or a substrate with a very thin layer of copper) usually by a complex process of multiple electroplating steps. 64 There are three common "subtractive" methods (methods that remove copper) used for the production of printed circuit boards: 1. Silk screen printing uses etch-resistant inks to protect the copper foil. Subsequent etching removes the unwanted copper. Alternatively, the ink may be conductive, printed on a blank (non-conductive) board. The latter technique is also used in the manufacture of hybrid circuits. 2. Photoengraving uses a photomask and chemical etching to remove the copper foil from the substrate. The photomask is usually prepared with a photoplotter from data produced by a technician using CAM, or computer-aided manufacturing software. Laserprinted transparencies are typically employed for phototools; however, direct laser imaging techniques are being employed to replace phototools for high-resolution requirements. 3. PCB milling uses a two or three-axis mechanical milling system to mill away the copper foil from the substrate. A PCB milling machine (referred to as a 'PCB Prototyper') operates in a similar way to a plotter, receiving commands from the host software that control the position of the milling head in the x, y, and (if relevant) z axis. Data to drive the Prototyper is extracted from files generated in PCB design software and stored in HPGL or Gerber file format. DRILLING Holes through a PCB are typically drilled with tiny drill bits made of solid tungsten carbide. The drilling is performed by automated drilling machines with placement controlled by a drill tape or drill file. These computer-generated files are also called numerically controlled drill (NCD) files or "Excellon files". 65 The drill file describes the location and size of each drilled hole. These holes are often filled with annular rings (hollow rivets) to create vias. Vias allow the electrical and thermal connection of conductors on opposite sides of the PCB. Plating and Coating PCBs are plated with Solder, Tin, or Gold over Nickel as a resist for etching (removal) away the (unneeded after plating) underlying copper. Matte solder is usually fused to provide a better bonding surface or stripped to bare copper. Treatments, such as benzimidazolethiol, prevent surface oxidation of bare copper. The places to which components will be mounted are typically plated, because untreated bare copper oxidizes quickly, and therefore is not readily solderable. Traditionally, any exposed copper was coated with solder by hot air solder leveling (HASL). This solder was a tin-lead alloy, however new solder compounds are now used to achieve compliance with the RoHS directive in the EU and US, which restricts the use of lead. One of these lead-free compounds is SN100CL, made up of 99.3% tin, 0.7% copper, 0.05% nickel, and a nominal of 60ppm germanium. SOLDERING Soldering is the process of joining of two metals using an alloy solder consisting of Tin and Lead (Sn-Pb). Tin determines the melting whereas the Lead is used to reduce the cost. After the PCB fabrication is done, the various components are arranged at proper locations on the PCB and then the soldering is done. All liquids consist of particles which attract each other. The surface is always trying to shrink and this is because of surface tension. The principle behind soldering is that when liquid particles are brought in contact 66 with the walls of the solid surface, it may happen that the solid attracts the liquid surface. This property is called adhesive property. Care must be taken that the melting point of solder is below that of the metal so that its surface is melted without melting without the metal. NEED FOR FLUX During the soldering process the flux acts as a medium for improving the degree of melting. The basic functions of flux are mentioned below: 1. Removes oxide from the surface. 2. It transfers heat from source to the joining & provide liquid cover including air gap. 3. Removal of residue after the completion of the soldering operation. PCB LAYOUT: The layout can be done either by hand or by using PCB designing software mentioned below: • EAGLE by Cadsoft • DipTrace by Novarm • FreePCB by Allan Wright (open-source Win2K/XP) • FreeRouting by AlfonsWirtz (Java, Autorouter with free angle support) • Cadstar by Zuken • gEDA, open-source PCB software project • OrCAD by Cadence • Kicad, open-source suite • PADS by Mentor Graphics • PCB123 Design by Sunstone Circuits • Proteus Here we have used eagle software to design PCB layout 67 isp programmer 8051 isp programmer (in-system programmer) for atmel Introduction: This 8051 isp original by atmel you can found on "8051 software And technical library - april 2003" cd-rom.it small component count i design new pcb and change some component that easy to build small pcb .the new firmware was written by john samperi for at90s2313 .this code can program more devices. Specification - device support * verified device - use power supply from target board - rs-232 control at 19200 bps - support 8051 studio 4 Schematic detail The schematic for 8051 isp show in picture 1, ic1 ds275 use for rs-232 driver because it small and no need external component ic2 at90s2313 is the cpu to communication and receive command from pc that run 8051 prog to control target cpu. The wire from 8051 isp to target cpu not exceed 15 cm 68 Fig schematic of 8051 isp 69 fig component installation. this firmware compiled to run on crystal 4mhz, so the target device must connect crystal 4mhz on xtal1 and xtal2 pin. But, if your target device use internal oscillator and enabled .it not need any external oscillator. To use this 8051 isp with target device that run at 8mhz you can do this by recompile the firmware source code. Before recompile you need to change the line in source code as below .equ xtal_8mhz=0 ; if 0 change .equ then 4mhz to xtal_8mhz=1 ; if xtal : 0 then 4mhz xtal after change firmware you can compiler it by 8051asm found from atmel web site to use 8051 isp 70 Eagle pcb design software The name eagle is a shortform, which stands for easily applicable graphical layout editor. This software offers user friendly and powerful solutions for pcb design, including schematic capture, board layout and autorouter. This software is developed by cadsoft. Eagle is popular among hobbyists because of its freeware license and rich availability of component libraries on the web. Eagle has following 2 sections: Schematic capture: eagle contains a schematic editor, for designing circuit diagrams. Parts can be placed on many sheets and connected together through ports. Pcb layout: the pcb layout editor allows back annotation to the schematic and autorouting to automatically connect traces based on the connections defined in the schematic. How to use eagle software 1) create new project Start up the eagle control panel, and right-click on "projects" to create a new project. You'll get to name it whatever you want 2) create new schematic in the project 71 Once you have created the new project, it will be "opened" automatically (which doesn't do much other than tell eagle that "this is the current project".) Right click on the new project and follow the popup menus to create a new schematic. 3) find and place ("add") components Components are added to a schematic from the add dialog, which you get to by clicking the add button over on the gui menu. 4) neaten things up We can make things a bit neater by moving some of the components, junctions, and wires around just a bit using the move button. When you select an object after clicking the move button, the object gets attached to your mouse pointer and behaves like when you were adding objects with respect to the other mouse buttons. 5) re-zoom the drawing Since we have all the components added, we can use the zoom-to-fit button to fit things better in our window. 6) wiring components Now it's time to make wire between components, find "wire" to start When you finish making wire between two components, hit "escape" in the keyboard to move to the next one 7) do rule check! The button shown does an electrical rule check. It will check whether the pins designated outputs are connected to inputs, whether there are obvious missing junctions, and stuff like that. 8) fix errors and warnings When we run it on our schematics so far, we get a warning that the junction are missing. We could fix that with the name command, or just leave it as is. 9) apply component values 72 When we plopped down the components during the "add" phase, we didn't assign specific values to any of them. Some of the components have inherent values that don't need to change. But the resistors, capacitors, and diodes should all have their values filled in appropriately. Values are assigned using the "value" button. After selecting the button, click on each component near its origin (little "+" sign), and you should be presented with an opportunity to change the value. 10) transform the schematic into board After finishing and saving your schematic, now we can move to the next step which is to move to board drawing by using "board" as shown in the picture. 11) rearrange your components Use "move" and the right-button of the mouse to rearrange your circuit on the board 12) autorouter After rearranging your circuit, just go to "tools / auto" then hit "ok" The job is done Your circuit is ready, save your work as usual and print it if you want Datasheets 1. At89s51 2. Lcd 3. 7805 voltage regulator 4. 7812 voltage regulator 5. Max232 6. Pull-up resistor 7. Bc547 8. 11.0952 mhz crystal oscillator 73