NI ELVIS Hall Effect Sensor 实验指南说明书
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Lab 6 – Magnetic Field Sensors
Figure 6.0. How the Hall Effect Works!
In 1879, Erwin Hall discovered that when a current flows through a block of semiconductor material in the presence of a magnetic field, a voltage is generated across it. He found that this voltage, now named after him, is proportional to the vector cross product of the current flowing through the sensor and the magnetic field. The proportionality constant γ is a property of the Hall Effect sensor.
V H = γ |I x B|
This means that you can use a Hall probe to measure current, magnetic field, or the angle between the sensor axis and an external field direction. Today, integrated Hall effect sensors have an internal constant current source and an operational amplifier (op amp) to buffer the output signal. These sensors are inexpensive, robust, and can be interfaced to both analog and digital circuits.
Goal: This lab focuses on using NI ELVIS tools to study the properties of Hall effect sensors. During the lab, build a simple gaussmeter and a digital counter interface using a linear Hall effect sensor and a Hall effect switch, respectively. Complete the Multisim challenge to learn how to design a tachometer circuit using a Hall effect switch as the sensor.
Required Soft Front Panels
DMM[V]
Oscilloscope (Scope)
LabVIEW VIs for the digital counter
Required Components
Small magnet
Linear magnetic field sensor: Allegro A3240UA or equivalent
Hall effect switch: Allegro A3212UA or equivalent
Contact Allegro at and request a free sample of these sensors. Exercise 6.1: Testing the Analog Magnetic Field Sensor with NI ELVIS Tools
These Hall Effectdevices have three terminals, +V cc power, ground, and the Hall
output.
1.Insert a linear Hall device (A3240) into the protoboard.
2.Connect the power +5 V pin socket to +V cc (pin 1).
3.Connect the GROUND on the protoboard to the Ground (pin 2) of the Hall
chip.
4.Connect the DMM (V ►├. ) lead to the Hall Voltage (pin 3) and the COM
lead to Ground.
Figure 6.1. Pin configuration for integrated Hall sensors
5. Launch the NI ELVIS II Instrument Launcher strip and select DMM[V].
6.Bring a small magnet (field intensity of several hundred gauss) in close
proximity to the Hall sensor face. In the absence of a magnetic field, the
sensor reads one-half of +V cc or about +2.5 V. As the magnet is moved closer to the sensor, the Hall voltage either rises greater than 2.5 V or falls to less than 2.5 V, depending on the magnet polarity. The south end of the magnet causes a rise and the north end causes a fall. The sensor saturates near +5 or 0 V in a field in excess of ±500 gauss. The Hall voltage is quite nonlinear when measured with respect to the distance between the sensor and the magnet face.
7.To observe this relationship, make distance and voltage measurements and
plot your observations. The distance between adjacent pin socket holes is 1/10 of an inch. The protoboard pin sockets make a good ruler.
8.Place the magnet on the protoboard directly in front of the sensor and measure
the Hall voltage in 0.1 or 0.05 in. increments over a distance of about 1 inch.
9.Record each reading in a table of Hall voltage and distance.
10.Plot the Hall voltage versus distance using data from your table.
Figure 6.2. Hall Effect Voltage versus Distance
The plot should be similar to the graph in Figure 6.2. The response is nonlinear, which demonstrates the importance of knowing the operating distance between the sensor and the magnet.
End of Exercise 6.1
Exercise 6.2: Hysteresis Characteristic of a Magnetic Field Switch Complete the following steps to perform measurements on the Hall effect switch
and determine its hysteresis characteristics.
1.Replace the linear sensor (A3240) with the Hall effect switch A321
2. The
circuit connections are the same as those of the linear circuit.
2.Repeat the measurements for Hall voltage versus distance for both increasing
and decreasing distances.
Note: Some Hall effect switches are Open Collector and require a 1 k pull-up
resistor to be connected between the Hall effect switch output and the power
supply line, as shown directly below.
3.Plot the data for both moving away from and moving toward the sensor on the
same set of axes. It should look similar to Figure 6.3.
Figure 6.3. Hall Effect Switch Voltage versus Distance
The Hall switch is a digital sensor whose output is either HI (~ +5 V) or LO (0.8 V). The output is HI for B greater than a critical field B max, and LOW for any field less than a critical field B min, or the other way around, depending on the internal circuitry of the switch. A graph of Hall voltage versus distance from the sensor demonstrates hysteresis between approaching the sensor and moving away from the sensor. The difference between the two limits:
h = B max - B min
is a measure of the noise immunity of the sensor.
For example, the A3212 Hall Switch requires a field B>B max to switch from LO to HI. Once in the HI state, the Hall switch requires a field B<B min to switch from HI to LO. In your earlier test, these critical fields, B max and B min, are translated into a distance DLO to HI (3/10 of an inch) and LHI to LO (4/10 of an inch), respectively.
NOTE: Again, some switches may behave in an opposite manner, where a magnetic field must be present to switch the output from HI to LO, and that in the absence of any magnetic field, the output is HI.
Close the digital multimeter.
End of Exercise 6.2
Exercise 6.3: Counting Pulses with a Magnetic Switch Sensor Complete the following steps to perform a pulse count measurement using a Hall effect switch:
1.Place the magnet far enough away from the sensor so it is in the LO (or HI)
state.
2.Move the South end of a magnet to approach the sensor. The measured
magnetic field eventually exceeds B max and the logic state toggles. Then, as
the magnet is pulled away and the magnetic field becomes less than B min, the
logic state switches back to its original state. The entire sequence, LO-HI-LO
(or HI-LO-HI), generates a positive pulse. Repeating this operation numerous
times generates a train of positive pulses.
3.Select oscilloscope (Scope) from the NI ELVIS II Instrument Launcher strip.
4.Connect the BNC connector (CH0) to the output signal from the Hall effect
switch (pins 3 and 2).
5.On the oscilloscope panel, select
Source: Scope CH 0
Trigger Type: Immediate
Level (V): ~ 1.0 V
6.Observe the Hall voltage on channel 0 as you rapidly move the magnet toward
and away from the sensor. With the oscilloscope trace on a longtime base (100
ms/div), you can observe the pulse train.
End of Exercise 6.3
Exercise 6.4: Building a Tachometer
An angle shaft encoder, a tachometer, and a dwell sensor all use magnetic switches to generate pulses. Counting pulses accumulates events. Counting pulses within a select time interval measures frequency.
Figure 6.4. Homemade Tachometer Apparatus
Complete the following steps to build a simple tachometer using a DC motor, a
CD disk, a small magnet, and a Hall Effect switch.
1.Affix an old CD to the rotor of a DC motor. Near the perimeter of the CD,
glue a small rare earth magnet to the upper surface. Place your Hall effect
switch below the CD so that the magnet passes over the switch as it rotates.
2.Connect the DC motor to the output of the variable power supply (Supply +
and Ground) pin sockets on the protoboard.
unch the variable power supply VPS from the NI-ELVISmx Instrument
Launcher strip. Click on the box Supply + Manual. It is easier to control the
DC motor speed with the real VPS knob on the right side of the NI ELVIS II
workstation than with the virtual voltage knob on the VPS front panel.
4.Apply a moderate voltage (1 to 2 V) to your motor.
ing the same oscilloscope setting as in Exercise
6.3, observe the pulse
stream as the CD spins.
6.Record the pulse frequency from the Scope panel at the bottom of the
oscilloscope screen window. This is the tachometer reading.
7.(optional) Record a number of tachometer readings at a variety of motor
voltages. A plot of the tachometer measurements versus motor drive voltage
produces a calibration curve for your motor.
8.Close all SFPs and remove the voltage probe.
End of Exercise 6.4
Exercise 6.5: Automatic Counting Using a LabVIEW Program Complete the following steps to build an automatic pulse counter driven by
LabVIEW.
1. Connect the output of the Hall Effect switch to the NI ELVIS II counter input
[CTR0_SOURCE]. If a pull-up resistor (not shown in Figure 6.5) was used
previously, leave it in place.
Figure 6.5. Counting Apparatus on the NI ELVIS II Protoboard
unch LabVIEW.
3.Open the LabVIEW program Hall Counter - DAQmx.vi.
NOTE: This LabVIEW program is configured to connect to“Dev1” for your NI ELVIS workstation. If your device is configured to another device name, you need to rename your NI ELVIS workstation to “Dev1,” in Measurement and Automation Explor er (MAX) or modify the LabVIEW programs to your current device name.
With this simple program, you can accumulate counts as a magnetic field that is
passed in and out from the Hall effect switch or over the Hall effect switch using
the tachometer circuit. Dividing the accummulated counts by the elapsed (count)
time generates the average counts per time, or the frequency.
Figure 6.6. Block Diagram for the program Hall Counter - DAQmx.vi NI ELVIS II has access to the NI data acquisition (DAQ) device counters. This
program uses the DAQ Assistant to set up the DAQ for counting pulses on input
pin (CTRO_Source). The difference between the two [Tick Count] functions
measures the counting interval.
End of Exercise 6.5
Multisim Challenge: Design a Tachometer Circuit
Open in Multisim a program called HallEffectSensors.ms11 found at
Open Samples»Educational Sample Circuits»Miscellaneous.
Study the circuit carefully. You can use the A and B keys to increase the magnetic field or speed parameters, respectively, for the two circuits. To decrease these parameters, use <Shift-A> or <Shift-B>. Double-click the oscilloscope icon XSC2 to view the oscilloscope traces.
Figure 6.7. Multisim example program HallEffectSensors.ms10
Using the program in Figure 6.7 as a guide, to design your own tachometer program. Input is the rate of rotation, and the output of the Hall effect switch is counts. Accumulating counts over a fixed period of time (about 1 second) yields counts/second or the frequency of counts.。