0% found this document useful (0 votes)
265 views8 pages

Control of A Servo Motor Write-Up

This lab report summarizes an experiment to control a servo motor using pulse width modulation from a temperature sensor. Students used LabVIEW to vary the pulse width sent to the servo motor and observed how it changed the angle of rotation. They obtained calibration curves relating pulse width to angle. Finally, they used a thermistor temperature sensor to input temperatures and observed the corresponding angles of the servo motor. The experiment demonstrated how pulse width modulation can be used to control servo position based on sensor input.

Uploaded by

Ethan Porter
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
265 views8 pages

Control of A Servo Motor Write-Up

This lab report summarizes an experiment to control a servo motor using pulse width modulation from a temperature sensor. Students used LabVIEW to vary the pulse width sent to the servo motor and observed how it changed the angle of rotation. They obtained calibration curves relating pulse width to angle. Finally, they used a thermistor temperature sensor to input temperatures and observed the corresponding angles of the servo motor. The experiment demonstrated how pulse width modulation can be used to control servo position based on sensor input.

Uploaded by

Ethan Porter
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Control of a Servo Motor

Lab Performed: 16 November, 2010

Lab Report Due: 23 November, 2010

Lab Performed by: Ethan Porter and Clinton Lauver

Abstract: (insert abstract here)


Introduction:

This lab was performed with several objectives in mind. These objectives include the use of
LabVIEW to control an RC servo motor, to explore the purpose and properties of pulse trains
and pulse width modulation, and to discover and understand the effect of pulse width in the
operation of RC servo motors. There are several important concepts explained in the paragraphs
below about the theory behind the use of servo motors and pulse trains and pulse width
modulation.

RC servo motors only turn approximately 180° and the angle of rotation is determined by the
pulse sent to the motor. A longer pulse sent by the control module means a larger angle. The
variation of the pulse widths is called pulse-width modulation. In order for the servo motor to
maintain its position, the pulse width must be sent continuously. Therefore, the motor driver
must send a pulse approximately every 20 milliseconds. The repeating of these pulses is
something known as a pulse train. As the pulse width inside the pulse train changes, so does the
angle of the servo. When the signal is stopped, the servo turns off and will remain in the same
position as the last signal.

For this lab, we used a surface temperature sensor to control the pulse width being sent in to the
pulse train. This sensor works through the use of a 20 kΩ thermistor, a device whose resistance
changes with temperature. This change in resistance can be seen by the data acquisition board
and a program on the computer converts the resistance value into a temperature value. The
typical temperature range for a device like that is -25 °C to 125 °C. Thermistors are great ways to
detect temperature changes because of the quick response they have to temperature changes. An
example figure of the response time of a thermistor can be seen at Figure 1 in the Appendix.

Experimental Method and Procedure:

Part 1: Some of the preliminary setup steps had been completed upon our arrival to the
experimental area. To begin, we first logged into the computer and opened up the LabVIEW
program that would rotate the RC servo motor. This program can be found at C:\Program
Files\National Instruments\LabVIEW 8.5\SensorDAQ\SDAQExp03_ServoMotor.vi. This
program, which can be seen in Figure 2 of the Appendix, varies the pulse width sent to the servo
motor in order to vary the angle it is positioned at. To confirm the program was written correctly,
we adjusted the pulse width of the pulse train to varying frequencies and watched the angle of
the servo motor.

Part 2: Next, we opened up the program SDAQExp03_ServoMotor_Ex02.vi in LabVIEW. A


screenshot of the user interface and program for this program can be found in Figure 3 of the
Appendix. This program was designed to allow the user to rotate the servo to different angles
and would display the pulse width being sent to the servo. We rotated the servo from 0° to 180°
in 30° increments and recorded the pulse width being sent at each angle.
Part 3: Finally, we attached the surface temperature sensor to Channel 1 of the data acquisition
board and opened the program SDAQExp03_ServoMotor_Ex03.vi in LabVIEW. This program,
whose user interface is shown in Figure 4 of the Appendix and program is shown in Figure 5 of
the Appendix, reads a temperature reading from the surface temperature sensor and assigns a
rotation angle to each temperature. We tested three separate temperatures with the temperature
sensor and recorded the temperature seen and the angle of the servo motor.

We then finished the experiment and closed out of the program and cleaned up the experiment
area.

Results and Discussion:

Part 1: The first part of the experiment was designed to allow the user to become more familiar
with the control of a servo with LabVIEW. Table 1 displays the values we recorded for different
pulse widths.

Table 1: Pulse width and corresponding angle for RC servo motor

Pulse Width
Angle (°)
(s)
0.0025 0
0.0016 90
0.0008 180
Part 2: The second part of the experiment allowed the user to obtain a calibration curve of the
servo by inputting rotation angles and reading the corresponding pulse width output using the
interface and program shown in Figure 3 of the appendix. Table 2 displays the values as recorded
for different rotation angles.

Table 2: Rotation angles and corresponding pulse width for RC servo motor

Rotation Pulse Width


(Degrees (s)

0 7.00E-04

30 9.70E-04

60 1.23E-03

90 1.50E-03

120 1.77E-03

150 2.03E-03

180 2.30E-03
From this data we obtained a calibration curve shown below in Figure 1. We obtained a best fit
and a calibration equations relating pulse width to degrees of rotation.

Figure 1: Calibration curve of Pulse Width vs. Rotation

Part 3: The third part of the experiment was designed to output a rotation of the servo motor for a
particular temperature input from the surface temperature sensor. Using the calibration curve
from Part 2, the pulse width can be calculated for each different value. The results are shown
below in Table 3.

Table 3: Temperature from sensor, degrees of rotation of RC servo, and corresponding pulse
width

Temperature Angle Pulse


Width

22.7 58 1.22E-03

32.7 103 1.63E-03

26 72 1.35E-03

Conclusion and Recommendations:

This experiment was an effective means to show how the modulation of pulse width effects the
position of an RC servo motor. Modulation of the pulse width can come from a variety of
sources, in our case a thermistor temperature sensor. This system could be implemented in the
case of thermostat, with the RC servo opening and closing a throttle and changing the flow rate
of cooling liquid to some system. This experiment was very effective and further improvement
would be unnecessary.

References:

“Surface Temperature Sensor Troubleshooting and Facts.” Vernier.com. 22 November 010,


<http://www.vernier.com/til/1391.html>.

Celik, Emine. “Control of a Servo Motor”. 2010.


Appendix:

Figure 2: Model Response of Thermistor to Temperature of several breaths


Figure 3: Screen shot of SDAQEXP03_ServoMotor.vi
Figure 4: User interface and Program for Part 2 of the experiment.
Figure 5: User interface for Part 3 of the experiment.

Figure 6: Program for LabVIEW in Part 3

You might also like