Professional Documents
Culture Documents
Access
By
A Thesis Presented to
In partial fulfillment
of the requirement for the degree of
By
1 Raheel Ahmad 2KX3-EE-117
i
Declaration
We, hereby declare that in this project neither as a whole is copied but
some part has been copied from some sources with exact references.
this thesis have not been submitted to any other University or Institute
Signature: __________________
Signature: __________________
Signature: __________________
ii
Pakistan Institute of Engineering and Technology,
Multan, Pakistan
under the supervision of their project advisor and approved by the project
partial fulfillment of the requirements for the four year degree of B.S. Electrical
Engineering.
iii
Acknowledgement
Alhamdulillah, all praises to Allah for the strengths and His blessing in
completing this project. We are thankful to our parents for their endless
department PIET for their guide and help throughout this dissertation
process.
iv
Abstract
In current era with technological advancement any electrical machine,
speed control can effects the overall system performance cost, time
and quality. In order to monitor and control these faults, different public
automation processes like LAN, WAN etc. The aim of this project is to
friendly real time controlling, cost, time, efficient and good infrastructure
of industrial automation.
v
TABLE OF CONTENTS
TITLE....................................................................................................................................i
DECLERATION..................................................................................................................ii
ACKNOWLEDGEMENT..................................................................................................iv
ABSTRACT.........................................................................................................................v
TABLE OF CONTENTS....................................................................................................vi
TABLE OF FIGURES......................................................................................................viii
LIST OF TABLES..............................................................................................................ix
CHAPTER 1 INTRODUCTION TO AUTOMATION ....................................................... 1
1.1 Automation ............................................................................................................. 1
1.1.1 Office Automation ........................................................................................... 1
1.1.2 Building Automation ....................................................................................... 2
1.1.3 Power Automation: ......................................................................................... 2
1.1.4 Home Automation: .......................................................................................... 3
1.1.5 Industrial Automation: .................................................................................... 3
CHAPTER 2 INTRODUCTION TO REMOTE ACCESS ................................................. 4
2.1 Remote Access ........................................................................................................ 4
2.2 Remote Devices Accumulation: ............................................................................. 4
2.2.1 Wired devices: ................................................................................................. 4
2.2.2 Wireless Devices:............................................................................................. 4
2.2.2.1 Bluetooth:.................................................................................................... 5
2.2.2.2 Wi-Fi: .......................................................................................................... 5
2.2.3 Remote Access Using Internet: ........................................................................ 6
2.2.3.1 VPN: ........................................................................................................... 6
2.2.3.2 Port Forwarding: ......................................................................................... 6
CHAPTER 3 INTRODUCTION TO ARDUINO ............................................................... 4
3.1 Arduino Uno ........................................................................................................... 8
3.2 Software IDE: ......................................................................................................... 9
3.3 Basic Function of Arduino UNO: ........................................................................... 9
CHAPTER 4 INTRODUCTION TO LABVIEW ............................................................. 10
4.1 LABVIEW ............................................................................................................ 10
4.2 Operation Panels ................................................................................................... 10
4.2.1 Control Panel ................................................................................................. 11
4.2.2 Function Panel ............................................................................................... 11
vi
4.3 DATA ACQUSITION .......................................................................................... 12
CHAPTER 5 METHODOLOGY ...................................................................................... 13
5.1 Hardware Implementation: .................................................................................. 13
5.1.1 Arduino UNO Board: ..................................................................................... 13
5.1.2 L298N ............................................................................................................ 15
5.1.3 FAN................................................................................................................ 17
5.1.4 LED Light Bulb ............................................................................................. 18
5.1.5 Heating Element............................................................................................. 19
5.1.6 LM35 (Heat Detector).................................................................................... 19
5.1.7 Connecting L298N to Arduino: ..................................................................... 21
5.1.8 Connecting Appliances to L298N:................................................................. 22
5.1.9 Implementation of SCADA System: ............................................................. 23
5.2 Programming the Arduino-Uno ............................................................................ 23
5.3 Designing of LABVIEW GUI .............................................................................. 24
5.3.1 Project Front Panel GUI................................................................................. 25
5.3.1.1 VISA Resource Name (Front Panel)......................................................... 25
5.3.1.2 Switches .................................................................................................... 26
5.3.1.3 Temperature Indicators ............................................................................. 26
5.3.2 Project Back Panel View: .............................................................................. 27
5.3.2.1 VISA Configuration Serial Port ................................................................ 28
5.3.2.2 VISA Read Function ................................................................................. 30
5.3.2.3 While Loop ............................................................................................... 31
5.3.2.4 VISA Write Function ............................................................................... 32
5.3.2.5 Case Structure: ......................................................................................... 33
5.4 Uno Interfacing with Lab VIEW: ......................................................................... 34
5.5 Remote Access: ..................................................................................................... 35
5.5.1 Remote Access Operation: ........................................................................... 41
Chapter 6 Conclusion & Future work: ............................................................................... 43
References .......................................................................................................................... 44
vii
List of Figures:
Figure 2-1 Port Forwarding web Server ............................................................... 7
Figure 3-1 Arduino UNO Board ............................................................................ 9
Figure 4-1 LabVIEW Control Panel View ........................................................... 11
Figure 4-2 LabVIEW Functional Panel View ...................................................... 11
Figure 5-1 L298N .............................................................................................. 15
Figure 5-2 DC FAN ............................................................................................ 17
Figure 5-3 LED Light Bulb .................................................................................. 18
Figure 5-4 Resistor ............................................................................................ 19
Figure 5-5 LM35................................................................................................. 19
Figure 5-6 Arduino UNO Board Connection with L298N .................................... 21
Figure 5-7 Software IDE Coding ........................................................................ 24
Figure 5-8 Front Panel GUI ................................................................................ 25
Figure 5-9 Flow Chart GUI ................................................................................. 27
Figure 5-10 VISA Configuration Serial Port ....................................................... 28
Figure 5-11 VISA Read Function ....................................................................... 30
Figure 5-12 While LOOP Structure .................................................................... 31
Figure 5-13 VISA Write Function ....................................................................... 32
Figure 5-14 Case Structure ................................................................................ 33
Figure 5-15 COM Port Selection in MAX ........................................................... 34
Figure 5-16 Enabling Web Server ...................................................................... 35
Figure 5-17 Enabling Log File ............................................................................ 36
Figure 5-18 Selection of VI for Remote Panel .................................................... 36
Figure 5-19 Web Pages Saving Root Directory ................................................. 37
Figure 5-20 Web Browser Remote Panel Visualization ..................................... 37
Figure 5-21 URL for Remotely Accessing Front Panel ...................................... 37
Figure 5-22 Local Area Connection in Server .................................................... 38
Figure 5-23 Internet Protocol Version in Server ................................................. 39
Figure 5-24 Assigning Static IP to Server .......................................................... 39
Figure 5-25 Select Port Forwarding in Router .................................................... 40
Figure 5-26 Remote Front Panel View on Client ................................................ 41
viii
List of Tables
Table 5.1 Arduino UNO Specification Table ...................................................... 14
Table 5.2 LM35 Specification ............................................................................. 20
ix
Chapter 1 Introduction to Automation
1.1 Automation:
expertise [1].
for accomplishing basic tasks and goals. Raw data storage, electronic
1
automation helps in optimizing or automating existing office
procedures.
building [1].
monitor different power units, rely their status and health information.
The power automation system can even carry out fault detection and
system.
2
1.1.4 Home Automation:
Home automation includes all that a building automation provides like
multimedia home theatres, plant watering and so on. But there exists a
(since automated systems can work 24 hours a day), and to reduce the
3
Chapter 2 Introduction to Remote Access
telecommuters, and people who are travelling may need access to the
corporation's network [4]. Once you have set up your remote access
tool, you can open all of your computer’s files and programs remotely,
from another device. You can be on the other side of the world and,
approach is that it is simple for the user and most modern operating
4
connect the different components, but the disadvantages are that we
now have to address the problems of (1) Device discovery and (2)
be expensive.
2.2.2.1 Bluetooth:
Handheld devices often utilize Bluetooth technology to avoid wires.
2.2.2.2 Wi-Fi:
Wireless Fidelity (Wi-Fi) technology is a branding and marketing name
for interoperable IEEE 802.11 devices [5] – that have been designed
PDAs and the latest generation cellular phones [5]. Much faster
making Wi-Fi a common solution for wireless services that require fast
connections.
5
2.2.3 Remote Access Using Internet:
If server have a windows operating system and want to access his
home computer through internet this can be done by VPN & Port
forwarding technique.
2.2.3.1 VPN:
If user create a virtual private network (VPN), so no need to expose the
away from home, you can connect to the VPN, and your computer will
act like it’s part of the same local network as the computer at home,
running the Remote Desktop server [6]. This will allow you to access
local network. Setting up a VPN is by far the more secure option when
traffic from the outside world to the appropriate server inside a local
number; for example, Web traffic uses port number 80 [6]. If the local
6
the port forwarding panel in the router would be configured to direct
Ports are "opened" and "closed" in the firewall, which determines which
commercial firewalls are used. In the home and small business, the
security camera setup, voice over IP, and downloading files [6].
7
Chapter 3 Introduction to Arduino
compiler and the boot loader that runs on the board [7].
An Arduino board contains 14 digital I/O pins, six pins can produce
I/O pins are on the top of the board, via female 0.1 inch headers.
8
Figure 0-2 Arduino UNO Board
& is derived from IDE for the processing programming language & for
has many features just like syntax high lighting & have capability to
click [7].
libraries, etc. The setup function will run only when power up or reset
the loop () section of your sketch is used to actively control the Arduino
board.
9
Chapter 4 Introduction to LABVIEW
4.1 LABVIEW:
LabVIEW software used for measurement or control system and is the
VIs, contains a Front Panel and a Block Diagram. Front Panel has
variety of functions. The functions (icons) are wired inside the Block
Diagram where the wires represent the flow of data [8]. The execution
Diagram will execute only if the data is available at each input terminal
of that node.
10
4.2.1 Control Panel:
This panel mainly contain Graphs, Switches, & Different Indicators &
add on front panel by using all of this user can control & I/O device.
This above panel mainly add various Structure loops & I/O devices in
Back panel also add some virtual Instruments which are the essential
11
4.3 DATA ACQUSITION:
Data acquisition (DAQ) is the process of acquiring an electrical or
with associated software. A DAQ card has various features which can
can be used to get data related to impulse voltage which require very
high accuracy. Sampling rate of this card is 2mbps (mega samples per
second) [9]. This DAQ can be used in variety of platform like Microsoft
windows, MAC, and Linux etc. For acquiring data from high voltage
as current [9].
12
Chapter 5 Methodology
This part will explain the procedure adopted to achieve the various
Project Flow:
appliances including two Fans, two Led & heating element & heating
electronics components.
13
6 can be used as PWM outputs), 6 analog inputs, a USB connection, a
power jack, an ICSP header, and a reset button. The difference seen
in the Arduino Uno is that it does not use the FTDI USB-to-serial driver
14
5.1.2 L298N:
speed and direction, but can be used for other projects such as driving
arrays.
Working of L298N:
droplets of water. The voltage would be the water flowing over the
wheel at a constant rate, the more water flowing the higher the voltage.
Motors are rated at certain voltages and can be damaged if the voltage
using PWM [10]. The longer the pulses the faster the wheel will turn,
15
the shorter the pulses, the slower the water wheel will turn. Motors will
16
5.1.3 FAN:
FAN used for produce cooling & reducing temperature .For example in
we mostly use the fan for cooling purpose because of cost effective,
and easy to control for remotely. Because proposed thesis bring the
industrial fan which can be operated at low voltages & current ratings.
Circuit type: DC
Voltage: 12v
Power: 4.32w
17
5.1.4 LED Light Bulb:
operated at low voltages & current ratings. Current rating is given below
Circuit type: DC
Voltage: 12v
Power: 7w
18
5.1.5 Heating Element:
Although resistors are used to reduce current flow, adjust signal levels,
Description:
19
temperature sensors calibrated in Kelvin, as the user is not required to
single power supplies, or with plus and minus supplies. As the LM35
device draws only 60 µA from the supply. The LM35 device is rated to
Specifications:
20
5.1.7 Connecting L298N to Arduino:
Description:
Motor Controllers.
Make sure you have all of your grounds tied together; Arduino,
Power source, and the Motor controller. The PWM Pins are
21
5.1.8 Connecting Appliances to L298N:
but in this thesis Arduino is used as an alternate of PLC & also for
automation purpose. Arduino pin (A0) used as an input pin & pins (6,
7, 8, and 13) used as output pins which will trigger the appliances as
Firstly, connect your Motor wires with L298N motor driver circuit
are used to operate total Arduino board & each Arduino pin
Also, one of Arduino pin is used as input just like sensor which
22
5.1.9 Implementation of SCADA System:
SCADA (supervisory control and data acquisition) system is
high power ceramic resister is used as heating element with LM35 heat
𝑃 ∝ 𝐼2 𝑅
heat detector sensor is used which will detect the temperature across
Addition it will measure the temperature from the power resister & send
In order for the Arduino-Uno board to be able to interact with the given
23
writing any code for any function wanted to be performed by the
Select the serial device of the Arduino board from the Tools |
board.
24
control and monitoring, in real-time, of the actual laboratory equipment.
25
connected for operating the communication between LabVIEW & serial
(Baud rate, data bits, parity bits, and stop bits) can be change for
5.3.1.2 Switches:
These are called Boolean Switches they change their current positions
when switch is press. Also LED is used for checking the ON & OFF
position of Switch. Here both switch & Led used for change the selector
temperature which set to trigger the certain appliances (FAN ,Bulb) etc.
26
5.3.2 Project Back Panel View:
27
Block Diagram Components:
port because the serial port sends and receives bytes of information
Baud Rate, Data & Parity Bits: NI-VISA provide asynchronous Serial
Communication, the port can transmit data on one line while receiving
28
data on another. The important serial characteristics are baud rate,
data bits, stop bits, and parity. For two ports to communicate, these
1) Baud Rate:
The baud rate is the rate at which information is transferred in a
2) Data Bits:
It examine the actual data bits in a transmission. When the
3) Parity Bits:
Parity bit’s used for Error checking during Transmission of Data
-- even, odd, marked, and spaced. You also can use no Parity.
Although, for even & odd parity we set a parity bit after data bits
to prove that incoming data have how much logic high & low bits.
29
4) Stop Bits:
Stop bits are used at the end of frame before transmission of
data.
5) Error In/Out:
This used for checking the Error conditions before running of
node.
2) Byte Count:
Its show maximum number of bytes which we requested to read
the maximum no of bytes which we can demand to read are 256 bytes.
30
3) Read buffer:
It sends no of bytes which is basically read through VISA serial port
4) Read count:
It contain number of bytes which is actually read by serial
Communication.
1) Sub diagram:
It contain the code which need to execute with in while loop at per
31
2) Iteration Terminal
It contain the number of counts whenever any condition become true
counts is (231 – 1). After this value remain same just equal to (231 – 1).
3) Conditional Terminal
This terminal work on different values of Boolean Inputs & define at
switch a user can change current true & false conditions etc
2) Write Buffer:
It mainly contains the data which is need to be write on serial
particular object.
32
3) Return count:
It contains the total actual number of bytes which are written on
4) Error In/Out:
This used for checking the Error conditions before running of node.
1) Selector Label:
It contain different values for which a case is executed to give desirable
output. On default it contain two values (True & False) a user can
execute a different code on True value & for false value code will vary.
33
2) Sub diagram (Case):
It contain the Code which is need to be executed for different values of
Selector Label.
3) Case Selector:
As Selector Label contain different range of values unlike (True &
False) any Range value can be selected just by using Case Selector.
For instance, for 2 position switch, range of values may be true & false
or may be 1 & 2.
will open panel from left side select your communication port just like
Now Open the LabVIEW file & select your targeting communication &
34
Arduino Board & click on continuously running in LabVIEW front
panel.
for this type of connection. The steps are identical if the computer has
Remote Panel Server while on 3rd step Brows the Root directory
& so on & on 4th step select port 80 While on 5th & 6th use log files
35
Figure 0-21 Enabling Log File
Till last step Front panel would be ready for remotely access now for
panel [12].
step browse for your VI file which need ready for remotely control &
36
Now 4th step show directory where web publishing page will be saved
while on 6th step show URL by copying this URL user can access this
front panel remotely with the help of web publishing page. After clicking
37
This remote panel method will work only in same Domain Public IP
network but for remotely access this webpage with internet just replace
your pc name with Public IP address & port number [12] etc. In addition
by this method user can just access his front panel from his server
computer & for controlling this on your remote computer LabVIEW Run
38
Select Internet Protocol Version 4 (TCP/IPv4) or Internet Protocol
39
Set up the router configuration by logging on to the router.
40
Now on client computer go to the web browser (Internet Explorer)
Now by typing above URL client can control his panel remotely etc.
employing the LabVIEW web server. This server allows multiple users
to access the front panel simultaneously and in real time, but only one
computer. To access the front panel through a web browser, the virtual
to determine how long a remote user can control the front panel. For
the remote access to the front panel, LabVIEW is not required but it is
images. The user accessing the front panel must request the control of
the control will be directly granted, but if another user has currently the
control, the server queues the request and the control will be granted
until the other user releases the control (right-clicking and selecting
Release Control of VI) or the time limit is exceeded. Only the server
user can regain control at any time and consult the users queue list
[14].
42
Chapter 6 Conclusion & Future Work
Our designed system for industrial control provides remote access that
use to create the GUI (graphical user interface) which can be access
get access over communication port for controlling the industrial panel
43
REFERENCES
[1] M. Olfusi, "Individual Control Home Automation System," Nigeria, 2013.
[2] Terry M. Brei, "What Is Industrial Automation," 15 October 2013.
[3] M. Rouse, "remote access," remote access, september 2005.
[4] J. Bruce, "Home Networking," 28 March 2015.
[5] W. Glenn, "How To Remote Access over the Internet," 22nd December 2016.
[6] N. Zlatanov, "Arduino and Open Source Computer Hardware and Software," IEEE
Computer Society, November.
[7] A. MISHRA, "DESIGN OF Temperature Controller Using LabVIEW," Rourkela, Odisha-
769008, 2013.
[8] P. Goswami, "Data Acquisition," Nirma University,India, 2015.
[9] Reichenstein7, "Arduino Modules - L298N Dual H-Bridge Motor Controller," 24th October
2013.
[10] Texas Instruments, 2016.
[11] N. Support, How Do I Publish My VI to a Web Page?, 2017.
[12] N. Support, How Do I Connect to a Remote Front Panel that is Hosted Behind a Remote
Router?, 2015.
[13] F. H. V.-L. et, "Electropneumatic system for industrial automation: a remote," in : 10.1016/j,
2013.
44