![Page 1: Servo Motor Control Demonstration. EML 2023 Department of Mechanical and Aerospace Engineering motor with gear reducer flex coupling incremental optical](https://reader035.vdocuments.us/reader035/viewer/2022062321/56649e4b5503460f94b406ad/html5/thumbnails/1.jpg)
Servo Motor Control
Demonstration
![Page 2: Servo Motor Control Demonstration. EML 2023 Department of Mechanical and Aerospace Engineering motor with gear reducer flex coupling incremental optical](https://reader035.vdocuments.us/reader035/viewer/2022062321/56649e4b5503460f94b406ad/html5/thumbnails/2.jpg)
EML 2023Department of Mechanical and Aerospace Engineering
motor withgear reducer
flex coupling
incremental optical
encoder
limit switchhoming switch
![Page 3: Servo Motor Control Demonstration. EML 2023 Department of Mechanical and Aerospace Engineering motor with gear reducer flex coupling incremental optical](https://reader035.vdocuments.us/reader035/viewer/2022062321/56649e4b5503460f94b406ad/html5/thumbnails/3.jpg)
computer controls the current going to the
motor
computer controls the current going to the
motor
Closed-Loop Control
desired steering anglecompared to current steering angle
motorgear reducer
gear reducer and flex couplings (if needed)
connect motor to steering shaft
incremental optical encoder (with homing
switch to initialize position) feeds back
current motor position
How does the computer do this?
How does the computer ‘read’ the encoder information?
![Page 4: Servo Motor Control Demonstration. EML 2023 Department of Mechanical and Aerospace Engineering motor with gear reducer flex coupling incremental optical](https://reader035.vdocuments.us/reader035/viewer/2022062321/56649e4b5503460f94b406ad/html5/thumbnails/4.jpg)
![Page 5: Servo Motor Control Demonstration. EML 2023 Department of Mechanical and Aerospace Engineering motor with gear reducer flex coupling incremental optical](https://reader035.vdocuments.us/reader035/viewer/2022062321/56649e4b5503460f94b406ad/html5/thumbnails/5.jpg)
EML 2023Department of Mechanical and Aerospace Engineering
Computer Interface
• To command the motor:– The computer must be able to generate an analog
voltage signal that is somehow interpreted by the motor.
• To ‘read’ the encoder:– The computer must be able to read the +5V and 0V
pulses coming from the two light detectors on the optical encoder.
![Page 6: Servo Motor Control Demonstration. EML 2023 Department of Mechanical and Aerospace Engineering motor with gear reducer flex coupling incremental optical](https://reader035.vdocuments.us/reader035/viewer/2022062321/56649e4b5503460f94b406ad/html5/thumbnails/6.jpg)
EML 2023Department of Mechanical and Aerospace Engineering
Interface to Computer
• We will use a National Instruments USB-6009 data acquisition (DAQ) device
• specs– USB interface to PC– 8 channels of analog input, 0-5V– 2 channels of analog output 0-5V
5 mA each– 12 channels of digital input/outputs
0 or 5V, (8.5 mA for outputs)– 1 counter
![Page 7: Servo Motor Control Demonstration. EML 2023 Department of Mechanical and Aerospace Engineering motor with gear reducer flex coupling incremental optical](https://reader035.vdocuments.us/reader035/viewer/2022062321/56649e4b5503460f94b406ad/html5/thumbnails/7.jpg)
EML 2023Department of Mechanical and Aerospace Engineering
NI USB-6009
![Page 8: Servo Motor Control Demonstration. EML 2023 Department of Mechanical and Aerospace Engineering motor with gear reducer flex coupling incremental optical](https://reader035.vdocuments.us/reader035/viewer/2022062321/56649e4b5503460f94b406ad/html5/thumbnails/8.jpg)
EML 2023Department of Mechanical and Aerospace Engineering
Interface to Computer
![Page 9: Servo Motor Control Demonstration. EML 2023 Department of Mechanical and Aerospace Engineering motor with gear reducer flex coupling incremental optical](https://reader035.vdocuments.us/reader035/viewer/2022062321/56649e4b5503460f94b406ad/html5/thumbnails/9.jpg)
EML 2023Department of Mechanical and Aerospace Engineering
cost: $41.67
Honeywell / Clarostat 600128CN1Allied Electronics part # 753-0059
![Page 10: Servo Motor Control Demonstration. EML 2023 Department of Mechanical and Aerospace Engineering motor with gear reducer flex coupling incremental optical](https://reader035.vdocuments.us/reader035/viewer/2022062321/56649e4b5503460f94b406ad/html5/thumbnails/10.jpg)
EML 2023Department of Mechanical and Aerospace Engineering
Computer Interface
• Let’s start with digital inputs to interface to the optical encoder.
notice that there are four wires
![Page 11: Servo Motor Control Demonstration. EML 2023 Department of Mechanical and Aerospace Engineering motor with gear reducer flex coupling incremental optical](https://reader035.vdocuments.us/reader035/viewer/2022062321/56649e4b5503460f94b406ad/html5/thumbnails/11.jpg)
![Page 12: Servo Motor Control Demonstration. EML 2023 Department of Mechanical and Aerospace Engineering motor with gear reducer flex coupling incremental optical](https://reader035.vdocuments.us/reader035/viewer/2022062321/56649e4b5503460f94b406ad/html5/thumbnails/12.jpg)
+5V power
ground
channel A
channel B
channels A & B will be either 0V or 5V depending on whether that light detector detects light through a slit or not
![Page 13: Servo Motor Control Demonstration. EML 2023 Department of Mechanical and Aerospace Engineering motor with gear reducer flex coupling incremental optical](https://reader035.vdocuments.us/reader035/viewer/2022062321/56649e4b5503460f94b406ad/html5/thumbnails/13.jpg)
+5V power
ground
channel A
channel B
![Page 14: Servo Motor Control Demonstration. EML 2023 Department of Mechanical and Aerospace Engineering motor with gear reducer flex coupling incremental optical](https://reader035.vdocuments.us/reader035/viewer/2022062321/56649e4b5503460f94b406ad/html5/thumbnails/14.jpg)
EML 2023Department of Mechanical and Aerospace Engineering
Encoder Demo Program
![Page 15: Servo Motor Control Demonstration. EML 2023 Department of Mechanical and Aerospace Engineering motor with gear reducer flex coupling incremental optical](https://reader035.vdocuments.us/reader035/viewer/2022062321/56649e4b5503460f94b406ad/html5/thumbnails/15.jpg)
![Page 16: Servo Motor Control Demonstration. EML 2023 Department of Mechanical and Aerospace Engineering motor with gear reducer flex coupling incremental optical](https://reader035.vdocuments.us/reader035/viewer/2022062321/56649e4b5503460f94b406ad/html5/thumbnails/16.jpg)
computer controls the current going to the
motor
computer controls the current going to the
motor
Closed-Loop Control
desired steering anglecompared to current steering angle
motorgear reducer
gear reducer and flex couplings (if needed)
connect motor to steering shaft
incremental optical encoder (with homing
switch to initialize position) feeds back
current motor position
How does the computer do this?
![Page 17: Servo Motor Control Demonstration. EML 2023 Department of Mechanical and Aerospace Engineering motor with gear reducer flex coupling incremental optical](https://reader035.vdocuments.us/reader035/viewer/2022062321/56649e4b5503460f94b406ad/html5/thumbnails/17.jpg)
EML 2023Department of Mechanical and Aerospace Engineering
Computer Interface to Motor
• To control the motor:– the computer must be able to generate an analog
voltage signal– however, the typical analog voltage signal that a
computer generates does not have sufficient current to power the motor
– an amplifier is used• a power supply provides 24V (7.5 amp max for our case) to
the amp• the computer generates an analog voltage in the range of
-5V to +5V; 0V means the motor is to stop ; -5V means the motor is to turn at a maximum speed CCW ; +5V means the motor is to turn at a maximum speed CW
![Page 18: Servo Motor Control Demonstration. EML 2023 Department of Mechanical and Aerospace Engineering motor with gear reducer flex coupling incremental optical](https://reader035.vdocuments.us/reader035/viewer/2022062321/56649e4b5503460f94b406ad/html5/thumbnails/18.jpg)
EML 2023Department of Mechanical and Aerospace Engineering
Interface to Computer
![Page 19: Servo Motor Control Demonstration. EML 2023 Department of Mechanical and Aerospace Engineering motor with gear reducer flex coupling incremental optical](https://reader035.vdocuments.us/reader035/viewer/2022062321/56649e4b5503460f94b406ad/html5/thumbnails/19.jpg)
from 24V power supply
to motor
emergency stop
![Page 20: Servo Motor Control Demonstration. EML 2023 Department of Mechanical and Aerospace Engineering motor with gear reducer flex coupling incremental optical](https://reader035.vdocuments.us/reader035/viewer/2022062321/56649e4b5503460f94b406ad/html5/thumbnails/20.jpg)
EML 2023Department of Mechanical and Aerospace Engineering
Issue with USB-6009 & Amp
The analog command signal to the amp must be from -5V to +5V.
A negative voltage causes the motor to turn in the opposite direction.
The USB DAQ can only output from 0 to +5V.
How can we reverse the direction of the motor?
![Page 21: Servo Motor Control Demonstration. EML 2023 Department of Mechanical and Aerospace Engineering motor with gear reducer flex coupling incremental optical](https://reader035.vdocuments.us/reader035/viewer/2022062321/56649e4b5503460f94b406ad/html5/thumbnails/21.jpg)
EML 2023Department of Mechanical and Aerospace Engineering
from 24V power supply
to motor
emergency stop
When we want the motor to go in the other direction, switch these two wires.
![Page 22: Servo Motor Control Demonstration. EML 2023 Department of Mechanical and Aerospace Engineering motor with gear reducer flex coupling incremental optical](https://reader035.vdocuments.us/reader035/viewer/2022062321/56649e4b5503460f94b406ad/html5/thumbnails/22.jpg)
EML 2023Department of Mechanical and Aerospace Engineering
Change motor direction
To go CW, set this digital output pin to TRUE (+5V).
To go CCW, set this digital output pin to FALSE (0V).
![Page 23: Servo Motor Control Demonstration. EML 2023 Department of Mechanical and Aerospace Engineering motor with gear reducer flex coupling incremental optical](https://reader035.vdocuments.us/reader035/viewer/2022062321/56649e4b5503460f94b406ad/html5/thumbnails/23.jpg)
EML 2023Department of Mechanical and Aerospace Engineering
Interface to Computer
![Page 24: Servo Motor Control Demonstration. EML 2023 Department of Mechanical and Aerospace Engineering motor with gear reducer flex coupling incremental optical](https://reader035.vdocuments.us/reader035/viewer/2022062321/56649e4b5503460f94b406ad/html5/thumbnails/24.jpg)
EML 2023Department of Mechanical and Aerospace Engineering
Interface to Computer
![Page 25: Servo Motor Control Demonstration. EML 2023 Department of Mechanical and Aerospace Engineering motor with gear reducer flex coupling incremental optical](https://reader035.vdocuments.us/reader035/viewer/2022062321/56649e4b5503460f94b406ad/html5/thumbnails/25.jpg)
EML 2023Department of Mechanical and Aerospace Engineering
Homing Switch
to input pin on USB DAQ
+5V
0V
![Page 26: Servo Motor Control Demonstration. EML 2023 Department of Mechanical and Aerospace Engineering motor with gear reducer flex coupling incremental optical](https://reader035.vdocuments.us/reader035/viewer/2022062321/56649e4b5503460f94b406ad/html5/thumbnails/26.jpg)
EML 2023Department of Mechanical and Aerospace Engineering
Interface to Computer
0V from USB-6009
+5V from USB-6009
![Page 27: Servo Motor Control Demonstration. EML 2023 Department of Mechanical and Aerospace Engineering motor with gear reducer flex coupling incremental optical](https://reader035.vdocuments.us/reader035/viewer/2022062321/56649e4b5503460f94b406ad/html5/thumbnails/27.jpg)
computer controls the current going to the
motor
computer controls the current going to the
motor
desired steering anglecompared to current steering angle
gear reducer and flex couplings (if needed)
connect motor to steering shaft
incremental optical encoder (with homing
switch to initialize position) feeds back
current motor position
USB connection
analogsignal
2 digitalsignals
USB connection
digitalsignal
digitalsignal
input power
homing switch
E stopswitch
![Page 28: Servo Motor Control Demonstration. EML 2023 Department of Mechanical and Aerospace Engineering motor with gear reducer flex coupling incremental optical](https://reader035.vdocuments.us/reader035/viewer/2022062321/56649e4b5503460f94b406ad/html5/thumbnails/28.jpg)
![Page 29: Servo Motor Control Demonstration. EML 2023 Department of Mechanical and Aerospace Engineering motor with gear reducer flex coupling incremental optical](https://reader035.vdocuments.us/reader035/viewer/2022062321/56649e4b5503460f94b406ad/html5/thumbnails/29.jpg)
EML 2023Department of Mechanical and Aerospace Engineering
Design Project
• If you decide to use a servo motor in your design:– include an optical encoder for motor position feedback– include a homing switch to initialize your position– include E-stop switches as needed