Design and Construction of a Mobile Phone Based Home and Office Appliances Remote Switching System
Kingsley Okeoghene Enalume, Emmanuel Okhueleigbe
Department of Electrical/Electronics Engineering, Federal University of Petroleum Resources Effurun, Effurun, Nigeria
To cite this article:
Kingsley Okeoghene Enalume, Emmanuel Okhueleigbe. Design and Construction of a Mobile Phone Based Home and Office Appliances Remote Switching System. American Journal of Embedded Systems and Applications. Vol. 5, No. 1, 2017, pp. 1-6. doi: 10.11648/j.ajesa.20170501.11
Received: September 30, 2016; Accepted: October 11, 2016; Published: February 6, 2017
Abstract: This paper presents a method for users to control their home and office appliances remotely using a mobile phone. This is borne out of the desire to minimise accidents and prevent damage to electrical appliances as a result of not switching off electrical appliances such as pressing iron, electric heater, etc, which can result in fire incidence and damage. The system provides the ease of turning on/off electrical appliances with its attendant safety. The access control is achieved by sending a DTMF code from the user mobile phone to the device mobile phone receiver. The received DTMF code is then decoded by the DTMF decoder which interfaces with a PIC Microcontroller to process the signal and control the appliance with the aid of a relay. The switching system presented in this paper will enable the switching of electrical appliances with AC load of 220V±5% supply from a mobile phone by simply issuing a command through the phone’s keypad to the system. This saves time used in switching ON or OFF the electrical appliances manually since the electrical appliance can be controlled from this remote system.
Keywords: GSM, Microcontroller, DTMF Decoder, Remote Switching
The use of mobile phone is highly prevalent nowadays . Although the main aim of the mobile phone is to enable communication between two mobile phone users, recent advancement in embedded technology have made it possible to use mobile phones to control home and office appliances, [2-3] monitor and control vehicles, [4-5] and for several other applications.
Advancement in technology has made life more efficient and comfortable. The comfort of being able to take control of devices from one particular location has become imperative as it saves a lot of time and effort . With the advancement and breakthroughs in technology over the years, the lives of people have become more complicated and thus they have become busier than before .
This paper presents embedded system that comprises mobile phone, DTMF decoder, microcontrollers and relays. The system makes it possible to remotely control home and office appliances. In the event that someone forgot to switch off an appliance, instead of going back to manually put off, the user’s mobile phone can be used to turn off the device, thereby preventing the likelihood of electrical fire . The appliance can be controlled by pressing a corresponding key in the user mobile and the tone transmitted to the receiver mobile attached to the device. By means of the DTMF decoder the tone is decoded, the signal is then processed by the microcontroller, which activates the particular relay to control the device .
2. Overview of the System
The switching system makes use of a receiver mobile phone that receives keypad tone sent by the user in the form of dual tone multi frequency (DTMF) [2,5], an MT8870 DTMF based decoder for decoding the dual tone multi frequency into digital signals, a microcontroller unit which organises the switching action, a ULN2003A relay driver which controls the relays, relays which act as switches to control the devices and a power supply unit. The switching system follows these basic operations: When a phone call is made, the mobile phone at the switching unit automatically answers the call and the desired control code is entered in the user mobile phone. The control codes are in dual tone multi frequency form and are decoded by the MT8870 DTMF decoder into digital signal . The output of the decoder goes to the microcontroller that coordinates the activation or deactivation of the relays . The ULN2003A relay driver consists of Darlington pair transistors and a diode to provide the necessary condition for the working of the relays. The relays acts as switches connected to the devices to be controlled. When they are activated, the switch turns ON the device and when they are deactivated they turn OFF the device. The block diagram of the system is shown in Figure 1.
3. Design and Construction
3.1. GSM Technology
The system employs the GSM technology for its transmission. GSM which stands for Global System for Mobile Communication is a telecommunication standard that was developed by the European Telecommunications Standards Institute (ETSI) . It was first launched in Finland in 1991. Gradually it became the global standard for mobile communication . By 2014, its operation was in well over 219 countries and territories [10-12]. GSM networks offer reliable and secure services such as voice and data services
. Due to its versatility in Nigeria, we decided to use this technology in the work.
3.2. Mobile Phone
Mobile Phone allows a subscriber to make or receive calls. It also allows a subscriber to send and receive SMS. To achieve this a subscriber Identity Module (SIM) is inserted into the mobile phone. Each key pressed on the phone generates two tone of different frequencies, known as Dual Tone Multi Frequency (DTMF) . This feature of the mobile phone was employed in the design.
3.3. DTMF Decoder
Pressing a key on a phone generates tone which is transmitted . DTMF assigns frequency to each key on the mobile phone. The keypad is laid out as a 4x4 matrix. The column corresponds to the high frequency, while the row corresponds to the low frequency .
Figure 2 shows a typical DTMF keypad indicating the corresponding low and high frequencies of each key.
Each tone from the DTMF keypad is a sum of two frequencies, one from the high frequency and the other from the low frequency . Since each key press generate a unique tone, when used to control appliances, the tone can identify the particular device that is to be controlled. There are 16 different tones in a DTMF with each tone being the sum of the low and high frequency. Most of our mobile phones uses 12 out of the 16 possible tones . The twelve keys in the keypads that are represented by these tones are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, *, and #. The table 1 below shows the sum of the frequencies that make up each of these keys [2,6].
The DTMF decoder used in this work is the CM8870 decoder. The DTMF decoder unit consist of the CM8870C DTMF decoder as the major component, a 3.58MHz crystal oscillator and passive components which include 10µF, 22µF and 0.1µF capacitors, 100kΏ and 330kΏ resistors.
The decoder converts the DTMF signal from the receiver phone to digital signals. The DTMF signal from the receiver mobile phone is the input; it enters this unit via Headset connected to the DTMF decoder. This DTMF decoder unit decodes the DTMF signal to binary digital signal with the LSB of the digital signal from pin 11 and the MSB of the digital signal from pin 14 of the decoder. The outputs of this unit are pins 11,12,13,14 which are connected to the PIC16F876A microcontroller.
3.4. PIC16X876A Microcontroller
The PIC16F876A microcontroller was used for the design and construction of this project. The microcontroller in all ramifications, meet the requirements of the project design in terms of both software flexibility and compatibility.
It is an easy-to-program (only 35 single word instructions) CMOS FLASH-based 8-bit microcontroller packs Microchip's powerful PIC architecture into a 28-pin package. Features of the device as seen in the data sheet are
• 8 kilo bytes of EEPROM data memory
• 5 channels of 10-bit Analog-to-Digital (A/D) converter
• 2 Comparators
• ICD (In Circuit Debugging function)
• Synchronous serial port can be configured either as the 2-wire Inter-Integrated Circuit (I²C™) bus or 3-wire Serial Peripheral Interface (SPI™)
• Enhanced 2 capture/compare/PWM functions
• Universal Asynchronous Receiver Transmitter (UART)
3.5. Relay Driver
The relay driver used in this project is a seven Darlington’s pair transistor IC with an output current 500mA (600ma peak), output voltage of 50V. It has output fly back diodes and input, compatible with various types of logic. Generally it is used to interface with relays and stepper motors, if high ratings is required by the motor, such that it cannot be provided by the other interfacing devices.
3.6. Regulated Power Supply
The DTMF decoder circuit, the microcontroller circuit, relay driver and the relays are low power devices which required voltages of certain threshold for efficient operation. A well regulated power supply is used to supply the required voltages needed by the different units of this system.
The power supply unit of the system as shown in figure 3 is divided into two subunits. The first unit supplies the DTMF decoder units and the microcontroller with a fairly stable five volts (5V). This subunit consists of a KBP206 rectifier chip, two 22 microfarad (22µF) electrolytic capacitors and a 7805 voltage regulator. The second subunit supplies the ULN2003A relay driver and the three 6V relays with six volts (6V) each. This subunit consist of a full bridge rectifier circuit made up of this diodes connected parallel to each other, two 1000 microfarad (1000µF) and a 7806 voltage regulator. The input of both subunits is a center-tap 12V DC step-down transformer.
3.7. Mode of Operation
The system has basically two modes of operation, namely:
• The active mode
• The passive mode
In the passive mode, the system goes into sleep mode while in the active mode; the system is very much operational.
During the passive mode, the system is set to a low power standby mode thus sending the system into a state of non-activity; when signal is sent for a specific interval of time.
In the active state, the system receives input DTMF signals (control codes), processes it in accordance with the Program of the microcontroller. After processing the received signal, the microcontroller sends an actuation signal through the relay driver to the relay. This activates the relay so as to switch ON/OFF the devices connected to the relays. When an incorrect code is sent, the system does not perform any switching action. Figure 4 shows the complete circuit diagram of the switching system.
For the switching system to function properly, the following steps are taken:
• The remote user sends authenticated signal to the receiver phone. Through the GSM network the signal is received by the receiver phone on the device.
• The DTMF signal is sent to the DTMF decoder that converts it to the digital signal that is transmitted to the microcontroller.
• The microcontroller issues commands based on the received digital signal and its program to the relay driver which coordinates the switching of the relays interfaced with it. The relays switches ON/OFF the devices connected to them.
The various stages for the implementation of the system is shown in figures 5, 6 and 7.
4. System Operation and Results
After construction the system was tested and the following was observed. The call from the user was answered by the receiver phone automatically (auto answer feature of the receiver phone must be enabled) after ringing for 5 seconds. The connected devices to the system turn ON/OFF in this order when the keys on the user’s keypad were pressed.
• When key ‘1’ was pressed, the first relay was activated while the other relays remained inactive and the fan connected to it was turned ON.
• When key ‘2’ was pressed, the second relay was activated while other relays remained inactive and the socket connected to it was turned ON.
• When key ‘3’ was pressed, the third relay was activated while other relays remained inactive and the lamp connected to it was turned ON.
• When key ‘4’ was pressed, the first relay and second relay were activated while the third relay remained inactive and the fan and socket connected to them were turned ON.
• When key ‘5’ was pressed, the first relay and third relay were activated while the second relay remained inactive and the fan and bulb connected to them were turned ON.
• When key ‘6’ was pressed, the second relay and third relay were activated while the first relay remained inactive and the lamp and socket connected to them were turned ON.
• When key ‘7’ was pressed, the first relay, second relay and third relay were activated and the fan, the lamp and socket connected to them were turned ON.
• When key ‘8’ was pressed, the first relay, second relay and third relay were deactivated and the fan, the lamp and socket connected to them were turned OFF.
• When keys ‘9’, ‘0’, ‘*’, ‘#’ were pressed nothing was observed.
These results were based on the program of the microcontroller.
The switching system which is a microcontroller-based GSM controlled switching device was designed and constructed to switch ON/OFF devices with AC load of 220V±5% supply. The result achieved in this process is actually a move away from the manual mode of switching to that of automation. The fact that the materials used were locally sourced, makes room for cost effectiveness of the design. In this prototype, three different devices were controlled. However, it is possible to control more than three devices in actual implementation.
In view of the prevailing problem of insecurity, this system should be further researched on to minimise intrusion to the control of our home appliances by integrating technologies like a passcode system or a voice acknowledgement system before it can be put into operation.
Another recommendation is for the switching system to have a backup power source such as batteries to ensure continuous operation especially in countries with intermittent power supply.
Finally, the system should incorporate a feedback acknowledgement mechanism to enable the user to know the status of each operation that is carried out.