Monday, August 5, 2019
Intelligent Lighting Control Using Android Application
Intelligent Lighting Control Using Android Application Divya Srinivasan, N.R.Raajan, Jayakumar V.K, Manonmani P Abstract: In this era where smartness is the key, automatic systems are preferred over manual ones. An important application of smart technology is efficient energy utilization, which is the need of the hour. Energy consumption can be minimized by turning off lights when they are not required, optimizing lighting levels to suit workers and by embracing green technology. One simple way to reduce carbon footprint is the usage of a lighting control system which delivers light as per the requirements and avoid unnecessary wastage. In this paper, a lighting control system using an android application has been proposed. Android is one of the widely used open source mobile platform and the user base is growing faster day by day. As more people are using smart phones, controlling light using an android application is cheaper, easier and cost effective. Keywords: Light control, Arduino board, GSM/GPRS module, Relay board, Android application I. INTRODUCTION Reducing energy consumption and increasing user comfort have always been main objectives of any intelligent building in todayââ¬â¢s scenario. Meeting these two demands is a complex task. This paper presents an effective way to reduce energy utilization and increase user comfort. In this paper, Arduino, a microcontroller is used. It is an open-source embedded platform where one can write programs and run it using hardware. Arduinos have the ability to sense the environment by getting input from different sensors and it can control its surroundings by controlling light, motors etc. The communication between a smart phone and microcontroller is established through a GSM/GPRS module. A GSM/GPRS module is same as that of the normal mobile phone and it needs a SIM card to communicate. It does the job of a normal mobile phone. This type of communication is called Machine to Machine (M2M) communication. What it means is that both wired and wireless systems are allowed to interact with oth er devices. It enables the flow of data between machines and finally between humans and machines. Irrespective of the nature of the data or machine, information flows in the same way, which is starts from a machine .Then it passes over a network and then through a checkpoint or gate to a system where it can be evaluated and acted upon. The aim of the M2M hardware is to provide an interface between the machine and the network. This paper deals with this M2M communication. Work to be done by the end user is very simple. Wireless communication makes human life easier and simpler. And especially with mobile, everything is instant and reachable. The block diagram of the proposed system is shown in fig 1. Fig 1.General Block Diagram II. GSM MODEMS GSM modems are much like GSM devices which helps in providing GSM functionality according to our needs. A complete phone can be built using a GSM modem but that would be a waste of important resources like time, which is of the essence, and money, because a phone would work out to be more cost effective. DTMF can help us control remotely, but DTMF (Dual Tone Multi Frequency signaling) in the aspects of monitoring has its own limitations.In these cases GSM modems can really be helpful. GSM modems can play a key role in projects which requires Remote Monitoring and Control. In this way Machine to Machine communication can be established. Pre-defined commands can be used to control GSM modems by sending them serially. These pre-defined commands are known as AT commands. In this paper the focus is on messaging only. AT commands also known as theHayes commands, is a specific command languageactually developed for theHayesSmartmodem. The command set comprises of a series of short text stri ngs that combine together to give complete commands for operations like dialing of numbers, call termination and the required parameter changes of the connection network. The Hayes command set is one of the most commonly used and is available in numerous variations. III. HAYES COMMANDS Some basic commands which are required to perform basic telephony operations are mentioned below Messaging Set Message Type as Text AT+CMGF=1 Set Message Destination Number Type Message AT+CMGS=+91XXXXXXXXXX When this command is entered, there is a prompt of the GSM modem terminal wherein the message to be sent is typed. After the message in entered, Ctrl+Z is pressed to exit terminal prompt. Once all the above steps are followed, the message will be sent to the user by the GSM modem. In addition to the above commands, a set of sequential messages will be sent by the GSM modem when an SMS or Call is received. Some of the messages are mentioned below. Incoming SMS Incoming SMS returns a message +CMTI: SM, 23 Read SMS To read the incoming SMS, the command used isAT+CMGR=Xwhere the number is X which is returned at the end of the+CMTI output above. For example it is 23 The SMS is received in the following way +CMGR: REC UNREAD,+91XXXXXXXXXX,phonebook entryâ⬠, ââ¬Å"Date, Time Message Text The above set of information is enough for to work with the GSM modem. Using Arduino IDE, code is written to receive message from GSM modem and the message is processed in the controller. Light is switched on or off only when the incoming message matches with the string written in the program. The Arduino Uno is a controller board based on theATmega328. It has 14 I/O pins (6 of which can provide PWM o/p)-Digital, a 16MHzceramic resonator, a USB connection, analog I/P-6, a power cord, an In Circuit Serial Programming(ICSP) header and a reset button. The specifications of Arduino Uno rev3 are shown in table 1. Table 1: Arduino Uno Specifications In addition to the above, dedicated functions are available for some of the pins: Serial: 1 (TX-Transmission) and 0 (RX-Reception). It is used to receive and transmit TTL (Transistor -Transistor Logic) serial data. The pins are linked to the equivalent pins of theATmega8U2USB-to-TTL Serial chip. External Interrupts: 2 and 3.These two pins can be designed to initiate an interrupt when any of the mentioned cases happens ââ¬âa low value occurs, a falling or rising edge, a value change. PWM: 3, 5, 6, 9, 10, and 11.Provide 8-bit PWM output with theanalogwrite() function. SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK).These pins support SPI communication using theSPI library. LED: 13.There is an LED, which is in-built, is linked to the pin (digital) 13. If the pin has a HIGH value then itââ¬â¢s in ON state, if it has a LOW value itââ¬â¢s in OFF state The Arduino UNO has the capability to communicate with a computer, another Arduino, or other controllers. Themicrocontroller used in this paper provides UART TT Logic (5Volts) serial communication, which is obtainable in pins (digital) 1 (TX) and 0 (RX).In anATmega16U2on the board serial communication is done over USB and appears as a virtual communication port. In the case when ATmega16U2 is used, external drivers are not required and the USB COM drivers (standard) are used.The Arduino software also includes controls which allow text based data to be sent and received. The Rx (Receive) and Tx (Transmit)LEDspresent will blink when data is being sent from USB to serial chip or to any other terminal. Aserial libraryin the form of a software present in Arduino permits serial communication on any of the pins (digital) of Uno. The Arduino software IDE is used to configure the Arduino Uno. TheATmega328on the Arduino Uno comes preburned with abootloaderwhich allows codes to be uploaded to t he board without the use of a programmer who has expertise in hardware programming. Communication is possible through the use of STK500protocol. The bootloader can be bypassed and the controller is programmed using the ICSP (In-Circuit Serial Programming) IV. HARDWARE CONNECTIONS The SIM Card is inserted into the GSM modem. The Tx (Transmit) pin of the GSM modem is connected to pin (digital) 3 of the Arduino. The Rx (Receive) pin of the GSM modem is connected to pin (digital) 4 of the Arduino. The Gnd(Ground) pin of the GSM modem is connected to the Gnd(Ground) pin of theArduino. The GSM modem uses an external 12Volts DC Adaptor as power source (The+5Volts from internal source of Arduino is not sufficient). It is made sure that the network LED flashes with a 2s delay and not 1s delay. 2s delay means it is connected to network, 1s delay means not unable to connect to network. Once the connections are given and the code is uploaded to the Arduino board, the string which is given in the code is sent as a message, GSM will receive the message and it will send it to Arduino which in turn will process the message and the corresponding action will take place. If number of lights is counted, then for each light some string has to be given in the coding. Instead of sending each message, development of an android application user friendly. Through an android app, message can be given. Since the GSM SIM900A is a GSM/GPRS module, control lights through android app are also possible. Authorization can also be given. It will provide restricted access people to control lights. The front end of the Android app looks like as shown in fig 2 and fig 3. Fig 2.Android App Password Screen Fig 3.Android App User Interface Using the swipe icon in the front panel, the lights can be turned on/off using this android app. Also only the users who know the password can control the lights. Number of lights which can be controlled depends on the number of ports the controller has. The controller output is given to relay boards and the output of the relay board is given to switches. In this way an android application and light is a terminal device. Also an admin is created and he/she will get the message that who is controlling the light. In this way, security can be improved. V. CONCLUSION Unnecessary lighting is one of the prime reasons for energy wastage. The most effective and easy way to curtail this is to turn off lights when they arenââ¬â¢t required. Lighting control systems can use factors such as occupancy, available daylight and time of day, thus providing significant energy and cost savings, a greater level of flexibility and control for building owners and added comfort for occupants. With increasing user comfort, energy can be saved to a larger extent. Also security is tightened with proper admin rights. Wireless systems reduce the labor, costs and wiring requirements of lighting control when compared to traditional systems. In short, wireless networking can usher in a new generation of smarter lighting control systems which reduce energy utilization and ensure a greener world.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.