Upload
hannah-miles
View
216
Download
0
Tags:
Embed Size (px)
Citation preview
GENERIC CONTROL OF ELECTRICAL
ENVIRONMENT THROUGH A WEBPAGE
- IT Acumens. COM
AIM:
The aim of the project is to control electrical devices from a remote location through a web page.
SOFTWARE REQUIRED
• Java 2 Enterprise Edition(J2EE)
• Java Development Kit (JDK1.3)
• Apache Tomcat Server 1.4.1
• Internet Explorer
• Microsoft Access
• Microsoft Word( for documentation)
HARDWARE REQUIRED
• Pentium III processor
• 64 MB RAM
• 10 GB Hard Disk
• Operating system windows 98
• PC Add-On card with PIA chip(s)
• An External port board.
• A dedicated designed interface
SCOPE OF THE PROJECT
CONTROL THROUGH IR
Range is limited.Line of sight
CONTROL THROUGH MICROWAVE
Transmitter & Receiver are costly.
DESCRIPTION
The electrical devices that are to be controlled are connected to the home PC through a designed dedicated interface.The status word of the devices are posted to the PC through the PIA present in the CPU of the home PC.The status word is then uploaded to the web server.
At the server the individual status of the devices are decoded and posted to the web page.A remote user logs in and checks the current status of the devices,if required the user changes the status of the devices.The changed status is then posted to the web server.The control word is then encoded and posted to the home PC.The changed status of the devices are reflected.
STATUS DETECTING CIRCUIT
CONTROL CIRCUIT
8255 CHIP
• The 8255 chip is called a Programmable Interface Adapter(PIA).
• The three buses used for the interface are the address bus,data bus and the control bus.
• The 8255 contains three individual I/O ports.
• The microprocessor connects to certain pins on the 8255.
• Each port can be made to function either as Input port or an Output port by setting the control word.
• Block B provides the logic for reading and writing to each port of the chip.
The electrical status of the devices is retrieved through the C++ program using the port-based instructions.
The port-based instructions are• _inp (port number)• _outp (port number, value)
_inp is used to read the value from the port and
_outp is used to write the value to the port.
START
SELECT
THE DEVICES
TO BE CONTROL
CONNECT THE DEVICES TO THE
HARDWARE INTERFACE
A
CONNECT THE INTERFACE TO THE PIA IN THE PC
USING THE PORTBASED INSTRUCTIONS RETRIEVE
THE STATUS WORD
IS THERE ACHANGE
IN STATUS WORD
A
UPLOAD THE CHANGED
STATUS WORD TO
THE SERVER
THE STATUS WORD IS
DECODED AND IT IS
STORED IN DATABASE
IN THE SERVER
THE REMOTE USERS
AUTHENTICATION IS
CHECKED
IS THE USER A
AUTHENTICATED
USER
IS THE USER
ADMINISTRATOR
DIRECT THE USER
TO A
RE-LOGIN PAGE
YES
DOES
THE USER HAVE WRITE
PERMISSIONDIRECTED
TO THE ADMINISTRATOR PAGE
NO
NO
C
DIRECT TO THE
CHANGE STATUS PAGE
DIRECT THE USER
TO THE DISPLAY
STATUS PAGE
O
THE USER CHANGES
THE STATUS AND
SUBMITS THE FORM
THE ENCODED VALUE
IS WRITTEN IN
THE SERVER
C
THE CONTROL WORD
IS POSTED TO
THE HOME PC
THE CONTROL WORD
IS SENT TO THE
OUTPUT PORT OF PIA
THE CHANGED STATUS
IS REFLECTED ON
THE DEVICES AT HOME.
STOP
O
MODULES
• Retrieving status word from the electrical device.
• Posting the control word to the web server.
• User authentication and display of current status.
• User changing the status of the required device.
• Control word stored in the home PC.
• Reflecting the changed status on device.
ACQUIRING DEVICE STATUS• The electrical devices are connected to the
interface designed.
• The interface is connected to the home PC through a Peripheral Interface Adapter.
• The Status word is obtained through a flat cable connected from the PC to the port board.
• The value is then posted to the server.
DECODING
• A Servlet program is written to decode the status word.
• The current status of the device are posted to the web page.
ADMINISTRATOR
• The administrator has the rights to add/delete the users from/to the list.
• The administrator categorizes the users with two permissions
* Read permission.
* Read /write permission.
REMOTE USER
• Authenticated users are allowed to access the web page.
• The users with read permission can only view the current status of the device.
• The users with read/write permission can view as well as change the status of the device.
• The changed status is stored in the web server’s database.
TRANSACTION OF DATA
ENCODING CONTROL WORD
• The status stored in the database are encoded using a servlet program.
• The encoded value is a decimal number which varies from 0 to 255.
• The encoded control word is posted from the web server to the home PC.
AT THE HOME PC
• The encoded control word is send to the interface through a java program.
• Decoding is done in the interface as a result of which individual device status are changed.
OUTPUT SCREENS
LOGIN SCREEN
CURRENT STATUS
REQUIRED STATUS
DATA STORED