Concise Architecture of a Remote Network based
Controller
Sadiq H. Abdulhussain
Computer EngineeringDepartment College of Engineering
University of Baghdad
Hayder S. Radeaf
Computer EngineeringDepartment College of Engineering
University of Baghdad
Basheera M. Mahmood
Computer EngineeringDepartment College of Engineering
University of Baghdad
ABSTRACT
The development of microcontroller is used in monitoring and data acquisition recently. This development has born various architectures for spreading and interfacing the microcontroller in network environment. Some of existing architecture suffers from redundant in resources, extra processing, high cost and delay in response. This paper presents flexible concise architecture for building distributed microcontroller networked system. The system consists of only one server, works through the internet, and a set of microcontrollers distributed in different sites. Each microcontroller is connected through the Ethernet to the internet. In this system the client requesting data from certain side is accomplished through just one server that is in turn communicate with required microcontroller for acquire data.
Keywords
Acquisition, Monitoring, Scalability, Reusability, Economical, and microcontroller.
1.
INTRODUCTION
As a result of the increasing complexity, and modernization of life, it is necessary to develop and enhance the life styles in all of its branches. Many branches appear to fulfill the demands of modernizing and digitizing like the Information and Communication Technology (ICT), distributed system, networking and automated system [1]. In the new world, an important branch of computing and communication technologies is computer network because of its wide employment. Computer networks gave businesses the ability to cleverly handle vast amounts of information and the Internet gave them the resources to share them [2].
The implementation of Ethernet in the network has been used widely recently to connect the worldwide Internet and facilities intranet networks. Internet has the ability to access many mobile devices and application because of its low cost. Because of the development in chip manufacturing, Ethernet can be completely realized through single-chip devices. The controllers can simply be programmed, configured and used inEthernet based embedded applications.
Formerly, microcontroller has a limited connectivity option for data communication between personal computer (PC) and microcontroller. These two devices usually are connected by using serial port interface. This type of interfaces has some weakness where it’s only permitted one user to control the microcontroller and the user need to be in close proximity with the microcontroller. Enabling a microcontroller to
communicate with personal computer (PC) by other interface e.g. Ethernet network, will give the developer and end-user an ability to monitor and control the microcontroller operating device with greater flexibility [3].
2.
PROBLEM STATEMENT
The design and implementation of recourses manageability and usability to control network systems are a complex and a challenging processes because of the variety and complexity of a computer network's resources [4,5].However, many intertwined shortages appeared in the implementation of such systems. Some of these shortages are listed as follows:
1. Access Information Remotely: It is the ability to access the status of the devices in specific sites from a remote distance.
2. Scalability: It is a desirable attribute of a network, system, or process that gives a rich system performance without the need to duplicate or reengineer the system if there is an increasing of objects and elements number i.e. handle the growing volume of work gracefully [6]. 3. Reusability: It is the ability to use all or a great part of
the system design in another application, thus avoiding time wastage and reducing the cost [7].
4. Economical: This feature is done by eliminating the number of devices and hardware used in the work implementation.
It must be mentioned that computer network needs some other feature such as reliability of reaching data in the network and friendly environment to become a prefect system.
3.
CENTRALIZED ORGANIZATION OF
THE PROPOSED SYSTEM
The proposed system has a centralized organization as shown in Figure (1). This system consists of four parts as follows:
International Journal of Computer Applications (0975 – 8887) Volume 77 – No.8, September 2013
Fig 1: The Centralized Proposed System.
A centralized system ensures that users are able to access controllers (to control and monitor) from various locations from the centralized server and that all arms of an organization have access to the same data. The centralized server offers a foundation of variety of benefits, such as easy accessibility and the ability to have organized controllers of the system.
4.
DESIGN AND IMPLEMENTATION
OF THE PROPOSED SYSTEM
The proposed system consists of four parts as mentioned previously in section 3, each part will be explained as follows:
4.1
Clients
The client will control and/or monitor the point(s) in a site (Department or Office, etc) of the foundation system through a web page exist in the main server which in turn makes that client access to the chosen site, according to the user privilege. This privilege is given by the proposed system administrator. The client accesses to the main server through the internet or foundation network.
The pages appear to the user are as follows:
[image:2.595.62.286.70.173.2]i- Login Page: In this page, the user should enter the username and password to access to the system in the fields dedicated to them as shown in Figure 2.
Fig 2: Login Page
ii- Site Selection Page: In this page, the user selects the site to be controlled and/or monitored as shown in Figure 3.
Fig 3: Site Selection Page
[image:2.595.323.560.314.518.2]iii-Site Control Page: In this page, the user could control and/or monitor the devices in the selected site as shown in Figure 4.
Fig 4: Site Control Page
4.2
The Server
It is the centralized computer that is responsible about all the actions of the proposed system. The user communicates with the server to have the ability to control and/or monitor the selected site. The server has the following components:
4.2.1
Web server
The Web Server used in the implementation is apache server which is the world most popular Web Server in the last decade was used; it is a free-to-use and open source for all users, commercial-grade, lightweight, robust, reliable, secure and used in small companies and large corporations [8].Apache Web Server is responsible for accepting HTTP requests from clients and serving them as HTTP responses, usually in the form of web pages containing table's content of the database, these tables are formed in the proposed system.
4.2.2
The Database
[image:2.595.66.297.475.625.2]to a browser from the current computer or from the network[9]. It consists of tables, and every table stores its specific information as the requirements of the proposed system. All data is organized and displayed faster by using MySQL databases. MySQL is used because it provides the following features: fast, supporting large databases, customizable and secure [10]. The database used in the proposed system consists of two tables named as status and
[image:3.595.314.554.95.587.2]control. The status table includes information about the remote site microcontroller ports, while the control table contains the commands generated by the client(s). Also there are other tables in the database to hold the user authentication information and the IPs of the remote sites. The implementations of the tables used in the proposed system are shown in Table (1).
Table 1. Status And Control Tables’ Contents
Cell Name Cell Content Description
Device Name The name of the site microcontroller Port Name The name of the port (A, B or D) pin0 The value of port pin 0
pin1 The value of port pin 1 pin2 The value of port pin 2 pin3 The value of port pin 3 pin4 The value of port pin 4 pin5 The value of port pin 5 pin6 The value of port pin 6 pin7 The value of port pin 7
4.2.3
The Middleware
The middleware exists in the server and it is responsible about the communication between the client and the controllers in the sites. It is consists of several modules; main module, PIC control module, check database module and communication module as shown in Figure (5). The program language used in the proposed middleware is Visual Basic .Net (VB.NET) and Winsock control. VB.NET is a new development of Microsoft's Visual Basic with a new programming interface. That can integrate a number of technologies was designed to make Web services applications easier to develop [11].Winsock is a programming interface, it is a standard application programming interface (API) that allows and supports two or more application, programs and processes to communicate and exchanging data either on the same computer or cross a network and primarily designed to foster data communication through a network. [12]. The work steps of middleware are shown in Figure 5. The work details are explained as follows:
i- Connect with the database to get the IP and port of the remote site to which the software want to control. ii- Periodically sends a UDP message “S” to the remote
site controller to get the status information of this site. iii- The software access the control table in the database
to check if there is a control command from the user, if there is one the software sends the following UDP message:
“CYXXXXXXXX”
Where Y represent the port name which want to control and X represent the value of each bit in the Y port.
(a) Status
[image:3.595.47.287.237.416.2](b) Control
Fig 5: Middleware software modules (a) Status (b) Control
4.3 The Controller
The controller is responsible about handling the commands issued by the server and process these commands then return back the response to the server. It consists of the following components:
4.3.1 The Microcontroller
The type of microcontroller used in the proposed system is PIC16F887 which is one of the Microchip products. It has all the components that exist in the modern microcontrollers, because of its low price, many types of application, high quality and easy availability; so that it is perfect solution for different applications [13]. In the proposed system, the microcontroller in the remote site checks periodically the attached Ethernet to find whether there is a UDP packet
Main Module
DB
Check
PIC
Control
DB
Middleware
Software
C
Point
Point
1
3
2
2
4
5
6
Communication
Module
Main Module
DB
Check
PIC
Control
DB
Middleware
Software
C
Point
Point
6
7
7
5
1
2
Communication
Module
4
International Journal of Computer Applications (0975 – 8887) Volume 77 – No.8, September 2013
received. If there is a packet received, the microcontroller checks its value, if the value is equal to “S” then the microcontroller reads the values of all its ports then sends them back to the middleware, while if the received packet
[image:4.595.136.494.131.526.2]includes the character “C”, the microcontroller wait for other nine bytes including the port name which want to control and the value of its bits which then sends to the specified port to execute thecommand.ThePICoperationisshownin Figure(6).
Fig 6: PIC operation flowchart
4.3.2 Serial Ethernet
The serial Ethernet is used in many applications to connect a microcontroller to the Ethernet network. Serial Ethernet development system features are used in embed designs. Like remote monitoring systems, industrial Automation, Controlling system web browser or receive emails. This benefits them through cost and time savings because it can control, monitor and service their embedded systems over the Internet,therefore, it is used in the proposed system, 10 and 100 Mbps transfer rates are used in the proposed system [14]. A typical Ethernet system is shown in Figure 7.A number of industrial solutions for Ethernet controller application are grown rapidly. Different methods for solving any problem of the conventional Ethernet were developed, so it was used in many application fields [15].
Fig 7: Standalone Ethernet Controller
The proposed system use the ENC24J600 as Ethernet controller where its block diagram and its connection to the PIC 16F887 microcontroller through SPI interface is shown in Figure 8.
Start
Configure the Ethernet port
and start listening to
incoming packets
Read UDP
packet
Is packet =
S?
Read ports status and
send it back to
middleware
Wait for port name to
control
Turn ON or OFF the
required port pin
Is packet =
C?
Yes Yes
[image:4.595.323.538.593.659.2]Fig 8: ENC24J600 Block diagram and connection to microcontroller
4.4 Points
[image:5.595.55.312.444.736.2]The points are set of sensors and transducers connected to a specific controller in the proposed system to control devices and monitor their status by the user remotely. The set of sensors used here produce their results in analogue format so that they will be connected to the controller through one of its available analogue pin. The transducers in the system control multiple appliances in either digital or analogue format. The digital transducers connect digital pin from the controller to an appliance through relay as shown in Figure (9), while the analogue transducer using digital pin to generate a PWM signal which applied to low pass filter to convert it to analogue signal that passed to the specified appliance as shown in Figure (10).
Fig 9: Digital Transducer
Fig 10: Analogue Transducer
5.
CONCLUSION
Controller system considers one of the important techniques in the recent years because of the great facilities that these systems give to control, command, manage direct or regulate the behavior of other device(s), machine(s) or system(s). The proposed system is a distributed microcontroller networked system which has many features that are; a remotely control that is achieved through the using of the server and the serial Ethernet which in turn connected to the microcontroller, scalability that is achieved through the rubout middle ware built in the server which handle the increasing number of sites without make any change on it, reusability feature that is achieved through the software used, since there is no need to make any change in this software if it is used in different applications such as monitoring and control the temperature, voltage, lighting and valves of different systems, also this software can control different systems in the same time, economical feature that is achieved by using one server to acquire and control many sites in the same time instead of using one server in each site to control the dedicated site placed in it. Therefore, this system is considering a new prototype that can be used in different, multiple and large-scale applications.
6.
REFERENCES
[1] Ali M. F. M., Younis M. I., Zamli, K. Z. and Ismail, W., "Development of Java based RFID application programmable interface for heterogeneous RFID system", The Journal of Systems and Software, Vol. 83, No.11, pp. 2322-233, 2010.
[2] Mahmood B. M., "Construction of an Infrastructure for RFID System", M.Sc. Thesis, University of Baghdad, Colleague of Engineering, 2012.
[3] Ab-Rahman M.S., Saupe M.N.M, Premadi A. and Jumari K., " Embedded Ethernet Microcontroller For Optical Monitoring", Embedded Ethernet Microcontroller For Optical Monitoring, Port Dickson, Negeri Sembilan, Malaysia, 2009.
[4] Abed al Hussain S.H.," Design and simulation of RFID reader protocol for Vehicle tracking system for University Of Baghdad-Aljaderia campus", Proceeding of 2nd Information Technology Conference, University of Technology, pp. 142-158, April 2010.
[5] Su X., Chu. C. C., Prabhu B.S. and Gadh R., "Service Organization and Discovery for Facilitating RFID Network Manageability and Usability via Win RFID Middleware", Proceeding of IEEE Conference on Wireless Telecommunications Symposium, pp. 392-398, April 2008.
[6] Bondi A. B., "Characteristics of Scalability and Their Impact on Performance", Proceedings of the 2nd international workshop on Software and performance, New York, USA, pp.195-203, 2000.
[7] Abed Al-Tameemi Z. F.," Design and Implementation of a Scalable Automated RFID based Attendance System with Scheduling Technique ", M.Sc. Thesis, University of Science Malaysia, School of Electrical and Electronic Engineering, 2011.
International Journal of Computer Applications (0975 – 8887) Volume *– No.*, ___________ 2013
[9] Glass M., Scouarnec Y. L., Naramore E., Mailer G., Stolz J. and Gerner J., "Beginning PHP, Apache, MySQL Web Development ", Wiley Publishing, Inc, 2004.
[10] Oracle Data Sheet, "MYSQL", Oracle and/or its affiliates, 2011.
[11] Thai T., Lam H., " .Net Framework Essentials", Third Edition, O'REILLY and Associates Inc., 2003.
[12] Jones A., Ohlund J., "Network programming for Microsoft windows", second edition, Microsoft Press, 2002.
[13] PIC Microcontrollers, by Milan Verle, mikroElektronika; 1st edition (2008), ISBN-13: 978-86-84417-15-4. [14] "Serial Ethernet", manual, MikroElectronika,