Documente Academic
Documente Profesional
Documente Cultură
DC Motor Control
User Guide
Quanser Consulting Inc.
1
Introduction
1.2
Analog feedback control using the Quanser Analog Plant Simulator or any
other analog computer including OP-AMP circuits implemented on breadboards.
A breadboard is available on the system for students to implement their own
analog controllers.
1.3
Computer control using a PC with realtime control capabilities and a HIL board.
The user can either program the PC to perform the realtime control or use
Simulink to generate code and run it in realtime on a PC. The system is fully
compatible with any of the Quanser Hardware in the Loop (HIL) boards as well
as National Instruments E-series boards and the dSpace DS1104 board. The
system is fully controllable using Quansers WinCon or SLX RT as well as
RTWT, XPC target, LabVIEW and Control Desk.
1.4
PIC Microcontroller control. The Quanser QIC Processor Core can readily be
plugged into the DCMCT unit. The user can then program the PIC to control the
motor without a PC.
1.5
1.6
Haptic Virtual Ball and Beam. This is java component that simulates a ball and
beam experiment dynamics on a PC. It also provides the user with a realtime
graphic simulation such that the user can command the beam angle via the
DCMCT and program feel in the knob to sense the ball rolling. This system can
easily demonstrate the positive effect haptics has on operation in virtual or
remote environments.
2
Control options
The photograph in Figure 1 shows the general layout of the system and the various
Figure 1
methods one could control the motor with. These are briefly described below.
2.1
PC or DSP control. You may control the system using a data acquisition board
or a DSP. You wire the signals to the RCA and DIN connectors on the board.
2.2
2.3
2.4
embedded controller. The signal connections are automatically made when the
QIC is installed. Quanser supplies qKInterfaces to communicate with the QIC in
realtime for tuning and data collection.
3
System components
A block diagram of the system is shown in Figure 2. The individual components are
described below.
High quality DC (Maxon brand) motor - This is a Graphite Brush DC motor with a
low inertia rotor. It has zero cogging and very low unloaded running friction.
3.2
Linear power amplifier - A linear power amplifier is used to drive the motor. The
input to the amplifier can be configured to be either the voltage at the RCA jack
labeled Command or the output of the built in D/A. The built-in D/A can only be
used if a QIC board is connected to the system and the appropriate jumper
installed (J6).
4
3.3
QIC compatible socket - A QIC processor core board can be plugged into this
socket to enable one to perform closed loop control using the QIC
microcontroller.
3.4
3.5
3.6
3.7
3.8
3.9
3.10
12 bit D/A is available and can be used only if the QIC board is installed. This will
allow feedback controllers implemented on the QIC to drive the D/A instead of
the external Command input. The jumper JP6 must be set to use the D/A output
to drive the amplifier and the output must be enabled using RB4. The output of
the D/A is also made available at the RCA jack labeled D/A.
3.11
24 bit encoder counter is connected to the encoder such that if a QIC board is
installed, the encoder measurements can be read by the QIC.
3.12
3.13
External analog input to QIC. The analog input applied to the RCA jack labeled
Command is level shifted and scaled such that a signal in the range of 5 V
applied to it is made available as a signal in the range of 0-5 volts at the QIC
input AN4. This is useful if you want to apply external command signals to a QIC
based controller.
Connections
Wiring to the system is via RCA and DIN jacks. They perform the following connections:
Outputs
Device
Range
RCA4
Potentiometer voltage
5 VDC
RCA3
Tachometer voltage
5 VDC
RCA2
Current measurement
5 VDC
RCA5
5 VDC
5 pin DIN
Encoder output
TTL, A, B
Command signal to
power amplifier
5 VDC
Serial to QIC
RS232
AC power to board
15 VAC
Input
RCA1
Serial
DB9
Power
6mm jack
System Parameters
Value
Units
Symbol
Torque constant
0.052
Nm/Amp
Km
Terminal resistance
10.6
Rm
Terminal Inductance
0.82
mHenry
Lm
Rotor Inertia
11.6
gm-cm2
Jm
Max Torque
0.07
Nm
Tmax
Gain
3.0
V/V
Ga
15
Vmax
Max current
1.5
Ampere
Imax
22
Watt
Pmax
Watt
Pdis
0.556
Amp/Volt
Gcurr
1024
Lines
Resolution- Quadrature
0.0879
Deg / count
Motor
Linear Amplifier
Current sense
Current sensitivity (+/- 10%)
Encoder
Type
TTL
Signals
A, B, Index
GEnc
Potentiometer
Resistance
10
kS
Bias voltage
4.7
Electrical range
350
Degrees
Sensitivity
39
Deg / V
Gpot
V / 1000 RPM
Gtach
1.5
Location of J6
DCMCT
Inputs
Outputs
Signal
Analog input
Pot
5V
Potentiometer
Analog input
Tach
5V
Tachometer
Analog input
Current
5V
Current
Encoder
Encoder
TTL
Encoder
5V
Amplifier command
Output
Analog output
Input
0
Command
Location of J6
With the QIC Core inserted, the following connections are attained:
QIC Core
Function
DCMCT
Pin
Name
Signal range
Inputs
Signal
Outputs
Calibration
Analog input
RA0
AN0
0-5 V
Potentiometer
78 deg / volt
Analog input
RA1
AN1
0-5 V
Tachometer
Analog input
RA2
AN3
0-5 V
Current
1.11 Amp / V
Analog input
RA5
AN4
0-5 V
External analog
input
Encoder
ENC
ENC
A, B, Index
Encoder
Pushbutton
RB0
INT
TTL, Pulled
high
PB
Outputs
Inputs
RB4
RB4
TTL, Pulled
High
Enable DA OUT
Analog out
D/A
Vout
5 V
Amplifier
Command
LED 3
RC0
RC0
0-5 V
LED 1
LED 2
RC1
RC1
0-5 V
LED 2
The highlighted cells show that over and above the signals that are derived from the
sensors, the QIC can be made to drive two LEDs and read the state of a momentary
action pushbutton switch. These are useful when performing certain types of
experiments supplied with the DCMCT qKInterfaces.
Note that RB4 is used to enable the output of the D/A to drive the amplifier. RB4 must
10
be pulled low by the QIC to enable the D/A output. You still need to physically move
jumper J6 to the left to connect the output of the D/A to the amplifier input.
The calibration column indicates that the analog sensors sensitivities are reduced by a
factor of 2 when measured by the QIC A/Ds as opposed to the RCA jacks. The reason
is that the RCA outputs are in the +/- 5 V range while the A/D inputs to the QIC are in
the 0-5 V range.
7.1
B2
B1
N/A
Encoder
Not used
A4
WRITE
B3
11
d10
d9
d8
d7
d6
d5
d4
d3
d2
d1
d0
d7
d6
d5
d4
d3
d2
d1
d0
High_byte
d11
d10
d9
d8
You then need to select to which register you need to write these values. This is done
via lines C4 and C5 on the PIC. The table below shows how to select the register:
C4
C5
Data Register
Low byte
High byte
The system is fully compatible with the Quanser Analog Plant Simulator. You may
implement analog controllers by wiring the system appropriately.
13