You are on page 1of 20

CHAPTER 3

DEVICES AND COMPONENTS

Some devices and components that are used in the application system are
discussed in this chapter. This chapter describes the development of the circuit and
selection of its components.

3.1. Required Components


To implement of the desire research, the target is to arrange all required
components and module as per circuit design and practical status observation of
components. The required components and description are as follows
 Programmable Logic Controller (PLC)
 Light Dependent Resistor (LDR)
 Passive Infrared (PIR) sensor
 Voltage Regulator (7805)
 Transistor (TIP 41C)
 Resistor
 Relay
 Fluorescent Lamp (45W)

3.2. Programmable Logic Controller


PLCs have been used in industry in one form or another for the past twenty
over years. The PLC is designed as a replacement for the hardwired relay and timer
logic to be found in traditional control panels, where PLC provides ease and
flexibility of control based on programming and executing logic instructions. The
internal functions such as timers, counters and shift registers making sophisticated
control possible using even the smallest PLC. A programmable controller operates by
examining the input signals from a process and carrying out logic instructions (which
18

have been programmed into its memory) on these input signals, producing output
signals to drive process equipment or machinery. Standard interfaces built-in to PLC
allow them to be directly connected to process actuators and transducers without the
need for intermediate circuitry or relays [08Dic].

Table 3.1 Datasheet of PLC


Specifications Types
PLC type FX2N (Mitsubishi)
Model FX2N-20MT
Power Supply 24V DC/ 50mA
Analog Input 4
Analog Output 2
Digital Input 12
Digital Output 8
Input Type Voltage free contact input
Output Type Transistor Type (NPN)
Programming Software GX Developer

Figure 3.1. Mitsubishi PLC (FX2N- 20MT) [08Dic]

3.3. Ladder Logic Programming


One of the widely used methods of controlling PLCs is using Ladder logic
programming. The ladder logic diagram is a representation of the steps of programming
that employs relay coils and contacts to control external outputs and actuators. These
outputs can be such as indicator lights, alarms as well as solenoids, motors and pneumatic
19

cylinder amongst others. The ladder program is all PLCs follows a template that consists
of 2 bus bars that are connected to one another using rung lines. The 2 bus bars on either
side are connected by Rungs 1, 2 and 3. L1 and L2 are the power sources to the input
and output instructions. Notice how each contact coil on the rungs also has a
respective address mapped to the input and output instructions which is indicated
above the instruction. Bus bars, also known as power rails supply the power from the
PLC to the instructions it contains [05Pet].

Ladder Logic Program Outputs L2


L1 Inputs

I/1 I/1 I/3 O/9

Rung 1 O/9 PL1

I/2 I/3 O/9


Rung 2
O/10 PL2
I/3 O/9 O/10
Rung 3

Figure 3.2. Example of Ladder Logic Program [05Pet]

The instructions towards to the left bus bar are input instructions which
typically consist of Normally-Open (NO), Normally-Closed (NC) contacts coils
and status bits that are used to control output instructions. These output
instructions are indicated towards the right bus bar which can include external
output instructions, mathematical operations, conversions, timers, counters and
other PLC instructions.
The rung lines that connect the 2 bus bars are on which the instructions are
written which can be written in a single rung or used in a logic connection such as
“OR” or “AND” along with a second rung line. Thus, they are also sometimes
referred to as branching instructions. When an input logic instruction is true,
power flows from the left bus bar to the right bus bar thereby energizing the
output instructions and perform an operation or task. Manipulation of these
instructions and control of input/output instructions allows users to solve control
problems in an efficient manner [05Pet].
20

3.4. Source/ Sink Inputs


The term source/sink refers to the direction of current flow into or out of
the input terminals of the PLC.
3.4.1. Source Input
When the PLC is connected for Source inputs, then the input signal current
flows into the X inputs.

Input Module
I Source
X0

I Source
XF

24V DC
0V COM

Figure 3.3. Source Input Configuration [05Pet]

3.4.2. Sink Input


When the PLC is connected for Sink inputs, then the input signal current
flow out of the X inputs.
Input Module
24V DC
21

+24V COM

I Sink
X0

I Sink
XF

Figure 3.4. Sink Input Configuration [05Pet]


3.5. Structure of Programmable Logic Controller
The structure of a PLC can be divided into four parts. They are:
1. Input/output modules
2. Central Processing Unit (CPU)
3. Memory
4. Programming Terminal

Programming
Terminal

Power
CPU Memory
Supply

Input Output
Module Module
PLC

Input Output
Devices Devices
PROCESS
22

Figure 3.5. PLC Structure [01Dan]

3.5.1. Input/ output Unit


Intelligence of an automated system is greatly depending on the ability of a
PLC to read in the various types of automatic sensing and manual input field devices.
Push buttons, keypad and toggle switches which from the basic main machine
interface are types of manual input devices. On the other hand, for detection of work
piece, monitoring of moving mechanism, checking on pressure and or liquid level and
many other, the PLC will have to tap the signal from the specific automatic sensing
devices like proximity switch, limit switch, photoelectric sensor, and level sensor and
so on. Input signal types to the PLC would be ON/ OFF logic or analogue. These
input signals are interfaced to PLC through to PLC through various types of PLC
input module [01Dan].
An automatic system is incomplete and the PLC system in virtually paralyzed
without means of interface to the field output devices. Some of the most commonly
controlled devices are motors, solenoids, relays indicators, buzzer and etc. through
activation of the motors and solenoids the PLC can control from a simple pick and
place system to a much complex serve positioning system. These type of output
devices are the mechanism of an automated system and so its direct effect on the
system performance.
This is the contact between a PLC and the outside world. In a modular PLC,
all inputs and outputs take place in blocks or modules that are designed to receive
various types of signals and to transmit signals in various formats. There are input
blocks for digital signals, analog signals, thermal elements and thermocouples,
encoders, etc. There are also output blocks for digital and analog signals as well as
blocks for special purposes.
Every input and output has a unique address that can be utilized in the
program code. The I/O modules take care of electric isolation to protect the PLC and
often have built‐in functions for signal processing. This means that input and output
signals can be connected directly without needing to use any extra electronic circuitry
[01Dan].

3.5.2. CPU Unit


Central Processing Unit (CPU) is the brain of a PLC controller. The CPU
controls and supervises all operations within the PLC, carrying out programmed
23

instructions stored in the memory. CPU itself is usually one of the microcontrollers.
These were 8- bit microcontrollers such as 8051 and now these are 16-bit and 32-bit
microcontrollers. Calculation and control functions. Counter / Timer and sequencer
for users design circuits using Relay Ladder Diagram.
CPU will accept data from a variety of input devices. It then processes the
data and using the program from memory, then sends the appropriate data and valid to
the output device. PLC controllers have complex routines for memory checkup in
order to ensure that PLC memory was not damaged (memory checkup is done for
safety reasons). CPU unit makes a great number of check-ups of the PLC controller
itself so eventual errors would be discovered early [01Dan].

3.5.3. Memory Unit


All PLCs contain both RAM and ROM in varying amounts depending upon
the design of the PLC. The use of a PLC's memory is determined again by the design
of the unit. The size of the memory varies from one brand of PLC to another, but the
memory can often be expanded by installing an extra memory card, for instance an
SD card. A PLC will commonly have the following memory units. Read ‐only
memory (ROM) for permanent storage of operating system and system data. Since the
information stored in a ROM cannot be deleted, an erasable programmable ROM
(EPROM) is used for this purpose. In this way, it is possible to update a PLC
operating system. Random access memory (RAM) for storage of programs. This is
because a RAM is very fast. Since the information in a RAM cannot be maintained
without current, PLCs have a battery so that the program code will not be lost in the
event of a power failure. Some PLCs also have the capability of program storage in an
EPROM. RAMs are also used when the program code is running. This is used, for
instance, for I/O values and the states of timers and counters. Some PLCs offer the
capability of inserting extra memory.
The internal memory in the CPU Unit consists of built-in RAM and built-in
EEPROM. The ladder program and parameter area data in the CPU units are backed
up in the built-in EEPROM backup memory. Function storage applications and data
used in the work. The size of the memory is divided into bit data (Data Bit) internal
memory one bit, it will be the state of logic 0 or 1 varies depending on the order in
which PLC consists of two memory types. ROM and RAM (Random Access
Memory) can read or write data.
24

The Programmable logic controller is a digital computer used for automation


of industrial processes such as control of machinery on factory assembly lines. Unlike
general purpose computers the PLC is also designed for multiple input & output
arrangements, extended temperature ranges, immunity to electrical noise, resistance to
vibrations and impact. PLC can handle severe conditions like dust, humidity. These
are highly reliable fast and flexible. Programs to control machine operation are
typically stored in non-volatile memory. A PLC is an example of a real time system
since output results must be produced in response to input condition within a given
period of time.
The three main parts of PLC are namely the central processing unit (CPU), the
input output selection and the programming device. Input module accept a variety of
analog or digital signals from various sensors and convert them to logic signal that
can be used by the CPU. CPU make decisions and executes control instructions based
on the program and its memory. Output module convert control instructions from the
CPU into signal that can be used to control various field devices. Programming device
is used to install the instructions that determine what PLC will do in response to
specific inputs. The operator interface allows process information to be displayed and
new control parameters to be entered. Reliable memory for storing input data and
execution. Having number (I/O) modules that are profitable. Easy in and operating a
troubleshooting [01Dan].

3.6. Light Dependent Resistor (LDR)


The LDR is a light- controlled variable resistor. The resistance of a LDR
decreases with increasing incident light intensity. A LDR are very useful especially in
light/dark sensor circuits. Normally the resistance of an LDR is very high, sometimes
as high as 1000000 ohms, but when they are illuminated with light resistance drops
dramatically. Electronic onto sensors are the devices that alter their electrical
characteristics, in the presences of visible or invisible light. The best- known devices
of this type are the light dependent resistor (LDR), the photo diode and the
phototransistors.
Light dependent resistor as the name suggests depends on light for the
variation of resistance. LDR are made by depositing a film of cadmium supplied or
cadmium selenite on a substrate of ceramic containing no or very few free electrons
when not illuminated. The longer the strip the more the value of resistance. When
25

light falls on the strip, the resistance decreases. In the absence of light, the resistance
can be in the order of 10 K ohm to 15K ohm and is called the dark resistance. The
LDR can be applied in light sensitive detector circuits and light activated and dark
activated switching circuit.
Depending on the exposure of light the resistance can fall down to value of
500 ohms. The power ratings are usually smaller and are in the range 50mw to 0.5w.
Though very sensitive to light, the switching time is very high and hence cannot be
used for high frequency applications. They are used in chopper amplifiers. Light
dependent resistors are available as discs 0.5 cm to 2.5 cm. The resistance rises to
several Mega ohms under dark conditions.
The below figure shows that when the torch is turned on, the resistance of the
LDR falls, allowing current to pass through it is shown in Figure 3.6. The basic
construction and symbol for LDR are shown in above figures respectively. The device
consists of a pair of metal film contacts separated by a snakelike track of cadmium
sulphide film, designed to provide the maximum possible contact area with the two
metal films.

Figure 3.6. LDR and Symbol of LDR [16Fad]

The structure is housed in a clear plastic or resin case, to provide free access to
external light. Practical LDR are available in variety of sizes and packages styles, the
most popular size having a face diameter of roughly 10mm, practical LDR and its
characteristic graph is shown in below Figure 3.7 [16Fad].
26

Substrate
Thin Strip of
Photoresistive
Material LDR Symbol
R(cell)
Dark Night Average Bright
Time Sunny Sunlight
10^8 Day
Resistance is
Photocell
Ohm
Resistance
10
Dark Light
0.1 1000
Illumination (Lux)

Figure 3.7. LDR and Its Characteristic Graph [16Fad]

3.6.1. Recovery Rate


When an LDR is brought from a certain illuminating level into total darkness,
the resistance does not increase immediately to the dark value. The recovery rate is
specified in k ohm/ second and for current LDR types it is more than 200 k ohm/
second. The recovery rate is much greater in the reverse direction, e.g. going from
darkness to illumination level of 300 lux, it takes less than 10ms to reach a resistance
which corresponds with a light level of 400 lux. A LDR may be connected either way
round and no special precautions are required when soldering. Maximum darkness
resistance is about 1Mohm. Minimum resistance bright light is about 100 ohm.
The LDR is a variable resistor whose resistance decreases with the increase in
light intensity. Two cadmium sulphide (cds) photoconductive cells with spectral
response similar to that of the human eye. The cell resistance falls with increasing
light intensity. Some of its features are high reliability, light weight, wide spectral
response and wide ambient temperature range [16Fad]

3.7. PIR Sensor


Passive Infrared Sensor popularly known as PIR sensor. The sensor is
basically made of a pyro electric sensor. This rectangular size sensor has some basic
features like it has 3 pins. One pin is VCC, another pin is for output named OUT and
last pin is GND. For supplying power needs 3.3-5V. When motion is detected, it
27

provides 3v high digital pulse. On the other hand, when no motion is triggered digital
pulse provides low state signal [15Ara].

1 23
+DC
Ground (GND)
Output
voltage

Figure 3.8. PIR Motion Sensor [15Ara]


3.7.1. Working Principle
The device has capability to sense up to 20 feet. PIR motion sensor gains
popularity for its low cost and low power. Additionally, wide lens range and easy
interfacing make the device user friendly. The sensor has two slots in it. These are
made of a special material that is sensitive to IR. When the sensor is idle, both slots
detect the same amount of IR, the ambient amount radiated from the room or walls or
outdoors. When a warm body like a human passes by, it first intercepts one half of
the PIR sensor, it causes a positive differential change between the two halves. When
the warm moving object leaves range, reverse process happens. For which a negative
differential change is generated. These change pulses are detected.
28

Pin 1-2 on a horizontal

PIR

Detecting area Fresel lens

Heat source movement Output Signal

Figure 3.9. PIR Motion Sensor‘s Working System [15Ara]

Uer are using usual 3 pins PIR motion sensor.3 different colored pins are there
in the device. For our PIR motion sensor the red cable is (+Ve) voltage power, black
cable is dedicated for (- Ve) ground power and yellow is for signal out [15Ara].

3.8. Voltage Regulator (7805)


The 7805 (sometimes LM7805) is a family of self- contained fixed linear
voltage regulator integrated circuits. The 78xx family is commonly used in electronic
circuits requiring a regulated power supply due to their ease-of- use and low cost. For
ICs within the family, the xx is replaced with two digits, indicating the output voltage
(for example, the 7805 has a 5 volts output, while the 7812 produced 12 volts). The
78xx line is positive voltage regulators: they produce a voltage that is positive relative
to a common ground. There is a related line of 79xx devices which are
complementary negative voltage regulators. 78xx and 79xx ICs can be used in
combination to provide positive and negative supply voltages in the same circuit.
There are 3 pins in IC 7805 Figure 3.8 and Table 3.2 show the pin descriptions of
LM7805IC. The input voltage range is minimum 7V to maximum 35V and the current
rating is 1A. The output voltage range is minimum 4.8V and maximum 5.2V.
29

Table 3.2. Pin Descriptions of LM7805 IC


Pin No. Symbol Descriptions
1 IN Input Voltage
2 GND Ground
3 OUT Output Voltage

Output
Input 1 3

2
Ground

1 2 3
Figure 3.10. LM7805 Pin Layout Diagram [10Rak]

7805 ICs have three terminals and are commonly found in the T0220 from
factor, although smaller surface- mount and larger T03 packages are available. 78xx
series ICs do not require additional components to provide a constant, regulated
source of power, making them easy to use, as well as economical and efficient uses of
space. Other voltage regulators may require additional components to set the output
voltage level or to assist in the regulation process [10Rak].

3.9. Transistor
In this thesis, NPN transistor is used. It is a Bipolar Junction Transistor (BJT)
type. The device is used as a switch. The NPN transistor has 3 pins. Pin 1 is emitter,
pin 2 is collector and pin 3 is base. A minimal current flows through base and high
current absorbing current flows through collector to emitter terminal. In this project
NPN transistor is used. It is a BJT type. The device is used as a switch. The NPN
transistor has 3 pins. Pin 1 is emitter, pin 2 is collector and pin 3 is base. A minimal
30

current flows through base and high current absorbing current flows through collector
to emitter terminal. TIP 41C is an NPN bi- polar junction transistor. A transistor stand
for transfer of resistance, is commonly used to amplify current. A small current at its
base controls a larger current at collector and emitter terminals.

C (2)

B (1)

TIP41C
E (3)

Figure 3.11. Pin Diagram and Internal Circuit Diagram of NPN Transistor [15
Ara]

3.10. Resistor
A resistor is a passive two- terminal electrical component that implements
electrical resistance as a circuit element. In electronic circuit, resistors are used to
reduce current flows, adjust signal levels, to divide voltages, bias active elements and
terminate transmission lines, among other uses. High- power resistors that can
dissipate many watts of electrical power as heat, may be used as part of motor
controls, in power distribution systems, or as test loads for generators. Fixed resistors
have resistances that only change slightly with temperature, time or operating voltage.
Variable resistors can be used to adjust circuit elements (such as a volume control or a
lamp dimmer), or as sensing devices for heat, light humidity, force or chemical
activity [16Fad].
31

Figure 3.12. Types of Resistors [16Fad]

The current through a resistor is in direct proportion to the voltage across the
resistor’s terminals. This relationship is represented by Ohm’s law:
I =V/R (3.1)

Where I is the current through the conductor in units of amperes, V is the


potential difference measured across the conductor in units of volts and R is the
resistance of the conductor in units of ohms.
The ratio of the voltage applied across a resistor’s terminals to the intensity of
current in the circuit is called its resistance and this can be assumed to be a constant
(independent of the voltage) for ordinary resistors working within their ratings.
Resistors are common elements of electrical networks and electronic circuits
and are ubiquitous in electronic equipment. Practical resistors can be made of various
compounds and films, as well as resistance wire (wire made of a high resistivity alloy,
such a nickel- chrome). Resistor are also implemented within integrated circuits,
particularly analog devices, and can also be integrated into hybrid and printed circuit
[16Fad].
3.11. Relay
The relay is an electromagnetic device which is used to isolated two circuits
electrically and connect them magnetically. This is used to interface an electronic
32

circuit to electrical circuit which works at very high voltage. For example, a relay can
make a 5V DC battery circuit to switch a 230V AC means circuit. Thus, a small
sensor circuit can drive a fan or an electric bulb. A relay switch can be divided into
two parts: input and output. The input section has a coil which generates magnetic
field. When a small voltage from an electronic circuit is applied to it. This voltage is
called the operating voltage. Commonly used relays are available in different
configuration of operating voltages like 6V, 9V, 12V, 24V etc. The output section
consists of contractors which connect or disconnect mechanism. In a basic relay, there
are three contacts: normally open (NO), normally closed (NC) and common (COM).
At no input state, the COM is connected to NO. When the operating voltage is applied
the relay coil gets energized and the COM changes contact to NC. Different relay
configuration are available like SPST,SPDT etc., which have different numbers of
changeover contacts. By using the proper combination of contractors, the electrical
circuit can be switched on and off [15Ara].

Figure 3.13. Relay [15Ara]

3.11.1. Types of Relay


Various types of relays are available such as 3 pin, 4 pin, 5 pin, 6 pin. Among
these some are of single switches or some are of dual switches. These switches are
configured as Single Pole Single Throw (SPST), Single Pole Double Throw (SPDT),
Double Pole Single Throw (DPST) and Double Pole Double Throw (DPDT) etc. In
SPST, this type has four terminals. In this type 2 terminals can be connected or
disconnected. The other 2 terminals are needed for the coil. In SPDT, this type of a
33

relay has 5 terminals. Out of these 2 are coil terminals. A common terminal is
included which connects to either of two others. In DPST, this relay has total 6
terminals. These terminals are divided into two pairs. They act as two SPST‘s which
are actuated by a single coil. Among the 6 terminals, 2 of them are coil terminals. In
DPDT, it has mainly 8 relay terminals. Out of these 2 rows are designed to be change
over terminals. These are designed to act as two SPDT relays which are actuated by a
single coil [16Fad].

3.11.2. Working Procedure

From To load
power
supply

Contacts open
Control switch

Control

Iron core

Figure 3.14. Working Procedure of Relay [16Afa]

Basically, a relay switch has two parts-input and output. The input part has a
coil which produces magnetic field when a very low voltage from the electronic
circuit is applied to relay. This low voltage range can be varied like 6v, 9v, 12v etc.
and this low voltage is commonly known as operating voltage. When current passes
through the coil it generates a magnetic field that activates the armature. Besides,
movable contacts either make or break a connection with a fixed contact. This
arrangement is totally dependent upon construction. On the other hand, the output part
includes three contactors such as normally open ( NO), normally closed ( NC ) and
common (COM ).When there is no input, the common is connected with normally
34

closed ( NC ). After applying operated voltage the relay coil becomes energized. For
this, COM changes its position and is connected with normally open (NO) [15Afa].

Figure 3.15. 5 Pin Relay [15Afa]

For example, 5 pin relay has a single control circuit but for the switch it has
two separate current paths. One path is that when the relay becomes de-energized
means there is no current flowing into control coil. Another path is that when the relay
becomes energized means there is current flowing into control coil. In this figure
when the device is de-energized, there exists continuity between pins 4 and 5. On the
other hand, when the relay is energized means on and there have continuity between
pins 3 and 5.

3.11.3 Relay Applications


Relays are used highly to realize logic functions. They provide time delay
functions. They are used to time the delay open and delay close of contacts. Relays
control high voltage circuits with the help of low voltage signals. Similarly, to control
high current circuits with the help of low current signals relays are also used. Relay
are quite common in home appliances where there is an electronic control turning on
something like a motor or a light. They are also common in cars where the 12V
35

supply voltage means that just about everything needs a large amount of current
[15Afa].
3.11.4. Relay in Circuit
In research circuit, relay it is required to operate a high voltage appliance like
220 V light. A relay has capability that can make a 24V DC circuit to switch a 220V
AC mains circuit. That‘s why in our work a relay shield that tagged 24VDC relay is
used. The shield provides some extra advantage. It provides more protection than
usual relay having no shield. This arrangement makes us relief from concerned over
checking relay connections.

Figure 3.16. 24V Relay [15Afa]

3.12. Fluorescent Lamp


There is no international energy efficiency performance standard for the
fluorescent lamps within the scope of this Product Profile. Instead, individual
countries have developed their own specifications. In addition, the power
consumption of fluorescent lamp ballasts must not exceed 1 W when the connected
lamps are switched off and other possible connected components are disconnected.
36

Figure 3.17. Fluorescent Lamp [16Fad]


A fluorescent lamp as a ‘discharge lamp of the low-pressure mercury type, in
which most of the light is emitted by one or several layers of phosphors excited by the
ultra-violet radiation from the discharge’. A fluorescent lamps require a ballast to
operate and are available in a variety of shapes, including linear, circular, U-shaped
and compact (integrated and non-integrated ballast) fluorescent lamps [16Fad].

3.13. Summary
In this chapter, peripheral components and features of PLC controller used in
the application system were described. Each of these sections was briefly presented.
The PIR sensor is used for detecting of the movement of the road and LDR sensor
which is used to detect the ambient light. The next chapter will express about design
consideration, test and result of the desired system.

You might also like