Group 6
Microcontroller Project
Design the velocities of two DC servo motors to reach
to the identical state
Lecturer : Dr.Vo Tuong Quan
Group 6
University of technology HCMC
1
Microcontroller Project
Group 6
Group’s member
University of technology HCMC
2
Group 6
Microcontroller Project
Why do we have to control the motor to reach identical state ?
Requirement for control electric drive systems is :
1.
2.
3.
Synchronize velocity of motor
Adjust the torque of motor to keep the tension invariably
Control and supervise by the computer network
In the electric drive systems , it has many shaft , every shaft is driven by one motor .
In many applications , it requires the synchronization of motor , if it isn’t responded , that systems doesn’t work
or work ineffectively .
University of technology HCMC
3
Group 6
Microcontroller Project
Why do we have to control the motor to reach identical state ?
Example :
→ So ,control the motor to reach identical state is important problem
University of technology HCMC
4
Microcontroller Project
Group 6
Principles
Firstly ,we input the speed.
This is a desired speed of motor 1 and motor 2
The actual speed of motor 1 is measured by encoder and feedback to the controller
Microcontroller will calculate the error between actual speed and desired speed
PID algorithm will be used to adjust the speed of motor 1 to reach the desired speed
University of technology HCMC
5
Microcontroller Project
Group 6
Principles
About the motor 2 :
The actual speed of motor 2 is measured by encoder and feedback to the controller .
At there , microcontroller will calculate the error between actual speed and desired speed
PID algorithm will be used to adjust the speed of motor 2 to reach the desired speed
University of technology HCMC
6
Microcontroller Project
Group 6
Principles
Finally, microcontroller calculate the error between actual speed of motor 1 and actual speed of motor 2 .
PID algorithm will be used to adjust the error smaller .
So , motor 1 and motor 2 reach the identical state
University of technology HCMC
7
Microcontroller Project
Group 6
Summary
We have three PID subprogram to adjust the speed of motor 1 and motor 2 .
The disadvantage of this method is the needed time to reach the identical state is long
University of technology HCMC
8
Microcontroller Project
Group 6
Block diagram
University of technology HCMC
9
Group 6
Microcontroller Project
Circuit schematic
O S C 2
14
12
31
O S C 2 /C L K O U T /R A 6
A V S S
V S S
A V D D
V D D
D 7
D 6
D 5
E
R W
V S S (G N D )
V D D
R S
1
V o
R S
R /W
E
D 4
2
V C C
3
11
32
4
1
2
3
5
8
9
10
D B 0
4
5
6
7
D B 1
D
D
D
D
D B 2
R S
R W
E
6
R E 0 /A N 6
R E 1 /A N 7
R E 2 /A N 8
9
0
1
2
7
8
9
0
L C D -1 6 0 2
7
O S C 1 /C L K IN /R A 7
1
2
2
2
2
2
2
3
U 2
8
R D 0 /T 0 C K I/T 5 C K I
R D 1 /S D O
R D 2 /S D I/S D A
R D 3 /S C K /S C L
R D 4 /F L T A *
R D 5 /P W M 4
R D 6 /P W M 6
R D 7 /P W M 7
3
4
5
6
7
8
9
0
D B 3
/T 1 O S O /T 1 C K I
/T 1 O S I/C C P 2 /F L TA *
/C C P 1 /F L T B *
/T 0 C K I/T 5 C K I/IN T 0
/IN T 1 /S D I/S D A
/IN T 2 /S C K /S C L
/T X/C K /S S *
/R X /D T /S D O
3
3
3
3
3
3
3
4
9
0
1
2
3
4
5
6
7
M 0
M 1
M 2
M 3
M 5
M 4
B I2
B I3
D B 4
C
C
C
C
C
C
C
C
F -/C A P 1 /IN D X
F + /C A P 2 /Q E A
3 /Q E B
IN
/P W
/P W
/P W
/P W
/P W
/P W
C /K
D /K
10
R
R
R
R
R
R
R
R
/V R E
/V R E
/C A P
/L V D
R B 0
R B 1
R B 2
R B 3
R B 4 /K B I0
R B 5 /P G M /K B I1
R B 6 /P G
R B 7 /P G
D B 5
0
1
2
3
4
5
D B 6
N
N
N
N
N
N
D B 7
/A
/A
/A
/A
/A
/A
11
13
0
1
2
3
4
5
12
O S C 1
5
6
7
8
3
4
5
6
A
A
A
A
A
A
13
S ense1
S ense2
1
1
1
1
2
2
2
2
R
R
R
R
R
R
K (L E D -)
P W M 2
P W M 1
M C L R * /V P P /R E 3
14
2
3
4
5
6
7
A ( LE D +)
A
B
C
D
P V N 1
15
1
16
V C C
V C C
0
KeyPad
P IC 1 8 F 4 4 3 1
0
A
D IR 1
2
1
U 3
2
1
3
5
7
P W M 1
10
12
2
1
3
0
E N 1
D IR 2
1
15
2
1
2
1
3
0
5V
12V
6
11
9
4
1A 1
1A 2
1Y 1
1Y 2
2A 1
2A 2
2Y 1
2Y 2
2
3
1Y 1
1Y 2
B
13
14
2Y 1
2Y 2
C
D
1E
2E
1E N
2E N
1
2
3
V C C 1
V C C 2
P W M 2
V C C
L298
2
Actuator
1
3
M G 2
+
+
-
2
A
2Y 1
C 2
1Y 2
1
2Y 2
M G 3
O S C 1
22P
1
M O TO R S E R V O
C 1
0
-
2
A
1Y 1
E N 2
Y 1
20M H z
O S C 2
M O TO R S E R V O
22P
University of technology HCMC
10
Microcontroller Project
Group 6
Element is used :
We use Pic18f4431 for controller
Lcd 16x2 is used to display
University of technology HCMC
11
Microcontroller Project
Group 6
Element is used :
Key pad is used to input the speed
L298 is used to motor driver
2 DC servo motor are actuator
University of technology HCMC
12
Microcontroller Project
Group 6
Simulation
University of technology HCMC
13
Group 6
Microcontroller Project
Thank for your attention
University of technology HCMC
14