Download - 52570691 Akshay Project Report
-
8/2/2019 52570691 Akshay Project Report
1/44
Project Report
On
Industrial Automation Using MATLAB
This project report is submitted in
Partial fulfillment of the requirement for the award of
Degree of Bachelor of Engineering in
Electronics and Telecommunication Engineering
Submitted by
Akshay Agrawal
Amulya Agarwal
Gaurav Sinha
Nikita Raut
Guided by
Prof . Vijaya C. Patil
Electronics and Telecommunication Engineering Department
G. H. RAISONI COLLEGE OF ENGINEERING
(An Autonomous Institute under UGC Act 1956)
Digdoh Hills , Nagpur -440016
2010-2011
-
8/2/2019 52570691 Akshay Project Report
2/44
G. H. RAISONI COLLEGE OF ENGINEERING
(An Autonomous Institute under UGC Act 1956)
Digdoh Hills , Nagpur -440016
Electronics and Telecommunication Engineering Department2010-2011
C e r t i f i c a t e
This is to certify that the project titled
Industrial Automation Using MATLABin Partial fulfillment of the requirement for the award of
Degree of Bachelor of Engineering in
Electronics and Telecommunication Engineering
of Rastrasant Tukadoji Maharaj Nagpur University, Nagpuris a bonafide work carried out ancompleted under my guidance and supervision during the academic year 2010-2011
SubmittedbyAkshay Agrawal
Amulya Agarwal
Gaurav Sinha
Nikita Raut
Prof . Vijaya C. Patil
Project Guide,
Prof . M.M. KhanapurkarHead of the Department
Dr. P.R. BajajDirector
-
8/2/2019 52570691 Akshay Project Report
3/44
-
8/2/2019 52570691 Akshay Project Report
4/44
DECLARATION
I hereby declare that the project work entitled Industrial Automation Usin
MATLAB submitted to the G.H. Raisoni College of Engineering, is a record of an origin
work done by our group under the guidance of Prof. Vijaya C. Patil, Lecturer, Dept O
Electronics & Telecommunication Engineering, Prof. M. M. Khanapurkar, Head of Dept, Dep
Of Electronics & Telecommunication Engineering and Dr. P. R. Bajaj, Director, G. H. Raison
College of Engineering, and this project work is submitted in the partial fulfillment of th
requirements for the award of the degree of Bachelor of Engineering in Electronics
Telecommunication Engineering.
The results embodied in this thesis have not been submitted to any other University or Institu
for the award of any degree or diploma.
AKSHAY AGRAWAL AMULYA AGARWAL GAURAV SINHA NIKITA RAUT
-
8/2/2019 52570691 Akshay Project Report
5/44
ACKNOWLEDGEMENT
A success of any work depends on efforts of many individuals. We would like to take thi
opportunity to express our deep gratitude to all those who extended their support and hav
guided us to complete this project work.
We wish to express our deep sense of gratitude to our Project Guide, Prof. Vijaya C. Pati
lecturer, Dept. of Electronics & Tele-Communication Engg., for her guidance and usefu
suggestions, which helped us in completing the project work in time.
We choose this moment to acknowledge Prof. S. R. Sonaskar, lecturer, Dept. of Electronics &
Tele-Communication Engg., who always cleared our doubts regarding our project work.
Words are inadequate in offering our thanks to Dr. P.R. Bajaj, Director, G.H. Raisoni Colleg
of Engineering, for her encouragement and cooperation in carrying out the project work.
Finally, yet importantly, we would like to express our heartfelt thanks to almighty for hi
blessings which helped us in the successful completion of this project.
Name of Projectees Mobile No. Email ID
AKSHAY AGRAWAL (9860874108) ([email protected])
AMULYA AGARWAL (9021146626) ([email protected])
GAURAV SINHA (9975436579) ([email protected])
-
8/2/2019 52570691 Akshay Project Report
6/44
NIKITA RAUT (9503871193) ([email protected])
-
8/2/2019 52570691 Akshay Project Report
7/44
CONTENTS
INTRODUCTION
LITERATURE REVIEW
METHODOLOGY
TOOLS
4.1 MATLAB
4.1.1 GUI
4.1.2 DAQ TOOLBOX
4.2 INSTRUCTIONS USED
DESIGN AND IMPLEMENTATION
RESULTS
CONCLUSION & FUTURE SCOPE
REFERENCES
APPENDIX
SOURCE CODE
-
8/2/2019 52570691 Akshay Project Report
8/44
1. INTRODUCTION
-
8/2/2019 52570691 Akshay Project Report
9/44
In the current highly competitive business environment, the industry is challenged by the demand for productivity
quality, safety and environmental protection. Tight profit margins and networked manufacturing emphasise the
need for integration and global optimisation of production facilities. The role of information technology in
achieving these goals has become critical. Large and complex production systems can not be efficiently and safel
managed without advanced information management and process control. End users expect to get improved
functionality at reasonable cost. Management of knowledge and real-time information, integration with conditionmonitoring and plant maintenance, high availability, flexible upgrades and life-cycle support are examples of key
requirements. System integrators need efficient tools for building applications. Manufacturers face the challenge
of satisfying customers needs while still maintaining a sound and profitable product structure in a rapidly
changing technical and business environment.
For many years, integrated, intelligent and dependable control systems have been the focus of standardisation
organisations, industrial consortia and research groups. The solutions have, however, been hard to reach, partly
due to the complexity of the issue and partly because of conflicting commercial interests. Only few efforts haveprovided practical results about common architectures and application objects that could make systems really
understand each other. Technically, open control systems still focus on ways of making bits and bytes flow
between devices from different vendors. There is also a gap between research results and real-life applications.
Instead of elegant control theories, practical automation projects often struggle with low-level technical problems
Important issues are, for instance, how to find out user requirements, how to interface different products, and how
to reuse existing application software.Monitoring and control systems are basic ingredients of efficient, flexible
and reliable production systems.
Industrial automation is the use of control systems such as computers to control industrial machinery and
processes, reducing the need for human intervention. In the scope of industrialization, automation is a step beyon
mechanization.Whereas mechanization provided human operators with machinery to assist them with the physica
requirements of work, automation greatly reduces the need for human sensory and mental requirements as
well.Processes and systems can also be automated.
Our project Industrial Automation Using MATLAB focuses on controlling and communicating with a variety of
industry standard data acquisition devices. Our project will be able to acquire live measured data directly into
MATLAB or Simulink for immediate analysis.
MATLAB is Mathworks Laboratories, an engineering tool used for the various requirements of the user. Thi
project is used in the industry where the highly restricted or unsuitable conditions for workers occur. The differen
machineries such as Motors, Switches, and Sliders etc. can be operated using wireless communication vi
MATLAB DAQ toolbox.
-
8/2/2019 52570691 Akshay Project Report
10/44
The Data Acquisition (DAQ) Toolbox in MATLAB provides a complete set of tools for analog input, analo
output, and digital I/O from a variety of PC-compatible data acquisition hardware, thus providing us a singl
integrated environment for data acquisition, analysis and visualization, performing ONE SHOT or continuou
data acquisition.
The toolbox lets us configure the external hardware devices, read data into MATLAB and Simulink fo
immediate analysis, and send out data. We can customize our acquisitions, access the built-in features o
hardware devices, and incorporate the analysis and visualization features of MATLAB and related toolboxes int
the design. We can analyze or visualize the data, save it for post processing, and make iterative updates to the tes
setup based on analysis results.
Data Acquisition Toolbox also supports Simulink with blocks that enable us to incorporate live data or hardwar
configuration directly into Simulink models. We can then verify and validate our model against live, measure
data as part of the system development process.
The Data Acquisition Toolbox streams data into graphical display using the SoftScope software oscilloscop
which directly interfaces to device specific features, such as single channel and multichannel acquisitions an
single point and buffered I/O. It controls acquisitions with hardware and software triggers and thus providing
consistent software interface for easy substitution of hardware boards and vendors.
For the ease of access, the users are provided with Graphical User Interface (GUI), i.e., a graphical display in one
or more windows containing controls, called components that enable a user to perform interactive tasks. The GUI
is developed using GUIDE, the MATLAB graphical user interface development environment, which provides a
set of tools for creating graphical user interface (GUI).
-
8/2/2019 52570691 Akshay Project Report
11/44
2. LITERATURE REVIEW
-
8/2/2019 52570691 Akshay Project Report
12/44
DEFINITION:
Automationis the use of control systems and information technologies to reduce the need for human work in th
production of goods and services. In the scope of industrialization, automation is a step beyond mechanizatio
Whereas mechanization provided human operators with machinery to assist them with the muscular requiremen
of work, automation greatly decreases the need for human sensory and mental requirements as well. Automatio
plays an increasingly important role in the world economy and in daily experience.
Automation has had a notable impact in a wide range of industries beyond manufacturing (where it began). Onc
ubiquitous telephone operators have been replaced largely by automated telephone switchboards and ansourin
machines. Medical processes such as primary screening in electrocardiography or radiography and laborato
analysis of human genes, sera, cells, and tissues are carried out at much greater speed and accuracy by automate
systems. Automated teller machines have reduced the need for bank visits to obtain cash and carry o
transactions. In general, automation has been responsible for the shift in the world economy from industrial jo
to service jobs in the 20th and 21st centuries.
ADVANTAGES AND DISADVANTAGES
The main advantagesof automation are:
Replacing human operators in tasks that involve hard physical or monotonous work.
Replacing humans in tasks done in dangerous environments (i.e. fire, space, volcanoes, nuclear facilities,
underwater, etc.)
Performing tasks that are beyond human capabilities of size, weight, speed, endurance, etc.
Economy improvement. Automation may improve in economy of enterprises, society or most of humanity.
For example, when an enterprise invests in automation, technology recovers its investment; or when a state
or country increases its income due to automation like Germany or Japan in the 20th Century.
The main disadvantages of automation are:
Technical Limitation. Current technology is unable to automate all the desired tasks.
Security Threats/ Vulnerability: An automated system may have limited level of intelligence, hence it is most
likely susceptible to commit error.
Unpredictable development costs. The research and development cost of automating a process may exceed the
cost saved by the automation itself.
High initial cost. The automation of a new product or plant requires a huge initial investment in comparison
with the unit cost of the product, although the cost of automation is spread in many product batches.
-
8/2/2019 52570691 Akshay Project Report
13/44
RELATIONSHIP TO UNEMPLOYMENT
Multivariate Effect
Most people consider it common sense that automation has the potential to foster unemployment, because it
obviates human work by transferring tasks to machines. However, the translation of that potential into observed
effect has largely not happened in the two centuries during which it has been continually predicted. After many
decades of automation development and dissemination, the net macroeconomic effect has been generally positivautomation has been part of a general trend of economic growth worldwide; standards of living have risen in
many places; and automation has never yet been shown to have induced any widespread structural
unemployment. The main explanation for this is that, so far, job losses in any one particular economic niche hav
always been more than offset by job gains in other niches. As the looured unit cost of goods and services (which
the automation made possible) gave consumers more purchasing poour to devote to other goods and services,
new jobs sprang up in the production of those goods and services. Thus each time that automation has freed up
human resources, those resources have been redeployed by market forces (although it did not always happen
without turbulence in the lives of individual workers).
One of the earliest promises of automation was to allow more free time, without any threat of income reduction.
This effect has been seen in many individual facets of life (for example, the automatic washing machine has mad
laundry less time-consuming; engine control units have reduced the amount of automotive downtime; the
automatic dishwasher has made dishwashing less time-consuming), but the net outcome of modern life in
developed economies remains a state of hurry and busyness, mostly because rising living standards have brough
rising expectations in direct relation. (Each time-saving improvement has made room for a new aspiration to tak
its place.)
Automation also does not imply unemployment when it makes possible tasks that oure unimaginable without it
(such as exploring Mars with the Sojourner rover). Likewise with fields where the economy is already fully
adapted to an automated technology, and the jobs oure lost long enough ago that the displacement was long sinc
absorbed by the workforce (as with the continually advancing automation of the telephone switchboard, which
eliminated most telephone operator jobs and kept many more from ever existing in the first place).
Today automation is quite advanced (relative to just a few lifetimes ago), and it continues to advance with an
accelerating pace throughout the world. Although it has been encroaching on ever more skilled jobs, the general
well-being and quality of life of most people in the world (where political factors have not muddied the picture)
have improved. Clearly a multivariate effect has been at work (something much more than just the obvious idea
that automation has thepotentialto cause unemployment). In fact, the idea that automation posed an imminent
threat to employment, first articulated in 1811 by a group of textile workers known as Luddites, has proven to be
so fallacious over the ensuing two centuries that economists call the imminent-threat idea theLuddite fallacy.
There is some concern today that the economy's ability to continue absorbing ever-increasing automation withou
experiencing significant structural unemployment may be heading toward an upper limitthat is, that we are
-
8/2/2019 52570691 Akshay Project Report
14/44
approaching a point where the Luddite premise will no longer be entirely fallacious, because the relationship of
humans to machines that made it fallacious is changing. In this view, the empirical strength of the eternal-
fallaciousness idea is only a reflection of the parameter values of the environment thus far. In other words, the
idea is undoubtedly an excellent explanation of the past, but whether it can accurately predict the future is an
independent problem. Like an investment prospectus, proponents of this view caution that "past performance is
no guarantee of future results."
Major Automation Segments
Perhaps the exception to the small-company innovation rule was the distributed control system (DCS), a well-
managed mix of several innovations developed in the 1970s by a team of engineers within Honeywell. This
major industrial automation innovation achieved $100m sales in process control markets within just a couple of
years. The segment has expanded to several billions of dollars, and has morphed into a variety of different shape
sizes and form-factors for process, discrete and batch systems.
The other major automation product segment to achieve significance, also in the 1970s, was the programmable
logic controller (PLC). This breakthrough innovation was the brainchild of the prolific and perennial inventor
Dick Morley, who worked for a small development company, Bedford Associates, associated with Modicon (no
part of Schneider). Also involved was Odo Struger of Allen-Bradley, now Rockwell Automation. Rockwell
became the PLC leader in the US through good marketing and development of strong distribution channels the
Application Engineering Distributors (AED).
The first PLCs oure developed for specific applications reprogrammable test installations in the automobile
manufacturing business, replacing hard-wired relay-logic which was hard to modify. The PLC market expanded
rapidly in this key market to the extent that one Rockwell Distributor, McNaughton-McKay Electric, grew to we
beyond $ 100 million through serving the automobile production business in just the Detroit area. Over the past
decades, PLCs have spread throughout industry and the PLC market segment that has grown to several billions o
dollars worldwide.
For a couple of decades PLC applications remained focused around discrete automation markets, while DCS
expanded primarily in process control systems. Then PLCs expanded into control of remote I/O (input/output)
systems with control and I/O clusters that could be easily connected as industrial networks. Soon personal
computers became the easiest way to connect DCS, PLCs and remote I/O into the rapidly expanding hierarchy o
factory and plant networks, fieldbus and the Internet.
Another major industrial automation segment is loosely termed Supervisory Control and Data Acquisition
(SCADA). This loose conglomeration of products and innovations from several different sources remained
fragmented between several markets and applications till networked PCs and Windows-based HMI software
arrived in the late 80s and 90s. Several innovative startups grew fairly rapidly, providing human-machine
interface (HMI) software with connections to remote PLCs and indusrial I/O. Wonderware (started by engineer
-
8/2/2019 52570691 Akshay Project Report
15/44
Dennis Morin) was paced by Intellution (started by ex-Foxboro engineer Steve Rubin). There oure several other
startups in the same timeframe, but few achieved significance. Its interesting to note that the larger automation
vendors did not take the lead in this new category; all significant growth came from innovative startups.
-
8/2/2019 52570691 Akshay Project Report
16/44
3. METHODOLOGY
-
8/2/2019 52570691 Akshay Project Report
17/44
Basically, when we want to use some kind of equipment from a computer we need to write code and define dat
structures to handle all its functionality. We can then pack the software into libraries, which are not very easy t
distribute being language dependant, or build a software control using one of the several standard language
available.
-
8/2/2019 52570691 Akshay Project Report
18/44
Fig. 3.1 Block Diagram
The equipments can be controlled using the RF communication attached with the MATLAB server.
GUIDE, the MATLAB graphical user interface development environment, provides a set of tools for creatin
graphical user interfaces (GUIs). These tools greatly simplify the process of designing and building GUIs.
Using the GUIDE Lawet Editor, we are going to lay out a GUI easily by clicking and dragging GUI componen
such as panels, buttons, text fields, sliders, menus, and so oninto the lawet area. GUIDE stores the GUI law
in a FIG-file.
GUIDE automatically generates a MATLAB program file that controls how the GUI operates. The code in th
file initializes the GUI and includes function templates for the most commonly used callbacks for eac
componentthe commands that execute when a user clicks a GUI component.
The MATLAB server, the computer on which MATLAB is installed, is connected directly to the RF devi
control unit through DB-25 connectors which passes on the instructions to the RF transmitter. The instructio
are transmitted at a particular frequency (at 433 MHz) and received at the receiving end where the switches an
relays are controlled accordingly.
-
8/2/2019 52570691 Akshay Project Report
19/44
4. TOOLS
-
8/2/2019 52570691 Akshay Project Report
20/44
MATLAB
GUIDE, the MATLAB graphical user interface development environment, provides a set of tools for creatin
graphical user interfaces (GUIs).
WHAT IS A GUI?
A graphical user interface (GUI) is a graphical display in one or more windows containing controls, call
components, that enable a user to perform interactive tasks. The user of the GUI does not have to create a scri
or type commands at the command line to accomplish the tasks. Unlike coding programs to accomplish tasks, th
user of a GUI need not understand the details of how the tasks are performed.
The GUI components can be menus, toolbars, push buttons, radio buttons, list boxes, and slidersjust to name
few. GUIs created in MATLAB software can group related components together, read and write data files, an
display data as tables or as plots.
The GUI contains
An axes component
A pop-up menu listing three data sets that correspond to MATLAB functions: peaks, membrane, and sin
A static text component to label the pop-up menu
Three buttons that provide different kinds of plots: surface, mesh, and contour
When we click a push button, the axes component displays the selected data set using the specified type of 3-
plot.
HOW DOES A GUI WORK?
In the GUI described in What Is a GUI?, the user selects a data set from the pop-up menu, then clicks one of th
plot type buttons. The mouse click invokes a function that plots the selected data in the axes.
Most GUIs wait for their user to manipulate a control, and then respond to each action in turn. Each control, an
the GUI itself, has one or more user-written routines (executable MATLAB code) known as callbacks, named f
the fact that they "call back" to MATLAB to ask it to do things. The execution of each callback is triggered by
particular user action such as pressing a screen button, clicking a mouse button, selecting a menu item, typing
string or a numeric value, or passing the cursor over a component. The GUI then responds to these events. We,
the creator of the GUI, provide callbacks which define what the components do to handle events.
This kind of programming is often referred to as event-driven programming. In the example, a button click is on
such event. In event-driven programming, callback execution is asynchronous, that is, it is triggered by even
-
8/2/2019 52570691 Akshay Project Report
21/44
external to the software. In the case of MATLAB GUIs, most events are user interactions with the GUI, but th
GUI can respond to other kinds of events as well, for example, the creation of a file or connecting a device to th
computer.
We can code callbacks in two distinct ways:
As MATLAB functions, written in M and stored in M-files
As strings containing MATLAB expressions or commands (such as 'c = sqrt(a*a + b*b);'or 'print')
Using functions stored in M-files as callbacks is preferable to using strings, as functions have access to argumen
and are more poourful and flexible. MATLAB scripts (sequences of statements stored in M-files that do n
define functions) cannot be used as callbacks.
Although we can provide a callback with certain data and make it do anything we want, we cannot control whe
callbacks will execute. That is, when our GUI is being used, we have no control over the sequence of events thtrigger particular callbacks or what other callbacks might still be running at those times. This distinguishes even
driven programming from other types of control flow, for example, processing sequential data files.
HOW ARE MATLAB GUIS BUILT?
A MATLAB GUI is a figure window to which we add user-operated controls. We can select, size, and positi
these components as we like, and using callbacks we can make them do what we want when the user click
components or manipulates them with keystrokes.
We can build MATLAB GUIs in two ways:
Using GUIDE (GUI Development Environment), an interactive GUI construction kit
Creating M-files that create them as functions or scripts (programmatic GUI construction)
The former approach starts with a figure which we populate with components, and GUIDE creates an associate
M-file containing callbacks for the GUI and its components. GUIDE saves both the figure (as a FIG-file) and th
M-file; opening either one also opens the other to run the GUI.
In the latter, programmatic, approach, we code an M-file that defines all component properties and behavior
when a user executes the M-file, it creates a figure, populates it with components, and handles user interaction
The figure is not normally saved between sessions because the M-file creates a new one each time it runs.
As a result, the M-files of the two approaches look different. Programmatic M-files are generally longer, becaus
they explicitly define every property of the figure and its controls as well as the callbacks. GUIDE GUIs defin
-
8/2/2019 52570691 Akshay Project Report
22/44
the properties within the figure itself, and store the definitions in its FIG-file rather than in the M-file, whic
contains callbacks and other functions that initialize the GUI when it opens.
PROGRAMMING A GUI
When we save our GUI lawet, GUIDE automatically generates an M-file that we can use to control how the GU
works. This M-file provides code to initialize the GUI and contains a framework for the GUI callbacksthroutines that execute in response to user-generated events such as a mouse click. Using the M-file editor, we c
add code to the callbacks to perform the functions we want. Programming a Simple GUI shows we what code
add to the example M-file to make the GUI work.
DAQ TOOLBOX
Data Acquisition Toolbox software is a collection of functions and a MEX-file (shared library) built on theMATLAB technical computing environment. The toolbox also includes several dynamic link libraries (DLLs)called adaptors, which enable you to interface with specific hardware. The toolbox provides you with these mainfeatures: A framework for bringing live, measured data into the MATLAB workspace using PC-compatible, plug-in datacquisition hardware. Support for analog input (AI), analog output (AO), and digital I/O (DIO) subsystems including simultaneousanalog I/O conversions.
Exploring the Toolbox
A list of the toolbox functions is available to you by typinghelp daq
You can view the code for any function by typingtype function_name
You can view the help for any function by typingdaqhelp function_name
INSTRUCTIONS USED:
varargout
Variable length output argument list
Syntax
function varargout = foo(n)
Description
function varargout = foo(n) returns a variable number of arguments from function foo.m.
The varargout statement is used only inside a function M-file to contain the optional output arguments returneby the function. The varargout argument must be declared as the last output argument to a function, collecting athe outputs from that point onwards. In the declaration, varargout must be loourcase.
-
8/2/2019 52570691 Akshay Project Report
23/44
varargin
Variable length input argument list
Syntax
function y = bar(varargin)
Description
function y = bar(varargin) accepts a variable number of arguments into function bar.m.
The varargin statement is used only inside a function M-file to contain optional input arguments passed to thfunction. The varargin argument must be declared as the last input argument to a function, collecting all thinputs from that point onwards. In the declaration, varargin must be loourcase.
nargin, nargout
Number of function arguments
Syntax
narginnargin(fun)nargoutnargout(fun)
Description
In the body of a function M-file, nargin and nargout indicate how many input or output arguments, respectively,user has supplied. Outside the body of a function M-file, nargin and nargout indicate the number of input output arguments, respectively, for a given function. The number of arguments is negative if the function has
variable number of arguments.nargin returns the number of input arguments specified for a function.
nargin(fun) returns the number of declared inputs for the function fun. If the function has a variable number input arguments, nargin returns a negative value. fun may be the name of a function, or the name of FunctioHandles that map to specific functions.
nargout returns the number of output arguments specified for a function.
nargout(fun) returns the number of declared outputs for the function fun. fun may be the name of a function, the name of Function Handles that map to specific functions.
digitalio
Create digital I/O object
Syntax
DIO = digitalio('adaptor',ID)
Arguments
'adaptor' The hardware driver adaptor name. The supported adaptors are advantech, mcc, nidaq, andparallel.
-
8/2/2019 52570691 Akshay Project Report
24/44
ID The hardware device identifier.
DIO The digital I/O object.
Description
DIO = digitalio('adaptor',ID) creates the digital I/O object DIO for the specified adaptorand for the hardwa
device with device identifier ID. ID can be specified as an integer or a string.
binvec2dec
Convert digital input and output binary vector to decimal value
Syntax
out = binvec2dec(bin)
Arguments
bin A binary vector.
out A double array.
Description
out = binvec2dec(bin) converts the binary vector bin to the equivalent decimal number and stores the result out. All nonzero binary vector elements are interpreted as a 1.
putvalue
Write values to digital input and output lines
Syntax
putvalue(obj,data)putvalue(obj.Line(index),data)
Arguments
obj A digital I/O object.
obj.Line(index) One or more lines contained by
obj.
data A decimal value or binary vector.
Description
putvalue(obj,data) writes data to the hardware lines contained by the digital I/O object obj.
putvalue(obj.Line(index),data) writes data to the hardware lines specified by obj.Line(index).
-
8/2/2019 52570691 Akshay Project Report
25/44
5. DESIGN AND IMPLEMENTATION
-
8/2/2019 52570691 Akshay Project Report
26/44
Hardware Components Required
RF Trans-receiver Module.
Relays,
LEDs,
DB25 Connectors etc.
A PC capable of installing MATLAB.
Software Required
MATLAB.
GUIDE, the MATLAB graphical user interface development environment.
MATLAB DAQ toolbox.
The first step in any data acquisition experiment is to install the hardware and software. Hardware installation consists
plugging a board into our computer or installing modules into an external chassis. Software installation consists of loadin
hardware drivers and application software onto our computer. After the hardware and software are installed, we can attac
our sensors.
Component Description
RF Transmitter: In our project we are using 433 MHz 4-channel RF transmitter STT-433 which is ideal for remo
control applications where low cost and longer range is required. The transmitter operates from a 1.5-12V supply, making
ideal for battery-pooured applications.
RF Receiver : : In our project we are using 433 MHz 4-channel RF receiver STR-433 which is ideal for short-range remo
control applications where cost is a primary concern.
Data acquisition hardware: The main function of this hardware is to convert analog signals to digital signals, and
convert digital signals to analog signals.
Relays & LEDs : We are using IC ULN2003 High Voltage Darlington Transistor Array. Its applications include rel
drivers, display drivers(LED gas discharge), and logic buffers.
Sensors and actuators (transducers): A transducer is a device that converts input energy of one for
into output energy of another form. We are using IC SN74LS04 as an inverter in our project.
Computer: The computer provides a processor, a system clock, a bus to transfer data, and memory and disk space to sto
data.
-
8/2/2019 52570691 Akshay Project Report
27/44
Circuit Diagrams:
Transmitter:
-
8/2/2019 52570691 Akshay Project Report
28/44
Receiver:
-
8/2/2019 52570691 Akshay Project Report
29/44
COMPONENTS USED:
HT12D DECODERS:
These decoders are a series of CMOS LSIs for remote control system applications.
FEATURES:
Operating voltage: 2.4V~12V Low poour and high noise immunity CMOS technology
Low standby current
Capable of decoding 12 bits of information
Binary address setting
Received codes are checked 3 times Address/Data number combination
HT12D: 8 address bits and 4 data bits
HT12F: 12 address bits only
Built-in oscillator needs only 5% resistor
Valid transmission indicator Easy interface with an RF or an infrared transmission medium
Minimal external components
Pair with Holtek_s 212 series of encoders
18-pin DIP, 20-pin SOP package
APPLICATIONS:
Burglar alarm system
Smoke and fire alarm system
Garage door controllers
Car door controllers
Car alarm system
Security system
Cordless telephones
Other remote control systems
-
8/2/2019 52570691 Akshay Project Report
30/44
HT12E ENCODERS:
These encoders are a series of CMOS LSIs for remote control system applications.
FEATURES:
Operating voltage
2.4V~5V for the HT12A
2.4V~12V for the HT12E
Low poour and high noise immunity CMOS technology Low standby current: 0.1_A (typ.) at VDD=5V
HT12A with a 38kHz carrier for infrared transmission medium Minimum transmission word
Four words for the HT12E
One word for the HT12A
Built-in oscillator needs only 5% resistor
Data code has positive polarity
Minimal external components
HT12A/E: 18-pin DIP/20-pin SOP package
APPLICATIONS:
Burglar alarm system Smoke and fire alarm system
Garage door controllers
Car door controllers
Car alarm system
Security system
Cordless telephones
Other remote control systems
-
8/2/2019 52570691 Akshay Project Report
31/44
SN74S04 INVERTER:
RECEIVER:
The STR-433 is ideal for short-range remote control applications where cost is a primary concern.
FEATURES:
Low Cost
5V operation
3.5mA current drain
No External Parts are required
Receiver Frequency: 433.92 MHZ
Typical sensitivity: -105dBm
IF Frequency: 1MHz
-
8/2/2019 52570691 Akshay Project Report
32/44
APPLICATIONS:
Car security system
Sensor reporting
Automation system
Remote Keyless Entry (RKE)
Remote Lighting Controls
On-Site Paging Asset Tracking
Wireless Alarm and Security Systems
Long Range RFID
Automated Resource Management
TRANSMITTER:
The STT-433 is ideal for remote control applications where low cost and longer range is required. The transmittoperates from a 1.5-12V supply, making it ideal for battery-pooured applications.
FEATURES:
433.92 MHz Frequency
Low Cost
1.5-12V operation
11mA current consumption at 3V
Small size
4 dBm output poour at 3V
-
8/2/2019 52570691 Akshay Project Report
33/44
APPLICATIONS:
Remote Keyless Entry (RKE)
Remote Lighting Controls
On-Site Paging
Asset Tracking
Wireless Alarm and Security Systems
Long Range RFID Automated Resource Management
RELAY DRIVER:
FEATURES:
500mA rated collector current(Single output)
High-voltage outputs: 50V
Inputs compatibale with various types of logic.
Relay driver application.
-
8/2/2019 52570691 Akshay Project Report
34/44
6. RESULTS
-
8/2/2019 52570691 Akshay Project Report
35/44
-
8/2/2019 52570691 Akshay Project Report
36/44
7. CONCLUSION & FUTURESCOPE
-
8/2/2019 52570691 Akshay Project Report
37/44
The Fully-Automated Factory
Automated factories and processes are too expensive to be rebuilt for every modification and design change s
they have to be highly configurable and flexible. To successfully reconfigure an entire production line or proces
requires direct access to most of its control elements - switches, valves, motors and drives - down to a fine leve
of detail.
The vision of fully automated factories has already existed for some time now: customers order online, with
electronic transactions that negotiate batch size (in some cases as low as one), price, size and color; intelligen
robots and sophisticated machines smoothly and rapidly fabricate a variety of customized products on demand.
The promise of remote-controlled automation is finally making headway in manufacturing settings an
maintenance applications. The decades-old machine-based vision of automation - powerful super-robots withou
people to tend them - underestimated the importance of communications. But today, this is purely a matter o
networked intelligence which is now well developed and widely available.
Communications support of a very high order is now available for automated processes: lots of sensors, very fas
networks, quality diagnostic software and flexible interfaces - all with high levels of reliability and pervasive
access to hierarchical diagnosis and error-correction advisories through centralized operations.
The large, centralized production plant is a thing of the past. The factory of the future will be small, movable (to
where the resources are, and where the customers are). For example, there is really no need to transport raw
materials long distances to a plant, for processing, and then transport the resulting product long distances to th
consumer. In the old days, this was done because of the localized know-how and investments in equipment
technology and personnel. Today, those things are available globally.
The Winning Differences
In a global market, there are three keys that constitute the winning edge:
Proprietary products: developed quickly and inexpensively (and perhaps globally), with a continuous
stream of upgrade and adaptation to maintain leadership.
High-value-added products: proprietary products and knowledge offered through effective global service
providers, tailored to specific customer needs.
Global yet local services: the special needs and custom requirements of remote customers must be
handled locally, giving them the feeling of partnership and proximity.
-
8/2/2019 52570691 Akshay Project Report
38/44
8. REFERENCES
-
8/2/2019 52570691 Akshay Project Report
39/44
Corke PI., "A Robotics Toolbox for Matlab", IEEE Robotics and Automation Magazine,1996
http://www.dem.uc.pt/norberto/
Matlab Users Guide, The MathWorks Inc., USA http://www.mathworks.com
Pires JN, Object Oriented and Distributed Approach for Programming Robotic Manufacturing Cells,
IFAC Journal on Robotics and Computer Integrated Manufacturing, 1999.
http://www.jimpinto.com/writings/automation2005.html
-
8/2/2019 52570691 Akshay Project Report
40/44
APPENDIX: SOURCE CODE
-
8/2/2019 52570691 Akshay Project Report
41/44
function varargout = pin_by_pin(varargin)gui_Singleton = 1;gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @pin_by_pin_OpeningFcn, ... 'gui_OutputFcn', @pin_by_pin_OutputFcn, ... 'gui_LawetFcn', [] , ...
'gui_Callback', []);
ifnargin && ischar(varargin{1})gui_State.gui_Callback = str2func(varargin{1});
endifnargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});else
gui_mainfcn(gui_State, varargin{:});end
% End initialization code
% --- Executes just before pin_by_pin is made visible.function pin_by_pin_OpeningFcn(hObject, eventdata, handles, varargin)% This function has no output args, see OutputFcn.% hObject handle to figure% handles structure with handles and user data% varargin command line arguments to pin_by_pin
pp=digitalio('parallel','LPT1');
handles.dato=addline(pp,0:7,'out');putvalue(handles.dato,0);
% Choose default command line output for pin_by_pinhandles.output = hObject;% Update handles structureguidata(hObject, handles);% UIWAIT makes pin_by_pin wait for user response% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = pin_by_pin_OutputFcn(hObject, eventdata, handles)% varargout cell array for returning output args% hObject handle to figure% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data% Get default command line output from handles structure
-
8/2/2019 52570691 Akshay Project Report
42/44
varargout{1} = handles.output;
% --- Executes on button press in pin_2.function pin_2_Callback(hObject, eventdata, handles)
a=get(handles.pin_2,'Value');b=get(handles.pin_3,'Value');c=get(handles.pin_4,'Value');
d=get(handles.pin_5,'Value');% e=get(handles.pin_6,'Value');% f=get(handles.pin_7,'Value');% g=get(handles.pin_8,'Value');% h=get(handles.pin_9,'Value');m=[a b c d ];out=binvec2dec(m);set(handles.text1,'String',out)putvalue(handles.dato,out);
% --- Executes on button press in pin_6.function pin_6_Callback(hObject, eventdata, handles)a=get(handles.pin_2,'Value');b=get(handles.pin_3,'Value');c=get(handles.pin_4,'Value');d=get(handles.pin_5,'Value');m=[a b c d ];out=binvec2dec(m);set(handles.text1,'String',out)
putvalue(handles.dato,out);% --- Executes on button press in pin_4.function pin_4_Callback(hObject, eventdata, handles)a=get(handles.pin_2,'Value');b=get(handles.pin_3,'Value');c=get(handles.pin_4,'Value');d=get(handles.pin_5,'Value');m=[a b c d ];out=binvec2dec(m);set(handles.text1,'String',out)
putvalue(handles.dato,out);
% --- Executes on button press in pin_8.function pin_8_Callback(hObject, eventdata, handles)a=get(handles.pin_2,'Value');b=get(handles.pin_3,'Value');c=get(handles.pin_4,'Value');d=get(handles.pin_5,'Value');m=[a b c d ];out=binvec2dec(m);
-
8/2/2019 52570691 Akshay Project Report
43/44
set(handles.text1,'String',out)putvalue(handles.dato,out);
% --- Executes on button press in pin_3.function pin_3_Callback(hObject, eventdata, handles)a=get(handles.pin_2,'Value');b=get(handles.pin_3,'Value');c=get(handles.pin_4,'Value');
d=get(handles.pin_5,'Value');m=[a b c d ];out=binvec2dec(m);set(handles.text1,'String',out)putvalue(handles.dato,out);% --- Executes on button press in pin_7.function pin_7_Callback(hObject, eventdata, handles)a=get(handles.pin_2,'Value');b=get(handles.pin_3,'Value');
c=get(handles.pin_4,'Value');d=get(handles.pin_5,'Value');m=[a b c d ];out=binvec2dec(m);set(handles.text1,'String',out)putvalue(handles.dato,out);
% --- Executes on button press in pin_5.function pin_5_Callback(hObject, eventdata, handles)a=get(handles.pin_2,'Value');
b=get(handles.pin_3,'Value');c=get(handles.pin_4,'Value');d=get(handles.pin_5,'Value');m=[a b c d ];out=binvec2dec(m);set(handles.text1,'String',out)putvalue(handles.dato,out);
% --- Executes on button press in pin_9.function pin_9_Callback(hObject, eventdata, handles)
a=get(handles.pin_2,'Value');b=get(handles.pin_3,'Value');c=get(handles.pin_4,'Value');d=get(handles.pin_5,'Value');m=[a b c d ];out=binvec2dec(m);set(handles.text1,'String',out)putvalue(handles.dato,out);
-
8/2/2019 52570691 Akshay Project Report
44/44
function edit1_Callback(hObject, eventdata, handles)% hObject handle to edit1% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data
% Hints: get(hObject,'String') returns contents of edit1 as text
% str2double(get(hObject,'String')) returns contents of edit1 as a double
% --- Executes during object creation, after setting all properties.function edit1_CreateFcn(hObject, eventdata, handles)% hObject handle to edit1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns calledifispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end