controlling of machine

51
Controlling of Machine Through Visual Basic Submitted to- Head of the Department Electricals $ Electronics Under the Guidance of- Nishit Soni

Upload: piyushnagotra18

Post on 07-Apr-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 1/51

Controlling of Machine Through Visual Basic 

Submitted to-

Head of the Department

Electricals $ Electronics

Under the Guidance of-

Nishit Soni

Page 2: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 2/51

CONTENTS

What is Controlling?

Introduction:

Working $ Circuit Diagram

PCB $ Soldering

Elements Used

LED

ResistorsCapacitors

Relays

Power Supply

Parallel Port.

Controlling of MachineThrough Visual Basics

Introduction to Visual

Basics

Page 3: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 3/51

Page 4: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 4/51

WHAT IS CONTROLL ING?

It is an arrangement of physicalcomponents connected to commandto regulate itself or another system.

Page 5: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 5/51

V ISUAL BASICS

Powerful Programming System Helps One To

Develop Sophisticated, Graphical Application That

Can Run On Microsoft Windows Environment

Basic Language, Visual In Nature

Visual Is A Method To Create GUI Application

It Is Object Oriented Programming, Event

Oriented Programming

Page 6: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 6/51

CONTROLL ING OF MACHINE 

THROUGH V ISUAL BASICS

8-Bit Control For 8-Bit Operation

Controlling: One Step Control

Either ¶0· Or ¶1·

Machine Interfacing To Computer

And Control It Via Visual Basic

Program

Page 7: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 7/51

CIRCUIT DIAGRAM

Page 8: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 8/51

W ORKING

Main Parts:

Power Supply UnitIndicating LED·s

Buffer AmplifierDarlington AmplifierRelaysLoad

Page 9: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 9/51

Page 10: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 10/51

Page 11: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 11/51

Page 12: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 12/51

Page 13: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 13/51

Light-emitting diode

Semiconductor

Has polarity

Light-emitting diode

Semiconductor

Has polarity

Page 14: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 14/51

When current flows across adiode� Negative electrons move

one way and positive holesmove the other way

Page 15: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 15/51

The wholes exist at a lowerenergy level than the freeelectrons

� Therefore when a freeelectrons falls it lossesenergy

Page 16: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 16/51

� This energy is emitted in aform of a photon, whichcauses light

� The color of the light isdetermined by the fall ofthe electron and henceenergy level of the photon

Page 17: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 17/51

1. TransparentPlastic Case

2. Terminal Pins

3. Diode

Page 18: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 18/51

Page 19: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 19/51

� Requires 1.5~2.5V and 10 mA

� To prevent overloading, use resistor 470 �

Page 20: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 20/51

Page 21: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 21/51

� LED is on when P0 ishigh

� LED is on when P1 islow

Page 22: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 22/51

� 8 LEDs are connected to BS2 each I/O pin (P0-P7)is allowed to sink 6.25mA

Page 23: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 23/51

Page 24: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 24/51

Page 25: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 25/51

ELECTRIC F IEL D STRENGTH

What is it?

ANS: Is the force that an electric chargeexperiences within a specific space(field).

E = F/q

Symbol : E Units: Newtons per Coulomb (NC-1)

Remember that electric fields act either inward oroutwards dependent on the charge:

+ -

Field lines representedwith an arrow henceare vectors.

Field lines are strongerwhen closer together.

Page 26: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 26/51

F IEL D L INES BETW EEN PL ATES

If parallel plates are charged then a uniform electric field is then

established:

- - - - - - - - - - - - - - - - - - - -

+  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +

Note:The field strength is the same wherever the charge happens to bee.g. A; B or C.

BA

C

At the edges ´Dµ the field strength is weaker as the field lines arelonger, the plates being further apart.

D

If a charge is moved from the negative plateto the positive then potential energy (EP) isproduced or a potential difference set up¶V·. This is also dependent on the distance¶d· between the plates thus two equations

can be produced:

EP = qV

E = V/

Page 27: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 27/51

CAPACITORS

What is it?

ANS: It is an electrical component that canstore electrical charge and release itsome time later.

Symbol : C Units: Farad (F)

USES

1. Storing energy as in flashphotography

2. Time delays in electroniccircuits

3. As filters in electronic circuits

4. In tuning circuits

Often made like a swiss rollby rolling metal plates witha insulator (dielectric) inbetween and wires

attached to each plate.

CEveryday capacitors are measured in eitherQF (10-6); nF (10-9); pF (10-12).

Page 28: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 28/51

BASIC CONSTRUCTION

INSULATOR

(DIELECTRIC)

CONDUCTOR CONDUCTOR

+-

TWO

OPPOSITELY

CHARGED

CONDUCTORS

SEPARATED

BY AN

INSULATOR -

WHICH MAY

BE AIR 

The Parallel Plate Capacitor

Page 29: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 29/51

WHAT DOESA CAPCITORDO?

+

+

+

+

+

+

+

+

-

-

-

-

-

-

-

-

+-

The battery causes theflow of electrons toaccumulate on one plateand attracts an equalnumber of electrons frothe other plate, leavingthe plates oppositely

charged.When fully charged:

� Flow of e- stops.

�Both plates equal &

oppositely charged.�Pd across plates, ¶V· =Vsupply.

�Electric field, ¶E·exists between plates E= V/d.

dE = electric field strength

Page 30: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 30/51

CAPACITANCE

This is the amount of charge a capacitor can store when connected

across a potential difference of 1 volt. Obviously the larger thecapacitor the more charge it can contain.

The capacitance (C) of a capacitor which stores a charge, ¶Q· coulombson each plate when connected across a supply of volts, ¶V·, is givenby:

C = Q /V

Capacitors have a finite voltage at which they work at. If the voltage isexceeded then the dielectric will melt and the plates suddenly comeinto contact. Short circuit, capacitor explodes!!

BOOM

Page 31: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 31/51

Charge stored [Q] depends on p.d. [Volts] applied [V]

Q

V

Gradient = C

Remember that the capacitance, C, is defined as´the charge required to raise the potential by one voltµ ´the charge required to raise the potential by one voltµ 

Hence C = Q/V

Page 32: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 32/51

Page 33: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 33/51

Area ofPlate overlap

= A

d d = plate separation

Medium relativepermittivity = Ir

 AC 

r I I 0

!

I0 = the permittivity of freespace = 8.86. X 10-12 F m-1

For air or a vacuum, Ir = 1

THE DIELECTR IC CONSTANT:

Different materials insulate atdiffering amounts thus changingthe capacitance, called dielectriceffect. The dielectric constant(Ir) gives the proportion by which¶C· increases when dielectricplaced between the plates.

Page 34: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 34/51

The dielectric constant does not a have a unit as it is the ratiobetween two capacitance values:

Ir = Cdielectric

Cair

Examples of dielectricconstants include:

Dielectric material Ir 

  Air 1.0

Oiled paper 2.0Polystyrene 2.5

Glass 6.0

Water 80

Page 35: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 35/51

THE ENERGY STORED IN CAPACITOR:

As charge, Q, is packed onto the plates work needs to be done.R 

epulsive forces want to push the electrons away from the negativeplate towards the positive. The battery supplies the push, energy, topack these electrons. The push, pd, the battery has the greater thecapacitance, C. Thus energy provided by the cell must equal:

E = Q x V

Area under graph= energy change= Q x V

V

For acapacitor

V vs Q isa straightline graph

V

Areaunder

graph =

½ x Q x V

Energy provided by cell Energy stored in capacitor

Page 36: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 36/51

As capacitance is the amount of stored charged then the energy

inside a capacitor then two

formulae can be produced.

EP

= ½CV2 [Substituting Q = CV into EP = ½QV]

EP = ½Q 2/C [Substituting V = Q/C into EP = ½QV]

Page 37: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 37/51

CAPACITORS IN SERIES & PARALLEL:

+-

Q - Q -Q + Q +

C1 C2

V2V1

V

Charge on each capacitor isthe same.

V = V1 + V2

For two or more capacitors:

1 = 1 + 1 ««««.

Cs C1 C2

SER IES PAR ALLEL

+-

V

C1

C2

Q 1

Q 2

Voltage across each capacitorsame as, V, of cell.

Q = Q 1 + Q 2

For two or more capacitors:

Cp = C1 + C2 «««.

Page 38: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 38/51

Page 39: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 39/51

Imax

time0

From this two graphs can be drawn for the charging of a capacitorwith relation to what happens to current ¶I· and voltage ¶V·.

Volts

VC

Amps

urrent starts at ma imum Ima 

and then decreases to ero asthe negative plate fills up withnegative charge. Repulsionpushes against the force of thebatter

Voltage starts at ero and

rapidl increases until itbegins to reach ma imum.Now repulsion prevents anfurther charge entering so theenerg remains constant.

URRENT GRAPH VOLTAGE GRAPH

Page 40: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 40/51

DISCHARGINGA CAPACITOR:

When a capacitor discharges the voltage and current graphs are the

same. They start at a maximum and follow the inverse curves downtowards zero, although it is worth noting that they don·t reach zero.

Volts, V

Time, t0

V0

Current I

Time, t

I0

Explain what is happening in each of these graphs and whythey are the same.

Page 41: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 41/51

TIME CONSTANT:

Time constant is the measure of time it takes for a capacitor to reach63% of the total amount of voltage or current that it can store/releasedepending on whether it is charging/discharging. The larger X, theslower the process.

It is given the term tau, ¶X· and is measured in seconds, ¶s·. Theformula for time constant is:

X = R C

Where:

X = time constant (s)

R = resistance (�)

C = capacitance (F)As the voltage never reaches max orAs the voltage never reaches max orzero, then the total time taken can·t bezero, then the total time taken can·t bemeasured hence that is why 63% of themeasured hence that is why 63% of thetime is used. (time is used. (Same for currentSame for current))

Page 42: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 42/51

Volts

63%

VOLTAGE GR APH

Time, t

Vmax

X

100%

86%

2X

This works exactly thesame for discharging andfor current they are justreversed.

The second time constant

is 63% of what is left.

Page 43: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 43/51

Page 44: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 44/51

� A relay is an electrically operated switch.

� Many relays use an electromagnets to operate a switching

mechanism mechanically.

� Relays are used where it is necessary to control a circuit

by a low-power signal or where several circuits must be

controlled by one signal.

� The first relays were used in long distance telegraph

circuits .Relays were used extensively in telephone

exchanges and early computers to perform logical

operations.

Page 45: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 45/51

� A type of relay that can handle the high power required to directly driveanelectric motor is called a µCONTACTOR µ.� Solid-state relays control power circuits with no moving parts, insteadusing a semiconductor device to perform switching.�Relays with calibrated operating characteristics and sometimes multipleoperating coils are used to protect electrical circuits from overload orfaults; in modern electric power systems these functions are performedby digital instruments still called ´Protective relays".

Automotive-style miniature relay, dust cover is taken

off

Page 46: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 46/51

� A simple electromagnetic relay consists of a coil of wiresurrounding a soft iron core, an iron yoke which provides alow reluctance path for magnetic flux, a movableiron armature, and one or more sets of contacts

� The armature is hinged to the yoke and mechanicallylinked to one or more sets of moving contacts.

� It is held in place by a spring so that when the relay is de-

energized there is an air gap in the magnetic circuit. Inthis condition, one of the two sets of contacts in the relayis closed,and the other set is open.

� Other relays may have more or fewer sets of contactsdepending on their function.

� This ensures continuity of the circuit between the movingcontacts on the armature, and the circuit track onthe printed circuit board (PCB) via the yoke, which issoldered to the PCB.

Page 47: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 47/51

�A solid-state relay uses a thyristor or other solid-state switchingdevice, activated by the control signal, to switch the controlled load,instead of a solenoid. An optocoupler can be used to isolate controland controlled circuits.

�If the coil is designed to be energized with alternating current(AC), a

small copper "shading ring" can be crimped to the end of the solenoid,

creating a small out-of-phase current which increases the minimum

pull on the armature during the AC cycle.

Simple electromechanical relay Small relay as used in electronics

Page 48: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 48/51

TYPES OF  REL AYS

�Latching relay

�Reed relay

�Polarized relay

�Machine tool relay

�Ratchet relay

�Contactor relay

�Solid state relay

�Solid state contactor relay

�Buchholz relay

�Forced guided contacts relay

�Overload protection relay

Page 49: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 49/51

APPL ICATIONS

Control a high-

voltage circuit with a low-

voltage signal, as in sometypes of modems or audio amplifiers

�Control a high-current circuit with a low-current signal, as in the

starter solenoid of an automobile

�Detect and isolate faults on transmission and distribution lines by

opening and closing circuit breakers

�Isolate the controlling circuit from the controlled circuit when the

two are at different potentials

�Time delay functions.

Page 50: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 50/51

Page 51: controlling of machine

8/6/2019 controlling of machine

http://slidepdf.com/reader/full/controlling-of-machine 51/51

Elec tricals $

Elec tronics

Session 2008-12