CS EE380 Lec01 Demo
CS EE380 Lec01 Demo
Contents
1 Components of the work bench 3
JJ
II
J
FG: Function Generator, PS: Power Supply, M: Motor with encoder, HB: H-bridge, PK2: I
PICkit 2, MCB: Motor Control Board. The PC is also part of the work bench. Back
Forward
Close
4/13
1 L298 + GND -
1 CN1-PS PC
UART-A
RS232
CN4-I/P
Is
DB9-
C
Rs = 4.7Ω 10 USB
M1 M3
M
H-bridge board
PICKIT2
PICKIT2
M2
CN5-O/P
M4
CN2-
µC board
I1 I2 E1−2 +Vcc +5V GND I3 I4 E3−4
Encoder
+12V 1
DB9-CAN
CN3-Motor
3
5
5-9
Note: The setup allows to connect another motor to H-bridge board between pins M3
JJ
II
and M4 . Connector CN5-O/P can then be used to connect to I3 , I4 , E3−4 . But, as we
J
have only one QEI module on dsPIC30F4012, we cannot use encoder signal from that
I
motor. However, we can perform speed control by using armature current sensed at pin Back
15 of L298 similar to how it is being sensed at pin 1. Forward
Close
5/13
JJ
II
J
I
Back
Forward
Close
6/13
JJ
II
J
I
Back
Forward
Close
7/13
JJ
II
J
I
Back
Forward
Close
8/13
JJ
II
J
I
Back
Forward
Close
9/13
JJ
II
J
I
Back
Forward
Close
10/13
JJ
II
J
I
Back
Forward
Close
11/13
JJ
II
J
I
Back
Forward
Close
12/13
JJ
II
J
• Hold down reset button on MCB; click on Connect button on terminal.exe. I
• Release reset button; read in data for a little longer than ts of your control sytem. Back
• When done, click on Stop Log button on terminal.exe. Forward
Close
13/13