ARDUINO BASED HOME AUTOMATION SYSTEM FOR DISABLED PERSONS
ARDUINO BASED HOME AUTOMATION SYSTEM FOR DISABLED PERSONS
?
?
BY
?
?
NAMES ??????????????????????????????????????????????????????????????????????INDEX NUMBER
GODWIN H. TSIKUDO ?????????????????????????????????????????????????????01180301B
?
ALEXANDER AGBAVITOR ?????????????????????????????????????????????01180393B
?
?
?
?
?
?
?
?
?
A PROJECT SUBMITTED TO THE ELECTRICAL/ELECTRONIC DEPARTMENT OF ACCRA TECHNICAL UNIVERSITY IN PARTIAL FULFILMENT OF THE REQUIREMENT FOR THE AWARD OF A BACHELOR OF TECHNOLOGY IN ELECTRICAL/ELECTRONIC ENGINEERING.
?
JUNE, 2020
CERTIFICATION
This project is submitted as part of fulfilment for the award of a Bachelor of Technology In Electrical/Electronic Engineering (BETECH) in Electrical/Electronic Engineering. The work is a result of our own investigation. All sections of the text and results which have been obtained from other works/ sources are fully referenced. We understand that cheating and plagiarism constitute a breach of Accra Technical University and will be dealt with accordingly.
?
Student’s Name and ID???????????????????????????????????????????????????????Signature and Date
GODWIN H. TSIKUDO – 01180301B????????????????????????……………………………………..
?AEXANDER AGBAVITOR – 01180393B???????????????……………………………………..
?
?
?
?
?
?
?
?
DEDICATION
We dedicate this project to the one whom by virtue of His spirit impacts strength, knowledge and understanding -Jehovah God, for seeing us through this programme successfully.
It is also dedicated to our families for their love and support, our friends for their support and suggestions.
?
?
ACKNOWLEDGEMENT
We are very grateful to the Almighty GOD for HIS provisions during our toil for the necessary knowledge required to come out successful.
We acknowledge our supervisor (Mr. Tengey Clement) and all colleagues whose selfless help and encouragement sustained our morale during our quest to achieve this feat.
May the Lord Almighty bless you and double all that you exhausted in coming to our aid.
?
?
ABSTRACT
The main objective of this project is to develop a home automation system using an Arduino board with Bluetooth being remotely controlled by any Android OS smart phone. As technology is advancing so houses are also getting smarter. Modern houses are gradually shifting from conventional switches to centralized control system, involving remote controlled switches. Presently, conventional wall switches located in different parts of the house makes it difficult for the user to go near them to operate. Even more it is difficult for the elderly or physically handicapped people to do so. Remote controlled home automation system provides the most solution with smart phones. In order to achieve this, a Bluetooth module is interfaced to the Audino board at the receiver end whiles on the transmitter end, a GUI application on the cell phone sends ON/OFF commands to the receiver where loads are connected. By touching the specified location the GUI (Graphical User Interface), the loads can be turned ON/OFF remotely through this technology.
?
?
?
?
?
?
?
?
?
TABLE OF CONTENT
CERTIFICATION…………………………………………………………………….???????i
DEDICATION…………………………………………………………………………??????ii
ACKNOWLEDGEMENT……………………………………………………………..??????iii
ABSTRACT ……………………………………………………………………………?????iv
TABLE OF CONTENT…………………………………………………………………????v
?
CHAPTER ONE: INTRODUCTION
1.1 INTRODUCTION ……………………………………………………………..???????????..?????????1??
1.2 BACKGROUND…………………………………………………………………????????2
1.3 PROBLEM STATEMENT………………………………………………………..???????2
1.4 GENERAL OBJECTIVE…………………………………………………………???????3
1.5 SPECIFIC OBJECTIVE…………………………………………………………..???????3
1.6 SCOPE OF STUDY………………………………………………………………..??????3
1.7 PROJECT SIGNIFICANCE………………………………………………………??????4
1.8 ORGANISATION OF STUDIES…………………………………………………??????5
1.9 LIMITATIONS……………………………………………………………………???????5
?
CHAPTER TWO: LITERATURE REVIEW
2.1 THE MOTOR DISABLED AND TECHNOLOGY……………………………?????????…..?????6
2.2 AUTOMATIC HAND GESTURE BASED REMOTE CONTROL FOR HOME
?????APPLIANCES …………………………………………………………………….??????7
2.3 RF BASED REMOTE CONTROL FOR HOME ELECTRICAL APPLIANCES..????10
2.4 DTMF CONTROL REMOTE APPLIANCE CONTROL SYSTEM USING MOBILE
?????PHONE………………………………………………………………………………???12
2.5 HOME AUTOMATION WITH RASPBERRY PI…………………………………???13
2.6 ADVANCED HOME AUTOMATION USING FPGA CONTROLLER………???????15
2.7 HOUSEHOLD APPLIANCE CONTROL FOR DISABLED PERSONS………??????16
2.8 REMOTE CONTROLLING OF HOME APPLIANCES USING MOBILE
??????TELEPHONY………………………………………………………………………????17
2.9 HOME APPLIANCE CONTROL FOR USERS WITH MOTOR DISABILITIES USING
?????SMART PHONE……………………………………………………………………?????19
2.10 CONTROLLING HOME APPLIANCES THROUGH VOICE COMMAND…?????21
2.11 SMS BASED WIRELESS HOME AUTOMATION CONTROL SYSTEM……?????23
2.12 HOME AUTOMATION CONTROL SYSTEM USING PC AND
MICROCONTROLLER ……………………………………………………………..????????24
CHAPTER THREE: DESIGN CONSIDERATION
?3.0 INTRODUCTION ……………………………………………………………..??????????26
?3.1 SMART PHONE OS ……………………………………………………………????????26
3.2 WIRELESS COMMUNICATION MODULE …………………………………?????????31
3.3 CONTROL CIRCUIT ……………………………………………………………???????37
3.4 LOAD DRIVERS………………………………………………………………….??????42
3.5 INFORMATION CENTRE…………………………………………………………????46
3.6 POWER SUPPLY……………………………………………………………………???50
?
CHAPTER FOUR: PROPOSED DESIGN AND SIMULATION
4.1 OVERVIEW ………………………………………………………………………..????52
4.2 HIGH LEVEL BLOCK DIAGRAM ……………………………………………..??????53
4.3 DIAGRAM DESCRIPTION ………………………………………………………?????53
4.4 CONTROL OF SINGLE SIGNAL DEVICES (LIGHT LOADS) ……………….?????57
4.5 CONTROL OF REGULATORY LOADS (FAN) …………………………………???57
?
?
?
CHAPTER FIVE: RESULTS AND DISCUSSION
5.1 SOFTWARE ………………………………………………………………………??????61
5.2 HARDWARE ………………………………………………………………………????63
5.3 STRENGTHS, WEAKNESSES AND CHALLENGES …………………………..????64
?
CHAPTER SIX: CONCLUSION AND RECOMMENDATION
6.1 CONCLUSION ……………………………………………………………………?????65
6.2 RECOMMENDATIONS ………………………………………………………….??????65
?????REFERENCES ……………………………………………………………………..????66
?????APPENDIXES ……………………………………………………………………..?????68
?????
?
?
?
?
?
?
?
?
LIST OF FIGURES
Figure 2.1- Work flow of the system ……………………………………………………????8
Figure 2.2- Flowchart of IR controlled devices …………………………………………???9
Figure 2.3 Input RF Remote Control Chart For Home Electricals Appliances …………????11
Figure 2.4 Output RF Remote Control Chart For Home Electricals Appliances …………. 11
Figure 2.5- Block diagram of DTMF remote controlled appliances……………………??????12
Figure 2.6- Home Automation With Raspberry Pi ………………………………………???14
Figure 2.7- Block Diagram Of?Proposed System?…………………………………….??????15
Figure 2.8- Household Appliances Control????……………………………………………??16
Figure 2.9- Remote Control of Home Appliances Using Mobile Telephony ……………???18
Figure 2.10- Home Appliances Control for Users With Motor Disability
???????????????????Using Smart Phones………………………………………………………….??20
Figure 2.11- Controlling Home Appliances through Voice Command…………………?????21
Figure 2.12- SMS Based Wireless Home Automation Control System ………………….??23
Figure 2.13- Home Automation Control System Using PC and Microcontroller ………????25
Figure 3.1-Components of Android OS ………………………………………………???????28
Figure 3.2- Lifecycle of an activity in Android OS ……………………………………?????29
Figure 3.4- Key objects in iOS app …………………………………………………….??????30
Figure 3.3- SIM900 ……………………………………………………………………??????32
Figure3.4- Bluetooth module ……………………………………………………………????34
Figure 3.5- RF transmitter/receiver module …………………………………………….????36
Figure 3.6 - Encoder/Decoder pair ………………………………………………………???36
Figure 3.7 - Arduino Uno board …………………………………………………………???38
Figure 3.8- PIC Chip ……………………………………………………………………????40
Figure 3.9- MSP430 ……………………………………………………………………?????41
Figure 3.10??…………………………………………………………………………….????44
Figure 3.12- Solid State Relay ………………………………………………………?????????46
Figure 3.13 - Raspberry Pi …………………………………………………………….??????48
Figure 3.14 - AC-DC Adaptor ……………………………………………………….???????51
Figure 4.1- High Level Block Diagram ………………………………………………???????53
Figure 4.2 – Schematic (Proteus)………………………………………………………??????55
Figure 4.3- Virtual Terminal Used Interface For Communicating With Microcontroller….?55
Figure 4.4- Controlling of loads with load 1(light) on ……………………………………?56
Figure 4.5- Speed Control of Motor Loads (Fan)………………………………………?????56
Figure 4.6- Basic Brushed DC Motor Equivalent Circuit ….……………………………???58
Figure 4.7 – DC Motor Equivalent circuit at Rest (or low speed)………………………?????58
Fig 4.8- DC Motor Control Graph………………………………………………………?????59
Figure 4.9- Motor Current with two different PWMs…………………………………???????60
Figure 5.2 - Android app………………………………………………………………???????61
Figure 5.2 – Communication Mode…………………………………………………… ??????62
Figure 5.3- PC Program …………………………………………………………….. ?????????63
Figure 5.4- Final Hardware Implementation ………………………………………..??????????64
?
?
?
?
?
?
?
?
?
?
?
?
CHAPTER ONE
GENERAL INTRODUCTION
1.1 INTRODUCTION
Wastage of electricity is one of the main problems which we are facing now a days. Sometimes we waste power while we forget to turn off the switches of lights, fans, AC, etc. of our house. It happens as we are unconscious or in a hurry while leaving home or office. In our day to day life, we interact with motor disabled or challenged people. These people depend on others, dominantly their friends and family members, to do their simplest of jobs. In that light, the operation of household loads is a herculean task for them. This ultimately leads to a drastic reduction in level of self-confidence, positivity, undependability and making them feel weak.
Many at times, these people are treated as burdens to the society, creating adverse feeling within them. In order to make them feel independent, comfortable and increase their self-confidence to a certain extent, we present this project. We have proposed the real-time implementations of controlling household loads, using a smartphone via GSM and Bluetooth interfaced with a microcontroller.
This paper presents the implementation of an automated system with the help of a GSM which includes microcontroller in it controlled by a user friendly interface and also says how touch screen mobile phone is helpful for a motor disabled user. So a smart phone is provided to a user interfaced with a GSM.
?
?
1.2 BACKGROUND OF THE STUDY
Home automation system is characterized by the ability of the system to perform tasks to initiate or control appliances or devices in the home. Now a days, the appliances available on the market is getting increased as days pass. Thus, the controlling of such devices is getting more and more attention. From a long time ago, the controlling was done manually, such as walking to the switch and turning it ON but as time passed, the arrival of remote control that gives the user an alternative way to control such appliances without the need for the user to walk to the appliance.
From the above, there are some more advancements in the controlling methods that are being researched on. The advancement is using of the voice to act as the controlling medium to initiate or to control the appliance.
?
1.3 PROBLEM STATEMENT
In our various activities and localities, we have a proportion of people being motor challenged. These individuals with motor disabilities need external help to access and operate electrical and electronic gadgets. With the upward surge in the improvement of technology, it is possible to remotely control loads at home.
This project involves the use of technological advancement for the betterment of the life of motor disabled people. A review of the various methods of making an automated remote control of household load has been provided in this piece. The piece ends with the implementation of the automatic control of the household for individuals with motor disabilities using mobile device with a microcontroller (Arduino).
1.4 GENERAL OBJECTIVE
Design and implement an economical and user friendly home automation system.
?
1.5 SPECIFIC OBJECTIVE
·????????To design home automation systems for people or persons with motor disabilities using a GSM enabled smartphone interfaced with a microcontroller.
·????????To construct a prototype of the designed circuit.
·????????To test the circuit for performance issues.
?
1.6 SCOPE OF STUDY
HOME APPLIANCE- The home appliance industry, which includes electrical devices used in a household – is a multi-billion-dollar industry, as the?consumption of household appliances worldwide?is forecast to generate nearly 590 billion U.S. dollars in revenues by 2020.?Shipment of home appliances?worldwide is projected to increase from 583 million units in 2013 to 700 million units by 2017. Leading companies of this industry include the Chinese?Haier Electronics Group, the U.S.-based Whirlpool, the German Bosch and Siemens Group, the Swedish company Electrolux, and the South Korean multinational giant?LG Electronics.
The home appliance industry is divided into two sectors:?major domestic appliances?and small domestic appliances. The first category includes large machines used at home, freezers, stoves, washing machines are examples of large or major home appliances. The second category,?small domestic appliances, includes products such as food processors, toasters and coffee makers, to name a few. Sales of small domestic appliances worldwide amounted to around 70 billion U.S. dollars in 2015.
A growing and promising sub-market within the home appliance industry is the smart appliance market. According to a survey about?connected devices, survey respondents are most likely to use smart appliances in the coming years. Forecasts show that the?value of the smart appliances market?is set to increase from 509 million U.S. dollars to about 26.15 billion U.S. dollars by 2019. In line with these figures, the?installed base of connected things in smart homes?is also projected to increase from an estimate of 174.3 million in 2015 to just over a billion by 2018. Asia Pacific is expected to lead the global market, accounting for 35 percent of the smart appliance global market share by 2020. Europe is projected to hold 30 percent of the market share, closely followed by North America, with an estimated share of 27 percent in the same year.?
?
1.7 PROJECT SIGNIFICANCE
·????????Home automation makes life more relaxed for people.
·????????With home automation, equipment and other electric powered gadgets such as home appliances and lighting can be controlled instantly and remotely.
·????????Home automation can be cost effective since there are wide range of price levels and does not just have to be an aspect of high community lifestyle.
·????????Electricity conservation can be achieved through home automation.
·????????A single home automation system can manage everything in the home and adding more items to the system would not be a problem since it can consist of another management.
?
1.8 ORGANISATION OF STUDIES
The introduction, aim of work and objectives are captured in chapter one.
Chapter two talks about the literature review.
The chapter three talks about the design consideration.
In the chapter four, we have proposed design and simulation.
Results and discussions are also capture in the chapter five.
The last chapter which is chapter six talks about the conclusion and recommendations and also references.
?
1.9 LIMITATIONS
The project work is complete on its own remotely, and automatically switching ON and OFF any electrical appliance is not limited to household appliances and sends a feedback message indicating the new present state of the appliance. It does not implement control of multiple appliances or automatic detection of faults in the controlled appliance.
??
?
?
?
?
?
?
CHAPTER TWO
LITERATURE REVIEW
?
2.1 THE MOTOR DISABLED AND TECHNOLOGY
MOTOR DISABLED- Motor disability is the partial or total loss of function of a body part, usually limb or limbs. This may result in muscle weakness, poor stamina, and lack of muscle control or total paralysis. Motor disability is often evident in neurological conditions such as cerebral palsy, Parkinson’s disease, stroke and multiple sclerosis.
With regards to disability statistics, the challenge presented is to shift from the impairment-based, dichotomous dependent variable (disabled vs. non-disabled, eventually also activity based questions with the same purpose), to a continuous dependent variable based on activity limitations (and restrictions in social participation). In the studies on living conditions carried out in Southern Africa, a matrix based on 44 daily activities in 9 categories (sensory experiences, basic learning and applying knowledge, communication, mobility, self-care, domestic life, interpersonal behaviors, major life areas and community, social and civic life) was constructed. This matrix measured:
-?????????An individual's capacity or level of functioning (without assistance) - or activity limitations and
-?????????An individual’s level of performance in their current or usual environment (i.e. where they normally are: at home, at school or at work) - or participation restrictions.
In the Malawi study Loeb & Eide 2004), this matrix was applied to individuals with disabilities and a sub-population of non-disabled. For each of the 44 activities, the degree to which an individual was capable of carrying out the activity without assistance (perceived activity limitation) was recorded on a scale from (0) no difficulty to (4) unable to carry out the activity. In the same manner the person’s performance in their current environment (perceived degree of participation restriction) was also recorded on a scale from (0) no problem to (4) unable to perform the activity. Based on recorded observations for each of the 44 items a single activity limitation score and participation restriction score was developed as the sum of all 44 items (maximum possible score 176). A histogram showing the distribution along an activity limitation scale was produced and is shown in Figure 3.
?
2.2 AUTOMATIC HAND GESTURE BASED REMOTE CONTROL FOR HOME APPLIANCES
Four students from the Savitribai Phule Pune University, India developed a way of controlling home appliances using hand gestures. Their project presented an accelerometer based on hand gesture recognition algorithm which is used to control electronic/electrical devices. The hardware module consisted of an accelerometer, microcontroller, infrared transmission module for sensing and collecting acceleration of hand motions. Infrared devices were controlled using hand gestures.
Fig 2.1- Work flow of the system
?
1)?????????Accelerometer: It is used for making the gestures. Gestures made are up, down, left, right. It basically operates in tri-axial mode but for convenience we are just considering the 2 axes.?
2)?????????IR?transmitter?and?PIC (Peripheral Interface Controller)?microcontroller?16F :?The?data?to?be?transmitted?is?given?to?micro-controller through accelerometer. Then the data is converted into digital form with the help of inbuilt A/D Converter present in micro-controller. The digitized data is then transmitted through IR LEDs.?
3)?????????Bluetooth module:?In this, the commands for controlling the device is given through the mobile/smart-phone. The Bluetooth module at the receiver then accordingly controls it. The devices which are to be controlled by the Bluetooth are bulb and fan.?
4)?????????IR receiver and PIC24F: In the receiver section, IR signals are detected by IR receiver module. PIC24F is SFM which has 4 UARTs (Universal Asynchronous Receiver Transmitter), of which first is used to control the devices using Bluetooth, second is for fan and the third is for bulb. Based on the hand gestures made at the transmitter, the devices (bulb and fan) connected at the receiver are controlled.?
Fig. 2.2- Flowchart of IR controlled devices
?
Comments:
Due to the very sensitive nature of the accelerometer, the system may take a gesture in the wrong way. This system also requires processing of much information which may cause the application to freeze up or operate too slowly due to overloading of the device. The IR transmitter used in this project has a distance limit controlling devices and also receivers must be almost directly align to communicate.
?
2.3 RF BASED REMOTE CONTROL FOR HOME ELECTRICAL APPLIANCES
This work was published by a student from the Dibrugarh University – India. In this project home appliances were controlled through RF based remote control system. From any place without any line of sight around the house, RF based wireless remote control system can change the state of the electrical appliances either in on or off state.
The controlling circuit was built around RF transmitter and RF receiver modules which are operating at 434MHz along with ICHT12E and decoder ICHT12D with few passive components. The four different channels at the encoder are used as input switches and the four channels at the decoder output are connected to the appliances through a relay. The transmission technique used is amplitude shift keying (ASK).
?
Fig 2.3: Input RF Remote Control Chart for Home Electricals Appliances
?
Fig 2.4: Output RF Remote Control Chart for Home Electricals Appliances
?
Comments:
This system is simple and easy to implement with no programming language involved, however it has limited coverage range. The system is also not flexible since the addition of new appliances means changing the whole hardware.
?
2.4 DTMF Control Remote Appliance Control System Using Mobile Phone
The Journal of Applied Research on October 2013 presented another way of remotely controlling appliances using Dual Tone Multiple Frequency (DTMF) technology. In this system, a cellular phone based home/office appliance controller was built for controlling arbitrary devices. This included a mobile phone which is connected to the system via headset. To activate the mobile phone unit on the system, a call is made and as the call is answered (auto answer mode), in response the user enters password to access the system to control the devices. As the caller presses specific button on the keypad, it results in turning on or off the specific device and the device switching is achieved by relays.
Working:
When a key is pressed the other person hears some tones with respect to the keys pressed. This tones are based on the DTMF technology. Data is transmitted in terms of pair of tones. The
??????????????????Figure 2.5- Block diagram of DTMF remote controlled appliances
Receiver detects the valid pair and gives appropriate BCD code as the output of the DTMF decoder IC. 12 signals are possible due to the 12 keys on the mobile keypad. The decoder outputs are then given to D flip-flops. The output toggle whenever a key is pressed. This signals relays to perform appropriate switching.
?
Comments:
This approach eliminates the short range coverage problem posed by the RF control method however the number of controllable appliances is limited by the number of keys on the users mobile phone.
?
2.5 HOME AUTOMATION WITH RASPBERRY PI
The International Journal of Innovative and Emerging Research in Engineering published this project work in 2015. The Raspberry Pi is a credit-card-sized single-board computer developed in the UK by the Raspberry Pi Foundation with the intention of promoting the teaching of basic computer science in schools.
The Raspberry Pi has a Broadcom BCM2835 system on a chip, which includes an ARM1176JZF-S 700 MHz , Video Core IV GPU, and was originally shipped with 256 megabytes of RAM, later upgraded to 512 MB. It does not include a built-in hard disk or solid-state drive, but uses an SD card for booting and long term storage.
?
Figure 2.6: Home Automation With Raspberry Pi
?The figure above shows the basic block diagram of the system. With the help of this system we can monitored and controlled the various equipment that are connected to the relay circuit via the input from raspberry pi model as well as from the WEBIOPI. Whenever the system is turned on, the current lighting data of the home are read and written to the data base and then transferred to the user interface. So, one can easily know the current situation of rooms and change in the state of the lights.
?
Comments:
Even though the use of the raspberry pi makes this system powerful, it also make it susceptible to internet hacks. The PC used as the interface for controlling the appliances doesn’t make it portable and hence not disability friendly.
?
2.6 ADVANCED HOME AUTOMATION USING FPGA CONTROLLER
The International Journal of Advanced Research in Computer and Communication Engineering on 7, July 2013, published a work on home automation using the above stated technique. This project was implemented using an android mobile phone having a Bluetooth interface, a pic microcontroller, a Field Programmable Gate Array (FPGA) controller, that communicates via the RS-232 protocol to the Bluetooth interface and a number of devices connected to the central controller. These devices are then controlled using the bluetooth and mobile devices through speech recognition application.
?
Figure 2.7- Block Diagram of Proposed System?
?
The PIC Microcontroller is used to receive the data from the Bluetooth receiver serially. The data received is converted to digital form using the PIC Microcontroller and the data is transmitted parallely to the FPGA controller. The number of control and monitoring devices attached to the FPGA depend on the number of free input/output ports available on the FPGA. The implemented system uses the parallel communication so that the speed is increased. The devices are directly connected to the FPGA Controller and are controlled using the speech recognition technique.
Comments
The parallel operation of the FPGA increases the processing speed of the system but also makes the system bulky. Interfacing the Bluetooth module with the PIC microcontroller require accurate clocking for the UART to interpret the received data correctly, which makes the implementation of this system difficult. However Arduino or any of the MSP430 family of microntrollers could have been used in place of the pic and FPGA controllers, this will make the implementation easy and less costly.
?
2.7 HOUSEHOLD APPLIANCE CONTROL FOR DISABLED PERSONS
This work was presented by a student from the University of Khartoum in September 2012. Their aim was to design a universal remote control for disabled persons at a cheap cost.
Figure 2.8- Household Appliances Control????
The figure above shows the overall design of the project. The first microcontroller is the transmitting unit, it is connected with keypad which its buttons are pressed according to the receiver device that must be operated, the transmitter generates the command which is multiplied by a carrier (modulation) and then sent using the IR led. The IR receptor captures the command and sends it to the microcontroller in the receiving side which performs the required action in the application device.
?
Comments:
The system is less costly and easy to implement. The transmitter and receiver should be directly aligned due to the use of the IR.
According to the student the IR detector used could receive IR radiation from a distance of 20cm, which is a limitation on the coverage area of this system.
?
2.8 REMOTE CONTROLLING OF HOME APPLIANCES USING MOBILE TELEPHONY
International Journal of Smart Home published this work in July 2008. This work presented another way of home appliance control which uses the X10 technology.
?X10 is a communications protocol, similar to network protocols such as TCP/IP. However, X10 works across home power lines. Like a broadcast network, every command is sent through every wire in the house; it’s up to each individual device to decide whether it needs to respond to a particular command.
With X10, a wide variety of devices can talk to each other and also with the computer. CM15A, a 2-way PC interface is at the other end of the communication hop from the computer. A typical X10 automation system consists of a transceiver module and several receiver modules. The transceiver that can transmit command and receive status of a receiver mainly interfaces with PC or micro-controller through USB or Serial port and communicates with the receiver modules through the home power line. The receiver modules are our mail home appliance device like light, fan, heater, water sensor, security sensors etc. They receive commands from X10 transceivers and act according to the command.
Figure 2.9- Remote Control of Home Appliances Using Mobile Telephony
?
Comments:
No extra wiring for controlling appliances since the appliances are controlled through the power lines.
This system is unreliable since power lines are noisy causing loss of commands. It is also difficult to install.
?
2.9 HOME APPLIANCE CONTROL FOR USERS WITH MOTOR DISABILITIES USING SMART PHONE
This project was published in the International Journal of Innovative Research in Advanced Engineering (IJIRAE) in July 2014.
The?system?architecture?shows?the?interaction?between?an?android?touch?screen?mobile?phone,?PC?(Virtual?home),?8051 Microcontroller Kit, GSM, relay and electronic appliances. PC and mobile phone interact via wireless connection, in turn connected to GSM, Microcontroller, relays and then gadget is through cables. The Virtual home gives an illusion of electronic appliances in a typical home in the form of buttons which changes its state upon touch on the icons present in the application installed on the mobile
?
?
?
?
?
?
?
?
?
Figure 2.10- Home appliances control for users with motor disability using Smart Phones
?
Comments:
This system has a wide coverage area due to the use of GSM. It is easy to use due to the user friendly mobile interface. It is costly due to SMS used a medium of communication.
?
?
?
?
?
?
2.10 CONTROLLING HOME APPLIANCES THROUGH VOICE COMMAND
Figure 2.11- Controlling Home Appliances through Voice Command
?
The block diagram of proposed model is shown above. It works in a way that the user with a specific cell number can make a call through GSM technology.?System receives the call and performs the respective action as instructed by the user such as controlling the light through relay based circuit. System also sends the voice message to the preconfigured cell number to tell the status of appliances or if it finds any kind of intrusion at home.?
USB voice GSM modem is used to send the return voice message to preconfigured number.
A relay based circuit is used to control the appliances this circuit is attached with system through DB-23 male parallel port [9].
Two relays are used to control two appliances but as there are eight data pins of parallel port so relays can be increased to control up to eight appliances. 12 volt adapter is used to give voltage to relay. An IC ULN2803 is used to interface the relay with parallel port. This application is developed in .Net framework using the language C#. Microsoft speech SDK 5.0 is used for speech reorganization purpose.?
This application has three main parts. One is to understand the speech or the voice of user. This is done through speech reorganization engine. There are many speech reorganization engines available but here Microsoft speech SDK5.1 is used. Second is to control the appliances according to the user demand. This can be done through relay based circuit that is attached with computer through parallel port. And third is to sense the intrusion in the home and sends voice message to preconfigured number. This can be done through sensors attach to the system with parallel port and AT commands respectively.
User from anywhere being GSM available can make a call to system to check the status of appliances or control them. System in return checks the authenticity of the number and if it is from the preconfigured number then it follows the instruction otherwise it discard the call. As computer receives a call timer starts and it automatically discard the call after few seconds. The voice is understood by the Microsoft speech reorganization engine that is installed in the system. If the command is about changing the status of appliances it passes the signal to parallel port to follow the instruction like turn the appliances on or off. This can be done through relay based circuit. If command is to check the status of appliances the system returns the voice message to preconfigured number using AT Commands telling the status of appliance
?
Comments:
It is very simple to construct since it employs simple programming language. It is cost effective since it doesn’t employ the use of the internet. It also has a high security because detection of intrusion is easy.
2.11 SMS BASED WIRELESS HOME AUTOMATION CONTROL SYSTEM
This project mainly focused on the control of home appliances remotely and providing security when the user is away from the place. The system is SMS based and uses wireless technology to revolutionize the standards of living.
BLOCK DIAGRAM
?
?
PC
?
RS232
?
GSM Modem
Remote User M
o
bile
Device
RF
?
HACS System
Appliance Co
n
trol
System
Security System
Figure 2.12- SMS Based Wireless Home Automation Control System
PC: PC being the main module has HACS system installed on it. The two subsystems; one being appliances control is responsible for easy access of appliances and the second subsystem being security alert is responsible for security intrusion detection. Both subsystems work on GSM technology for transmission of instructions from sender to receiver.
GSM Modem: GSM modem is a plug and play device and is attached to the PC which then communicates with the PC via RS232 port. GSM modem is a bridge responsible for enabling/disabling of SMS capability.
Cell Phone: Mobile device communicates with the GSM Modem via radio waves. The mode of communication is wireless and mechanism works on the GSM technology. Cell phone has a SIM card and a GSM subscription. This cell phone number is configured on the system. User transmits instructions via SMS and the system takes action against those instructions.
Comments:
Security is very high since the system took no action against the instructions received from unauthorized number.
The system can be used to control appliances from a remote distance due to the sms based technology.
2.12 HOME AUTOMATION CONTROL SYSTEM USING PC AND
?MICROCONTROLLER
In this paper, the main point that is discussed is regarding the automatic control of home appliances (On/Off) with the help of computer and microcontroller(8951).This is a wired system and every appliance must be connected with the help of cables. The other modules which are used in order to accomplish our desired goal are Dallas Timer, Relays, ULN, MAX232, Keil cross compiler, flash magic and power supply circuit.
Figure 2.13- Home Automation Control System Using PC and Microcontroller
COMMENTS
?2.13 ADVANTAGES
i.??????We can save electricity whenever there is no need.
ii.?????Full security because we require specific codes in order to access the appliances.
iii.???A predefined time when to On/Off the appliance can be given well in advance.
2.14 DISADVANTAGES
If the output ports are more than 8, we should require combining of 2 microcontrollers.
CHAPTER THREE
?METHODOLOGY
3.0 INTRODUCTION
In order to efficiently control appliances remotely the prototype must perform these basic functions
·????????Accept information from user through a mobile interface [Smart Phone]
·????????Communicate with mobile device through a wireless medium [Wireless Communication Module].
·????????Process received information [Control Circuit].
·????????Interface with Appliances [Load Drivers]
·????????Have an information center for feedback [Home Information Center]
·????????Have appropriate source of power [power supply circuit]
3.1 SMART PHONE OS
A smart phone is a mobile phone with an advanced operating system which combines features of a personal computer operating system with other features useful for mobile or handheld use.
For effective implementation of the system, the smartphone interface should:
·????????Be based on an OS which is commonly used and easily programmable.
·????????Should abstract the system’s operation with single soft touches.
·????????Should be easy to use
Below are some of the available smartphone operating systems and a summary of their operation and performance;
3.1.1 ANDROID OS
Android?mobile operating system?was developed by?Google, based on the?Linux kernel?and designed primarily for touchscreen?mobile devices such as?smartphones?and?tablets. Android's?user interface?is mainly based on?direct manipulation, using touch gestures that loosely correspond to real-world actions, such as swiping, tapping and pinching, to manipulate on-screen objects, along with a?virtual keyboard?for text input.
Android's?source code?is released by Google under?open source?licenses, although most Android devices ultimately ship with a combination of open source and proprietary software, including proprietary software required for accessing Google services.?Android is popular with technology companies that require a ready-made, low-cost and customizable operating system for?high-tech?devices.
Figure 2.13- Components of Android OS
It is also worth to mention that in systems with limited resources it is very difficult to provide multitasking that is why Android manages application being ran in different way as it is in typical computer systems. Part of the process like application checking emails or providing constant synchronization can work in background.?
However,?applications?having?their?own window (ex. games) when are escaped by the user (ex. the incoming call arrive or another application?is?ran)?are?paused?(not?closed)?and?put?on?a?special?stack?remaining?in?the memory.?
If?the?system?“decides”?it?is?necessary?to?have?more?space?it?can?close?the application?from?the?memory. So?it?is?important to?know?in?which?state?the?application ?is. Android introduced a term “activity”. Application can have zero, one or many activities which main aim is to interact with the user. An activity can have one out of several specified states at one time. Providing handling the activity through all the states properly is a crucial aspect of developing a stable application. The figure below shows the lifecycle of an activity and stages it goes through from its start until it ends.
Figure 3.1- Lifecycle of an activity in Android OS
3.1.2 iOS
iOS?(formerly?iPhone OS) is a?mobile operating system?created and developed by?Apple Inc.?exclusively for?its hardware. It is the operating system that presently powers many of the company's mobile devices, including the?iPhone,?iPad, and?iPod touch. It is the second most popular mobile operating system globally after?Android?by sales. iPad tablets are also the second most popular, by sales, against Android since 2013, when Android tablet sales increased by 127%.
The iOS?user interface?is based upon?direct manipulation, using?multi-touch?gestures. Interface control elements consist of sliders, switches, and buttons. Interaction with the OS includes gestures such as?swipe,?tap,?pinch, and?reverse pinch, all of which have specific definitions within the context of the iOS operating system and its multi-touch interface. Internal accelerometers?are used by some applications to respond to shaking the device (one common result is the?undo?command) or rotating it in?three dimensions?(one common result is switching between portrait and landscape mode).
The structure of an iOS app is based on the model-view-controller?architecture. This pattern separates the app’s data and business logic from the visual presentation of that data. This architecture is crucial to creating apps that can run on different devices with different screen sizes.
Figure 3.2- Key objects in iOS app
v?Android OS was selected for the implementation of the prototype because it is free and is based on open source license, also Android has a large community of developers which makes android programming feasible.
3.2 WIRELESS COMMUNICATION MODULE
This module basically sends information from the mobile device to the control circuit wirelessly.
The device to implement this module should meet the following minimum requirements.
?3.2.1 GSM SIM900
The SIM900 is a complete Quad-band GSM/GPRS solution in a SMT module which can be embedded in the customer applications. Featuring an industry-standard interface, the SIM900 delivers GSM/GPRS 850/900/1800/1900MHz performance for voice, SMS, Data, and Fax in a small form factor and with low power consumption. With a tiny configuration of 24mm x 24mm x 3 mm, SIM900 can fit almost all the space requirements in your M2M application, especially for slim and compact demand of design.
The GSM module is used to establish communication between computer and a GSM-GPRS system. The Global System for Mobile Communication (GSM) is an architecture used for mobile communication in most of the countries.
Figure 3.3- SIM900
GENERAL FEATURES
INTERFACES
?3.2.2 HC-06 BLUETOOTH MODULE
This Bluetooth module can easily achieve serial wireless data transmission. Its operating frequency is among the most popular 2.4GHz ISM frequency band (i.e. Industrial, scientific and medical). It adopts Bluetooth 2.0+EDR standard. In Bluetooth 2.0, signal transmit time of different devices stands at a 0.5 seconds interval so that the workload of Bluetooth chip can be reduced substantially and more sleeping time can be saved for Bluetooth. This module is set with serial interface, which is easy to use and simplifies the overall design/development cycle.
Figure 3.4- Bluetooth module
FEATURE
1.?????Bluetooth protocol:?Bluetooth Specification v2.0+EDR
2.?????Frequency:?2.4GHz ISM band
3.?????Modulation:?GFSK(Gaussian Frequency Shift Keying)
4.?????Emission power:?≤4dBm, Class 2
5.?????Sensitivity:?≤-84dBm at 0.1% BER
6.?????Speed: Asynchronous:?2.1Mbps(Max) / 160 kbps, Synchronous: 1Mbps/1Mbps
7.?????Security:?Authentication and encryption
8.?????Profiles:?Bluetooth serial port
9.?????Power supply: +3.3VDC 50Ma
10.?Working temperature: -20 ~ +75 Centigrade
11.?Dimension: 26.9mm x 13mm x 2.2 mm
3.2.3 RF TRANSMITTER/RECEIVER MODULE
An?RF module?(radio frequency module) is a (usually) small electronic device used to transmit and/or receive radio signals between two devices. RF based wireless remote control system can change the state of the electrical appliances either in on state or off state.?The controlling circuit is built around RF transmitter and RF Receiver modules which are operating at 434 MHz along with encoder IC HT12E and decoder IC HT12D with few passive components. The modulation technique at the transmitter follows ASK (amplitude shift keying) which is operating at 434MHz. The input data pin at the transmitter module accepts data serially and transmits it through Radio frequency which is again picked up by the receiver module placed at a distance. The HT12E is a 1212 series encoder IC for remote control applications. By using the paired HT12E encoder and HT12D decoder we can easily transmit and receive 12 bit parallel data divided into 8 address bits and 4 data bits. By using these address pins we can provide 8 bit security code for data transmission and multiple (28 = 256) receivers may be addressed using same transmitter.
Figure 3.5- RF transmitter/receiver module
Figure 3.6 - Encoder/Decoder pair
v?For this project the GSM sim900 was selected for long-distant communication between the user’s hand device and the control unit, Bluetooth for short-distant communication and RF for communication between control unit and the load drivers.
3.3 CONTROL CIRCUIT
Any automatic system requires an intelligent chip that controls the system components. This circuit interprets received signals and sends appropriate signal for appliance control. The control circuit used should meet the following minimum requirements:
·????????Reliability
·????????Relatively fast processing response
·????????Cost effectiveness
·????????Consume minimal power
There are a number of control circuits available on the market but we considered three (3) of them since they were popular and were frequently used, thus allowing us to make informed decisions based on user reviews. Below are the control circuits which were considered for this project;
3.3.1 The Arduino Control Circuit
Arduino is an open-source electronics platform based on easy-to-use hardware and software. Arduino boards are able to read inputs - light on a sensor, a finger on a button, or a Twitter message - and turn it into an output - activating a motor, turning on an LED, publishing something online. You can tell your board what to do by sending a set of instructions to the microcontroller on the board. To do so you use the Arduino programming language (based on Wiring), and the Arduino Software (IDE), based on Processing.
Over the years Arduino has been the brain of thousands of projects, from everyday objects to complex scientific instruments. A worldwide community of makers - students, hobbyists, artists, programmers, and professionals - has gathered around this open-source platform, their contributions have added up to an incredible amount of accessible knowledge that can be of great help to novices and experts alike.
The boards feature 21 serial communications interfaces, including USB on some models, for loading programs from personal computers. For programming the microcontrollers, the Arduino project provides an integrated development environment (IDE) based on the Processing project, which includes support for the C and C++ programming languages.??The Arduino board exposes most of the microcontroller's?I/O?pins?for?use?by?other?circuits?and?current?Uno?version?provides?14 digital?I/O?pins,?six?of?which?can?produce?pulse-width?modulated?signals,?and?six?analog inputs, which can also be used as six digital I/O pins.
Figure 3.7 - Arduino Uno?board
3.3.2 Pic Micro-Controller
This?is?a?family?of?modified?Harvard?architecture?microcontrollers ?made?by?Microchip Technology,?derived?from?the?PIC1650?originally?developed?by?General?Instrument's
Microelectronics Division.?Early models of PIC had read-only memory (ROM) or field programmable EPROM for program storage, some with provision for erasing memory.?All current models use Flash memory for program storage, and newer models allow the PIC to reprogram itself.
Program memory and data memory are separated. Data memory is 8 -bit, 16-bit and in latest models, 32-bit wide. The hardware capabilities of PIC devices range from 8-pin DIP chips up to 100-pin SMD chips, with discrete I/O pins, ADC and DAC modules, and communications ports such as UART, I2C, CAN, and even USB [21].
PIC devices generally feature:
v?Flash memory (program memory, programmed using MPLAB devices)
v?SRAM (data memory)
v?EEPROM memory (programmable at run-time)
v?Sleep mode (power savings)
v?Watchdog timer
v?Various crystal or RC oscillator configurations, or an external clock
Figure 3.8- PIC Chip
?3.3.3MSP430
The MSP430 is a mixed-signal microcontroller family from Texas Instruments. Built around a 16-bit CPU, the MSP430 is designed for low cost and, specifically, low power consumption[1] embedded applications.
The MSP430 can be used for low powered embedded devices. The current drawn in idle mode can be less than 1 μA. The top CPU speed is 25 MHz. It can be throttled back for lower power consumption. The MSP430 also uses six different low-power modes, which can disable unneeded clocks and CPU. Additionally, the MSP430 is capable of wake-up times below 1 microsecond, allowing the microcontroller to stay in sleep mode longer, minimizing its average current consumption. The device comes in a variety of configurations featuring the usual peripherals: internal oscillator, timer including PWM, watchdog, USART, SPI, I2C, 10/12/14/16/24-bit ADCs, and brownout reset circuitry. Some less usual peripheral options include comparators (that can be used with the timers to do simple ADC), on-chip op-amps for signal conditioning, 12-bit DAC, LCD driver, hardware multiplier, USB, and DMA for ADC results. Apart from some older EPROM (MSP430E3xx) and high volume mask ROM (MSP430Cxxx) versions, all of the devices are in-system programmable via JTAG (full four-wire or Spy-Bi-Wire) or a built in bootstrap loader (BSL) using UART such as RS232, or USB on devices with USB support.
Figure 3.9- MSP430
The Arduino control circuit was selected for the implementation of the prototype because of the following reasons:
v?Inexpensive - Arduino boards are relatively inexpensive compared to other microcontroller platforms. The least expensive version of the Arduino module can be assembled by hand, and even the pre-assembled Arduino modules cost less than $50
v?Cross-platform - The Arduino Software (IDE) runs on Windows, Macintosh OSX, and Linux operating systems. Most microcontroller systems are limited to Windows.
v?Simple, clear programming environment - The Arduino Software (IDE) is easy-to-use for beginners, yet flexible enough for advanced users to take advantage of as well. For teachers, it's conveniently based on the Processing programming environment, so students learning to program in that environment will be familiar with how the Arduino IDE works.
v?Open source and extensible software - The Arduino software is published as open source tools, available for extension by experienced programmers. The language can be expanded through C++ libraries, and people wanting to understand the technical details can make the leap from Arduino to the AVR C programming language on which it's based. Similarly, you can add AVR-C code directly into your Arduino programs if you want to.
v?Open source and extensible hardware - The plans of the Arduino boards are published under a Creative Commons license, so experienced circuit designers can make their own version of the module, extending it and improving it. Even relatively inexperienced users can build the breadboard version of the module in order to understand how it works and save money.
3.4 LOAD DRIVERS
These serve as an interface between the control circuit and the load appliances. To ensure they operate satisfactorily, the application requirement of the load driver should include:
·????????Robustness
·????????Cost effectiveness
·????????Appropriate electrical rating
·????????Reliability
There are two basic classifications of relays:
?
3.4.1 Electromechanical Relay
领英推荐
Electromechanical relays have moving parts, whereas solid state relays have no moving parts. Advantages of Electromechanical relays include lower cost, no heat sink is required, multiple poles are available, and they can switch AC or DC with equal ease.
3.4.2 Power Relay
The power relay is capable of handling larger power loads of 10-50 amperes or more. They are usually single-pole or double-pole units.
Figure 3.10
3.4.3 Time-Delay Relay
?The contacts might not open or close until sometime interval after the coil has been energized. This is called delay-on-operate. Delay-on-release means that the contacts will remain in their actuated position until some interval after the power has been removed from the coil.?A third delay is called interval timing.?
Contacts revert to their alternate position at a specific interval of time after the coil has been energized. The timing of these actions may be a fixed parameter of the relay, or adjusted by a knob on the relay itself, or remotely adjusted through an external circuit.
Figure 4.11
?
3.4.4 Solid State Relay
These active semiconductor devices use light instead of magnetism to actuate a switch. The light comes from an LED, or light emitting diode. When control power is applied to the device’s output, the light is turned on and shines across an open space. On the load side of this?space,?a?part?of?the?device?senses?the?presence?of?the?light,?and?triggers?a?solid?state switch that either opens or closes the circuit under control. Often, solid state relays are used where the circuit under control must be protected from the introduction of electrical noises.
Advantages of Solid State Relays include low EMI/RFI, long life, no moving parts, no contact bounce, and fast response. The drawback to using a solid state relay is that it can only accomplish single pole switching and is designed to either switch AC only or DC only.
Figure 3.12- Solid State Relay
v?Since the developed prototype will be universally applicable to all loads, the type of load being controlled will determine the type and rating of the relay but for the purpose of developing the prototype we decided to select the Power relay since it switches both AC and DC loads with equal ease whereas the solid state relay can be applied to loads with very high ratings and the time-delay relay might interfere with our timing circuit.
3.5 INFORMATION CENTRE
This will serve as the storage base for the system where the state of appliances over a period of time are saved for feedback purposes. The device to implement this service should:
?
3.5.1 Raspberry Pi
Raspberry Pi is credit-card sized single board computer used for programming and designing. It is operating on Linux-Kernel based Operating System. It function similar to computer except that it do not have screen monitor, mouse and keyboard.?It costs around € 45.00. We can do most of work in Raspberry Pi like we can browse internet or play video.?The only exception is to program so that it can function and play the video or surf internet. It consists of CPU, GPU and RAM like that of Computer. The physical outlets consists of Power plug , Ethernet?plug, HDMI, USB, Card Reader, Audio Out, RCA Video Out, GPIO respectively.
Figure 3.13- Raspberry Pi
Back part of Circuit board of Raspberry Pi
The working of Raspberry Pi is explained below:
Raspberry?Pi ?is?credit-card?sized?computer?which?supports?Linux?based?Operating System(OS). The foremost thing is to install O.S in the memory card as Raspberry Pi do not have any Hard-Disk attached by. The O.S can be downloaded from website and installed on Secure Digital (SD) card.
There are different types of Linux based O.S, however choose 'Raspbian Debian Wheezy' O.S to install. Raspberry Pi have 2 USB ports through which Keyboard and Mouse are plugged in. Similarly, HDMI port through which Monitor is connected to display and work. There is Ethernet port to connect the Raspberry Pi in network or Internet. And the GPIO port is used to connect other physical devices as peripherals. Now, programming can be done in Linux windows for various simple applications.?It can be used to control, log and monitor several devices by programming and connecting such devices.
Hence, a good knowledge of programming is pros to user who wants to have knowledge and program to various applications. Once the installation is completed, the windows opens and desktop contains number of icons for?user?facility?like?web?browser,?LTX?terminal,?Control?program,?games?and?others.?To connect other devices GPIO pins are used for external connection so that either the data can be read from them for monitoring or send to them for controlling part. The user must install necessary software that supports LINUX O.S to program for logging, monitoring and controlling section.
3.5.2 Personal Computer (PC)
There is apparently no difference between the normal PC and raspberry pi, except the fact that the PC is more powerful than the raspberry pi and also has a keyboard and a monitor which the raspberry pi doesn’t have. All are based on the microprocessor technology that enables manufacturers to put an entire CPU on one chip.
At home, the most popular use for personal computers is for playing games. Businesses use personal computers for word processing, accounting, desktop publishing, and for running spreadsheet and database management applications.
v?For the implementation of the prototype we selected the personal computer since it already has a monitor which will make our implementation of the user interface easy.
3.6 POWER SUPPLY
A power supply is an electronic device that supplies electric energy to an electrical load. The power supply circuit should:
?3.6.1 DC Power Supply
The prototype will be supplied with DC power which will then require an AC-DC converter, the?maximum operating voltage of the components considered for this project is 12V DC hence?the?need for a 240V/12V Universal AC-DC power adapter to convert the 240V AC mains to the required 12V for the prototype.
Figure 3.14 - AC-DC Adaptor
CHAPTER FOUR
PROPOSED DESIGN AND SIMULATION
4.1 OVERVIEW
This chapter provides details of the technical procedures implemented and gives vivid explanations to the design approaches employed in the breadboard prototyping, wiring and soldering of the various modules and final interconnecting and assembling of the modules to form the complete system. It comprises of four main activities, which are:
·????????Drawing the functional block diagram from selected elements based on the design considerations.
·????????Create schematics from functional block diagram.
·????????Simulate schematic.
·????????Make necessary modification to schematic to develop circuit diagram for prototype.
List of components
NAME OF COMPONENTS
QUANTITY
UNIT OF COMPONENTS
Resistors of various types
4
Ohms
Liquid Cristal Display (LCD)
1
None
Potentiometer
1
Ohms
Relays
3
None
Voltage Regulator
1
Volts
Switch
1
None
230 – 12v Transformer
1
None
Packaging
1
None
?
Bread board
1
None
?
Lamp
1
Volts
?
Capacitors
4
Farad
?
Quartz Cristal
1
None
?
Wall Socket
1
None
?
Arduino (ESP32- S2- WROOM)
1
None
?
LED lights
2
None
?
Solder ion
1
None
?
Wires
Strips
None
?
Diode LN 7805
1
None
?
Fire Sensor
1
None
?
4.2 HIGH LEVEL BLOCK DIAGRAM
Smart Phone
Bluetooth
ESP WROOM32
Power Supply
Fire Sensor
Relay
Lamp
PIR Motion Sensor
Relay
Socket Outlet
Relay
Extra Load
Figure 4.1- High Level Block Diagram
4.3 The Central Processing Unit (ESP32 – S2 - WROOM)
ESP32-S2-WROOM and ESP32-S2-WROOM-I are two powerful, generic Wi-Fi MCU modules that have a rich set of peripherals. They are an ideal choice for a wide variety of application scenarios relating to The Internet of Things (IoT), wearable electronics and smart home.
·????????ESP32-S2-WROOM comes with a PCB antenna, and ESP32-S2-WROOM-I with an IPEX antenna. They both feature a 4 MB external SPI flash.
·????????At the core of this module is ESP32-S2 *, an Xtensa? 32-bit LX7 CPU that operates at up to 240 MHz.
·????????The chip has a low-power co-processor that can be used instead of the CPU to save power while performing tasks that do not require much computing power, such as monitoring of peripherals.
·????????ESP32-S2 integrates a rich set of peripherals, ranging from SPI, I2S, UART, I2C, LED PWM, LCD, Camera interface, ADC, DAC, touch sensor, temperature sensor, as well as up to 43 GPIOs. It also includes a full-speed USB On-The-Go (OTG) interface to enable USB communication.
Block Diagram of ESP32-S2
Figure 1: ESP32-S2-WROOM Block Diagram
4.4 LCD Interfacing to a microcontroller.
Connection of the 16x2 LM016 LCD is made to the microcontroller digital pins as follows;
Register Select (RS) input pin connects to microcontroller pin 28 (ADC5). Enable (E) input pin connects to μC digital pin 27 (ADC4). Read/Write (RW) pin is connected to ground (0V) since the LCD will receive data from the Arduino. The higher nibble data pins D4?D7 are connected to μC pin 26 to 23 (ADC3 ? ADC0) respectively.
To enable varying of the brightness of the back led of the display, the Anode (A) and Cathode (K) pins of the LCD are connected to +5V and 0V respectively whilst the Vo pin is connected to the wiper of a 10KΩ variable resistor (potentiometer). Figure 4.2 demonstrates the above connections.
Figure 4.2: (a) LCD connection to microcontroller (μC)?????(b) Circuit diagram LCD connections
4.5 DESCRIPTION
The smartphone serves as an interface for the user to communicate with the system. The smartphone will host a customized android application for this purpose. Through soft touches on specific buttons on the application, commands are sent wirelessly via Bluetooth to the Arduino microcontroller (ESP32 – S2 –WROOM).
The wireless transmission is done through Bluetooth for short range costless communication. For the Bluetooth wireless transmission, a Bluetooth module could be used for this purpose.
When the user issues a command on the app, the commands are sent through the Bluetooth module. The Bluetooth module in turn, sends the command to the ESP WROOM microcontroller which activates the load.
The ESP32 microcontroller does this by generating a sequence of bits which are fed into the input of an encoder in a parallel format. This sequence of bits contains control signal bit/bits and the address bits which corresponds to a particular load. The encoder encodes these bits and transmits them serially to the RF Transmitter to be transmitted to a particular load for control.
Figure 4.2 – Schematic (Proteus)
Fig 4.3 Virtual Terminal used as interface for communicating with microcontroller
Fig 4.4 Controlling of Loads with Load 1(light) on
Fig 4.5 Speed control of motor loads (fan)
4.4 CONTROL OF SINGLE SIGNAL DEVICES (LIGHT LOADS)
These kind of devices have only two states that is they are either on or off; they include lamps, sockets and security alarms. In the simulation we modeled these devices using lamps. After a matched signal is detected by a decoder, the control signal which is 1 bit in size (1 or 0) is sent to the transistor to drive the relay to control the device.
4.5 FIRE SENSOR
A Fire Sensor is a device that can be used to detect presence of a fire source or any other bright light sources. There are several ways to implement a Fire Sensor but the module used in this project is an Infrared Radiation Sensitive Sensor.
This particular fire sensor is based on YG1006 NPN Photo Transistor.
The YG1006 Photo Transistor looks like a black LED but it is a three terminal NPN Transistor, where the long lead is the Emitter and the shorter one is the collector (there is no base terminal as the light it detects will enable the flow of current).
This photo transistor is coated with black epoxy, making it sensitive to Infrared radiations and this particular Photo Transistor (YG1006) is sensitive to Infrared Radiation in the wavelength range of 760nm to 1100nm.
Using this particular type of Flame Sensor, you can detect Infrared Light up to a distance of 100cm within its 60 degrees of detection angle.
There are two types of implementations of Flame Sensors using YG1006 Photo Transistor: one is with both Analog Output and Digital Output while the other is with only the Digital Output.
Both these implementations require same components but the difference is that one module (the one with the Analog Output) provides the Sensor output as Analog Output.
Components of Fire Sensor Module
The fire Sensor has three pins (some may have four pins): VCC, GND and DO. Connect VCC and GND to +5V and GND of the power supply (can be connected to Arduino’s +5V). The DO (short for Digital Output) is connected to Digital I/O Pin 11 of Arduino.
In order to indicate the detection of a flame or fire, a Buzzer is used. The Buzzer circuit consists of a 1KΩ Resistor, an NPN Transistor (like 2N2222 or BC548), a 5V Buzzer and a PN Junction Diode.
The Buzzer is driven through Digital I/O 12 pin of Arduino UNO. The Buzzer circuit is a safety measure and is not mandatory. You can connect the Buzzer directly to Arduino. To test the functionality of the flame sensor, place a fired lighter or a match stick in front of the sensor.
Under normal conditions, the output from the Flame Sensor is HIGH. When the sensor detects any fire, its output becomes LOW.
Arduino detects this LOW signal on its input pin and activates the Buzzer.
4.6??Final Assembling and Soldering.
Final assembling of the system involves interfacing all the modules, interconnecting them and finally supplying a common power source to them. To ensure firm connection and in order to make the complete system handy and portable all the components were soldered to a printed circuit board (PCB).
4.7 CONCLUSION
The above implementation of this project gives a detailed overview from the early start to the simulation. It shows the step-by-step approach that was taken during the project implementation. The automatic household load control system serves its purpose as indicated in the objectives. In summary, the aim of the project was met.
CHAPTER FIVE
RESULTS AND DISCUSSION
5.1 INTRODUCTION
This chapter describes the achievements of the project in details on both hardware and software of the project.
5.2 SOFTWARE
As indicated in chapter four this home automation system will have a user friendly app on an android phone which will abstract the operation of the appliances with simple soft touches. The image below shows how the app was designed.
Figure 5.1 - Android app
It has six buttons for operating three ‘on and off’ loads and two seek bars for operating regulatory loads such as a fan.
5.2 HARDWARE
The two-state load was implemented using a light bulb and a two sockets whereas the multi-state load was implemented using a dc brushless fan. The image below shows the final implementation.
Figure 5.4- Final hardware implementation
5.3 STRENGTHS, WEAKNESSES AND CHALLENGES
5.3.1 Strengths
·????????Alternate communication routes makes it reliable
·????????Low power consumption
·????????Immune to hacking since the system is completely offline.
·????????Efficient
5.3.2 Weaknesses
·????????Its operation is affected in a RF noisy environment
·????????Delay in GSM operation
5.3.3 Challenges
·????????Working with analogue components required more than just simulation , there was the need for extensive research with numerous iterations for efficient performance
CHAPTER SIX
CONCLUSION AND RECOMMENDATION
6.1 CONCLUSION
In this project the design and implementation of an economical and user friendly home automation system has been established.?This provides a user friendly interface (touch screen device). By a single soft touch of either a disabled person or a normal person the electronic gadgets are operated. This saves time, money and power consumption.
6.2 RECOMMENDATIONS
The home automation system can be improved further to make the system more efficient and effective. Some of the suggestions are stated below:
·????????Use the super heterodyne RF transmitter to increase the RF transmission range.
·????????The system should be shielded to prevent RF and magnetic interference.
REFERENCES
International Journal of Advanced Research in Computer and Communication Engineering. ISSN (Print) : 2319-5940, SSN (Online) : 2278-1021, Vol. 2, Issue 7, July 2013.
International Journal of Innovative Research in Advanced Engineering (IJIRAE).?ISSN: 2349-2163 6 6th July 2014. PP. 44-48
Journal of Electronics and Communication Engineering (IOSR-JECE). e-ISSN: 2278-2834,p- ISSN: 2278-8735.Volume 9, Issue 3, Ver. III (May - Jun. 2014), PP 67-72 www.iosrjournals.org.
International Journal of Advanced Scientific Research. ISSN: 2456-0421 www.newresearchjournal.com/scientific. Volume 1, 1st April 2016; Page No. 05-07.
IJISET - International Journal of Innovative Science, Engineering & Technology, Vol. 1 Issue 5, July 2014.
International Journal of Innovative and Emerging Research in Engineering Volume 2, Issue 3, 2015
Remote-Controlled Home Automation Systems with Different Network Technologies. Centre for Applied Internet Research (CAIR), University of Wales, NEWI, Wrexham, UK.
International Journal of Smart Home Vol. 2, No. 3, July, 2008.www.statista.com
Home Security System – Microtronics Technologies
International Journal of Innovative Research In Electrical, Electronics, Instrumentation And Control Engineering Vol. 3, Issue 7, July 2015
International Journal of Advanced Research in Computer Science and Software Engineering
International Journal of Scientific & Engineering Research, Volume 5, Issue 5, May-2014
ISSN 2229-5518
APPENDIX A
Code:
#include <SoftwareSerial.h>
SoftwareSerial mySerial(7, 8);
char temp[63];
char f;
int m;
byte dev_2 = B01000000;
int inByte =0;
int led=13;
boolean notCleared = true;
boolean myserial = false;
void setup(){
?Serial.begin(9600);
?delay(100);
?mySerial.begin(9600);
?delay(100);
?mySerial.println("AT+CMGF=1");
?delay(500);
?mySerial.println("AT+CNMI=2,2,0,0,0");
?// wait for a while till the serial port is ready
?//Serial.print("");
?pinMode(13,OUTPUT);
??pinMode(9,OUTPUT);
??digitalWrite(9,HIGH);
?DDRD |= B01111100;
?PORTD = B00000000;
?//Serial.println(mySerial.available());
?delay(100);
????????????}
void loop(){
?
???for(m=0;m<63;m++){
???????temp[m]=0;
?????}
??//Serial.println(mySerial.available());
?????
??if (Serial.available()) {
???for(m=51;m<54;m++)
???????{
?????????while(!Serial.available());
?????????inByte = Serial.read();
?????????temp[m]=inByte;
?????????Serial.print(temp[m]);
????????}
??????????updateOut();
}
?while (notCleared){
??for(m=0;m< 42 ;m++)
???????{
?????????while(!mySerial.available());
?????????inByte = mySerial.read();
?????????temp[m]=inByte;
?????????//delay(100);
???????}
????notCleared = false;
????Serial.println(mySerial.available());
?}
?
?if (mySerial.available()){
??//Serial.print("\n");
??delay(500);
???????Serial.println(mySerial.available());
??Serial.print("\n");
?for(m=0; m<56 ;m++)
???????{
?????????while(!mySerial.available());
?????????inByte = mySerial.read();
?????????temp[m]=inByte;
?????????Serial.print(temp[m]);
???????}
??????myserial = true;
??????updateOut();
??}
?}
?void updateOut(){
?
???if(temp[51]=='D' && temp[52]=='1' && temp[53]=='N')
?????{
??????digitalWrite(13,HIGH);
??????PORTD |= B01100100;
??????digitalWrite(9,LOW);
??????delay(3000);
??????digitalWrite(9,HIGH);
???????
???????if(myserial)
???????Serial.println("D1N");
???????myserial = false;
?????}
????
?????if(temp[51]=='D' && temp[52]=='1' && temp[53]=='F')
?????{
??????PORTD = B01100000;
??????digitalWrite(9,LOW);
??????delay(3000);
??????digitalWrite(9,HIGH);
???????digitalWrite(13,LOW);
???????if(myserial)
???????Serial.println("D1F");
???????myserial = false;
???????
?????}
?????if(temp[51]=='D' && temp[52]=='2' && temp[53]=='N')
?????{
??????digitalWrite(13,HIGH);
??????PORTD = dev_2 | B01000100;
??????dev_2 = PORTD;
??????digitalWrite(9,LOW);
??????delay(3000);
??????digitalWrite(9,HIGH);
???????
???????if(myserial)
???????Serial.println("D2N");
???????myserial = false;
??????
?????}
????
?????if(temp[51]=='D' && temp[52]=='2' && temp[53]=='F')
?????{
??????PORTD = dev_2 & B11111011;
??????dev_2 = PORTD;
??????digitalWrite(9,LOW);
??????delay(3000);
??????digitalWrite(8,HIGH);
???????digitalWrite(13,LOW);
???????if(myserial)
???????Serial.println("D2F");
???????myserial = false;
???????
?????}
?????if(temp[51]=='D' && temp[52]=='3' && temp[53]=='N')
?????{
??????digitalWrite(13,HIGH);
??????PORTD = dev_2 | B01001000;
??????dev_2 = PORTD;
??????digitalWrite(9,LOW);
??????delay(3000);
??????digitalWrite(9,HIGH);
???????
???????if(myserial)
???????Serial.println("D3N");
???????myserial = false;
??????
?????}
????
?????if(temp[51]=='D' && temp[52]=='3' && temp[53]=='F')
?????{
??????PORTD = dev_2 & B11110111;
??????dev_2 = PORTD;
??????digitalWrite(9,LOW);
??????delay(3000);
??????digitalWrite(8,HIGH);
???????digitalWrite(13,LOW);
???????if(myserial)
???????Serial.println("D3F");
???????myserial = false;
???????
?????}
?????if(temp[51]=='D' && temp[52]=='4' && temp[53]=='1')
?????{
??????PORTD = B00000100;
??????digitalWrite(9,LOW);
??????delay(3000);
??????digitalWrite(9,HIGH);
???????digitalWrite(13,LOW);
???????if(myserial)
???????Serial.println("D41");
???????myserial = false;
???????
?????}
?????if(temp[51]=='D' && temp[52]=='4' && temp[53]=='2')
?????{
??????PORTD = B00001000;
??????digitalWrite(9,LOW);
??????delay(3000);
??????digitalWrite(9,HIGH);
???????digitalWrite(13,LOW);
???????if(myserial)
???????Serial.println("D42");
???????myserial = false;
???????
?????}
?????if(temp[51]=='D' && temp[52]=='4' && temp[53]=='3')
?????{
??????PORTD = B00001100;
??????digitalWrite(9,LOW);
??????delay(3000);
??????digitalWrite(9,HIGH);
???????digitalWrite(13,LOW);
???????if(myserial)
???????Serial.println("D43");
???????myserial = false;
???????
?????}
?????if(temp[51]=='D' && temp[52]=='4' && temp[53]=='4')
?????{
??????PORTD = B00010000;
??????digitalWrite(9,LOW);
??????delay(3000);
??????digitalWrite(9,HIGH);
???????digitalWrite(13,LOW);
???????if(myserial)
???????Serial.println("D44");
???????myserial = false;
???????
?????}
?????if(temp[51]=='D' && temp[52]=='4' && temp[53]=='5')
?????{
??????PORTD = B00010100;
??????digitalWrite(9,LOW);
??????delay(3000);
??????digitalWrite(9,HIGH);
???????digitalWrite(13,LOW);
???????if(myserial)
???????Serial.println("D45");
???????myserial = false;??????
?????}
?????if(temp[51]=='D' && temp[52]=='4' && temp[53]=='F')
?????{
??????PORTD = B00000000;
??????digitalWrite(9,LOW);
??????delay(3000);
??????digitalWrite(9,HIGH);
???????digitalWrite(13,LOW);
???????if(myserial)
???????Serial.println("D4F");
???????myserial = false;??????
?????}
?}
Attended Youth leadership and skills training institute
2 年Hi
Attended Youth leadership and skills training institute
2 年Hi