Nothing Special   »   [go: up one dir, main page]

Nikhil Project Report (Viii Sem)

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 46

DIGITAL DIST.

CONTROL OF INDUSTRIAL APPLIANCES

PROJECT STAGE-II REPORT

Submitted for the Partial fulfillment of the requirement of the

Degree

Of

BACHELOR OF TECHNOLOGY

in

ELECTRICAL ENGINEERING

Submitted To: Submitted By:

Prof. Vineet Gehlot Mr. Nikhil Mathur

( Lecturer ) ( IV B.Tech. , VIII Sem.)

Department of Electrical Engineering

Jodhpur Institute of Engineering & Technology,

JIET Group of Institutions,

Rajasthan Technical University, Kota (Raj.)

2011

1
CERTIFICATE

This is to certify that the Project Report entitled “DIGITAL


DISTRIBUTION CONTROL OF INDUSTRIAL APPLIANCES” being
submitted by Mr. Nikhil Mathur (IV B. Tech., VIII Sem.) for the partial
fulfillment of the requirement of the Degree of Bachelor of Technology in
Electrical Engineering of Jodhpur Institute of Engineering & Technology,
Jodhpur is a record of the Project delivered by him.

Prof. Kusum Agarwal


(Head, EE)
Date: 26th May,2011
Place: Jodhpur

2
ACKNOWLEDGEMENT
The compilation of this project would not have been possible without
the support and guidance of the following people and organization .With my
deep sense of gratitude ,I think my respected teachers for supporting this topic
of my project. This project report provides me with an opportunity to put into
knowledge of advanced technology. I thereby take the privilege opportunity to
thank my guide and my friends whose help and guidance made this study a
possibility.

As a student, I learnt many things but unless I put all with the practical
knowledge as to how things really work and what are the problems generally
arise, I cannot expect to be an efficient student. So I think that my project is an
indispensable part of the course.

His dedication & sincerity towards the project helped me a lot in


completion of project report and gave it the present attractive look.

Last but not the least , I would again like to express my sincere thanks to
all project guides for their constant friendly guidance during the entire stretch of
this report. Every new step I took was due to their persistent enthusiastic
backing and I acknowledge this with a deep sense of gratitude.

Mr. Nikhil Mathur

( IV B.Tech. , VIII Sem.)

3
ABSTRACT
The computer had seen a lot of evolution both in hardware and software
Sides, yet there are some features which remain unbeatable and one among
them is the structure oriented programming language or C. Apart from
computer Programming they are fused in circuit boards, microcontrollers.., etc
to carry out Specified functions. The reason is the elegance and simplicity of the
keywords used in c.
This paper is about Controlling Home/Industrial Appliance with
computer using C. This idea is evolved from the in-out features of
microcontroller. The same can be extended to a PC where the output from PC is
a pulse which will activate a relay and hence controlling electrical/electronic
appliance. This is possible in all PCs having printer port.
PC controlled Fan Regulator is one of the applications of electronics to
increase the facilities of life. Fan is one of the unavoidable Electronic
equipment in our day today life. It has become essential element without which
people can’t lead a smooth life. The presence of a fan in a house or office is not
now considered as a luxury on the other hand it is included in the basic
requirement. The uses of new electronic theories have been put down by
expertise to increase the facilities given by the existing appliance. Here the
facility of ordinary fan is increased by the making it controlled by a PC.
In PC controlled fan regulator we can regulate the speed of the fan by
using a PC. Here the variation in the firing angle of triac is used for regulating
the speed.
Any button on the PC can be used for controlling speed of the fan. Using
this circuit, we can change the speed of the fan from our couch or bed. This
circuit is used for controlling the speed of the fan in 5 levels. This innovation
can be a success only if people are made aware about its advantages and how
user-friendly it is. The circuit can be used to regulate the intensity of light. This

4
innovation finds its use mainly to help old age people who don’t want to walk in
order to control the speed of fan. It also finds its use of somebody wants to
change the speed while sleeping.

5
CONTENTS

Sr. No. Topics Page No.

1. Introduction ………………………...……………… 7
2. PCB fabrication ……………………………...……… 8-9
3. Soldering...…………………………………...……… 10-12
4. Circuits Components…………...………...………… 13-27
5. Digital distribution control of industrial appliances 28-35
6. Software...…………………………………...…… 36-42
7. Conclusion …………………………………...…… 43-44
8. Bibliography……………………………………...….. 45
9. Cost sheet ……………………………………...….. 46

6
CHAPTER – 1.
INTRODUCTION
1. Introduction
A circuit that allows total control over your equipments without having to move
around is a revolutionary concept. Total control over the speed of the fan is a boon to many.
This product brings to you this very concept.
PC control facilitates the operation of fan regulators around the home or office from a
distance. It provides a system that is simple to understand and also to operate, a system that
would be cheap and affordable, a reliable and easy to maintain system of PC control and
durable system irrespective of usage. It adds more comfort to everyday living by removing
the inconvenience of having to move around to operate a fan regulator. The system seeks to
develop a system that is cost effective while not undermining the need for efficient working.
The first PC control, called “lazy bones” was developed in 1950 by Zenith Electronics
Corporation (then known as Zenith Radio Corporation). The device was developed quickly,
and it was called “Zenith space command”, the PC went into production in the fall of 1956,
becoming the first practical wireless PC control device. Today, PC control is a standard on
electronic products, including VCRs, cable and satellite boxes, digital video disc players and
home audio players. In the year 2000, more than 99 percent of all TV set and 100 percent of
all VCR and DVD players sold are equipped with PC controls. The average individual these
days probably picks up a PC control at least once or twice a day.
Basically, a PC control works in the following manner. A button is pressed. This
completes a specific connection which produces a Morse code line signal specific to that
button. The transistor amplifies the signal and sends it to the LED which translates the signal
into infrared light. The sensor on the appliance detects the infrared light and reacts
appropriately.
The PC control’s function is to wait for the user to press a key and then translate that
into infrared light signals that are received by the receiving appliance. The carrier frequency
of such infrared signals is typically around 36kHz.

7
CHAPTER – 2.
PCB FABRICATION
2.1. PCB fabrication
Printed Circuit Boards play a vital role here in determining the overall performance of
the electronic equipment. A good PCB design ensures that the noise introduced as a result of
component placement and track layout is held within limits while still providing components
years of assembly maintenance and performance reliability.
2.2. Where and why are PCB’s used?
Printed circuits boards are used to route electric signals through copper track which
are firmly bonded to an insulating base.
 Advantages of PCB over common wiring are:
 PCB’s are necessary for connecting a large number of electronic components in a
very small area with minimum parasitic effects.
 PCB’s are simulated with mass production with less chance of writing error.
 Small components are easily mounted.
 Servicing in simplified.
The base materials used for PCB’s are glass epoxy, epoxy paper, polyester etc. Copper
foil used for copper clad is manufactured by the process of electronic deposition.
The properties of copper coil are:
 Thickness………………35μ meter
   Thickness tolerance……+5 μ meter
   Purity of Copper………99.8%
   Resistivity at 20oC…….0.1594
2.3. Preparation of single sided PCB
In a single sided PCB the conductor tracks run only on one side of copper clad board.
Thus crossing of conductors is not allowed. Base materials are selected according to
application. It is mechanically and chemically cleansed. The photo resist is an organic
solution which when exposed to light of proper wavelength, changes their solubility in
developer but after exposure to light is not soluble. Laminate coating of photo resist is done
by
(i) Spray coating
(ii) Dip coating

8
(iii) Roller coating.
The coated copper clad and laminated film negative is kept in intimate contact with
each other.
The assembly is exposed to UV light and is rinsed in the developer tank. Proper
developer has to be used for a particular photo resist and then the PCB is dyed in a tray. The
dye reveals the flux to be used for a particular photo resist. Then the PCB is dyed in a tray.
2.4. Layout
The layout can be done either by hand or by using PCB designing software like
ORCAD or PROTEL.
2.5. Fabrication
The required circuit is designed and the layout of the circuit is done on the component
side as well as the copper clad side. Spaces are provided for holes to insert the respective
components. Etch resistant ink coatings are given on the interconnecting marks.
2.6. Etching
The copper clad PCB is etched with ferrous chloride solution containing a small
amount of Hydro Chloric Acid for increasing activeness of Ferric Chloride in etching.
Wherever the varnish coating is there the copper remains. Then it is washed with water and
Oxalic Acid.
2.7. Drilling
The required holes of suitable size are drilled using twist drill. Now the Printed
Circuit Board (PCB) is complete and ready for soldering.

9
CHAPTER – 3.
SOLDERING
3.1. Soldering
Soldering is a process in which two or more metal items are joined together by
melting and flowing a filler metal into the joint, the filler metal having a relatively low
melting point. Soft soldering is characterized by the melting point of the filler metal, which is
below 400 °C (752 °F). The filler metal used in the process is called solder.
Soldering is distinguished from brazing by use of a lower melting-temperature filler
metal; it is distinguished from welding by the base metals not being melted during the joining
process. In a soldering process, heat is applied to the parts to be joined, causing the solder to
melt and be drawn into the joint by capillary action and to bond to the materials to be joined
by wetting action. After the metal cools, the resulting joints are not as strong as the base
metal, but have adequate strength, electrical conductivity, and water-tightness for many uses.

Figure 3.1 Soldering Process

10
3.2. Applications
One of the most frequent applications of soldering is assembling electronic
components to printed circuit boards (PCBs). Another common application is making
permanent but reversible connections between copper pipes in plumbing systems. Joints in
sheet metal objects such as food cans, roof flashing, rain gutters and automobile radiators
have also historically been soldered, and occasionally still are.
3.3. Tools
Hand-soldering tools include the electric soldering iron, which has a variety of tips
available ranging from blunt to very fine to chisel heads for hot-cutting plastics, and the
soldering gun, which typically provides more power, giving faster heat-up and allowing
larger parts to be soldered. Hot-air guns and pencils allow rework of component packages
which cannot easily be performed with electric irons and guns.
3.4. Flux
In high-temperature metal joining processes (welding, brazing and soldering) , the
primary purpose of flux is to prevent oxidation of the base and filler materials. Tin lead
solder, for example, attaches very well to copper, but poorly to the various oxides of copper,
which form quickly at soldering temperatures. Flux is a substance which is nearly inert at
room temperature, but which becomes strongly reducing at elevated temperatures, preventing
the formation of metal oxides. Secondarily, flux acts as a wetting agent in the soldering
process, reducing the surface of the molten solder and causing it to better wet out the parts to
be joined.
3.4.1. NEED FOR FLUX
During the soldering process the flux acts as a medium for improving the degree of
melting. The basic functions of flux are mentioned below:
1. Removes oxide from the surface.
2. Assists the transfer of heat from the source to the joining and provides a liquid cover
including air gap.
3. Removal of residue after the completion of the soldering operation.
3.5. Soldering defects
The most common defect when hand-soldering results from the parts being joined
not exceeding the solder's liquids temperature, resulting in a "cold solder" joint. This is
usually the result of the soldering iron being used to heat the solder directly, rather than the

11
parts themselves. Properly done, the iron heats the parts to be connected, which in turn melt
the solder, guaranteeing adequate heat in the joined parts for thorough wetting.

12
CHAPTER - 4.
CIRCUIT COMPONENTS
4.1. Resistor
A resistor is a two-terminal electronic component that produces a voltage across its
terminals that is proportional to the electric current through it in accordance with Ohm's law:
V = IR
Resistors are elements of electrical networks and electronic circuits and are ubiquitous
in most 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 as
nickel/chrome). The primary characteristics of a resistor are the resistance, the tolerance,
maximum working voltage and the power rating. Other characteristics include temperature
coefficient, noise, and inductance. Resistors can be integrated into hybrid and printed circuits,
as well as integrated circuits. Size, and position of leads (or terminals) are relevant to
equipment designers; resistors must be physically large enough not to overheat when
dissipating their power.
Units: The ohm (symbol: Ω) is a SI-driven unit of electrical resistance, named after Georg
Simon Ohm. Commonly used multiples and submultiples in electrical and electronic usage
are the milliohm (1x10-3), kilo ohm (1x103), and mega ohm (1x106).

 Carbon film resistor

Figure 4.1.1. Carbon film resistor

 Color coding of resistors

Resistor values are always coded in ohms.


 band A is first significant figure of component value
 band B is the second significant figure
 band C is the decimal multiplier

13
 band D if present, indicates tolerance of value in percent (no color means 20%)

Figure 4.1.2. Color coding resistance

 Color coding table

Table 4.1.1. Color Coding Table

4.2. Bipolar junction transistor


A bipolar (junction) transistor (BJT) is a three-terminal electronic device constructed
of doped semiconductor material and may be used in amplifying or switching applications.

14
Bipolar transistors are so named because their operation involves both electrons and holes.
Charge flow in a BJT is due to bidirectional diffusion of charge carriers across a junction
between two regions of different charge concentrations. This mode of operation is contrasted
with unipolar transistors, such as field-effect transistors, in which only one carrier type is
involved in charge flow due to drift. By design, most of the BJT collector current is due to the
flow of charges injected from a high-concentration emitter into the base where they are
minority carriers that diffuse toward the collector, and so BJTs are classified as minority-
carrier devices.
4.2.1. Working of transistor
An NPN transistor can be considered as two diodes with a shared anode. In typical
Operation, the emitter–base junction is forward biased and the base–collector junction is
reverse biased. In an NPN transistor, for example, when a positive voltage is applied to the
base–emitter junction, the equilibrium between thermally generated carriers and the repelling
electric field of the depletion becomes unbalanced, allowing thermally excited electrons to
inject into the base region. These electrons wander (or "diffuse") through the base from the
region of high concentration near the emitter towards the region of low concentration near the
collector. The electrons in the base are called minority carriers because the base is doped p-
type which would make holes the majority carrier in the base.

Figure 4.2.1.Working of transistor


To minimize the percentage of carriers that recombine before reaching the collector–
base junction, the transistor's base region must be thin enough that carriers can diffuse across
it in much less time than the semiconductor's minority carrier lifetime. In particular, the
thickness of the base must be much less than the diffusion length of the electrons. The
collector–base junction is reverse-biased, and so little electron injection occurs from the
collector to the base, but electrons that diffuse through the base towards the collector are

15
swept into the collector by the electric field in the depletion region of the collector–base
junction. The thin shared base and asymmetric collector–emitter doping is what differentiates
a bipolar transistor from two separate and oppositely biased diodes connected in series.
4.2.2. NPN transistor
NPN is one of the two types of bipolar transistors, in which the letters "N" and "P"
refer to the majority charge carriers inside the different regions of the transistor. Most bipolar
transistors used today are NPN, because electron mobility is higher than hole mobility in
semiconductors, allowing greater currents and faster operation.
NPN transistors consist of a layer of P-doped semiconductor (the "base") between two
N-doped layers. A small current entering the base in common-emitter mode is amplified in
the collector output. In other terms, an NPN transistor is "on" when its base is pulled high
relative to the emitter. The arrow in the NPN transistor symbol is on the emitter leg and
points in the direction of the conventional current flow when the device is in forward active
mode.

Figure 4.2.2. NPN Transistor


4.2.3. Regions of operation
Bipolar transistors have five distinct regions of operation, defined mostly by applied
bias:
 Forward-active (or simply, active):
The emitter–base junction is forward biased and the base–collector junction is reverse
biased. Most bipolar transistors are designed to afford the greatest common-emitter
current gain, βF, in forward-active mode. If this is the case, the collector–emitter current
is approximately proportional to the base current, but many times larger, for small base
current variations.
 Reverse-active (or inverse-active or inverted):
By reversing the biasing conditions of the forward-active region, a bipolar transistor
goes into reverse active mode. In this mode, the emitter and collector regions switch
roles. Because most BJTs are designed to maximize current gain in forward-active mode,
the βF in inverted mode is several (2–3 for the ordinary germanium transistor) times

16
smaller. This transistor mode is seldom used, usually being considered only for failsafe
conditions and some types of bipolar logic. The reverse bias breakdown voltage to the
base may be an order of magnitude lower in this region.
 Saturation:
With both junctions forward-biased, a BJT is in saturation mode and facilitates high
current conduction from the emitter to the collector. This mode corresponds to a logical
"on", or a closed switch.
 Cutoff:
In cutoff, biasing conditions opposite of saturation (both junctions reverse biased) are
present. There is very little current flow, which corresponds to a logical "off", or an open
switch.
4.2.4. Transistor 'alpha' and 'beta '
The proportion of electrons able to cross the base and reach the collector is a measure
of the BJT efficiency. The heavy doping of the emitter region and light doping of the base
region cause many more electrons to be injected from the emitter into the base than holes to
be injected from the base into the emitter. The common-emitter current gain is represented by
βF ; it is approximately the ratio of the DC collector current to the DC base current in forward-
active region. It is typically greater than 100 for small-signal transistors but can be smaller in
transistors designed for high-power applications. Another important parameter is the
common-base current gain, αF. The common-base current gain is approximately the gain of
current from emitter to collector in the forward-active region. Alpha and beta are more
precisely related by the following identities (NPN transistor):

4.3. SPDT RELAY:


A relay is an electromechanical switch. More importantly, relays are used in virtually
every type of electronic device to switch voltages and electronic signals. A relay operates
based on the principals of electromagnetic. Inside a relay is an inductor (a wire coil) that,
when energized with an electric pulse, will generate a magnetic field. The second part of a
relay is a system of metallic arms which make up the physical contacts of the switch. When

17
the relay is off, or no electric pulse is given to the relay, the arm of the switch is in one
position. When the relay is on, or an electric pulse is sent to the relay, the swing or switching
arm of the switch moves to another contact of the switch. The arm moves as the generated
magnetic field pulls the swinging arm toward the inductor (or wire coil). There are many
different configurations of relays but this is the simplest form of the internal switching.
Relays can have as few as 1 moving arm up to many inside of a single relay box.

Figure 4.3.1. SPDT Relay

When the relay is in the “off” position, the swing arm is in contact with the normally
closed contact. This means that when the relay is in the “off” position, the normally closed
contact is also conducting to the main contact. When the relay is activated, the magnetic field
created by the inductor coil pulls the swing arm until it makes contact with the normally open
contact connecting the circuit connected to the normally open contact to the circuit connected
to the main contact.
4.3.1. Relay Terms:
 Inductor Coil: generates a magnetic field inside the relay housing when voltage is
applied.

18
 Swing Arm: the only moving part of a relay. Switches between contacts of the relay
when pulled by the magnetic field generated the inductor coil.
 Normally Open Contact: the contact or pin that is NOT in contact with the swing
arm when the relay is in the off position but is the contact the swing arm switches to
when the relay is activated.
 Normally Close Contact: the contact or pin that IS in contact with the swing arm
when the relay is in the off position but is the contact the swing arm switches away
from when the relay is activated.
 Main Contact: connected to the swing arm. The primary purpose of the switching of
the relay allows the primary contact to jump or switch between the circuits attached to
the normally open and normally closed contacts when the relay is turn on and off.

Figure 4.3.2. PC Mounted Relay


4.3.2. Protection diodes for relays:
Transistors and ICs must be protected from the brief high voltage produced when a
relay coil is switched off. The diagram shows how a signal diode (e.g. 1N4148) is connected
'backwards' across the relay coil to provide this protection.
Current flowing through a relay coil creates a magnetic field which collapses
suddenly when the current is switched off. The sudden collapse of the magnetic field induces
a brief high voltage across the relay coil which is very likely to damage transistors and ICs.
The protection diode allows the induced voltage to drive a brief current through the coil (and
diode) so the magnetic field dies away quickly rather than instantly. This prevents the
induced voltage becoming high enough to cause damage to transistors and ICs.

19
Figure 4.3.3. Protection diodes for relays

4.4. Diode:

Figure 4.4.1. Typical diode packages in same alignment as diode symbol. Thin bar depicts the cathode.

In electronics, a diode is a two-terminal electronic component that conducts electric


current in only one direction. The term usually refers to a semiconductor diode, the most
common type today, which is a crystal of semiconductor connected to two electrical
terminals, a P-N junction. A vacuum tube diode, now little used, is a vacuum tube with two
electrodes; a plate and a cathode. The most common function of a diode is to allow an electric
current in one direction (called the diode's forward direction) while blocking current in the
opposite direction (the reverse direction). Thus, the diode can be thought of as an electronic
version of a check valve. This unidirectional behavior is called rectification, and is used to
convert alternating current to direct current, and extract modulation from radio signals in
radio receivers.
4.4.1. Current–voltage characteristic:
A semiconductor diode’s behavior in a circuit is given by its current–voltage
characteristic, or I–V graph (see graph at right). The shape of the curve is determined by the
transport of charge carriers through the so-called depletion layer or depletion region that

20
exists at the p-n junction between differing semiconductors. When a p-n junction is first
created, conduction band (mobile) electrons from the N doped region diffuse into the
P-doped region where there is a large population of holes (vacant places for electrons) with
which the electrons “recombine”. When a mobile electron recombines with a hole, both hole
and electron vanish, leaving behind an immobile positively charged donor (dopant) on the N-
side and negatively charged acceptor (dopant) on the P-side. The region around the p-n
junction becomes depleted of charge carriers and thus behaves as an insulator.
However, the width of the depletion region (called the depletion width) can not grow
without limit. For each electron-hole pair that recombines, a positively-charged dopant ion is
left behind in the N-doped region, and a negatively charged dopant ion is left behind in the P-
doped region. As recombination proceeds more ions are created, an increasing electric field
develops through the depletion zone which acts to slow and then finally stop recombination.
At this point, there is a “built-in” potential across the depletion zone.
If an external voltage is placed across the diode with the same polarity as the built-in
potential, the depletion zone continues to act as an insulator, preventing any significant
electric current flow (unless electron/hole pairs are actively being created in the junction by,
for instance, light. see photodiode). This is the reverse bias phenomenon. However, if the
polarity of the external voltage opposes the built in potential, recombination can once again
proceed, resulting in substantial electric current through the p-n junction (i.e. substantial
numbers of electrons and holes recombine at the junction).. For silicon diodes, the built-in
potential is approximately 0.6 V. Thus, if an external current is passed through the diode,
about 0.6 V will be developed across the diode such that the P-doped region is positive with
respect to the N-doped region and the diode is said to be “turned on” as it has a forward bias.

Figure 4.4.2. I–V characteristics of a P-N junction diode (not to scale)

21
A diode’s 'I–V characteristic' can be approximated by four regions of operation (see
the figure at right). At very large reverse bias, beyond the peak inverse voltage or PIV, a
process called reverse breakdown occurs which causes a large increase in current (i.e. a large
number of electrons and holes are created at, and move away from the p-n junction) that
usually damages the device permanently. The avalanche diode is deliberately designed for
use in the avalanche region. In the zener diode, the concept of PIV is not applicable. A zener
diode contains a heavily doped p-n junction allowing electrons to tunnel from the valence
band of the p-type material to the conduction band of the n-type material, such that the
reverse voltage is “clamped” to a known value (called the zener voltage), and avalanche does
not occur. Both devices, however, do have a limit to the maximum current and power in the
clamped reverse voltage region. Also, following the end of forward conduction in any diode,
there is reverse current for a short time. The device does not attain its full blocking capability
until the reverse current ceases.
The second region, at reverse biases more positive than the PIV, has only a very small
reverse saturation current. In the reverse bias region for a normal P-N rectifier diode, the
current through the device is very low (in the μA range). However, this is temperature
dependent, and at sufficiently high temperatures, a substantial amount of reverse current can
be observed (mA or more).
The third region is forward but small bias, where only a small forward current is
conducted. As the potential difference is increased above an arbitrarily defined “cut-in
voltage” or “on-voltage” or “diode forward voltage drop (V d)”, the diode current becomes
appreciable (the level of current considered “appreciable” and the value of cut-in voltage
depends on the application), and the diode presents a very low resistance. The current–
voltage curve is exponential. In a normal silicon diode at rated currents, the arbitrary “cut-in”
voltage is defined as 0.6 to 0.7 volts. The value is different for other diode types — Schottky
diodes can be rated as low as 0.2 V and red or blue light-emitting diodes (LEDs) can have
values of 1.4 V and 4.0 V respectively. At higher currents the forward voltage drop of the
diode increases. A drop of 1 V to 1.5 V is typical at full rated current for power diodes.
4.5. Opto-coupler:
In electronics, an opto-isolator (or optical isolator, optical coupling device,
optocoupler, photocoupler, or photoMOS) is a device that uses a short optical transmission
path to transfer an electronic signal between elements of a circuit, typically a transmitter and
a receiver, while keeping them electrically isolated -
22
Figure 4.5.Opto-coupler
Since the electrical signal is converted to a light beam, transferred, then converted
back to an electrical signal, there is no need for electrical connection between the source and
destination circuits. Isolation between input and output is rated at 7500 Volt peak for 1
second for a typical component costing less than 1 US$ in small quantities.
The opto-isolator is simply a package that contains both an infrared light-emitting
diode (LED) and a photo detector such as a photosensitive silicon diode, transistor Darlington
pair, or silicon controlled rectifier (SCR). The wave-length responses of the two devices are
tailored to be as identical as possible to permit the highest measure of coupling possible.
Other circuitry—for example an output amplifier—may be integrated into the package. An
opto-isolator is usually thought of as a single integrated package, but opto-isolation can also
be achieved by using separate devices.
4.5.1. Configurations:

Figure 4.5.1.Schematic diagram of a very simple opto-isolator with an LED and phototransistor.
The dashed line represents the isolation barrier, over which there is no electrical
contact. A common implementation is a LED and a phototransistor in a light-tight housing to
exclude ambient light and without common electrical connection, positioned so that light
from the LED will impinge on the photodetector. When an electrical signal is applied to the
input of the opto-isolator, its LED lights and illuminates the photodetector, producing a
corresponding electrical signal in the output circuit. Unlike a transformer the opto-isolator
allows DC coupling and can provide any desired degree of electrical isolation and protection
from serious overvoltage conditions in one circuit affecting the other. A higher transmission

23
ratio can be obtained by using a Darlington instead of a simple phototransistor, at the cost of
reduced noise immunity and higher delay.
With a photodiode as the detector, the output current is proportional to the intensity of
incident light supplied by the emitter. The diode can be used in a photovoltaic mode or a
photoconductive mode. In photovoltaic mode, the diode acts as a current source in parallel
with a forward-biased diode. The output current and voltage are dependent on the load
impedance and light intensity. In photoconductive mode, the diode is connected to a supply
voltage, and the magnitude of the current conducted is directly proportional to the intensity of
light. This optocoupler type is significantly faster than photo transistor type, but the
transmission ratio is very low; it is common to integrate an output amplifier circuit into the
same package.
The optical path may be air or a dielectric waveguide. When high noise immunity is
required an optical conductive shield can be integrated into the optical path. The transmitting
and receiving elements of an optical isolator may be contained within a single compact
module, for mounting, for example, on a circuit board; in this case, the module is often called
an optoisolator or opto-isolator. The photosensor may be a photocell, phototransistor, or an
optically triggered SCR or TRIAC. This device may in turn operate a power relay or
contactor. Analog optoisolators often have two independent, closely matched output
phototransistors, one of which is used to linearize the response using negative feedback.
4.6. D-subminiature:

Figure 4.6. D-subminiature


The D-subminiature or D-sub is a common type of electrical connector used
particularly in computers. A D-sub contains two or more parallel rows of pins or sockets
usually surrounded by a D-shaped metal shield that provides mechanical support, some
screening against electromagnetic interference, and ensures correct orientation. The part
containing pin contacts is called the male connector or plug, while that containing socket

24
contacts is called the female connector or socket. The socket's shield fits tightly inside the
plug's shield. The shields are connected to the overall screens of the cables (when screened
cables are used), creating an electrically continuous screen covering the whole cable and
connector system.

Figure 4.6.1.DB25 female connector & Cable

Table 5.2.1. Details of parallel port signal lines

4.7. Transformer
A transformer is a device that transfers electrical energy from one circuit to another
through inductively coupled conductors — the transformer's coils or "windings". Transformer
is used here to step down the supply voltage to a level suitable for the low voltage
components.

25
Figure. 4.7. Transformer

The transformer used here is a 230/(12V-0-12V) step down transformer.

4.8. Regulator Section 

Figure 4.8. Regulator Section

A voltage regulator is an electrical regulator designed to automatically maintain a


constant voltage level.
IC 7809 is used here. It is a 9V regulator. It regulates the rectified 12V to 9V. This
9V is supplied to the whole circuit. 
4.9. Opto Isolator
An Opto isolator is used to transmit either analog or digital information from one
voltage potential to another while maintaining isolation of the potentials. Its operating voltage
is higher than that of an Opto coupler.

Figure 4.9. Opto Isolator

Here, MOC3021 is used as opto isolator. It is used to drive the Triac BT136. 

26
4.10. Triac BT 136

A TRIAC, or TRIode for Alternating Current is an electronic component


approximately equivalent to two silicon-controlled rectifiers (SCRs/thyristors) joined in
inverse parallel (paralleled but with the polarity reversed) and with their gates connected
together. The formal name for a TRIAC is bidirectional triode thyristor. This results in a
bidirectional electronic switch which can conduct current in either direction when it is
triggered (turned on) and thus doesn't have any polarity. It can be triggered by either a
positive or a negative voltage being applied to its gate electrode (with respect to A1,
otherwise known as MT1). Once triggered, the device continues to conduct until the current
through it drops below a certain threshold value, the holding current, such as at the end of a
half-cycle of alternating current (AC) mains power. In addition, applying a trigger pulse at a
controllable point in an AC cycle allows one to control the percentage of current that flows
through the TRIAC to the load (phase control).

Figure 4.10. Triac BT 136

The triac used here is BT136.  It is thyristor with a firing angle nearly 45 o. A snubber
circuit consisting of a resistor and capacitor is used to control the firing angle of Triac. This
firing angle determines the speed of the fan.

27
CHAPTER – 5.
DIGITAL DIST. CONTROL OF INDUSTRIAL APPLIANCES
5.1. Introduction
Here is a circuit diagram for using the printer port of a PC, for control application
using software and some interface hardware. The interface circuit along with the given
software can be used with the printer port of any PC for controlling up to eight equipments.
The interface circuit shown in is drawn for only two device, being controlled by D0 and D1
bit at pin 2 and pin 3 of the 25-pin parallel port. Identical circuits for the remaining data bits
D2 through D7 (available at pins 4 through 9) have to be similarly wired. The use of opto-
coupler ensures complete isolation of the PC from the relay driver circuitry.
Lots of ways to control the hardware can be implemented using software. In C/C++
one can use the out port b (port no, value) function where port no is the parallel port address
(usually 378hex for LPT1) and 'value' is the data that is to be sent to the port. For a value=0
all the outputs (D0-D7) are off. For value=1 D0 is ON, value=2 D1 is ON, value=4, D2 is ON
and so on. e.g. If value=29(decimal) = 00011101(binary) ->D0, D2, D3, D4 are ON and the
rest are OFF.
5.2. Working
First of all, connect the DB25 cable to the parallel port of computer as well as DB25
female connector on the circuit board. Now open the software “Portctrl” which is written in
“c” and is very easy to understand. The screen in the software shows the status of the Data
pins of the computer’s parallel port.
Initially, All the pins are in the off state i.e. 0. Now Press the appropriate numeric key
to turn on/off pins of the computer’s port. This in turn sends either 3.5-5v signal (on state) if
the key is pressed once and if it is pressed again then it sends 0- 1.5v (off state) signal. The
software converts the number pressed in to hex code which is also shown on the screen and
then sends the value to parallel port address (usually 378hex for LPT1). Maximum up to 8
appliances can be controlled by pressing appropriate keys.
When any of the port is in “on” state then the voltage forward biases the LED in the
Optocoupler and sends the light to a phototransistor. The Optocoupler provides complete
isolation from the computer’s port. The phototransistor in turn activates the transistor BC148
used to energize relay. Inside a relay is an inductor (a wire coil) that, when energized with an
electric pulse, will generate a magnetic field. The second part of a relay is a system of
metallic arms which make up the physical contacts of the switch. When the relay is off, or no
28
electric pulse is given to the relay, the arm of the switch is in one position. When the relay is
on, or an electric pulse is sent to the relay, the swing or switching arm of the switch moves to
another contact of the switch. The arm moves as the generated magnetic field pulls the
swinging arm toward the inductor (or wire coil). And hence the AC circuit is completed and
the electrical appliance is turned on.

Figure 5.1. Digital Distribution control of Industrial appliances

29
Figure 5.2. Power supply circuit

Figure 5.3. Screenshot of the main screen for computerized electrical equipment control

However, Transistors and ICs must be protected from the brief high voltage produced
when a relay coil is switched off. The protection diode allows the induced voltage to drive a
brief current through the coil (and diode) so the magnetic field dies away quickly rather than
instantly. This prevents the induced voltage becoming high enough to cause damage to
transistors and ICs.
5.2.1. Background
Parallel port is a simple and inexpensive tool for building computer controlled devices
and projects. The simplicity and ease of programming makes parallel port popular in
electronics hobbyist world. The parallel port is often used in computer controlled robots,
home automation, etc. Here is a simple tutorial on parallel port interfacing and programming,
with some examples. The primary use of parallel port is to connect printers to the computer
and is specifically designed for this purpose.

30
Figure 5.4. Combined actual-size, single-side PCB layout for Digital distribution control of industrial
appliances and power supply circuits
Thus it is often called as printer Port or Centronics port (this name came from a
popular printer manufacturing company 'Centronics' which devised some standards for
parallel port). You can see the parallel port connector in the rear panel of your PC. It is a 25
pin female (DB25) connector (to which printer is connected). On almost all the PCs only one
parallel port is present, but you can add more by buying and inserting ISA/PCI parallel port
cards.

31
Figure 5.5. Component layout for the PCB
5.2.2. Parallel port modes
The IEEE 1284 Standard which has been published in 1994 defines five modes of
data transfer for parallel port. They are:
1. Compatibility Mode
2. Nibble Mode
3. Byte Mode
4. EPP
5. ECP
The programs, circuits, and other information found in this tutorial are compatible to
almost all types of parallel ports and can be used without any problems.

32
5.2.3. Hardware
The pin outs of DB25 connector is shown in the picture below: The lines in DB25
connector are divided into three groups, they are:
1. Data lines (data bus)
2. Control lines
3. Status lines

Figure 5.2.3. pin outs of DB25 connector


As the name refers, data is transferred over data lines. Control lines are used to
control the peripheral, and of course, the peripheral returns status signals back to the
computer through Status lines. These lines are connected to Data, Control And Status
registers internally. The details of parallel port signal lines are given below:

Table 5.2.1. Details of parallel port signal lines

33
5.2.4. Parallel port registers
As you know, the Data, Control and Status lines are connected to there corresponding
registers inside the computer. So, by manipulating these registers in program, one can easily
read or write to parallel port with programming languages like 'C' and BASIC. The registers
found in a standard parallel port are:
1. Data register
2. Status register
3. Control register
As their names specify, Data register is connected to Data lines, Control register is
connected to Control lines and Status register is connected to Status lines. (Here the word
connection does not mean that there is some physical connection between data/control/status
lines. The registers are virtually connected to the corresponding lines.) So, whatever you
write to these registers will appear in the corresponding lines as voltages. Of course, you can
measure it with a multimeter. And whatever you give to Parallel port as voltages can be read
from these registers (with some restrictions). For example, if we write '1' to Data register, the
line Data0 will be driven to +5v. Just like this, we can programmatically turn on and off any
of the Data lines and Control lines.
5.2.5. LIST OF COMPONENTS USED:
1. 25 pin connector (DB25 male) and DB25 cable.
2. Two 470ohm resistors.
3. 4n35 optocoupler.
4. 4.7Kohm resistor.
5. 2N2222/BC148.
6. Relay 6v/100ohm.
7. 1N4001Diode.
8. 6v battery.
9. One 3 pin plug and socket.
10. One LED.
11. Connecting wires.
12. 230 v A.C. main supply.
13. Printed Circuit Board.
5.2.6. Applications:
The project can be used for various applications wherever you require control using pc.

34
a) Hotel power management.
b) Street light management.
c) Home automation.
d) High voltage grid control.
e) Industrial automation and many more.

35
CHAPTER - 6.
SOFTWARE
6.1. Program written in C :
#include<stdio.h>
#include<conio.h>
#include<dos.h>
void main()
{
void tone(void);
int p=0x0378;
char ex[23]={"Created by Er. Nikhil Mathur"};
int j;
char ex1[34]={"For Further Details & Improvements"};
int k;
char ex2[40]={" Email:-mathurnikhil10@gmail.com"};
int l;
char ex3[23]={"Programming Language: C"};
int m;
int u[10];
int i;
static a,b,c,d,e,f,g,h;
char no;
clrscr();
textcolor(15);
gotoxy(20,6);
cprintf("DIGITAL DISTRIBUTION CONTROL OF ELECTRICAL APPLIANCES");
textcolor(11);
gotoxy(20,7);
cprintf("-----------------------------------------");
textcolor(11);
gotoxy(10,10);
cprintf("EQUIPMENT NO: 1 2 3 4 5 6 7 8");
textcolor(11);

36
gotoxy(10,12);
cprintf("STATUS: %d %d %d %d %d %d%d %d",a,b,c,d,e,f,g,h);
textcolor(10);
gotoxy(9,16);
cprintf("FOR 'ON' AND 'OFF' AN EQUIPMENT PRESS CORRESPONDING EQUIP.
NO.");
textcolor(11);
gotoxy(28,18);
cprintf("STATUS 0=OFF STATUS 1=ON");
textcolor(12);
gotoxy(32,20);
cprintf("FOR EXIT PRESS 'E'\n");
no=getch();
switch(no)
{
case '1':
a=!a;
tone();
outportb(p,1);
delay(500);
outportb(p,0);
break;
case '2':
b=!b;
tone();
outportb(p,2);
delay(500);
outportb(p,0);
break;
case '3':
c=!c;
tone();
outportb(p,4);
delay(500);
37
outportb(p,0);
break;
case '4':
d=!d;
tone();
outportb(p,8);
delay(500);
outportb(p,0);
break;
case '5':
e=!e;
tone();
outportb(p,16);
delay(500);
outportb(p,0);
break;
case '6':
f=!f;
tone();
outportb(p,32);
delay(500);
outportb(p,0);
break;
case '7':
g=!g;
tone();
outportb(p,64);
delay(500);
outportb(p,0);
break;
case '8':
h=!h;
tone();
outportb(p,128);
38
delay(500);
outportb(p,0);
break;
case 'e':
if((a|b|c|d|e|f|g|h)==1)
{
clrscr();
textcolor(10);gotoxy(20,12);
cprintf("PLEASE SHUT DOWN ALL THE EQUIPMENTS");
sound(200);
delay(500);
nosound();
delay(3000);
break;
}
else
{
clrscr();
for(j=0;j<23;j++)
{
textcolor(10);gotoxy(20+j,12);
cprintf("%c",ex[j]);
sound(3000+j);
delay(30);
nosound();
}
for(m=0;m<23;m++)
{
textcolor(10);gotoxy(20+m,13);
cprintf("%c",ex3[m]);
sound(1800+m);
delay(30);
nosound();
}
39
for(k=0;k<34;k++)
{
textcolor(10);gotoxy(20+k,14);
cprintf("%c",ex1[k]);
sound(2000+k);
delay(30);
nosound();
}
for(l=0;l<40;l++)
{
textcolor(10);gotoxy(20+l,15);
cprintf("%c",ex2[l]);
sound(2500+l);
delay(30);
nosound();
}
printf("\n\n\n\nPress any key");
getch();
outportb(p,0);exit(0);
}
case 'E':
if((a|b|c|d|e|f|g|h)==1)
{
clrscr();
textcolor(10);gotoxy(20,12);
cprintf("PLEASE SHUT DOWN ALL THE EQUIPMENTS");
sound(200);
delay(500);
nosound();
delay(3000);
break;
}
else
{
40
clrscr();
for(j=0;j<23;j++)
{
textcolor(10);gotoxy(20+j,12);
cprintf("%c",ex[j]);
sound(2500+j);
delay(30);
nosound();
}
for(m=0;m<23;m++)
{
textcolor(10);gotoxy(20+m,13);
cprintf("%c",ex3[m]);
sound(3500+m);
delay(30);
nosound();
}
for(k=0;k<34;k++)
{
textcolor(10);gotoxy(20+k,14);
cprintf("%c",ex1[k]);
sound(3000+k);
delay(30);
nosound();
}
for(l=0;l<40;l++)
{
textcolor(10);gotoxy(20+l,15);
cprintf("%c",ex2[l]);
sound(3500+l);
delay(30);
nosound();
}
printf("\n\n\n\nPress any key");
41
getch();
outportb(p,0);exit(0);
}
default:
clrscr();
sound(500);
delay(100);
nosound();
textcolor(11);gotoxy(30,12);
cprintf("INVALID KEY PRESSED");
textcolor(11);gotoxy(33,14);
cprintf("WAIT 2 SECONDS");
delay(3000);
break;
}
main();
}
void tone(void)
{
sound(1000);
delay(100);
nosound();
}

42
CHAPTER - 7
CONCLUSION
7.1. Conclusion
The conclusion of the project is that whenever the voltage or a digital signal ‘1’ is
applied on the parallel port of the computer using the software which is written in “c” then
the voltage on the corresponding pin drives the optocoupler. When the voltage is applied,
then the optocoupler activates the transistor inside the optocoupler which drives the transistor
BC 148. The transition in the resistance of the circuit due to variation in voltages across the
optocoupler makes the transistor BC 148 ON. The transistor in turn energizes the coil in the
relay .The energized coil makes connection between the two terminals of the other circuit in
which the electrical appliance is connected. And hence the AC circuit is completed. Another
very interesting conclusion of this project is use of the relay whose connection is to be made
very carefully otherwise the circuit will not work. Precautions must be taken under every step
of soldering the circuit.
With the knowledge of new techniques in ‘Electronics’ we are able to make our life
more comfortable. One such application of electronics is used in “PC CONTROLLED FAN
REGULATOR”.
The same circuit finds its use in many more applications. By this the intensity of light
can be controlled using a PC. The intensity of light can be controlled in five levels from off
position to maximum intensity possible. So it finds use as a night lamp by keeping the
intensity of lamp in low level. 
 The circuit also finds its use for switching ON and OFF any electronic circuitry. Our
normal T.V PC can be used for all these purposes. So it is very useful or a real help to old age
and sick people, since they can control the speed from the place where they are sitting.
We feel that our product serves something good to this world and we like to present it
before this prosperous world. 
7.2. Advantages
 This circuit is simple to use and efficient.

 It can be assembled with ease.

 It is cheap and hence very economic.

 It is small in size. 

43
7.3. Scope of the project
The project helps in understanding the working of the 25 pin parallel port of the
computer, SPDT Relay and Optocoupler. The scope of this project is huge with the
modernization and advancement in computer fields.
The project can be used for various applications wherever you require control using
pc.
a) Hotel power management.
b) Street light management.
c) Home automation.
d) High voltage grid control.
e) Industrial automation and many more.

44
CHAPTER - 8
BIBLIOGRAPHY
8. REFERENCE
 www.electronicsforyou.com

 www.howstuffworks.com

 www.wikipedia.org

 Electronics for You Magazine

 Electronic Devices and Circuits – J. B.Gupta

 Linear Integrated circuits – Gaykwad

45
Cost Sheet

46

You might also like