You are on page 1of 57

Design of plc using Arduino UNO

A CAPSTONE PROJECT REPORT

Submitted by
Sushil Kumar Soni (11107149)
Sachin Rana (11108203)
Deepak Porwal (11108002)

In partial fulfillment of for the award of the degree of

BACHELOR OF TECHNOLOGY
IN
ELECTRICAL AND ELECTRONICS ENGINEERING

Under the Guidance of


Mrs. Appala Naidu K.
Assistant Professor

LOVELY PROFESSIONAL UNIVERSITY


Phagwara, Punjab (India)

Lovely Professional University, Punjab


Certificate

I hereby certify that the work which is being presented in the Capstone project entitled
Design of PLC using Arduino UNO in partial fulfillment of the requirement for the award of
degree of Bachelor of technology and submitted in Department of Electrical and Electronics
Engineering, Lovely Professional University, Punjab is an authentic record of my own work
carried out during period of Capstone/Dissertation under the supervision of Mr. Appala Naidu
K., Lecturer, Department of Electrical and Electronics Engineering, Lovely Professional
University, Punjab.
The matter presented in this dissertation has not been submitted by me anywhere for the
award of any other degree or to any other institute. .
Date:
Sushil Kumar Soni
Sachin Rana
Deepak Porwal
This is to certify that the above statement made by the candidate is correct to best of my
knowledge.
Date:

Mr. Appala Naidu K. (Lecturer)


Supervisor

The B.tech Capstone project examination of Design of PLC using Arduino UNO has been held
on May27, 2015.

Signature of Examiner

DECLARATION
We hereby declare that the project work entitled DESIGN OF PLC USING ARDUINO UNO is an
authentic record of our own work carried out as requirements of Capstone Project for the
award of degree of Bachelor of Technology in ELECTRICAL AND ELECTRONICS ENGINEERING
from Lovely Professional University, Phagwara, under the guidance of Mr. Appala Naidu K.,
during January to April 2015.
All the information furnished in this capstone project report is based on our own intensive
work and is genuine.

Project Group Number:

SUSHIL KUMAR SONI


11107149
May, 2015

SACHIN RANA
11108203
May, 2015

DEEPAK PORWAL
11108002
May, 2015

Acknowledgement
There are so many people attached to it directly or indirectly and this project bears no
exception to this fact. On the completion of this project we take the opportunity to express our
deep gratitude and sincere thanks to our project mentor, Mr. Appala Naidu K. whose support
and guidance had always been there since the start of this project to the end. We are highly
grateful to him for his time-to-time feedbacks and precious suggestions. He taught us how to
ask questions and express my ideas and how to work in corporate world.
On this occasion we would like to convey our special thanks to Mr. R.K. Sharma, HOD, School
of Electrical and Electronics Engineering, Lovely Professional University, Punjab. Who
gave us a wonderful chance to do project and provided us an immense learning experience.
We cannot fully express our gratitude to Mr. Appala Naidu K. for providing us the required
theoretical knowledge and clearing our concepts prerequisite for undergoing this project.

Abstract
The PLC (Programmable Logic Controller) has been and still is the basic component of the
industrial automation world. Programmable Logic Controllers were invented to replace relay
control systems. The Industrial application made the PLC systems being very expensive, both
to buy and repair, and also because of the highly specific skills requested to software designers
to extract the maximum potentials from controllers. Arduino is a kind of universal
programmable controller, although it is only the core and in any case it has been built for
general applications; with a little of external hardware (essentially interfaces capable of
transferring signals from sensors and to actuators, reducing the EMI which may damage the
microcontroller) and an appropriate software may, however, become something very similar
to a PLC. Also the software for coding is free of cost means it is an open source. The main
feature of this PLC is that it will be able to interface up to 4 analog input and output module,
means it interface all type of sensors like temperature sensors at input side. Here we are also
design our own scada by using c# programming in visual basic studio software.
So our overall aim is to provide a PLC for small scale industries or for home automation with a
very minimum cost. This Report tells a little about the history of PLC development. It also talks
about the components that make up PLCs. Ladder Logic is discussed briefly as a common way
to program PLCs. The need, and current effort, to standardize PLCs is mentioned.

Contents
Cover Page..1
Certificate2
Declaration.3
Acknowledgement.4
Abstract5
List of Figures8
Abbreviation...10
Chapter 1: Introduction...11
1.1 Automation..11
1.2 PLC..................12
1.3 PLC Language15
1.4 SCADA............16
1.5 Visual Studio...17
1.6 Arduino UNO..18
1.7 DC/AC Motor..19
1.8 PWM Theory...22
Chapter 2: Literature of review..25
Chapter 3: Equipment, Material and Experimental set-up10
3.1 Transformer26
3.2 MCB Miniature Circuit Breaker...27
3.3 Relay28
3.4 Regulators29
3.5 Diodes.30
3.6 LEDs.31
3.7 Crystal oscillator..31
3.8 IC L293D32
3.9 Arduino Kit..34
Chapter 4 Research Methodology37
4.1 Rectifier Circuit.37
4.2 Changer Circuit.40
4.3 Complete Circuit..41
4.4 Coding of Applications42
Chapter 5 Complete work plan with timeline52
Chapter 6 Working and Result53
6.1 Working Process53
6.2 Result..55

Chapter 7: Conclusion & Future Scope 56


7.1. Conclusion..56
7.2. Future Scope..56
References and bibliography57
Project Approval Certificate...........................58

List of Figures
Sl. No.

Figure Name

Page No.

1.

PLC

12

2.

Block Diagram of PLC

13

3.

Ladder Language

15

4.

Instruction

16

5.

SCADA

17

6.

Visual Studio

17

7.

Arduino

18

8.

Left hand rule

20

9.

Block Diagram of DC motor

20

10.

AC motor

21

11.

PWM Graph

23

12.

Transformer

26

13.

MCB

27

14.

Relay

28

15.

Diode

30

16.

Leds

31

17.

Crystal

32

18.

IC-L293D

33

19.

Rectifier Ckts

37

20.

Changer Ckts

40

21.

Complete Ckts

41

22.

SCADA View

51

23.

Gantt Chart

52

24.

Working Process

53

Abbreviation
AC

Alternating Current

Capacitor

DC

Direct Current

Current

IC

Integrated Circuit

LED

Light Emitting Diode

MCB

Miniature Circuit Breaker

MCU

Microcontroller

Np

No. of Primary Turns

Ns

No. of Secondary Turns

Charge

Resistance

Real Power

Voltage

Vp

Primary Voltage

Vs

Secondary Voltage

ZL

Load Impedance

Chapter 1: Introduction
A Programmable Logic Controller (PLC) is a standard industrial control device that provides a
simple, yet robust, method of controlling manufacturing and dynamic processes. As a result of their
low cost, adaptability, and reliability, PLCs are by far the most common control mechanism used by
manufacturing businesses of all sizes for environment control, food processing, motion control, and
automated test equipment. Yet even though PLCs are heavily used by industry, their use in teaching
control theory concepts is uncommon for mechanical engineering programs.

1.1

Automation:

Automation is basically the delegation of human control functions to machines aimed towards
achieving

Higher productivity

Greater efficiency

Less assembly or production time

Reduced errors

History of process control and automation:


Manual control:
In this all the actions related to process control and automation are taken by operators. One of the
major drawbacks of this method is the likely human errors and in consequence its effect on the
quality of the final project.

Hard wired logic control:


This was considered to be the first step towards automation. Here the contactors and relay together
with timers and counters were used in achieving the desired level of automation.
Limitations: bulky and complex wiring, involves lot of rework, to implement changes in control logic.

Dedicated electronic control:


With the advent of electronics, the logic gates and further microprocessors started replacing the relay
and auxiliary contactors in control circuits. The bimetallic and motorized timers were replaced by
electronic timers.

Advantages: reduced wiring and space requirements, energy saving, less maintenance and greater
reliability.

Limitations: in case of any change requirement in the control a lot of rework had to be done
which was time consuming and the technology up gradation was costly.

10

1.2

Programmable logic control:

As the desired logic control is achieved through a program these controllers are referred to as
programmable logic controllers, the programmable controller have in recent years experienced
an unprecedented growth as universal element in industrial automation. Control engineering has
evolved over time. In the past humans was the main method for controlling a system. More
recently electricity has been used for control and early electrical control was based on relays.
These relays allow power to be switched on and off without a mechanical switch. It is common
to use relays to make simple logical control decisions. The development of low cost computer
has brought the most recent revolution; Most of this is because of the advantages they offer.

Fig. 1.2.1. PLC

Advantages of PLCs:
PLCs not only are capable of performing the same tasks as hard-wired control, but are also capable
of many more complex applications. In addition, the PLC program and electronic communication
lines replace much of the interconnecting wires required by hard-wired control. Therefore, hardwiring, though still required to connect field devices, is less intensive. This also makes correcting
errors and modifying the application easier. Some of the additional advantages of PLCs are as
follows:
Smaller physical size than hard-wire solutions.
Easier and faster to make changes.
PLCs have integrated diagnostics and override functions.
Diagnostics are centrally available.
Applications can be immediately documented.
Applications can be duplicated faster and less expensively.

11

What Constitutes A PLC?


The PLC is basically a programmed interface between the field input elements like limit switches,
sensors, transducers, push buttons etc and the final control elements like actuators solenoid valves,
dampers, drives, LEDs, hooters etc...

The interface called as programmable logic controller or to be precise, programmable controller


consists of the following:
1.
2.
3.
4.
5.

Input modules.
CPU with processor and program memory.
Output modules.
Bus system.
Power supply.

Fig. 1.2.2. PLC Block Diagram

Functions of various blocks:


Input Module:
The input module acts as an interface between the field control inputs and the CPU. The voltage or
current signals generated by the sensors, transducer, limit switches, push buttons etc are applied to
the input module.

12

Purpose of input module:

It converts the field signal into a standard control signal for processing by PLC. The standard
control signal delivered by input module could be 5V or 9V whereas the field signal
receiving by it could be say 24V or230V AC

It isolates the field signals from the CPU.

It sends one input at the time to CPU by multiplexing action thus helping in the serial
communication.

Depending upon the nature of the input signal coming from the field the input module, could be:

Digital input module.

Analog input module.

Central processing unit:


The central processing units or the CPU consists of the following blocks:

Arithmetic logic unit

Program memory

Process image memory

Internal timers and counters and

Flags.

The heart of the CPU is the micro processor or microcontroller chip, working of a CPU is fully
controlled by the instructions stores in user program memory, the user program directs and controls
the CPUs memory.

Output module:
The output module act as a link b/w the CPU and the output devices located in the field. The field
devices could be relays, contactor, lamps, and motorized potentiometers, actuators.
The output module converts the output signal delivered by CPU into an appropriate voltage level
suitable for output field devices. But the output module converts this voltage level into say 24 v dc,
120 v dc or 230 v ac etc. Thus the output module in receiving signal from the processor switches
voltage to the respective output terminals.

Power supply:
The power supply modules generate the voltage required by the electronic module of the PLC from
the main supply. typically one phase , 230v ac supply is converted into 24 v DC supply by the power
supply module , it should be noted that the CPU needs 24 V DC input and other voltages required by
the PLC hardware such as 5v dc etc is generated by CPU.
13

Analog Inputs and Outputs:


Analog inputs and outputs are continuous, variable signals. Typical analog signals vary from 0 to 20
milliamps, 4 to20 milliamps, or 0 to 10 volts.

Discrete Inputs and Outputs:


Discrete inputs and outputs, also referred to as digital inputs and outputs, are either on or off.
Pushbuttons, toggle switches, limit switches, proximity switches, and relay contacts are examples of
devices often connected to PLC discrete inputs. Solenoids relay and contactor coils, and indicator
lamps are examples of devices often connected to PLC discrete Outputs.

1.3 PLC Language:


Ladder Logic Programming: A program consists of instructions that accomplish specific
tasks. The degree of complexity of a PLC program depends upon the complexity of the application,
the number and type of input and output devices, and the types of instructions used.

Ladder logic (LAD):


is one programming language used with PLCs. Ladder logic incorporates programming functions
that are graphically displayed to resemble symbols used in hard-wired control diagrams. The left
vertical line of a ladder logic diagram represents the power or energized conductor. The output coil
instruction represents the neutral or return path of the circuit. The right vertical line, which
represents the return path on a hard-wired control line diagram, is omitted. Ladder logic diagrams
are read from left-to-right and top-to-bottom. Rungs are sometimes referred to as networks. A
network may have several control elements, but only one output coil.

Fig. 1.3.1. Ladder language

Statement List and Function Block Diagrams:


While ladder logic programs are still common, there are many other ways to program PLCs. Two
other common examples are statement list and function block diagrams.

Statement list (STL) instructions: include an operation and an operand. The operation to be
performed is shown on the left. The operand, the item to be operated on, is shown on the right.

14

Function block diagrams (FBD):


Include rectangular functions with inputs shown on the left side of the rectangle and outputs shown
on the right side.
In the following example, the program segments perform the
Same function

Fig.1.3.2. Instructions

1.4 SCADA:
SCADA (supervisory control and data acquisition) generally refers to industrial control systems
(ICS): computer systems that monitor and control industrial, infrastructure, or facility-based
processes, as described below:
Industrial processes include those of manufacturing, production, power generation,
fabrication, and refining, and may run in continuous, batch, repetitive, or discrete modes.
Infrastructure processes may be public or private, and include water treatment and
distribution, wastewater collection and treatment, oil and gas pipelines, electrical power
transmission and distribution, wind farms, civil defense siren systems, and large
communication systems.
Facility processes occur both in public facilities and private ones, including buildings,
airports, ships, and space stations. They monitor and control HVAC, access, and energy
consumption.

15

Fig. 1.4.1. Scada

1.5

Visual Studio:

Visual Basic is a programming language and development environment created by


Microsoft.

Visual Basic provides a graphical user interface GUI that allows the developer drag
and drop objects into the program as well as manually write program code.

Visual Basic, also referred to as "VB," is designed to make software development


easy and efficient.

Features of Visual basic:


GUI Interface, Modularization, Object Oriented, Debugging, Macros IDE, Data
access feature

Fig. 1.5.1. Visual studio

16

1.6

Arduino UNO:

Fig. 1.6.1. Front view of Arduino

Fig. 1.6.2. Back side of Arduino

Overview:
The Arduino Uno is a microcontroller board based on the ATmega328 (datasheet). It has 14 digital
input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz ceramic
resonator, a USB connection, a power jack, an ICSP header, and a reset button. It contains
everything needed to support the microcontroller; simply connect it to a computer with a USB cable
or power it with an AC-to-DC adapter or battery to get started.
The Uno differs from all preceding boards in that it does not use the FTDI USB-to-serial driver chip.
Instead, it features the Atmega16U2 (Atmega8U2 up to version R2) programmed as a USB-to-serial
converter. 1.0 pin out: added SDA and SCL pins that are near to the AREF pin and two other new
pins placed near to the RESET pin, the IOREF that allow the shields to adapt to the voltage provided
from the board. In future, shields will be compatible with both the board that uses the AVR, which

17

operates with 5V and with the Arduino Due that operates with 3.3V. The second one is a not
connected pin that is reserved for future purposes.

1-Stronger RESET circuit.


2-Atmega 16U2 replaces the 8U2.
"Uno" means one in Italian and is named to mark the upcoming release of Arduino 1.0. The Uno and version
1.0 will be the reference versions of Arduino, moving forward. The Uno is the latest in a series of USB
Arduino boards, and the reference model for the Arduino platform; for a comparison with previous versions,
see the index of Arduino boards.

1.7 DC/AC Motor:


Electrical motors are everywhere around us. Almost all the electro-mechanical movements we see
around us are caused either by an A.C. or a DC motor. Here we will be exploring this kind of
motors. This is a device that converts DC electrical energy to a mechanical energy.

Principle of DC Motor:
This DC or direct current motor works on the principal, when a current carrying conductor is
placed in a magnetic field; it experiences a torque and has a tendency to move. This is known as
motoring action. If the direction of current in the wire is reversed, the direction of rotation also
reverses. When magnetic field and electric field interact they produce a mechanical force, and based
on that the working principle of dc motor established.

Fig. 1.7.1. Left Hand Rule

18

The direction of rotation of a this motor is given by Flemings left hand rule, which states that if the index
finger, middle finger and thumb of your left hand are extended mutually perpendicular to each other and if
the index finger represents the direction of magnetic field, middle finger indicates the direction of current,
then the thumb represents the direction in which force is experienced by the shaft of the dc motor.
Structurally and construction wise a direct current motor is exactly similar to a DC generator, but electrically
it is just the opposite. Here we unlike a generator we supply electrical energy to the input port and derive
mechanical energy from the output port. We can represent it by the block diagram shown below.

Fig. 1.7.2. Block diagram of dc motor

Here in a DC motor, the supply voltage E and current I is given to the electrical port or the input port
and we derive the mechanical output i.e. torque T and speed from the mechanical port or output
port.
The input and output port variables of the direct current motor are related by the parameter K.

So from the picture above we can well understand that motor is just the opposite phenomena of a DC
generator, and we can derive both motoring and generating operation from the same machine by
simply reversing the ports.

19

AC Motors:
Commonly ran by an AC variable frequency drive, an AC electric motor operates by applying
alternating current (AC) power to the electric motor. An AC electric motor consists of several parts
but the main parts are the stator and rotor. The AC electric motors stator has coils that are supplied with
the alternating current and produces a rotating magnetic field. The AC electric motors rotor rotates inside
the electric motors coils and is attached to an output shaft that produces torque by the rotating magnetic
field. There are two different types of AC electric motors and each of them uses a different type of rotor.
The first type of AC motor is called an induction motor (also known as an asynchronous motor).An induction
motor uses a magnetic field on the rotor of an induction motor thats created by an induced current. The
other type of AC motor is called a synchronous motor and rotates precisely at the supply frequency or on a
sub-multiple of the supply frequency. A synchronous motor is able to operate with precision supply
frequency because it doesnt reply on induction. The magnetic field on a synchronous motor is generated
by current delivered through slip rings or a permanent magnet. Synchronous motors run faster than
induction motors because the speed is reduced by the slip of the asynchronous motor.

Fig. 1.7.3. Ac motor

1.8 PWM Theory:


A Pulse Width Modulation (PWM) Signal is a method for generating an analog signal using a digital
source. A PWM signal consists of two main components that define its behavior: a duty cycle and a
frequency. The duty cycle describes the amount of time the signal is in a high (on) state as a
percentage of the total time of it takes to complete one cycle. The frequency determines how fast the
PWM completes a cycle (i.e. 1000 Hz would be 1000 cycles per second), and therefore how fast it
switches between high and low states. By cycling a digital signal off and on at a fast enough rate,

20

and with a certain duty cycle, the output will appear to behave like a constant voltage analog signal
when providing power to devices.

Example: To create a 3V signal given a digital source that can be either high (on) at 5V or low (off)
at 0V, you can use PWM with a duty cycle of 60% which outputs 5V 60% of the time. If the digital
signal is cycled fast enough, then the voltage seen at the output appears to be the average voltage. If
the digital low is 0V (which is usually the case) then the average voltage can be calculated by taking
the digital high voltage multiplied by the duty cycle, or 5V x 0.6 = 3V. Selecting a duty cycle of
80% would yield 4V, 20% would yield 1V, and so on.
PWM signals are used for a wide variety of control applications. Their main use is for controlling
DC motors but it can also be used to control valves, pumps, hydraulics, and other mechanical parts.
The frequency that the PWM signal needs to be set at will be dependent on the application and the
response time of the system that is being powered. Below are a few applications and some typical
minimum PWM frequencies required?

Heating elements or systems with slow response times: 10-100 Hz or higher

DC electric motors: 5-10 kHz or higher

Power supplies or audio amplifiers: 20-200 kHz or higher


Below are some graphs demonstrating PWM signals with different duty cycles

Fig. 1.8.1. Graph

21

Fig. 1.8.2. Graph

Fig. 1.8.3. Graph

22

23

Chapter 2: Review of Literature

In early 20th century, microprocessors are used for Automation and controlling power distribution
among various units of an industry. The applications of microprocessor suffer from a basic
limitation that it fails to alter the maximum demand level during load fluctuations and not able to
operate number of outputs. This has resulted in development of PLC circuitry to be incorporated
in the place of microprocessor, in order that the demand level can be altered to suit the load
fluctuations resulting in a smooth uninterrupted and continuous power distribution and also it is
able to handle number of output. PLCs are miniature individual computers, using hardware and
software to perform the control functions. The PLCs consist of two basic sections namely CPU
and the Input/output interface systems. Various controllers that are normally used are
microprocessors, proportional interface derivative controls. The major disadvantages of the
controls are, the problem of fixed imaginary values used for comparing and controlling. PLCs are
preferred more for their merit of providing flexible and absolute real values. The first PLC was
traced back to when Bed Ford Associate developed a device called modular digital control for
general motors. This was used by General Motors to replace the traditional relay based machine
control system. Todays PLCs are designed not only to communicate with control systems, but
also to perform reporting functions and diagnose the failures. Now we are thinking that after that
much invention still we are not able to make a low cost PLC for small scale industries and for
home automation. So we are using an Arduino UNO which full fill that limitation and also
increase the analog input and output port which differentiate our PLC to others. Here we make a
table which shows difference between microprocessor based and Arduino based PLC
Table: PLCs in comparison with Microprocessor controls

PARTS

Inputs

3-5V

PLC
higher rating

Input condition

Non-isolated I/O

Isolated I/O

Programming

Programming of C
is complicated

Programming of PLC is easy

Environment

C is affected by noise

Noise cant affected the PLC

Outputs

Fast and it may vary


because of disturbance

rugged outputs

24

Chapter 3: Equipment, Materials & Experimental


Setup

3.1 Transformer:
A transformer is an electrical device that transfers energy between two or more circuits through
electromagnetic induction between 2 isolated coils placed near to each other, due to the principle
of mutual induction the power from one coil is transferred from one coil to the other.
A varying current in the transformer's primary winding creates a varying magnetic flux in the core
and a varying magnetic field impinging on the secondary winding. This varying magnetic field at
the secondary induces a varying electromotive force (emf) or voltage in the secondary winding.
Making use of Faraday's Law in conjunction with high magnetic permeability core properties,
transformers can thus be designed to efficiently change AC voltages from one voltage level to
another within power networks.

Fig. 3.1.1. Transformer


3.1.1. Types of Transformer:
Transformers can be categorized in different ways, depending upon their purpose, use,
construction etc. The types of transformer are as follows,
Step Up Transformer & Step Down Transformer - Generally used for stepping up and down the

25

voltage level of power in transmission and distribution power network.


Three Phase Transformer & Single Phase Transformer - Former is generally used in three phase
power system as it is cost effective than later but when size matters, it is preferable to use bank of
three single phase transformer as it is easier to transport three single phase unit separately than one
single three phase unit.
Electrical Power Transformer, Distribution Transformer & Instrument Transformer - Transformer
is generally used in transmission network which is normally known as power transformer,
distribution transformer is used in distribution network and this is lower rating transformer and
current transformer &potential transformer, we use for relay and protection purpose in electrical
power system and in different instruments in industries are called instrument transformer.
Two Winding Transformer & Auto Transformer - Former is generally used where ratio between
high voltage and low voltage is greater than 2. It is cost effective to use later where the ratio
between high voltage and low voltage is less than 2.
Outdoor Transformer & Indoor Transformer - Transformers that are designed for installing at
outdoor are outdoor transformers and transformers designed for installing at indoor are indoor
transformers.

3.2 MCB Miniature Circuit Breaker


A Miniature circuit breaker is an automatically operated electrical switch designed to protect an
electrical circuit from damage caused by overload or short circuit. Its basic function is to detect a
fault condition and interrupt current flow. Unlike a fuse, which operates once and then must be
replaced, a circuit breaker can be reset (either manually or automatically) to resume normal
operation. Circuit breakers are made in varying sizes, from small devices that protect an individual
household appliance up to large switchgear designed to protect high voltage circuits feeding an
entire city. Nowadays we use more commonly miniature circuit breaker or MCB in low voltage
electrical network instead of fuse.

Fig. 3.2.1. MCBs


26

3.2.1 Working Principle Miniature Circuit Breaker


There are two arrangement of operation of miniature circuit breaker. One due to thermal effect of
over current and other due to electromagnetic effect of over current. The thermal operation of
miniature circuit breaker is achieved with a bimetallic strip whenever continuous over current
flows through MCB, the bimetallic strip is heated and deflects by bending. This deflection of
bimetallic strip releases mechanical latch. As this mechanical latch is attached with operating
mechanism, it causes to open the miniature circuit breaker contacts. But during short circuit
condition, sudden rising of current, causes electromechanical displacement of plunger associated
with tripping coil or solenoid of MCB. The plunger strikes the trip lever causing immediate
release of latch mechanism consequently open the circuit breaker contacts. This was a simple
explanation of miniature circuit breaker working principle.

3.3 Relay:
A relay is an electrically operated switch. Many relays use an electromagnet to mechanically
operate a switch, but other operating principles are also used, such as solid-state relays. Relays are
used where it is necessary to control a circuit by a low-power signal (with complete electrical
isolation between control and controlled circuits), or where several circuits must be controlled by
one signal. The first relays were used in long distance telegraph circuits as amplifiers: they
repeated the signal coming in from one circuit and re-transmitted it on another circuit. Relays
were used extensively in telephone exchanges and early computers to perform logical operations.
A type of relay that can handle the high power required to directly control an electric motor or
other loads is called a contractor. Solid-state relays control power circuits with no moving parts,
instead using a semiconductor device to perform switching. Relays with calibrated operating
characteristics and sometimes multiple operating coils are used to protect electrical circuits from
overload or faults; in modern electric power systems these functions are performed by digital
instruments still called "protective relays".

Fig. 3.3.1. Relay


27

3.3.1. Uses of Relays


Amplifying a digital signal, switching a large amount of power with a small operating power.
Some special cases are:

A telegraph relay, repeating a weak signal received at the end of a long wire
Controlling a high-voltage circuit with a low-voltage signal, as in some types of modems
or audio amplifiers,
Controlling a high-current circuit with a low-current signal, as in the starter solenoid of an
automobile,
Detecting and isolating faults on transmission and distribution lines by opening and
closing circuit breakers (protection relays),

Isolating the controlling circuit from the controlled circuit when the two are at different potentials,
for example when controlling a mains-powered device from a low-voltage switch. The latter is
often applied to control office lighting as the low voltage wires are easily installed in partitions,
which may be often moved as needs change. They may also be controlled by room occupancy
detectors to conserve energy,

3.4 Regulators:
Regulators have an important place in the electrical switch boards. Fan regulators are very similar
to light dimmers. Their function is to regulate/control the speed of the fan and provide a
convenient environment for the residents.
The traditional regulators which are bulky use a resistance having taps and connected in series
with the fan. When we move the knob different amount of resistance gets inserted in the circuit.
Although cheap the biggest problem with such a regulator is that a considerable amount of energy
is lost in form of heat through the resistance. When the fan is operating at low speed the power
loss is significant.
The technologically superior electronic regulators overcome these problems by using electronic
components to control the speed of the fan.
Some of the advantages of electronic fan regulators are:
1.
They provide a continuous speed control.
2.
Power saving at all the speeds.
3.
Smaller size and weight.
The heart of the electronic fan regulator is TRIAC. TRIAC is a semiconductor device belonging
to the family of thyristors.

28

3.5 Diodes:
A diode is a two-terminal electronic component with asymmetric conductance; it has low (ideally
zero) resistance to current in one direction, and high (ideally infinite) resistance in the other. A
semiconductor diode, the most common type today, is a crystalline piece of semiconductor
material with a pn junction connected to two electrical terminals.
A vacuum tube diode has two electrodes, a plate (anode) and a heated cathode. Semiconductor
diodes were the first semiconductor electronic devices. The discovery of crystals' rectifying
abilities was made by German physicist Ferdinand Braun in 1874. The first semiconductor diodes,
called cat's whisker diodes, developed around 1906, were made of mineral crystals such as galena.
Today, most diodes are made of silicon, but other semiconductors such as selenium or germanium
are sometimes used.

Fig. 3.5.1. Diodes


The most common function of a diode is to allow an electric current to pass in one direction
(called the diode's forward direction), while blocking current in the opposite direction (the reverse
direction). Thus, the diode can be viewed as an electronic version of a check valve. This
unidirectional behavior is called rectification, and is used to convert alternating current to direct
current, including extraction of modulation from radio signals in radio receivers, these diodes are
forms of rectifiers.
However, diodes can have more complicated behavior than this simple onoff action, due to their
nonlinear current-voltage characteristics. Semiconductor diodes begin conducting electricity only
if a certain threshold voltage or cut-in voltage is present in the forward direction (a state in which
the diode is said to be forward-biased). The voltage drop across a forward-biased diode varies
only a little with the current, and is a function of temperature; this effect can be used as a
temperature sensor or voltage reference.

29

3.6 LEDs:
A light-emitting diode (LED) is a two-lead semiconductor light source. It is a basic pn-junction
diode, which emits light when activated. When a fitting voltage is applied to the leads, electrons
are able to recombine with electron holes within the device, releasing energy in the form of
photons. This effect is called electroluminescence, and the colour of the light (corresponding to
the energy of the photon) is determined by the energy band gap of the semiconductor.
An LED is often small in area (less than 1 mm2) and integrated optical components may be used
to shape its radiation pattern.
Appearing as practical electronic components in 1962, the earliest LEDs emitted low-intensity
infrared light. Infrared LEDs are still frequently used as transmitting elements in remote-control
circuits, such as those in remote controls for a wide variety of consumer electronics. The first
visible-light LEDs were also of low intensity, and limited to red. Modern LEDs are available
across the visible, ultraviolet, and infrared wavelengths, with very high brightness.
Early LEDs were often used as indicator lamps for electronic devices, replacing small
incandescent bulbs. They were soon packaged into numeric readouts in the form of seven-segment
displays, and were commonly seen in digital clocks.

Fig. 3.6.1. LEDs

3.7 Crystal Oscillator:


A crystal oscillator is an electronic oscillator circuit that uses the mechanical resonance of a
vibrating crystal of piezoelectric material to create an electrical signal with a very
precise frequency. This frequency is commonly used to keep track of time (as in quartz
wristwatches), to provide a stable clock signal for digital integrated circuits, and to stabilize
frequencies for radio transmitters and receivers.

30

The most common type of piezoelectric resonator used is the quartz crystal, so oscillator circuits
incorporating them became known as crystal oscillators, but other piezoelectric materials
including polycrystalline ceramics are used in similar circuits.

Fig.3.7.1 crystal oscillator


Quartz crystals are manufactured for frequencies from a few tens of kilohertz to hundreds of
megahertz. More than two billion crystals are manufactured annually. Most are used for consumer
devices such as wristwatches, clocks, radios, computers, and cell phones. Quartz crystals are also
found inside test and measurement equipment, such as counters, signal generators, and
oscilloscopes.

3.8 IC L293D:
L293D is a dual H-bridge motor driver integrated circuit (IC). Motor drivers act as current
amplifiers since they take a low-current control signal and provide a higher-current signal. This
higher current signal is used to drive the motors.
L293D contains two inbuilt H-bridge driver circuits. In its common mode of operation, two DC
motors can be driven simultaneously, both in forward and reverse direction. The motor operations
of two motors can be controlled by input logic at pins 2 & 7 and 10 & 15. Input logic 00 or 11 will
stop the corresponding motor. Logic 01 and 10 will rotate it in clockwise and anticlockwise
directions, respectively.
Enable pins 1 and 9 (corresponding to the two motors) must be high for motors to start operating.
When an enable input is high, the associated driver gets enabled. As a result, the outputs become
active and work in phase with their inputs. Similarly, when the enable input is low, that driver is
disabled, and their outputs are off and in the high-impedance state.

31

Fig.3.8.1 L293D PIN Configuration

Features:

Easily compatible with any of the system


Easy interfacing through FRC (Flat Ribbon Cable)
External Power supply pin for Motors supported
Onboard PWM (Pulse Width Modulation) selection switch
2pin Terminal Block (Phoenix Connectors) for easy Motors Connection
Onboard H-Bridge base Motor Driver IC (L293D)

Technical Specification:
Power Supply: Over FRC connector 5V DC
External Power 9V to 24V DC
Dimensional Size: 44mm x 37mm x 14mm (l x b x h)
Temperature Range: 0C to +70 C

32

3.9 Arduino Kit:


The Arduino Uno is a microcontroller board based on the ATmega328. It has 14 digital
input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz ceramic
resonator, a USB connection, a power jack, an ICSP header, and a reset button. It contains
everything needed to support the microcontroller; simply connect it to a computer with a USB
cable or power it with a AC-to-DC adapter or battery to get started.

The Uno differs from all preceding boards in that it does not use the FTDI USB-to-serial driver
chip. Instead, it features the Atmega16U2 (Atmega8U2 up to version R2) programmed as a USBto-serial converter.

SummaryMicrocontroller
Operating Voltage
Input Voltage (recommended)
Input Voltage (limits)
Digital I/O Pins
Analog Input Pins
DC Current per I/O Pin
DC Current for 3.3V Pin
Flash Memory
SRAM
EEPROM
Clock Speed
Length
Width
Weight

ATmega328
5V
7-12V
6-20V
14 (of which 6 provide PWM output)
6
40 mA
50 mA
32 KB (ATmega328) of which 0.5 KB used by boot loader
2 KB (ATmega328)
1 KB (ATmega328)
16 MHz
68.6 mm
53.4 mm
25 g

Power:
The Arduino Uno can be powered via the USB connection or with an external power supply. The
power source is selected automatically. External (non-USB) power can come either from an ACto-DC adapter (wall-wart) or battery. The adapter can be connected by plugging a 2.1mm centrepositive plug into the board's power jack. Leads from a battery can be inserted in the Gnd and VIN
pin headers of the POWER connector.The board can operate on an external supply of 6 to 20
volts.
33

If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board
may be unstable. If using more than 12V, the voltage regulator may overheat and damage the
board. The recommended range is 7 to 12 volts.
The power pins are as follows:

VIN. The input voltage to the Arduino board when it's using an external power source (as opposed
to 5 volts from the USB connection or other regulated power source). You can supply voltage
through this pin, or, if supplying voltage via the power jack, access it through this pin.

5V.This pin outputs a regulated 5V from the regulator on the board. The board can be supplied
with power either from the DC power jack (7 - 12V), the USB connector (5V), or the VIN pin of
the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and can
damage your board. We don't advise it.

3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50 mA.

GND. Ground pins.

IOREF. This pin on the Arduino board provides the voltage reference with which the
microcontroller operates. A properly configured shield can read the IOREF pin voltage and select
the appropriate power source or enable voltage translators on the outputs for working with the 5V
or 3.3V

Memory:
The ATmega328 has 32 KB (with 0.5 KB used for the boot loader). It also has 2 KB of SRAM
and 1 KB of EEPROM.

Input and Output:


Each of the 14 digital pins on the Uno can be used as an input or output, using pin Mode (), digital
Write (), anddigitalRead () functions. They operate at 5 volts. Each pin can provide or receive a
maximum of 40 mA and has an internal pull-up resistor (disconnected by default) of 20-50 K
ohms. In addition, some pins have specialized functions:

Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data. These pins
are connected to the corresponding pins of the ATmega8U2 USB-to-TTL Serial chip.

34

External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt on a low value, a
rising or falling edge, or a change in value. See the attach Interrupt () function for details.

PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analog Write () function.

SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication using
the SPI library.

LED: 13. There is a built-in LED connected to digital pin 13. When the pin is HIGH value, the
LED is on, when the pin is LOW, it's off.
The Uno has 6 analog inputs, labeled A0 through A5, each of which provide 10 bits of resolution
(i.e. 1024 different values). By default they measure from ground to 5 volts, though is it possible
to change the upper end of their range using the AREF pin and the analog Reference function.
Additionally, some pins have specialized functionality:

TWI: A4 or SDA pin and A5 or SCL pin. Support TWI communication using the Wire library.
There are a couple of other pins on the board:

AREF. Reference voltage for the analog inputs. Used with analog Reference().

Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset button to
shields which block the one on the board.

35

Chapter 4: Research Methodology


Design of PLC using Arduino UNO consist several circuits some of them connected at output side
of the Arduino and some of them at input side for completing the overall circuit of PLC, which are
described in detail below. Also this chapter consist coding part used in system.

4.1 Rectifier Circuit


A rectifier is an electrical device that converts alternating current (AC), which periodically
reverses direction, to direct current (DC), which flows in only one direction. The process is known
as rectification.

Fig. 4.1.1 Power Supply


4.1.1. Half-wave rectification:
In half wave rectification of a single-phase supply, either the positive or negative half of the AC
wave is passed, while the other half is blocked. Because only one half of the input waveform
reaches the output, mean voltage is lower. Half-wave rectification requires a single diode in a
single-phase supply, or three in a three-phase supply. Rectifiers yield a unidirectional but
pulsating direct current; half-wave rectifiers produce far more ripple than full-wave rectifiers, and
much more filtering is needed to eliminate harmonics of the AC frequency from the output.

36

Fig. 4.1.1.1. Half-wave rectifier

The no-load output DC voltage of an ideal half wave rectifier for a sinusoidal input voltage is

Where:
Vdc, Vav - the DC or average output voltage,
Vpeak, the peak value of the phase input voltages,
Vrms, the root-mean-square value of output voltage.
4.1.2. Full-wave rectification.
A full-wave rectifier converts the whole of the input waveform to one of constant polarity
(positive or negative) at its output. Full-wave rectification converts both polarities of the input
waveform to pulsating DC (direct current), and yields a higher average output voltage. Two
diodes and a center tapped transformer, or four diodes in a bridge configuration and any AC
source (including a transformer without center tap), are needed. Single semiconductor diodes,
double diodes with common cathode or common anode, and four-diode bridges, are manufactured
as single components.

Fig. 4.1.2.1. Bridge rectifier: a full-wave rectifier using 4 diodes.


37

For single-phase AC, if the transformer is center-tapped, then two diodes back-to-back (cathodeto-cathode or anode-to-anode, depending upon output polarity required) can form a full-wave
rectifier. Twice as many turns are required on the transformer secondary to obtain the same output
voltage than for a bridge rectifier, but the power rating is unchanged.

Fig. 4.1.2.2. Full-wave rectifier using a center tap transformer and 2 diodes
The average and root-mean-square no-load output voltages of an ideal single-phase full-wave
rectifier are:

Very common double-diode rectifier vacuum tubes contained a single common cathode and two
anodes inside a single envelope, achieving full-wave rectification with positive output. The 5U4
and 5Y3 were popular examples of this configuration.

38

4.2 Changer Circuit:

Fig 4.2.1 Changer Circuit


It is just a switching circuit which changes or switches the output voltage from one form to
another like from DC to AC and AC to DC. Input for this system is 120v AC or 18v DC. This
switch operates the relay and relay cut / operates and changes the voltage.

39

4.3 Complete Circuit:

Fig 4.3.1 complete circuit

40

4.4 Codes of Applications:


Counters:
Counter down:
Counter ctr(5, 1);
// Counts down, starting at 5
unsigned long TIMER0 = 0; // Define variable used to hold timer 0 elapsed time
void setup() {
setupPLC();
// Setup inputs and outputs
}
void loop() {
in(X0);
// Read Input 0
timerOn(TIMER0, 10); // 10 ms switch debounce delay
ctr.countDown();
// Count down
in(X1);
// Read input X1
ctr.clear();
// Clear counter (counter at lower limit)
in(X2);
// Read input X2
ctr.preset();
// Preset counter (counter at upper limit)
ctr.lowerQ();
// Display Count Down output on Y0
out(Y0);
ctr.upperQ();
// Display Count Up output on Y1
out(Y1);
}
Counter Up:
Counter ctr(5, 1);
// Counts down, starting at 5
unsigned long TIMER0 = 0; // Define variable used to hold timer 0 elapsed time
void setup() {
setupPLC();
// Setup inputs and outputs
}
void loop() {
in(X0);
// Read Input 0
timerOn(TIMER0, 10); // 10 ms switch debounce delay
ctr.countDown();
// Count down
in(X1);
// Read input X1
ctr.clear();
// Clear counter (counter at lower limit)
in(X2);
// Read input X2
ctr.preset();
// Preset counter (counter at upper limit)
ctr.lowerQ();
// Display Count Down output on Y0
out(Y0);
ctr.upperQ();
// Display Count Up output on Y1
out(Y1);
}

41

Counter Up Down:
Counter ctr(10);
// Counts up or down in range 0-10, starting at zero
unsigned long TIMER0 = 0; // Define variable used to hold timer 0 elapsed time
unsigned long TIMER1 = 0; // Define variable used to hold timer 1 elapsed time
void setup() {
setupPLC();
// Setup inputs and outputs
}
void loop() {
in(X0);
// Read Input 0
timerOn(TIMER0, 10); // 10 ms switch debounce delay
ctr.countUp();
// Count up
in(X1);
// Read Input 1
timerOn(TIMER1, 10); // 10 ms switch debounce delay
ctr.countDown();
// Count down
in(X2);
// Read input X1
ctr.clear();
// Clear counter (counter at lower limit)
in(X3);
// Read input X2
ctr.preset();
// Preset counter (counter at upper limit)
ctr.lowerQ();
// Display Count Down output on Y0
out(Y0);
ctr.upperQ();
// Display Count Up output on Y1
out(Y1);
}
Digital input/output:
void setup()
{
setupPLC(); // Setup inputs and outputs
}
void loop() {
in(X0);

// Read Input 0

out(Y0);

// Send to Output 0

inNot(X1); // Read Input 1 (inverted)


out(Y1);

// Send to Output 1

in(X2);

// Read Input 2

outNot(Y2); // Send to Output 2 (inverted)

42

inNot(X3); // Read Input 3 (inverted) and send to Output 3 (inverted)


outNot(Y3); // (The double negative cancels out)
}

Latch Command:
void setup() {
setupPLC();

// Setup inputs and outputs

}
void loop() {
in(X0);
latch(Y0, X1);
in(Y0);
outNot(Y1);

// Read switch connected to Input 0 (Set input)


// Latch, Q = Output 0, Reset = Input 1
// Read Q output and generate NotQ on Output 1
// (These two lines are optional)

Set Reset commands:


void setup() {
setupPLC();

// Setup inputs and outputs

}
void loop() {
in(X0);

// Read switch connected to Input 0 (Set input)

set(Y0);

// Set Y0 to 1 if X0 = 1, leave Y0 unaltered otherwise

in(X1);

// Read switch connected to X1

reset(Y0);

// Clear Y0 to 0 if X1 = 1, leave Y0 unaltered otherwise

43

AND, OR, XOR and Not command:


void setup() {
setupPLC(); // Setup inputs and outputs
}
void loop() {
in(X0);

// Read Input 0

andBit(X1); // AND with Input 1


out(Y0);

// Send result to Output 0

in(X0);

// Read Input 0

orBit(X1); // OR with Input 1


out(Y1);

// Send result to Output 1

in(X0);

// Read Input 0

xorBit(X1); // XOR with Input 1


out(Y2);

// Send result to Output 2

in(X0);

// Read Input 0

outNot(Y3); // Send inverted result to Output 3


}

NAND, NOR, and XNOR command:


void setup() {
setupPLC(); // Setup inputs and outputs
}
void loop() {
// NAND
in(X0);

// Read Input 0

andBit(X1); // AND with Input 1


outNot(Y0); // Send result to Output 0 (inverted)
44

// NOR
in(X0);

// Read Input 0

orBit(X1); // OR with Input 1


outNot(Y1); // Send result to Output 1 (inverted)

// XNOR
in(X0);

// Read Input 0

xorBit(X1); // XOR with Input 1


outNot(Y2); // Send result to Output 2 (inverted)
}

Delay Off:
void setup() {
setupPLC();

// Setup inputs and outputs

}
void loop() {
in(X0);

// Read Input 0

timerOff(TIMER0, 2000); // 2 second turn-off delay


out(Y0);

// Output to Output 0

Delay On:
void setup() {
setupPLC();

// Setup inputs and outputs

}
void loop() {
in(X0);

// Read Input 0
45

timerOn(TIMER0, 2000); // 2 second delay


out(Y0);

// Output to Output 0

in(X1);

// Read Input 1

timerOn(TIMER1, 4000); // 4 second delay


out(Y1);

// Output to Output 1

Inverted Input Logic commands:


void setup() {
setupPLC();

// Setup inputs and outputs

}
void loop() {
in(X0);

// Read Input 0

andNotBit(X1); // AND with Input 1 (inverted)


out(Y0);
in(X0);

// Send result to Output 0


// Read Input 0

orNotBit(X1);
out(Y1);

// OR with Input 1 (inverted)

// Send result to Output 1

C# Programming for linking the Hardware to P.C.:


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace PLC_Command
{
46

public partial class Form1 : Form


{
public Form1()
{
InitializeComponent();
serialPort1.PortName = "COM19";
serialPort1.BaudRate = 9600;
panel1.BackColor = Color.Red;
panel2.BackColor = Color.Red;
panel3.BackColor = Color.Red;
panel4.BackColor = Color.Red;
textBox2.Text = ("OFF");
textBox3.Text = ("OFF");
textBox4.Text = ("OFF");
textBox5.Text = ("OFF");
}
private void button1_Click(object sender, EventArgs e)
{
serialPort1.Open();
if (serialPort1.IsOpen)
{
serialPort1.WriteLine("A");
}
serialPort1.Close();
textBox2.Text = ("ON");
panel1.BackColor = Color.Green;
}
private void button2_Click(object sender, EventArgs e)
{
serialPort1.Open();
if (serialPort1.IsOpen)
{
serialPort1.WriteLine("a");
}
serialPort1.Close();
textBox2.Text = ("OFF");
panel1.BackColor = Color.Red;
}
private void button3_Click(object sender, EventArgs e)
{
serialPort1.Open();
if (serialPort1.IsOpen)
47

{
serialPort1.WriteLine("B");
}
serialPort1.Close();
textBox3.Text = ("ON");
panel2.BackColor = Color.Green;
}
private void button4_Click(object sender, EventArgs e)
{
serialPort1.Open();
if (serialPort1.IsOpen)
{
serialPort1.WriteLine("b");
}
serialPort1.Close();
textBox3.Text = ("OFF");
panel2.BackColor = Color.Red;
}
private void button5_Click(object sender, EventArgs e)
{
serialPort1.Open();
if (serialPort1.IsOpen)
{
serialPort1.WriteLine("C");
}
serialPort1.Close();
textBox4.Text = ("ON");
panel3.BackColor = Color.Green;
}
private void button6_Click(object sender, EventArgs e)
{
serialPort1.Open();
if (serialPort1.IsOpen)
{
serialPort1.WriteLine("c");
}
serialPort1.Close();
textBox4.Text = ("OFF");
panel3.BackColor = Color.Red;
}
private void button7_Click(object sender, EventArgs e)
{
48

serialPort1.Open();
if (serialPort1.IsOpen)
{
serialPort1.WriteLine("D");
}
serialPort1.Close();
textBox5.Text = ("ON");
panel4.BackColor = Color.Green;
}
private void button8_Click(object sender, EventArgs e)
{
serialPort1.Open();
if (serialPort1.IsOpen)
{
serialPort1.WriteLine("d");
}
serialPort1.Close();
textBox5.Text = ("OFF");
panel4.BackColor = Color.Red;
}
private void button9_Click(object sender, EventArgs e)
{
serialPort1.Open();
if (serialPort1.IsOpen)
{
serialPort1.WriteLine("S");
}
serialPort1.Close();
panel1.BackColor = Color.Red;
panel2.BackColor = Color.Red;
panel3.BackColor = Color.Red;
panel4.BackColor = Color.Red;
textBox2.Text = ("OFF");
textBox3.Text = ("OFF");
textBox4.Text = ("OFF");
textBox5.Text = ("OFF");
}
}
}

49

After run this program we will get an own software for control the PLC which look like that,
mention below.

Fig 4.4.1 Software View

50

Chapter 5: Complete work Plan with timelines

51

Chapter 6: Working & Result


6.1. Working Process:

Fig 6.1.1 Block Diagram Of work process

Block Diagram shows working process of my project. Let us study step by step process and
thinking for my project, how I create this.
Sensors or push button initiate the Input Module and input module send the signal to the
Arduino. Arduino link with the computer by serially interface in which programming software is
installed. Now according to the input and programming Arduino gives the result at output side.
Although operation of PLC as a DC or AC it depends upon connected load at output side and
status of change over system

52

Steps:
1-Firstly we are using Arduino Kit as a core of my project.
2- Then interfaces the push button with Input module at input side.
3- Then interface the relay board with output module at output side.
4- Now we are using a changer circuit to change the AC to DC and DC to AC by relay.
5- Now the output of that changer circuit is fed back to the main supply of PLC means at the
relay board.
6- For supply we are using 220v AC or 18v 6A DC power bank.
7- We are using 1K resistors at input side with all push button for pull up operation.
8- Now we are burn the program in Arduino by computer.
Example.
How counter application is done in that PLC.
For UP Counter initial value is zero (0) let us take we are programming in that way so that it
countess up to 10.
Now let us take input is ----X0
Output is ------Y0
When we press X0 then count increases (+1) now again we press X0 up to 10 times and when it
completes pre determine counters value it makes the Y0 high.
This is the simple working of counter application.

53

6.2 Result:
After complete of this project we are making a investigation on some point which are effect the
PLCs operation. The point is related to the controllers used for making PLC.
Now here I described why these points are important and how these are different in simple PLC
and Arduino based PLC.
These points are
Environmental issue:
Certain environments may affect the operation of a controller. For example, typical controllers
have an operating temperature of 0-55 degrees Celsius (32-130 degrees F).but Arduino have an
operating temperature range of 0-80 degrees Celsius. If your application will include any
extreme environmental conditions, or you have specific codes at your facility that must be met,
you will need to either research products that meet those specifications or design the installation
to meet requirements. Check appropriate entry.
Discrete Devices:
The number and type of devices your system will include is directly linked to the amount of I/O
that will be necessary for your system. You will need to choose a controller that supports your
I/O count requirements and has modules that support your signal types. Enter quantities and type
based on corresponding field devices. Arduino based PLC supports all types of sensors and
actuators.
Analog Devices:
The number and type of devices your system will include is directly linked to the amount of I/O
that will be necessary for your system. You will need to choose a controller that supports your
I/O count requirements and has modules that support your signal types. Enter quantities and type
based on corresponding field devices. Arduino based PLC have up to 6 analog outputs.
Communication:
Communication ports (other than the programming port) are not always included with a
controller. Knowing your system communication requirements will help you choose a CPU that
supports your communication requirements, or additional communication modules if necessary.
Check any/all communications functions required. Arduino communicate other networks,
systems or field devices.
Programming:
Certain controllers may not support every type of instruction. You will need to choose a model
that supports all instructions that you may need for a specific application. For example, built-in
PID functions are much easier to use than writing your own code to perform closed-loop process
control. Typical instructions such as timers, counters, etc. are available in most controllers; note
any other special instructions required here. Check any/all programming functions required.

54

Chapter 7: Conclusion & Future Scope


7.1 Conclusion:
The following conclusion has been drawn from our present study:

A larger flexibility in programming using PLC circuitry is noticed.


Cost of that PLC is reduces by using the Arduino.
EMI free Product.
Beneficial for small scale industries.
It bears properties of both AC and DC.
Have 4 analog I/O.
All type of sensor interface compatible.

7.2 Future of scope:


The application systems in industries require a person to monitor and control instruments. This is
where a PLC consisting of programmable micro controllers that uses a specialized computer
language. Normally, the program is written and then downloaded to PLC using cable connection
which results in storage of program in the non volatile memory. Since they are designed for
usage during real time, it can not only endure harsh environment, but also have different output
and input ports having sensor units. The units can control output for various devices like
displays, lights, valves etc.
Times have changed and new automation systems have replaced the antiquated automation
systems consisting of plethora of timers and relays.
The supervisory control and data acquisition or SCADA is a means to develop criteria for
process management and allowing fast retrieval in various scenarios. Control and Data collection
is essential for any process of SCADA and PLC performs the task of classification and
assimilation of data which is collected. It can not only monitor, but also control facilities and
infrastructure of industries in a proper manner.
A centralized system, this can be done properly by even programmable logic controllers or
remote terminal units. SCADA is concerned about Data management and Data acquisition and a
process like data acquisition only commences at the PLC level. As an engineer having training in
PLC SCADA, one has to monitor the software and servers which allow communication with the
equipment on the field. SCADA has multi-purpose usages like researching for obscure diseases
in hospitals.

55

References
1- https://www.wikipedia.org
2- http://www.open-electronics.org/arduino-as-a-programmable-logic-controller-plc/
3- http://www.arduino.cc/
4- http://www.freescale.com/
5- P.S. Bhimbhra , Power Electronics, Khanna Publishers-Delhi
6- Ashfaq Hussain, Electrical Machine, Dhanpat Rai Publications, 2012
7- Design of embedded based three phase preventer and selector system for
industrial applications-IJECET- ISSN 0976 6464, ISSN 0976 - 6472, Vol. 4,
Issue 1, January- February (2013), pp. 183 188
8- A cost effective approach to implementing change over system - ISSN-L: 22239553, ISSN: 2223-9944 Vol. 2, No. 2, March 2012
9- Smart phase change-over system with AT89C52 microcontroller, IOSR Journal of
Electrical and Electronics Engineering (IOSRJEEE) ISSN: 2278-1676 Volume 1,
Issue 3 (July-Aug. 2012), PP 31-34
10- Freescale Semiconductor Application Note Document Number: AN3471 Rev. 0,
07/2008
11- Siemens
AG,
2003a.
Siemens
http://www.control.com/thread/1254143982

LOGO

Manual.

12- Siemens AG, 2003b. SIMATIC S7-200. Programmable Controller System


Manual.
http://cmsapps.sea.siemens.com/controls/icc/06Ind
Control_%20pdfs/06IC_15/15_03-04.pdf
13- Siemens AG, 2003c. SIMATIC HMI WinCC. Configuration Manual.
http://www.pacontrol.com/siemensmanuals/ Simatic-HMI-WinCC_Basics.pdf
14- Siemens AG, 2004. SIMATIC Programming with STEP 7 Lite 3.0. Manual.
http://legacy.solar.dk/upload/downloads/industri/S7LiteV30_e.pdf

56

PROJECT APPROVAL CERTIFICATE

57

You might also like