22-06-2013, 01:06 PM
Hall-Effect Sensors
Hall-Effect.pdf (Size: 312.32 KB / Downloads: 99)
Introduction
In this laboratory, you will learn how to use a Hall-effect sensor to detect the presence of a
magnetic field due to a permanent magnet. You will then write a LabVIEW program to count the number
of times that a magnet is moved past the Hall sensor, in a simulation of an attendance counter at a
turnstile. Finally, you will write a program to compute and display the total (cumulative) duration of low
pulses. As an extra credit exercise, you will write a program to count and display the number of long low
pulses, that is, low pulses that are at least 200 ms in duration.
Count Low Pulses
In this experiment, you will write a program to count and display the number of low pulses that have
been produced by your Hall sensor circuit.
Since the Hall sensor outputs a voltage of (approximately) either 0 or 5 volts, every time a new low
pulse occurs, the present voltage measurement Vi will be less than the immediately preceding voltage
measurement Vi-1 by approximately 5 V. Therefore, every time the voltage difference Vi – Vi-1 is less than,
say, -4 V, you know that a new pulse has occurred.* Therefore your strategy for detecting a new pulse
will be to compute the voltage difference Vi – Vi-1 at each iteration of the While loop and then check
whether that difference is less than -4 V. If the difference is less than -4 V, a low pulse counter is
incremented by one.
Laboratory Report
1. For the VI’s you wrote in this laboratory (listed in the preceding section), provide a printout that
shows the front panel and block diagram, similar to Figure 4 above. Hints for obtaining this printout
are provided in the Laboratory #1 Supplemental Handout.
2. Explain how you implemented your working timer in Experiment #4.
3. Imagine you are given a Hall-effect sensor that outputs 0V in the absence of a (sufficiently strong)
magnetic field and 5V in the presence of a magnetic field. In such a scenario, how would you
modify your VI from Experiment #3 to work as a “high” pulse counter?
Extra Credit Exercise: Count Long Low Pulses
In this extra credit exercise, your task is to count and display the number of “long low pulses”
that are being produced by your Hall sensor circuit. For the purposes of this exercise, a “long low pulse”
is defined as any low pulse that has a measured duration of 200 ms or longer. Note that, since the VI’s
you have been using in this lab sample at the rate of once every 100 milliseconds, the shortest measured
duration of a single low pulse is 100 milliseconds.