Speed Control Using Tachometer
Speed Control Using Tachometer
Mechanical Motion
The ability to translate electrical signals into motion in the real world
combined with the ability to measure position can help you exploit the
power of the computer to generate computer automation the source of
much of the modern worlds conveniences.
Goal
In this experiment, use the power capacity of the NI DAQ Card to run and
control the speed of a small DC motor. Using a modified free space IR
link, build a tachometer to measure the speed of the motor. By combining
the motor and tachometer with a LabVIEW program, you can incorporate
computer automation in the system.
Introduction to NI ELVIS
10-1
ni.com
Lab 10
Required Components
IR LED/phototransistor module
DC motor
Glue
Mechanical
Motion
Lab 10
Mechanical
Motion
Lab 10
Mechanical
Motion
+5V
Emitte
r
1k
Gnd
Dete ctor
10 k
+
To ACH 4
-
Emitte r
VPS+
Dete ctor
+5V
1k
Gn d
10 k
+
To ACH 4
-
Gn d
1 2 V DC M ot
or
triggering the sensor, you can drill a hole about the size of the transmitter/receiver
beam (3 mm) near the edge of the CD. Align the IR sensor so that the beam passes
through the hole.
4. Read the pulse frequency (Freq:) from the measurement row CHO
Meas: at the bottom of the oscilloscope screen. Take frequency
measurements for a variety of power supply levels. A plot of
frequency versus VPS voltage level demonstrates the linearity of your
rotary motion system.
5. Close NI ELVIS and all SFPs.
Measurements and get the frequency directly. Then convert the frequency to rpm as
discussed above.
Use the DAQ Assistant to collect 1000 voltage samples for the tachometer
graph and provide an input signal array for the Pulse Measurements.vi.
The rpm signal is sent to a front panel meter and displayed in krpm. The
rpm signal also goes to a shift register with five elements. This provides
an averaged rpm signal for the front panel. You manually control the
motor speed with the front panel knob labeled Setpoint. Also available on
the front panel is a graph of the tachometer signal as a function of time.
Run this VI and take your motor for a spin. See and hear how responsive
the motor is to a rapid change in the rpm setpoint.
Figure 10-11. LabVIEW Tachometer and Motor Control Circuit Front Panel
If you are more familiar with control, you can use another VI (PID
Autotuning.vi) to set the initial PID parameters automatically. Then you
can fine-tune the parameters to your specific system. Search for additional
LabVIEW PID resources at ni.com.
Figure 10-13. Setpoint (yellow) and RPM (red) Traces show Optimal Control PID
in Action