Transcript PROJEC

Students :
Rabee odeh
Ahmad Anwar
supervisor:
Dr. Raed jaber
Angular position control of a dc motor
There are several industrial ,automatic ,and other
processes that require the control of angular
position of a motor (or translation position) the
stepper motor achieve this purpose but the
stepper motor lack the advantage of controlling
the angular position at wide range of speeds; this
aim is achieved by using dc motor which allow us
to control the position at a wider range of speeds
in both reverse and forward direction.
Introduction
Position control systems are an important
component of many industrial products .
Examples are found in disc drives ,automotive
products ,robotics ,process control and many
others.
Aim of a position control system
In all servomechanisms one of the most
important components is the position sensor
it measures the position of the servomotor
and convert it to an electrical signal that the
control system can interpret and use.
Digital optical position sensors are particularly
important because they are non contact and
thus not subject to the wear and noise of
analog position controllers .
A further advantage of optical sensors is that
they can be used in severe environments
where strong magnetic field exists.
General information and introduction
• We used a dc motor of parameters that will be
studied and analyzed next,an optical shaft
encoder that consist of a transmitter and a
receiver will be studied and analyzed next,pic
16f877 4 MHZ it's cct and code will be
analyzed next.
Generic block diagram of the project
Load information and parameters
(DC-MOTOR)
Dc electric motor is used as a manipulative
device in control systems ; dc motors are
extremely versatile drives capable of reversible
operation over a wide band of speeds ,with
accurate control of the speed at all times ;they
can be controlled from zero speed to full speed
in both directions in this project our goal is to
control the motor position at a specific speed in
both directions but the advantage of range of
speeds give the motor a great importance in
position control systems.
Measurement of motor constants
About used DC motor.
- It is a DC motor (constant flux) ,12 volt rated ,
-We measure its parameters (Ra, La, Kp, J, B) as follows
:
1st : armature resistance (Ra)
By an ohm meter we found that Ra =10.5 Ω
•
2nd :induced or back emf constant (Kb) •
We applied a 12 v DC voltage to the terminals of the •
motor and measured Va and the speed (rpm) and
repeated for less voltages as in the following table :
Va
Ia (mA)
N(rpm)
W=2*pi*N/60
(rad/s)
12
170
3000
314.16
10
145
2200
230.384
8
123
1700
178.024
6
115
1350
141.372
4
86
800
83.776
2
68
350
36.652
Now from the relation
Va = e+RaIa +La(dIa/dt)
In steady state Ia is constant so Va =e +
RaIa
But e = Kb* Ф*w
(Ф: is constant)
e= Kb*w
(Va/Ia) = Kb (w/Ia) + Ra so we construct the
following table:
Va/Ia
Wm/Ia
70.58824
1848
68.96552
1588.855
65.04065
1447.35
52.17391
1229.322
46.51163
974.1395
29.41176
539
• We plot (Va/Ia ) vs. (Wm/Ia ) as follows :
Kb = slope = 0.033 v/rad/
Ra = intersection =12.28Ω
Ra = Ra avg =(10.5+12.28)/2 =11.2 Ω
3rd : Armature reactance (La )
By applying a variable low AC voltage to the armature
terminals and increasing the voltage until the motor
start to move we measured the current (Ia) and the
rms voltage (Va) , we found that :
The min AC voltage Va = 20 v
Then Ia = 1.7A
Ra = 1.1*11.66 =12.83 Ω
we calculated La from the relation:
= 26.8 mH
4th : J and B :
Rotor mass = 50 gm
Rotor diameter = (shaft diameter+ Rotor
diameter)/2
= (0.002+0.02)/2=0.011 m
Jrotor = 0.125* mass*diameter^2
=0.125*0.05*(0.011)^2 =8*10^-7
Now for B :From the relation : (Kb*Ia) =B* (W)
We construct the following table and plot (Kb*Ia) vs
(W)
Kb*Ia
W
0.00561
314.16
0.004785
230.384
0.004059
178.024
141.372
0.003795
0.002838
83.776
0.002244
36.652
0.007
0.006
y = 1E-05x + 0.0019
0.005
0.004
Series1
0.003
Linear (Series1)
0.002
0.001
0
350
300
250
200
150
100
50
0
B = slope =1.1*10^-5
Tind rated =Kb* Ia rated =0.0308*0.085 =
0.0056
OR:
Tind rated =er*Iar/Wr=(Var-Iar*Ra)*Iar/Wr
= (12-0.085*11.6)*0.085/335
=0.00542
This was the first section which describes the
used dc motor
driving cct(H-BRIDGE)
An H-bridge is an electronic circuit which
enables a voltage to be applied across a load
in either direction. These circuits are often
used to allow DC motors to run forwards and
backwards. H-bridges are available as
integrated circuits, or can be built from
discrete components.
In this project the first type is used ; a dual full
bridge driver l298.
L298 is high current high voltage full bridge
driver of a total dc current up to 4 ampere and
of an operating supply voltage up to 46 volts .
The block diagram of the circuit is shown in
the following figure:
From which we use two inputs connected to
the microcontroller and two outputs
connected to the motor(load).
• The alternative was to to build a full bridge
using transistors which is cheaper , but for
purposes of simplifying the work we use this
chip (L298) .
• An H-bridge is built with four switches (solidstate or mechanical). When the switches S1
and S4 (according to the first figure) are closed
(and S2 and S3 are open) a positive voltage
will be applied across the motor. By opening
S1 and S4 switches and closing S2 and S3
switches, this voltage is reversed, allowing
reverse operation of the motor as shown
below .
Forward direction
And in this case the applied voltage(Va) at the
motor terminals equal to input voltage(Vi)voltage drop on switch 1(VT1)-voltage drop
on switch 2(Vt2)
shaft encoder and it's cct
• Sources and detectors
• Source:
• The light source for the optical encoder is either
light emitting diode (led ) or laser diode , the led
is considerably less expensive than the laser and
used for relatively slow speed or lower frequency
communication application ,the light output from
the led has a broad spectral bandwidth and emits
from the led as a large cone!
• Detectors:
• Optical receivers are critical components in such
systems ,their performance play a dominant role
in determining the spacings and in the flexibility
of the system in terms of its sensitivity.
• The received signal must be converted into an
electrical signal , amplified and processed ; to
give an estimate of the transmitted signal ;to use
it in directing the motor in the desired direction .
Basic Light Detector
• The following cct features basic, visible light
photo-detector circuit that can be used to
detect trains or other light blocking objects.
• The sensor used for this circuit is silicon
phototransistor this sensor allow less current
to flow when they are dark. (Phototransistors
change their 'conductance' ).
• The phototransistor would normally be
placed between the rails in the circuit .
• The Photo-detector use LM339 voltage comparator,
integrated circuits to detect the change in voltage
across the sensor. the circuit is configured to have the
LED's turn on when the sensor element is dark
(covered by a train.) The LED's can also be made to
turn off when a train is detected.
• The supply voltage for the circuit is specified as
regulated 12 volts DC but this can be changed if
needed. In some cases the values of some resistors
may have to be adjusted to compensate(calibrate).
• In this circuit, when the light falling on the
phototransistor (Q1) is blocked, its
conductance will decrease and the voltage
across Q1 will rise. When the voltage rises
above 1/2 of the supply voltage the output of
the comparator will turn ON and the LED will
be lit.
• The only critical part of this circuit is the value
of resistor R1 which in most cases can be 470K
ohms but may have to be increase if the room
is dark or decreased if the room is well lit.
• Increasing the value of R1 will cause the
sensitivity of the sensor to decrease. This may
be necessary when the light falling on the cell
is not very strong or shadows can affect the
phototransistor.
`
• Pin Diagram For An LM339(Internal Circuitry
For LM339)
pic16f877
While talking about the pic and it’s cct ,excuse me Dr.
samer and please accept my maximum respect and all
of you my classimates , dr.s.
Let me tell a joke about why using this pic(pic 16f877),
When I decided to buy the microcontroller (pic) , we look
for the memory of the pic; what will the type which
will fit the size of the project program , anyhow we
decided to use pic18 you know it has a larger memory
maybe 5 more size we need to control the position at
different velocities , we need to do a lot of things
anyhow students said “... ‫”شو انت مجنون‬.
By a childish behavior I switched back to pic 16
despite of my unconveniance .
Yes in the last month we learnned about the pic and
exactly pic 18 but we haven't absorbed it yet in
the matter which enables us to write a program .
However the connection of the basic circuit of the
pic which we used is shown in the next slide the
connection of the input output devices is shown
next:
• The position control mode is the simplest and
least expensive mode of control in which the
controller output has only two possible
values depending on the sign of of the error
(in which a neutral zone is considered around
the zero such that no action take place).
Such that
SP: step point
en: nth sample of error.
In: integral mode action.
Pn: proportional mode action .
Dn: derivative mode action.
Delta: sample time used to compute the
derivative mode action.