Blog Archive

Showing posts with label PIC microcontroller. Show all posts
Showing posts with label PIC microcontroller. Show all posts

Wednesday, 19 October 2016

WIRELESS LOAD CONTROL DEVICE USING GSM MODULE

WIRELESS LOAD CONTROL DEVICE USING GSM MODULE
ABSTRACT
This paper presents Wireless Load Control Device (WLCD) using GSM module. The WLCD consists of PIC18F4550, GSM Module, relay circuit, keypad, and LCD. PIC18F4550 is used as a microcontroller to process the received data and then the output signal is sent for on/off relay switch. The users can on/off load in two ways, either keypad or short message service (SMS). The WLCD can control three loads and the current status of each load is displayed on the LCD. A working prototype of WLCD was built to demonstrate the effectiveness and efficiency of on/off load control through the GSM network.
Keywords: wireless load control device, PIC microcontroller, 18F4550, GSM module, SIM900B

INTRODUCTION
Nowadays, the innovative technologies have become an integral part of human life. Various load control method and technology such as power line carrier (PLC), telephone modem, internet, WIFI, Bluetooth, and
ZigBee were established and developed to facilitate comfortable for humans. There are many researches about load control method and technology until now. For example, in 2000, R. C. Luo et al. presented intelligent autonomous mobile robot control through the Internet. In 2010, X. Liu and W. Wang introduced a control system of indoor intelligent Lighting which is based on power line carrier communication. The power line is used to transmit the analogue or digital signals with high speed. Not only power line technology but also wireless remote control and GSM network are used to combine for remote the indoor intelligent lighting and controlling the sensing. Architecture for power monitoring system using the wireless sensor network technology is proposed in 2011. In 2013, V. Bhatia and P. Whig present the modeling and simulation of electrical load control system using RF technology. Moreover, V. Bhatia and P.
Whig designed and simulated the smart elevator control system with Security based on Dual Tone Multi Frequency. R. Makwana et al. tried to study the comparative of different wireless protocol between ZigBee (over IEEE 802.15.4) and Bluetooth (over IEEE 802.15.1).
In addition, the microcontrollers are playing a very important role in the development of the smart systems. The microcontroller is basically a single chip microprocessor suited for machine controlling and system processing because it carries out autonomous operations and takes smart decisions. Moreover, the devices such as air conditioners, power tools, toys, office machines employ microcontrollers for its operation.
This paper designs and develops the control of electrical loads using GSM module. PIC18F4550 is used for processing and controlling of the WLCD. By pressing the keypad on the WLCD, the controllability of the electrical load can be achieved. Moreover, the users can send the command to remote control the electrical load and receive the current status of the load by GSM module.

MATERIAL AND METHOD
The complete system of WLCD can be shown in Fig. 1, consists of four major parts: (1) input command, (2) microcontroller, (3) output display, and (4) electrical load driver.
 
Fig. 1: Block diagram of the WLCD

Hardware Implement
Input Command
WLCD can receive the input command in two ways (i.e. keypad or SMS). 3x4 keypad switches are connected to the microcontroller for sending the input command to control each electrical load. In the other way, the user can interface with the WLCD by sending the SMS from the mobile phone to its. The GSM module (SIM900B) is used to receive that SMS from the user via GSM network and send the data to the microcontroller via RS232 serial port.

Microcontroller
A microcontroller (PIC18F4550) is used as an interface device (input command, LCD and the electrical load driver). It is a 40-pin dip, low power consumption and high speed FLASH/EEPROM technology. It consists of 256 bytes EEPROM memory, 35 Input/output, two external clock modes (up to 48MHz), 13 channels of 10-bit analog to digital converter, and a capture/compare/PWM functions. 7805 voltage regulators are used to convert 12Vdc to 5Vdc and the output is then given to the microcontroller and GSM module. The electrical load driver, keypad and LCD are connected with microcontroller at port A, B and D, respectively.

Output of the WLCD
16X2 LCD is used in the system to display the current status of the WLCD. Besides the LCD, the user can receive the current status of electrical load by sending SMS to the WLCD.

Electrical load driver
The electrical load driver includes the opto-isolator and the relay circuit. The opto-isolator has the function to transmit the output signal from the microcontroller to the relay circuit. The relay circuit is an interrupting device designed for shutting on/off the power supply. The relay switch is designed for the electrical load at 220Vac and 10A. When the WLCD receives the command, the microcontroller will control the relay switch to on/off the electric power supply via the opto-isolator. The prototype of hardware implementation was done as shown in Fig.2.
 
fig 2. The WLCD prototype
Software Implement
According to the hardware circuit design features, WLCD controlling program flowchart is introduced as shown in Fig. 3. First, the system initializes each module, and then turns off all electrical loads. Then, WLCD started already, the microcontroller sends the command of AT + CMGD = 2 for clearing the second data storage space in the SIM card of GSM module. When the user sends the short messages to WLCD, GSM module will send that command to the microcontroller. After that the microcontroller will turn on/off load according to the received command and show the current status on the LCD. The microcontroller sends a command (such as AT+CMGS="+66868273639" and “SW1-ON SW2-ON SW3-OFF”) to the GSM module for informing the current status to the user. In the other way, when the received command is sent from the keypad, the WLCD will operate to on/off the electrical load and show the current status of each electrical load on the LCD module.
 
Fig. 3: Flow diagram of WLCD controlling program
Table 1 shows the control command to control the electrical loads of WLCD. For example, when the user need to on only SW2, the command is “*010#”.
Table 1: WLCD control commands
 
RESULTS
Electrical loads such as fans, bulbs, and computer etc. are tested and controlled wirelessly by the WLCD. When starting up the program, the LCD will show as Fig. 4(a). Then, three electrical loads can be controlled at a time in the present system. For example, when the user enters “*000#” to the WLCD using keypad, all of electrical loads will turn off and the LCD will show the current status as shown in Fig. 4 (b). Next, the user sends the SMS command (“*111#”) to the WLCD, the LCD will show the phone number of a user as shown in Fig. 4 (c). Then, all loads are switched on and the LCD will show the current status of electrical load as shown in Fig. 4 (d). After that, the microcontroller will send the current status to the user via SMS as shown in Fig. 4 (e).
 
(a) Start up the program
 
(b) Off all electrical load
 
(c) the number of user who send the command to the WLCD
 
(d) On all electrical load
 
 (e) SMS send and receive from WLCD
Fig. 4: the result of WLCD

CONCLUSION
To control the electrical load by wireless communication using GSM module, the WLCD was constructed. The WLCD is designed to provide three loads (rated of each load at 220Vac 10A). The electrical loads can be turned on/off by keypad on WLCD or SMS via GSM network as the command shown in Table 1. The user can know the current load status by LCD on WLCD or the SMS from WLCD.
The advantage of WLCD can be stated as follows:
- wireless control from remote places,
- ease of operation by using any mobile possible to on/off electrical load,
- the users will get a convenient, and
- time saving.
In addition, this WLCD can be applied to the other systems such as controlling the pump, motor, etc. In the future work, we will add the electrical measuring system which can read and send the electrical measuring value such as power and energy to the user. The system will be designed to increase the current load more than 10A by using the higher size of the relay. Moreover, the WLCD can be extended to the desired number of loads by adding the relay circuits and changing the control commands.

REFERENCES
[1] R.C. Luo, T.M. Chen, and C.C. Yih. Intelligent Autonomous Mobile Robot Control through the Internet. IEEE International Symposium ISIE. 2000, 1: 6-11.
[2] X. Liu and W. Wang. Indoor Intelligent Lighting Control System Based on Power Line Carrier Design. 2010 Second WRI Global Congress on Intelligent Systems (GCIS), 2010, 1: 408-411.
[3] R. V. P. Yerra et al. WSN based power monitoring in smart grids. Seventh International Conference on Intelligent Sensors, Sensor Networks and Information Processing (ISSNIP), 2011, 401-406.
[4] V. Bhatia and P. Whig. Modelling and Simulation of Electrical Load Control System using RF Technology. International Journal of Multidisciplinary Science and Engineering, 2013, 4(9): 44-47.
[5] V. Bhatia and P. Whig. A Secured Dual Tone Multi Frequency based Smart Elevator Control System. International Journal of Research in Engineering & Advanced Technology. 2013, 1(4): 1-5.
[6] R. Makwana et al. Wireless Based Load Control and Power Monitoring System. International Conference on Energy Efficient Technologies for Sustainability (ICEETS), 2013, 1207 – 1211.

Thursday, 21 April 2016

AN EFFICIENT MONITORING OF SUBSTATIONS IN POWER TRANSMISSSION LINES USING ZIGBEE IN EMBEDDED SYSTEM

AN EFFICIENT MONITORING OF SUBSTATIONS IN POWER TRANSMISSSION LINES USING ZIGBEE IN EMBEDDED SYSTEM
ABSTRACT
This project proposes an innovative design to develop a system based on microcontroller that is used for monitoring power of a distribution transformer in a substation and to protect the system from the rise in above mentioned parameter. Protection to the distribution transformer from the main station is done with the aid of the ZIGBEE Communication. Moreover the system displays the same on a LCD at the main station that will lead to avoid the damage in substation. The design generally consists of two units, one in the substation unit, called as transmitter unit, and another in the Main station called as controlling and receiver unit. The transmitter in the substation is where the power is monitored continuously by PIC microcontroller. A ZIGBEE is used for transmitting the signals that are obtained. The controlling unit in the main station receives the transmitted signals by means of ZIGBEE receiver and displays in LCD and LED and reacts in accordance to the received signal.
Keywords: PIC microcontroller, LCD, LED, ZIGBEE, Main-Substation.

INTRODUCTION
Electricity is a necessary and useful form of energy. It plays an ever growing role in our modern industrialized society. Maintenance of a transformer is one of the biggest problems in the Electricity Board (EB). The transformer may burn out due to the over load and short circuit in their winding. Power starts from the transmission grid at distribution substations where the voltage is stepped-down and carried by smaller distribution lines to supply commercial, residential, and industrial users.
Electric power systems can be divided into two stations, namely, Main station and Substation. Power to the substation is monitored using PIC Microcontroller and transmitted through ZIGBEE, then the main station receives the signal and compare with the reference voltage. Because of the microcontroller operation in the main station, if the increase in power rises higher than the desirable power, then that increased range is viewed by LCD and indicated using LED and BUZZER. And further damage can be avoided by shutting down the substation.

WORKING PRINCIPLE
The substation contains ZIGBEE transmitter and PIC microcontroller. The main station consists of PIC microcontroller, ZIGBEE receiver and LCD display. The power in the substation is continuously acquired by the PIC Microcontroller and transmits through the ZIGBEE transmitter to the main station. The ZIGBEE receiver in the main station receives the signal and compares it to the reference voltage. If the received signal is below the reference voltage it does not shows any variation or if it is above the reference voltage then that increased range is viewed by LCD and indicated using LED and further damage can be avoided by shutting down the substation using relay from the main station.

HARDWARE DESCRIPTION
 
Figure.1 Block diagram
A. PIC MICROCONTROLLER: The controller PIC 16f877A is used in this project. It is 8-bit CMOS microcontroller with flash program it is RISC PROCESSOR with performance, fully static design it has 5 ports. Port A, Port B, Port C, Port D and Port E with 33 I/O lines. The Controller has 8kx14 words of flash memory, 368x8 bytes for data memory and 256x8 EPROM data memory. It is programmable code protection. The user code will be stored in the flash memory. The 5V supply is given to VDD and VSS of the controller. Microcontroller is used for monitoring power of a distribution transformer in a substation and to protect the system from the rise in that parameter.

B. ZIGBEE: ZIGBEE is based on an IEEE 802.15.4 personal area network. The technology defined by the ZIGBEE specification is intended to be simpler and less expensive than other WPANs, such as Bluetooth. ZIGBEE is targeted at Radio Frequency (RF) applications that require a low data rate, long battery life, and secure networking. ZIGBEE has a defined rate of 250 kbps. In substation unit the power is continuously monitored and it is transmitted through ZIGBEE transmitter and the transmitted signal is received by ZIGBEE receiver.
 
Figure.2 Zigbee module

C. TRANSMITTER SECTION: Each of the two transmitters is a CMOS inverter powered by + 10V internally generated supply. The input is TTL and CMOS compatible with a logic threshold of about 26% of Vcc. The input if an unused transmitter section can be left unconnected: an internal 400KW pull up resistor connected between the transistor input and Vcc will pull the input high forming the unused transistor output low. The open circuit output voltage swing is guaranteed to meet the RS232 specification + 5v output swing under the worst of both transmitters driving the 3KW. The slow rate at output is limited to less than 30V/ms and the powered done output impedance will be a minimum of 300ohm with +2V applied to the output with Vcc =0V.The outputs are short circuit protected and can be short circuited to ground indefinitely.

D. RECIEVER SECTION: The two receivers fully conform to RS232 specifications. They’re input impedance is between 3KW either with or without 5V power applied and their switching threshold is within the +3V of RS232 specification. To ensure compatibility with either RS232 IIP or TTl\CMOS input. The MAX232 receivers have VIL of 0.8V and VIH of 2.4V the receivers have 0.5V of hysteresis to improve noise rejection. The TTL\CMOS compatible output of receiver will be low whenever the RS232 input is greater than 2.4V. The receiver output will be high when input is floating or driven between +0.8V and –30V.

E. CIRCUIT DIAGRAM EXPLANATION: Figure.3 shows the circuit diagram. The reference voltage is fixed in the c program coding. A potentiometer is connected to the reference pin-2 in U2 PIC Microcontroller. The signal is transmitted from U2 controller TX pin-25 via ZIGBEE transmitter. The transmitted signal is received by ZIGBEE receiver and fed to U1 controller RX pin-26. The port C and port D is connected to LCD Display. The LED and Buzzer is connected to port B Pin 33 and 34.
 
Figure.3 Circuit diagram
 
Figure.4 Final Hardware Arrangements

SOFTWARE DESCRIPTION
A. MPLAB: MPLAB IDE is an integrated development environment that provides development engineers with the flexibility to develop and debug firmware for various Microchip devices. MPLAB IDE is a Windows-based Integrated Development Environment for the Microchip Technology Incorporated PIC microcontroller (MCU) and PIC digital signal controller (DSC) families. In the MPLAB IDE, you can:
·       Create source code using the built-in editor.
·       Assemble, compile and link source code using various language tools.

B. CCS C COMPILER: It offers the most optimized Microchip PIC MCU and dsPIC DSC C Compilers for Windows and Linux, and a powerful integrated development environment. Our compilers support the PIC10, PIC12, PIC14, PIC16, PIC18 microcontrollers and now support Microchip PIC24/dsPIC chips. The CCS C Compiler includes generous libraries of useful routines and ready-to-run example programs for hardware peripherals. This compiler is used to compile the embedded c language program.

C. MPLAB SIMULATOR: PROTEUS is a discrete-event simulator for the running the hex code program. It’s used to debug the software before going to hardware.

D. PCB DESIGN: PAD 2 PAD is used to prepare the PCB schematic. Tracks are made in insulating base. PCB's are used to route electrical signal through copper. The performance of an electronic circuit depends up on the layout and design of PCB.

E. PCB PREPARATION: Layout is printed on a butter paper. It is screen printed on copper clad, etched by using ferric chloride solution, drilled using PCB driller, cut the unwanted materials and soldered the components.
 
Figure.5 PCB Design For PIC Microcontroller

CONCLUSION
This design based on PIC microcontroller is used to monitor and control the power in the distribution transformer continuously throughout its operation. If the microcontroller recognizes any increase in the level of desired value, then the unit has been made shut down in order to prevent it from further damages and also indicates the values throughout the process in LED and Buzzer and displays the value in LCD. Hence the distribution is made more secure, reliable and efficient by means of the proposed system.

REFERENCES
[1] Embedded C Programming and the Microchip PIC” by Barnett & Cox O’cull,Thomson, 2006.
[2] Design with PIC Microcontroller by John Bheat Man, Prentice Hall, 1997.
[3] PC-Based Instrumentation Concepts and Practice by N.Mathivanan, PHI Learning, 2007.
[4]The 8051 Microcontroller and Embedded Systems using Assembly and C by Muhammad Ali Mazidi, Pearson, 2009.
[5] P.Daponte, M. Di Penta and G.Mercurio, A Distributed Measurement System for Power Quality Monitoring, IEEE Transactions on Power Delivery, Vol. 19, Issue. 2, pp: 456-463, 2004.
[6] G. Pudlo, S. Tenbohlen, M. Linders and G. Krost, "Integration of Power Transformer Monitoring and Overload Calculation into the Power
System Control Surface", IEEE/PES Transmission and Distribution Conference and Exhibition, Vol. 1, pp: 470-474 Asia Pacific, 2002.
[7] Sen Ouyang and Jianhua Wang, "A new morphology method for enhancing power quality monitoring system", International Journal of Electrical Power & Energy Systems Vol.29, No.2, pp.121-128, February 2007.
[8] www.chipcon.com
[9] www.zigbeealliance.com
[10] www.microchip.com
[11] www.soselectronic.com