Your SlideShare is downloading. ×
Online monitor and control system
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.

Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Online monitor and control system


Published on

We made system which give facility to control and monitor industry online, we are use RS232 interfacing of microcontroller and PC and we made VB application which continually read serial port and also …

We made system which give facility to control and monitor industry online, we are use RS232 interfacing of microcontroller and PC and we made VB application which continually read serial port and also same time save all data in My-SQL database it is also sends data from My-SQL database and one online application client side from that user can access all database thru that all industrial application.

Published in: Education

  • Be the first to comment

  • Be the first to like this

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

No notes for slide


  • 1. INTRODUCTION Chapter – 1The World Wide Web has made it possible to send a lot of data from one side of theworld to the other side in almost no time. The use of the Internet for real-time interactionof the remote Controlling and Monitoring of the plants would give us many advantages.This technology cannot only be used in the industry, but also in the field of medicine,education etc.Although all this looks promisingly two main problems should be faced before the webbased Control and Monitoring can be implemented. The first one is the aspect of timedelay, which can lead to irregular data transmission and data loss. In the worst-case thiscan make the whole system unstable. The other one is the problem of Security. WhenMalicious hackers can grant access to a system the consequences can be catastrophic.Other problems concern the distance or logistics. If something goes wrong with thesystem, a lot of time and preparation can be needed before somebody can intervene torequirement specifications and system implementation1.1 Problem faced by Ceramic IndustryIn all of the ceramic industry they have mostly two or three units like vitrified tiles, floortiles etc. They need to have the monitor and control room for every unit. For that theyneed more no. of employers to monitor and control and also to synchronize the work theyneed to communicate all data & this process is very difficult with regular comminationsystem. And if there is only one technician than they need to run to different controlrooms, if person is late then may accident will occur and this will harm the person whichis working with machine or may be damage is done to machinery part. To need moreadvance control room which give all data at one place and easily available to accesshardware from any place.1.2 Utility of the ProjectNow all industry turn towards computerized controlling system because it is easy tooperate and easy to understand for that company they want to make the plan ofcomputerized monitoring and control system which is centralize whole company. 1|Page
  • 2. Our project will be useful in all industry where two or more plan is running or complexmonitoring and controlling system is there. It will provide next generation platform oftechnology where large hardware and online application is running together with use ofsophisticated embedded system which allows in making our hardware to online which canbe controlled form anywhere with secured authentication.Here company wants to combine three different systems. Means we want to monitor andcontrol three different points from one place. If there is one central control system than itis very easy for the employee. So here we have established one monitoring and controlpoint from there we can control and monitor whole system. We are going to design onewebsite through which employee can login with his/her User Id and Password and getauthority to control all the controlling point.Company wants to build very user-friendly and easy to operate central monitoring andcontrol system which can be operated by any of the employers. For that there is no needto give a special training. Here each point of controlling through website is very easy. Sothere is a reduction in time to solve a problem. So this time is utilized in manufacturingmore tiles.It is helpful in most of industry to change its complex and static control system withmobile control system through internet. It is easy to change the speed of motor andtemperature control with mouse click or keyboard keys. It is provide user-friendlyenvironment of control room and also make virtual work place. 2|Page
  • 3. BRIEF HISTORY OF THE WORK Chapter – 2Now a day‟s industry is running with more number of plants, for that industry turn tomake central control system, from where person can to monitor and control system.The online monitoring and control system can be described as the whole of operationsperformed to control or monitor a system situated in a closed network. It is based onexisting technologies, programming languages as VB and PHP specifications as HTTP.2.1 Networked Control System (NCS):A Networked Control System (NCS) is a control system wherein the control loops areclosed through a real-time network. The defining feature of an NCS is that control andfeedback signals are exchanged among the systems components in the form ofinformation packages through a network.The functionality of a typical NCS is established by the use of four basic elements: 1. Sensors, to acquire information, 2. Controllers, to provide decision and commands, 3. Actuators, to perform the control commands and 4. Communication network, to enable exchange of information.The most important feature of a NCS is that it connects cyberspace to physical space thus,enabling execution of several tasks from long distance. In addition, networked controlsystems eliminate unnecessary wiring thus, reducing the complexity and the overall costin designing and implementing the control systems. They can also be easily modified orupgraded by adding sensors, actuators and controllers to them with relatively low cost andno major changes in their structure. Moreover, featuring efficient sharing of data betweentheir controllers, NCS are able to easily fuse global information to make intelligentdecisions over large physical spaces. 3|Page
  • 4. Their potential applications are numerous and cover a wide range of industries such as:space and terrestrial exploration, access in hazardous environments, factory automation,remote diagnostics and troubleshooting, experimental facilities, domestic robots, aircraft,automobiles, manufacturing plant monitoring, nursing homes.2.2 Types of Communication networks:  Fieldbuses, e.g. CAN.  Ethernet  Wireless networks, e.g. Bluetooth or ZigBee. The term Wireless Networked Control System (WNCS) is often used in this connection.  Advent and development of the Internet combined with the advantages provided by NCS attracted the interest of researchers around the globe. Along with the advantages, several challenges also emerged giving rise to many important research topics. New control strategies, kinematics of the actuators in the systems, reliability and security of communications, bandwidth allocation, development of data communication protocols, corresponding fault detection and fault tolerant control strategies, real-time information collection and efficient processing of sensors data are some of the relative topics studied in depth.  The insertion of the communication network in the feedback control loop makes the analysis and design of an NCS complex, since it imposes additional time delays in control loops or possibility of packages loss. Depending on the application, time-delays could impose severe degradation on the system performance. 4|Page
  • 5. LITERATURE SURVEY Chapter – 3For IDP we have visited Morbi ceramic estate at ghutu road, Morbi. There is 300 to 400ceramic companies make different type of tiles like vitrified tiles, floor tiles, wall tiles etc.All companies are work with same procedure it may different for tiles type and size, atthere our group had been visited industry with reference of Ladani Girishbhai, and he isthe employer of Wintech Automation, all Automation Systems of most industry is madeby Wintech Automation in Morbi. We had visited a ceramic factory named “RealCeramic”; the main product of that company is a vitrified tile and floor tiles. When visiteda company we had observed that there are three main processes for making ceramic tilesfrom raw material of sand and cement. The detailed description of those three processescan be given as below:1) In first phase they mix the raw material of sand and cement in the huge container at very high pressure and this mixture has been given to the ceramic die. First monitoring & control system has worked to count tiles at the end of first process and store this data.2) After completing the 1st phase, the tiles are entered into a heating chamber. The temperature of that heating chamber is around 100 C to 900 C. Apart from this function second monitoring & controlling system have to observed rod which is used to move the tiles from one place to other place at definite speed. Speed for that process is also control by second phase system. The Second monitoring & controlling system also observed a gas pipe which supplies a gas to heating chamber for maintain the temperature of heating chamber by burning that gas. Because if temperature change, the structure of the tiles will be change. After giving a proper temperature the printing is done on the ceramic tiles. Here also temperature is important; the color of the tiles is depends on it. Changing in temperature also change the brightness of the tiles. So the second phase second monitoring & control system is monitor/maintain the temperature of that heating chamber and speed of rod as well as the flow of gas supplied to the heating chamber. 5|Page
  • 6. 3) In 3rd Phase, again they have to pass ceramic tiles from other heating chamber which has a temperature around 600 to 1300 C. Here high temperature is required for the good shape of the tiles. Secondary heating chamber is an identical module of primary heating chamber which consists moving rod, gas pipe etc.So in 3rd phase same as 2nd phase third monitoring & control system is monitor/maintainthe temperature of that heating chamber, speed of rod as well as the flow of gas suppliedto the heating chamber. Secondary heating chamber is also give actual color of the tiles.After that the ceramic tiles is given to the coolant chamber, which has a temperature ofaround 100 C so it make tiles cooler. For that third monitoring & controlling system ismaintain the temperature of that chamber as well as count the no. of tiles at the last stageand compare it with the no. of tile counted earlier. This is basically a three stage processin which monitoring & controlling system has to maintain temperature, pressure andmovement at each and every point. So it will make this process bit difficult formonitoring & controlling. Figure 3.a Tiles Making Process with Controlling Station 6|Page
  • 7. Now we will take an example of an issue which is discussed with industrial person.According to that issue whenever tiles pattern is changed, technician need to changethickness of tiles, printing style and temperature and it is very difficult to change allparameter at different place, employee who handle all system is need to rush at allmonitoring and control system.When any accident occurs in the company system activate the alarm but at the same timeif the controlling person is not there in the controlling chamber it is very dangerous for allthe workers working in company. We need to shift all three systems at one central placethen it is required to maintain all parameters like temperature, speed of rod etc. as it is.We have two choose for solving 1) Use of Ethernet control IC. 2) Communicate with computer and database.3.1 Use of Ethernet control ICEthernet control IC is use for make Ethernet enable system it is make possible to connectmicrocontroller with RJ45, ENC28J60 is a one of the IC which widely used, it is based onsynchronous communication and also for that we need to develop TCP/IP protocols withmicrocontroller and with send data to web page, we need to program our HTML webpage with microcontroller it somewhat tuff work, and also we need to purchase static IPfor use our system over internet.3.2 Communicate with Computer and DatabaseWe need to make interface microcontroller with computer and update database and nowone web page is show this data with good GUI and also user can able to update database.We can easily use any free hosting side with lass many then previse method. And alsothis method is providing good GUI interface and security.For that we are choose second way communicate with computer and database for solvingthis project. 7|Page
  • 8. VB application• microcontroller is • web application connect with • microcontroller is is communicating hardware communicating with VB with computer application microcontroller web application Figure 3.b Implication Diagram of Project 8|Page
  • 9. IMPLEMENTATION OF THE Chapter – 4 PROJECT WORK4.1 Block diagram of project: Figure 4.a Block Diagram of ProjectTo implement our project we are having to possibilities one is use with Ethernetcontroller IC and another is make some static software on computer which cancommunicate with microcontroller or also save all data in online database. 9|Page
  • 10. In first case with Ethernet controller IC we need static IP for make it online, and in ourproject we need to combine three controlling center in to one mobile controlling center itis difficult to do this with only hardware we need to go for static software approach.4.2 Component Use:  AT89C51RD2 Microcontroller  ADC8004  MAX232  VB 6.0  Microsoft Comm. Control 6.0(MSComm.)  Microsoft ADO Control 6.0(ADODC)  MY-SQL ODBC 5.1 driver  MY-SQL  Apache4.3 Simulator and Emulator use:  Proteus 7.7  Keil 4.0  Virtual Serial Port Emulator  Serial Terminal  XAMPP  BASCOM  AVR StudioIn static software approach we need to make static software which can be communicatewith microcontroller or also it save data in online database. We will use serial-port withUSRT without handshaking or communicate microcontroller with static application ofcomputer. As a static application we can use C or VB but hear we need to provide staticGUI for user and it is difficult to make GUI application with C, and another reason is wecannot able to easily update online database like My-SQL for that we are going with VB.It is easy to make good GUI with VB and also we can able to update any database withVB just use of ODBC component. And also for the serial communication VB haveseparate component “Microsoft communication 6.0” for serial port interfacing. 10 | P a g e
  • 11. Now for the online application we are choose PHP and HTML with My-SQL database,because PHP is easy and open source also easy to use My-SQL with that.For hardware part, we are using AT89C51RD2 Phillips IC with MAX232 because serial-port communication and also for temperature and pressure monitoring we are usingADC0808 analog to digital converter, and motor driver start motor.4.4 System Requirement:Operating system = windows XP, windows vista, windows 7.Net framework 2.0Internet connectionApache 2.2My-SQL Server 5.5My-SQL ODBC driver 5.1MSComm control 6.0 11 | P a g e
  • 12. DETAIL ABOUT ALL COMPONENTS Chapter – 55.1 Microcontroller P89V51RD2:The P89V51RD2 is an 89C51 microcontroller with 64kb Flash and 1024 bytes of dataRAM. A key feature of the P89V51RD2 is its X2 mode option. The design engineer canchoose to run the application with the conventional 89C51 clock rate (12clocks permachine cycle) or select the X2 mode (6clocks per machine cycle) to achieve twice thethroughput at the same clock frequency. Another way to benefit from this feature is tokeep the same performance by reducing the clock frequency by half, thus dramaticallyreducing the EMI. The Flash Program memory supports both parallel programming andin serial In-System Programming (ISP). Parallel programming mode offers gang-programming at high speed, reducing programming costs and time to market. ISP allowsa device to be reprogrammed in the end product under software control. The capability tofield/update the application firmware makes a wide range of applications possible. TheP89V51RD2 is also In-Application Programmable (IAP), allowing the Flash programmemory to be reconfigured even while the application is running.5.1.1 Features Provided By P89V51RD2:  5V Operating voltage from 0 to 40MHz  64kB of on-chip Flash program memory with ISP (In-System Programming) and  Supports 12-clock (default) or 6-clock mode selection via software or ISP  SPI (Serial Peripheral Interface) and Enhanced UART  PCA (Programmable Counter Array) with PWM and Capture/Compare functions  Three 16-bit timers/counters5.1.2 Basic Pins :  PIN 9: PIN 9 is the reset pin which is used reset the microcontroller‟s internal registers and ports upon starting up. (Pin should be held high for 2 machine cycles.)  PINS 18 & 19: The 8051 has a built-in oscillator amplifier hence we need to only connect a crystal at these pins to provide clock pulses to the circuit. 12 | P a g e
  • 13.  PIN 40 and 20: Pins 40 and 20 are VCC and ground respectively. The 8051 chip needs +5V 500mA to function properly,  PINS 29, 30 & 31: As described in the features of the 8051, this chip contains a built-in flash memory. In order to program this we need to supply a voltage of +12V at pin 31. If external memory is connected then PIN 31, also called EA/VPP, should be connected to ground to indicate the presence of external memory. PIN 30 is called ALE (address latch enable), which is used when multiple memory chips are connected to the controller and only one of them needs to be selected. We will deal with this in depth in the later chapters. PIN 29 is called PSEN. This is "program store enable". In order to use the external memory it is required to provide the low voltage (0) on both PSEN and EA pins.5.1.3 Pin Configuration: Figure 5.a Pin Diagram of Microcontroller P89V51RD2 13 | P a g e
  • 14. 5.1.4 Ports:There are 4 8-bit ports: P0, P1, P2 and P3.  PORT P0 (pins 32 to 39) PORT P0 can be used as a general purpose 8 bit port when no external memory is present, but if external memory access is required then PORT P0 acts as a multiplexed address and data bus that can be used to access external memory in conjunction with PORT P2. P0 acts as AD0-AD7,  PORT P1 (Pins 1 to 8): The port P1 is a general purpose input/output port which can be used for a variety of interfacing tasks. The other ports P0, P2 and P3 have dual roles or additional functions associated with them based upon the context of their usage.  PORT P2 (pins 21 to 28): PORT P2 can also be used as a general purpose 8 bit port when no external memory is present, but if external memory access is required then PORT P2 will act as an address bus in conjunction with PORT P0 to access external memory. PORT P2 acts as A8-A15, as can be seen from fig 1.1  PORT P3 (Pins 10 to 17): PORT P3 acts as a normal IO port, but Port P3 has additional functions such as, serial transmit and receive pins, 2 external interrupt pins, 2 external counter inputs, read and write pins for memory access.5.1.5 Oscillator Circuits:The 8051 requires the existence of an external oscillator circuit. The oscillator circuitusually runs around 12MHz, although the 8051 (depending on which specific model) iscapable of running at a maximum of 40MHz. Each machine cycle in the 8051 is 12 clockcycles, giving an effective cycle rate at 1MHz (for a 12MHz clock) to 3.33MHz (for themaximum 40MHz clock). The oscillator circuit that generates the clock pulses so that allinternal operations are synchronized. 14 | P a g e
  • 15. 5.2 Microcontroller ATmega16:ATmega16 is an 8-bit high performance microcontroller of Atmel‟s Mega AVR familywith low power consumption. Atmega16 is based on enhanced RISC (ReducedInstruction Set Computing) architecture with 131 powerful instructions. Most of theinstructions execute in one machine cycle. Atmega16 can work on a maximum frequencyof 16MHz.ATmega16 has 16 KB programmable flash memory, static RAM of 1 KB and EEPROMof 512 Bytes. The endurance cycle of flash memory and EEPROM is 10,000 and 100,000,respectively. ATmega16 is a 40 pin microcontroller. There are 32 I/O (input/output) lineswhich are divided into four 8-bit ports designated as PORTA, PORTB, PORTC andPORTD. ATmega16 has various in-built peripherals like USART, ADC, AnalogComparator, SPI, JTAG etc. Each I/O pin has an alternative task related to in-builtperipherals. The following table shows the pin description of ATmega16. Figure 5.b pin Diagram of ATmega16 15 | P a g e
  • 16. 5.2.1 Pin DescriptionsVCC Digital supply voltage.GND Ground.Port A (PA7..PA0) Port A serves as the analog inputs to the A/D Converter.Port A also serves as an 8-bit bi-directional I/O port, if the A/D Converter is not used.Port pins can provide internal pull-up resistors (selected for each bit). The Port A outputbuffers have symmetrical drive characteristics with both high sink and source capability.When pins PA0 to PA7 are used as inputs and are externally pulled low, they will sourcecurrent if the internal pull-up resistors are activated. The Port A pins are tri-stated when areset condition becomes active, even if the clock is not running.Port B (PB7..PB0) Port B is an 8-bit bi-directional I/O port with internal pull-up resistors(selected for each bit). The Port B output buffers have symmetrical drive characteristicswith both high sink and source capability. As inputs, Port B pins that are externally pulledlow will source current if the pull-up resistors are activated. The Port B pins are tri-statedwhen a reset condition becomes active, even if the clock is not running.Port C (PC7..PC0) Port C is an 8-bit bi-directional I/O port with internal pull-up resistors(selected for each bit). The Port C output buffers have symmetrical drive characteristicswith both high sink and source capability. As inputs, Port C pins that are externally pulledlow will source current if the pull-up resistors are activated. The Port C pins are tri-statedwhen a reset condition becomes active, even if the clock is not running. If the JTAGinterface is enabled, the pull-up resistors on pins PC5(TDI), PC3(TMS) and PC2(TCK)will be activated even if a reset occurs. Port C also serves the functions of the JTAGinterface.Port D (PD7..PD0) Port D is an 8-bit bi-directional I/O port with internal pull-up resistors(selected for each bit). The Port D output buffers have symmetrical drive characteristicswith both high sink and source capability. As inputs, Port D pins that are externally pulledlow will source current if the pull-up resistors are activated. The Port D pins are tri-statedwhen a reset condition becomes active, even if the clock is not running. 16 | P a g e
  • 17. RESET Reset Input. A low level on this pin for longer than the minimum pulse lengthwill generate a reset, even if the clock is not running. Shorter pulses are not guaranteed togenerate a reset.XTAL1 Input to the inverting Oscillator amplifier and input to the internal clockoperating circuit. XTAL2 Output from the inverting Oscillator amplifier.AVCC AVCC is the supply voltage pin for Port A and the A/D Converter. It should beexternally connected to VCC, even if the ADC is not used. If the ADC is used, it shouldbe connected to VCC through a low-pass filter.AREF AREF is the analog reference pin for the A/D Converter.5.2.2 ADC0804ADC0804 is a single channel analog to digital convertor i.e., it can take only one analogsignal. An ADC has n bit resolution (binary form) where n can be 8,10,12,16 or even 24bits. ADC 0804 has 8 bit resolution. The higher resolution ADC gives smaller step size.Step size is smallest change that can be measured by an ADC. For an ADC withresolution of 8 bits, the step size is 19.53mV (5V/255).The time taken by the ADC to convert analog data into digital form is dependent on thefrequency of clock source. ADC0804 can be given clock from external source. It also hasan internal clock. However the conversion time cannot be more than110us. To use theinternal clock a capacitor and resistor is connected to pin 19 and 4 as shown in the circuitdiagram. The frequency is given by the relation f= 1/ (1.1RC). The circuit uses aresistance of 10k and a capacitor of 150pF to generate clock for ADC0804. Vin, which isthe input pin, is connected to a preset to provide analog input. 17 | P a g e
  • 18. Figure. 5.c ADC0804 pin Diagram5.2.3 Pin Description :1. CS, Chip Select: This is an active low pin and used to activate the ADC0804.2. RD, Read: This is an input pin and active low. After converting the analog data,the ADC stores the result in an internal register. This pin is used to get the data out ofthe ADC 0804 chip. When CS=0 & high to low pulse is given to this pin, the digitaloutput is shown on the pins D0-D7.3. WR, Write: This is an input pin and active low. This is used to instruct the ADCto start the conversion process. If CS=0 and WR makes a low to high transition, theADC starts the conversion process.4. CLK IN, Clock IN: This is an input pin connected to an external clock source.5. INTR, Interrupt: This is an active low output pin. This pin goes low when theconversion is over.6. Vin+ : Analog Input .7. Vin- : Analog Input. Connected to ground.8. AGND: Analog Ground. 18 | P a g e
  • 19. 9. Vref/2: This pin is used to set the reference voltage. If this is not connected the default reference voltage is 5V. In some application it is required to reduce the step size. This can be done by using this pin. 10. DGND: Digital Ground. 11-18. Output Data Bits (D7-D0). 19. CLKR: Clock Reset. 20. Vcc: Positive Supply5.3 RS-232 :Communication as defined in the RS232 standard is an asynchronous serialcommunication method. The word serial means, that the information is sent one bit at atime. Asynchronous tells us that the information is not sent in predefined time slots. Datatransfer can start at any given time and it is the task of the receiver to detect when amessage starts and ends. Figure 5.d Pin diagram of RS232 19 | P a g e
  • 20. RS232 is now a days the most widely used serial I/O interface standard, RS232input/output voltage is not TTL compatible Bit 1 is –3V to –25V Bit 0 +3V to +25V.Toconnect RS232 to a TTL-level chip requires voltage converters to convert the TTL logiclevels to the RS232 voltage level, and vice versa. MAX232/233 IC chips use commonly,MAX232/233 is called line drivers.As given in fig RS232 port have 9 pin for that its name is D9 connecter here tow pin 2&3for receiving and transmitting data and 2 pin 5&9 for ground and ring indicator remainingis a ATM pin for handshaking.In RS232 framing is done for sending data 0 as a start bit, and 1 as a stop bit in between 8bit data is framed and also if needed then parity bit is add for redundancy. Framing isshown in figure 1. Figure 5.e Bit framing of UART Transmission and receivingNow we need to select proper baud rate or BPS (bit per second) for communicatebetween PC and microcontroller baud rate must be constant throughout thecommunication, in our project we are use constant baud rate 9600 throughout the project.5.4 MAX232We are developed microcontroller AT89c51RD2 board for serial communication withRS232 port. Hear MAX232 is used for convert the RS232 levels down to lower levels,typically 3.3 or 5.0 Volts, because Serial RS-232 communication works with voltages -15V to +15V for high and low. On the other hand, TTL logic operates between 0V and 20 | P a g e
  • 21. +5V, Modern low power consumption logic operates in the range of 0V and +3.3V oreven lower.RS232 and MAX232 connection diagram with pc is given below here in that fourcarpenter is used and 3(Tx) and 2(Rx) pin of the pc port is given at 13(R1in) & 14(T1out)pin of MAX232, and 11(T1in) & 12(R1out) pin of MAX232 is given to themicrocontroller pin P3.1 (Tx) & P3.0(Rx) respectively and also need to make commonground of all three devices. Figure 5.f Pin diagram of MAX232 and Connection with RS2325.5 ULN2003ULN2003 is a high voltage and high current Darlington array IC. It contains seven openCollector Darlington pairs with Common Emitters. A Darlington pair is an arrangementof two bipolar transistors.ULN2003 belongs to the family of ULN200X series of ICs. Different versions of thisfamily interface to different logic families. ULN2003 is for 5V TTL, CMOS logicdevices. These ICs are used when driving a wide range of loads and are used as relaydrivers, display drivers, line drivers etc. ULN2003 is also commonly used while drivingStepper Motors. Refer Stepper Motor interfacing using ULN2003. 21 | P a g e
  • 22. Each channel or Darlington pair in ULN2003 is rated at 500mA and can withstand peakcurrent of 600mA. The inputs and outputs are provided opposite to each other in the pinlayout. Each driver also contains a suppression diode to dissipate voltage spikes whiledriving inductive loads. Fig 5.g pin diagram of ULN20035.6 Microsoft comm. control 6.0(MSComm.)The MSComm. control provides serial communications for your application by allowingthe transmission and reception of data through a serial port. The MSComm. controlprovides the following two ways for handling communications. Interrupt communication:Interrupt process is check device signal if the devices has already in sending code tocomport of computer. We are programming in Comm. Event and On Comm. Event thatthese event will be active when coming signal from device. Polling Communication:In PC system, the polling has some transferring between terminal and CPU in case data isbyte type that keyboard send coming. The polling will be through checking signal fromdevice such as keyboard polling as user press button. For CPU polling to check signal, we 22 | P a g e
  • 23. call " Wet Poll" that will be loss time 90% , We can avoid the cycle time lose with usingpolling technique that call is "Round Robin" About in VB programming ,we use TimerControl for Checking data from Serial port .MSComm Element.Properties DescriptionComport Set and returns the communications port number.Settings Sets and returns the baud rate, parity, data bits, and stop bits as string.Portopen Sets and returns the state of a communications port. Also opens and closes a port.Output Writes a string of characters to the transmit buffer. Table 1 (MSComm Element Properties and its Description)5.7 Microsoft ADO control 6.0(ADODC)The ADO Data control uses Microsoft ActiveX Data Objects (ADO) to quickly createconnections between data-bound controls and data providers. Data-bound controls are anycontrols that feature a Data Source property. Data providers can be any source written tothe OLE DB specification. You can also easily create your own data provider usingVisual Basics class module.Although you can use the ActiveX Data Objects directly in your applications, the ADOData control has the advantage of being a graphic control (with Back and Forwardbuttons) and an easy-to-use interface that allows you to create database applications witha minimum of code.Open Database Connectivity (ODBC) is Microsofts strategic interface for accessing datain a heterogeneous environment of relational and non- relational database managementsystems. Based on the Call Level Interface specification of the SQL Access Group,ODBC provides an open, vendor- neutral way of accessing data stored in a variety ofproprietary personal computer, minicomputer, and mainframe databases. 23 | P a g e
  • 24. ODBC alleviates the need for independent software vendors and corporate developers tolearn multiple application programming interfaces. ODBC now provides a universal dataaccess interface. With ODBC, application developers can allow an application toconcurrently access, view, and modify data from multiple, diverse databases.ODBC is a core component of Microsoft Windows Open Services Architecture. Applehas endorsed ODBC as a key enabling technology by announcing support into System 7in the future. With growing industry support, ODBC is quickly emerging as an importantindustry standard for data access for both Windows and Macintosh applications.5.8 MY-SQL ODBC 5.1 driverThe MySQL Connector/ODBC is the name for the family of MySQL ODBC drivers(previously called MYODBC drivers) that provide access to a MySQL database using theindustry standard Open Database Connectivity (ODBC) API. This reference coversConnector/ODBC 3.51 and Connector/ODBC 5.1. Both releases provide an ODBCcompliant interface to MySQL Server.MySQL Connector/ODBC provides both driver-managers based and native interfaces tothe MySQL database, with full support for MySQL functionality, including storedprocedures, transactions and, with Connector/ODBC 5.1, full Unicode compliance. Figure 5.h (MY-SQL ODBC driver 5.1) 24 | P a g e
  • 25. IMPLEMENT CIRCUITS AND FLOW Chapter – 6 CHART6.1 ADC0804 interfacing with p89c51rd2The easiest way to do analog to digital conversion is to use an IC such as the ADC0804that does the work for you. The analog voltage is applied to pin 6 and the result isavailable at pins 11 through 18. We will connect pin 1 and 2 (Chip Select and Read) toground so that the chip is always enabled. (If you wanted to use more than one ADC youcould use this pin to control which chip is currently enabled).Connect pin 7 (Vin) toground. The ADC0804 includes an internal oscillator which requires an external capacitorand resistor to operate. Connect the 150 pF capacitor from pin 4 (CLOCK IN) to groundand the 10k ohm resistor from pin 4 to pin 19 (CLOCK R). Figure.6.a (adc0804 interfacing with p89v51rd2) 25 | P a g e
  • 26. ADC0804 is a very commonly used 8-bit analog to digital convertor. It is a single channelIC, i.e., it can take only one analog signal as input. The digital outputs vary from 0 to amaximum of 255. The step size can be adjusted by setting the reference voltage at pin9.When this pin is not connected, the default reference voltage is the operating voltage, i.e.,Vcc. The step size at 5V is 19.53mV (5V/255), i.e., for every 19.53mV rise in the analoginput, the output varies by 1 unit. To set a particular voltage level as the reference value,this pin is connected to half the voltage. For example, to set a reference of 4V (Vref), pin9is connected to 2V (Vref/2), thereby reducing the step size to 15.62mV (4V/255).6.1.2 Flow chart: Figure.6.b (Flowchart of adc0804 Interfacing) 26 | P a g e
  • 27. 6.2 RS232 interface with microcontrollerFor interface RS232 with microcontroller P89V51RD2 we need to use MAX232, andconnection like seen in fig. Figurer.6.c (RS232 interfacing with P89V51RD2 simulation)For that also we need to load program in microcontroller for UART (universalasynchronous receiving transmission), microcontroller need to continually read port andalso send data port at regular time interval, we send data to SBUF of microcontroller andthen as per requirement we need to send to port of microcontroller. And also UART weneed to constant BPS for that we need to use timer hear we are using timer 1 in mode 2with sat TMOD 20 mode 2 is an 8-bit timer therefore it allows only values of 00 to FFHto be loaded into the timer‟s register TH, After TH is loaded with the 8-bit value 0xFD,The SCON register is loaded with the value 50H, indicating serial mode 1, where an 8-bitdata is framed with start and stop bits. TR1 is set to 1 to start timer 1 then TI is clearedand the character byte to be transferred serially is written into SBUF register, same as forresaving data same RI is sat by 1 and read data form SBUF after that RI is cleared.We are making C code which resave data from PC and according to them send it to portP1. 27 | P a g e
  • 28. 6.2.1Flow chart of data Receiving C code: Figure 6.d (Flowchart of data Receiving by Microcontroller) 28 | P a g e
  • 29. 6.3 VB Application Interface with COM Port :For interface COM port with VB we need to use Microsoft Comm. control 6.0 componentand then add it in our form. Then assign property as our requirement, as per shown in fig. Figure.6.e (MSComm. components with properties)And then we will send and receive data with VB, with writing simple code for starting orloading time of every form we will open the comport because before the use of comportwe need to open it.Now after that we will send data receive data by just writing simple code like this.MSComm1.PortOpen = True for open port.MSComm1.Output = "a" for send output char „a‟.Label1.Caption = MSComm1.Input for take input from COM port and display tolable1.MSComm1.PortOpen = False for close port. 29 | P a g e
  • 30. 6.4 Framing of Microcontroller and PC data Communication.Here we are synchronize all data sending and receiving data from microcontroller to VBapplication hear we are send acknowledge to receive data for synchronize data of timerevent. Fig. 6.f ( Data Flow and Synchronization) 30 | P a g e
  • 31. 6.5 Make MY-SQL Database :The MySQL database has become the worlds most popular open source database becauseof its high performance, high reliability and ease of use. It is also the database of choicefor a new generation of applications built on the LAMP stack (Linux, Apache, MySQL,PHP / Perl / Python.) Many of the worlds largest and fastest-growing organizationsincluding Facebook, Google, Adobe, Alcatel Lucent and Zappos rely on MySQL to savetime and money powering their high-volume Web sites, business-critical systems andpackaged software.MySQL runs on more than 20 platforms including Linux, Windows, Mac OS, Solaris,IBM AIX, giving you the kind of flexibility that puts you in control. Whether youre newto database technology or an experienced developer or DBA, MySQL offers acomprehensive range of database tools, support, training and consulting services to makeyou successful.For save data in data base we are use My-SQL database it is communicate with VBapplication and also with PHP web application. For make motor control section we willmake database name as a motor and under this database name 2 table moter1 and moter2this two table have same field Mval and all table have only one row with informationabout states of this motor. Motor (database name) Table name Motor1 Motor2 Temp1 Temp2 Online Feld name Mval Mval Val Val En Data On On As integer As integer Boolean Table 2 (Database of System for Motor Control) 31 | P a g e
  • 32. Login (data base name) Table name Login data Field name Username Password Data type varchar(36) varchar(36) Table 3 (Login Page Database)It can be updated by static VB application or PHP web application for given bidirectionalinformation transfer. Database is saved in PC where microcontroller hardware isconnected with that and also this is served for client who can use web application forMonitoring and Control industrial Application. 32 | P a g e
  • 33. 6.7 VB application interact with databaseAs given above in MY-SQL ODBC driver we need to first make ODBC connection withMY-SQL data base, now we need to use another component from VB component list it isMicrosoft ADO data control 6.0 (OLEDB). And add this component from component listand drag to form that. Figure 6.g (Microsoft ADO Control and its Properties)Now this is proses for connect database with VB application after that we need to updatedata on data and also take data from data base, we are here direct sate filed to the separatelabel and assign property to the label as shown in finger. Coad which use for databaseconnection: 33 | P a g e
  • 34. Adodc1.RecordSource = "SELECT Author FROM book" „Set database sours and filter.Adodc1.Refresh Refresh databaseAdodc1.RecordSet.MoveFirst Move to the first recordAdodc1.RecordSet.MoveLast Move to the last recordAdodc1.RecordSet.MoveNext Move to the next recordAdodc1.RecordSet.Previous Move to the previous recordAdodc1.RecordSet.AddNew Adds a new recordAdodc1.RecordSet.Update Updates and saves the new recordAdodc1.RecordSet.Delete Deletes a current recordAdodc1.Caption = Adodc1.RecordSource Set caption of databaseAdodc1.Recordset.Fields ("field1") = text1.Text Add text1 to the field1 of databaseAdodc1.Recordset.Fields ("field1").Value = text1.Text Add value of text1 to the field1 of databaseWe need to first set the data in text box or label with use of record set and then after itgives the data to data base and then we can use it and also update it if we won‟t movedatabase first, last, privies, next than it will done with above codes.6.8 VB form GUI: 34 | P a g e
  • 35. Main Form: Static Control Form:Online Control: Figure.6.h ( GUI designing of VB6.0 Application)6.8.1 Flow Chart of VB application: 35 | P a g e
  • 36. Figure 6.i (Flow Chart of VB Application)6.9 HTML Web Site Designing: 36 | P a g e
  • 37. 6.9.1 Home Page: Figure.6.j. (Home Page of Website)6.9.2 Login Page: Figure 6.k (Login Page of System) 37 | P a g e
  • 38. Login page is used for authentication of user which won‟t to use online web applicationfor monitoring and controlling industrial application he/she must have its on user nameand password for access web applicationHere we need to tack information from user one is username and another is password forthat we need two text box and after that one button for submit this information this allinformation is under one frame.We are use POST method to take data in place of GET method because of security risen,in GET method user information is printed on URL of browser it easily stolen by anyhackers for that we are use POST method for send data to web server.We can send data to the data processing page by both the GET and POST methods of aform. Both methods are used in form data handling where each one has some differenceon the way they work. We will discuss some of the differences.As you have seen there is a character restriction of 255 in the URL. This is mostly the oldbrowsers restriction and new ones can handle more than that. But we cant be sure that allour visitors are using new browsers. So when we show a text area or a text box askingusers to enter some data, then there will be a problem if more data is entered. Thisrestriction is not there in POST method.In GET method data gets transferred to the processing page in name value pairs throughURL, so it is exposed and can be easily traced by visiting history pages of the browser. Soany login details with password should never be posted by using GET method.As the data transfers through address bar ( URL ) there are some restrictions in usingspace, some characters like ampersand ( & ) etc. in the GET method of posting data. Wehave to take special care for encoding (while sending) and decoding (while receiving)data if such special characters are present.There are some special cases where advantage of using GET method is, one can store thename value pairs as bookmark and directly use them by bypassing the form. 38 | P a g e
  • 39. 6.9.3 Flow chart: Figure 6.l (Flow Chart of Login Page) 39 | P a g e
  • 40. 6.9.4 Registration Form Figure.6.m (Registration Page of Website)6.9.5 Two step Verification with SMS: Figure.6.n (Two Step Verification) 40 | P a g e
  • 41. 6.9.6 Flow Chart: Figure.6.o (Flow Chart of Mobile Verification) 41 | P a g e
  • 42. 6.9.7 Motor Control Page:Motor control page is use to monitor motor states and also change motor states like fromON to OFF and vice versa hear four butane for two motor for first motor 1 two switchesone is for ON motor and another is for OFF motor and below that text is show the statesof motor. Figure.6.p (Motor Control and Monitor Page for System)First check which switch is pressed and then as per switch call PHP file, every PHP file iscontained database coding which update database of MY-SQL and go back to the mainpage in main page PHP script is use for sown states of motor from database, this proses iscontinues and it will give also message to user if static controlling process is started. 42 | P a g e
  • 43. 6.9.8 Flow chat for motor control: Figure.6.q (Flow Chart of Motor Control and Monitoring Page) 43 | P a g e
  • 44. PROJECT MANAGEMENT Chapter – 7Work/time Jun Jul Au Sep Oct No De Jan Feb Ma Apr e y g v c r ilLiteraturesurveyPc tomicrocontrollercommunicationAdc0804 andMotor driveLearn PHPand htmldesigningMy-SQL.connectivity toPHPData baseconnectivity toVBapplicationInsert SecurityverificationProject withATmega16Testing andTroubleshooting Table 3 (Project Management) 44 | P a g e
  • 45. ConclusionIn this report the Internet based process control has been examined. Internet-based controlis only an extra control level added into the existing process control hierarchy. Whendesigning architecture the requirement specifications, user interface, universally platform-independent programming languages and security measures are important issues.Internet technologies can provide web clients a platform, not only for remotelymonitoring the behavior of process plants, but also for remotely controlling the plants aswell. One of the key problems in the Internet based process control is the Internet timedelay. If the Internet is heavily loaded, the responses may be delayed and the operatorcorrections may take too long time for correcting the system. More advancedtechnologies should be implemented to properly deal with the Internet transmission delay.It looks that in the near future the attention will first go to develop web based monitoringsystems. When the problem of time delay is resolved the way for Internet based control iswidely open. 45 | P a g e
  • 46. ReferencesReference books and papers:The 8051 Microcontroller and Embedded Systems Using Assembly and C, 2/eby Muhammad Ali Mazidi.PHP Tutorial From beginner to master by W3 schools.Professional PHP Programming by: Jesus Castagnetto,Harish Rawat,SaschaSchumann,Chris Scollo,Deepak Veliath,Wrox Press.PHP & MySQL Web Development All-in-One Desk Reference For Dummies by JanetValade with Tricia Ballad and Bill Ballad Published by Wiley Publishing Inc.Learn Visual Basic 6.0 by KIDware (206) 721-2556.AYALA - The 8051 Microcontroller Architecture, Programming and Applications 1991Reference webs pages: 46 | P a g e