speed control using tachometer
TRANSCRIPT
-
8/9/2019 Speed Control Using Tachometer
1/14
Introduction to NI ELVI S 10-1 ni .c om
10Mechanical Motion
Figure 10-1. Tachometer Apparatus to Measure Motor Speed
Goal
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 world’s conveniences.
In this experiment, use the power capacity of the NI DA !ard to run and
control the speed of a small D! motor. "sing a modified free space I#
lin$, build a tachometer to measure the speed of the motor. %y combining
the motor and tachometer with a &ab'I() program, you can incorporate
computer automation in the system.
-
8/9/2019 Speed Control Using Tachometer
2/14
Lab 10 Mechanical
Required Components
* + $ resistor -brown, blac$, red
* +/ $ resistor -brown, blac$, orange
* I# &(D0phototransistor module
* D! motor
* 1mall punch or drill
* 2lue
* 1everal combs with varying numbers of teeth per inch
-
8/9/2019 Speed Control Using Tachometer
3/14
Lab 10 Mechanical
Exercise 10-1 Start Your Engine
3ou can purchase a small, inexpensive D! motor at #adio 1hac$ or many
hobby stores. These motors re4uire a voltage source from / to +5 ',
producing a maximum #67 of about +8,/// at +5 '. )ith no load, the
current re4uirement is about 9// mA. The NI (&'I1 II '61 can supply
up to 8// mA at +5 '. Also, by changing the polarity of the applied
voltage, you can change the direction of rotation.
!omplete the following steps to install and run a motor on an NI (&'I1 II
protoboard.
+. !onnect a D! motor to the '61 output terminals, -1"66&3: and
2#;"ND.
5. &aunch the NI (&'I1mx Instrument &auncher and select Variable
Power Supply (VPS).
9. , applying power to the protoboard,
and clic$ing Run.
Figure 10-. VPS Supply + Configured to Manually Drive a DC Motor
End o! Exercise 10-1
-
8/9/2019 Speed Control Using Tachometer
4/14
Lab 10 Mechanical
Exercise 10- "he "achometer
"sing an I# &(D and phototransistor or an integrated
&(D0phototransistor module, you can build a simple motion sensor.
!omplete the following steps to build a simple motion sensor.
+. ;n the protoboard, insert the components shown in the
-
8/9/2019 Speed Control Using Tachometer
5/14
9. 1elect Scope from the NI (&'I1mx Instrument &auncher and select
the settings, as shown in
-
8/9/2019 Speed Control Using Tachometer
6/14
Exercise 10-$ &uilding a Rotar' Motion S'stem
The rotary motion demonstration system consists of the D! motor
controlled by the variable power supply and the I# motion sensor
configured as a tachometer. To complete the tachometer, you must attach
a dis$ with a 5 in. diameter, to the shaft of the motor by completing thefollowing steps.
+. !ut a 5 in. diameter dis$ from a piece of thin but sturdy cardboard or
plastic.
5. !ut a slot about /.58 in. wide and /.58 in. deep near the circumference
of the dis$.
9. 6unch or drill a small hole at the center point.
. 2lue the dis$ to the end of the motor shaft.
8. 7ount the motor so that the slot lines up with the I#
transmitter0receiver beam. In operation, each revolution generates one
pulse.
+ 5 V
Emitte r #ete ctor VPS+
Gn d
! , " ! ,
+
To AC# $%
, V DC M ot
or
Gn d
Figure 10-(. Motion Sensor Circuit and Motor Parts
)ote 3ou can also use the !D and motor of &ab C. Instead of a small magnet
triggering the sensor, you can drill a hole about the sie of the transmitter0receiver
beam -9 mm near the edge of the !D. Align the I# sensor so that the beam passes
through the hole.
-
8/9/2019 Speed Control Using Tachometer
7/14
Figure 10-*. Apparatus to Measure the Speed of a Spinning CD
End o! Exercise 10-$
-
8/9/2019 Speed Control Using Tachometer
8/14
Exercise 10-% "esting the Rotar' Motion S'stem
!omplete the following steps to test the rotary motion system.
+. 6ower on the protoboard and run the motor using the NI (&'I1 II'61 1
-
8/9/2019 Speed Control Using Tachometer
9/14
Exercise 10-( , -a./0E1 Measurement o! R2M
&ab'I() has several 'Is located at Functions»Programming»Analog
Wae!orm»Wae!orm "easurements that are convenient for measuring
the timing periods of a continuous waveform. 3ou can use the 6ulse
7easurements.vi to measure the period, pulse duration, or duty cycle froma waveform array.
Figure 10-3. Period Measurement Converted to !.PM
3ou can convert the period measurement to revolutions per minute by
inverting the period to get fre4uency and multiplying by C/ to get rpm.
-
8/9/2019 Speed Control Using Tachometer
10/14
"sing &ab'I(), complete the following steps to measure the
period0fre4uency on a continuous waveform.
+. &aunch &ab'I() and open #67.vi from the Bands?;n?NI (&'I1 II
library folder.
5. ;pen the diagram window and study the program.
Figure 10-10. 0loc! Diagram of program .PM1vi
"se the DA Assistant to collect +/// voltage samples for the tachometer
graph and provide an input signal array for the 6ulse 7easurements.vi.
The rpm signal is sent to a front panel meter and displayed in $rpm. Therpm signal also goes to a shift register with five elements. This provides
an averaged rpm signal for the front panel. 3ou manually control the
motor speed with the front panel $nob labeled Setpoint. Also available on
the front panel is a graph of the tachometer signal as a function of time.
-
8/9/2019 Speed Control Using Tachometer
11/14
#un this 'I and ta$e your motor for a spin. 1ee and hear how responsive
the motor is to a rapid change in the rpm setpoint.
Figure 10-11. (a2V')- Tachometer and Motor Control Circuit 3ront Panel
End o! Exercise 10-(
-
8/9/2019 Speed Control Using Tachometer
12/14
-a./0E1 Challenge5 Computer ,utomation o! the Rotar'MotionS'stem
National Instruments offers the &ab'I() 6ID !ontrol Tool$it, which
features additional &ab'I() 'Is you can use to add computer
automation to your rotary system. 6ID stands for Hproportional integralderivative. These control algorithms move a system from one setpoint
-initial rpm to another setpoint -final rpm in an optimied manner. The
addition of a single 'I -6ID.vi provides optimal control to your program.
The algorithm compares the target rpm -final rpm with the current rpm
-averaged rpm signal to generate a D! error signal, which drives the
'61. Integration and differentiation parameters adEust the '61 voltage
smoothly from one measurement to the next.
Figure 10-1. P'D su2V'for
Control Applications
If you are more familiar with control, you can use another 'I -6ID
Autotuning.vi to set the initial 6ID parameters automatically. Then you
can fine?tune the parameters to your specific system. 1earch for additional
&ab'I() 6ID resources at ni.com.
-
8/9/2019 Speed Control Using Tachometer
13/14
Figure 10-1$. Setpoint 4yello+5 and .PM 4red5 Traces sho+ &ptimal Control P'Din Action
In
-
8/9/2019 Speed Control Using Tachometer
14/14