Utsi Halleffect

download Utsi Halleffect

of 13

Transcript of Utsi Halleffect

  • 8/10/2019 Utsi Halleffect

    1/13

    1

    Hall Effect Sensor

    By: John Muratore , Research Associate Professor, Aviation Systems and FlightResearch, University of Tennessee Space InstituteWilliam Moonan , Graduate Research Assistant, Aviation Systems and Flight Research,University of Tennessee Space InstituteJoseph Young, Graduate Research Assistant, Aviation Systems and Flight Research,

    University of Tennessee Space Institute

    ApproachAs a test article we will be using a Lego motor to which a bar magnet has been attached.This will excite a Hall effect sensor. Every time one of the ends of the bar magnet rotates

    past the switch, it will switch state. By counting the number of times the switch changesin a second and dividing by 2, the rotation rate per second can be determined. We willuse the protoboard and myDAQ for our data acquisition in this task.

    Hall Effect Switch

    The Hall effect switch consists of a piece of semiconductor to which a chemical has beenadded to make it sensitive to magnetic fields. This produces a small electrical signalwhich is detected and amplified in the chip.

    The Hall effect switch actually only switches on the south pole passage of the magnet.The bar magnet is mounted on the gear of the Lego motor such that the north-south poleaxis is aligned with the shaft of rotation. This results in a switch whenever either end ofthe bar passes the Hall Effect switch.

    This sensor can be purchased from Paralax Instruments athttp://www.parallax.com/StoreSearchResults/tabid/768/List/0/SortField/4/ProductID/90/Default.aspx?txtSearch=hall+effect

    Lego brand motors are available at most toy stores.

  • 8/10/2019 Utsi Halleffect

    2/13

    2

    Step 1 - Wiring

    The Hall Effect switch consists of a small square housing for the integrated circuit. Notethat the switch is in itself magnetized.

    The pinout for the switch is as follows :

    Letteringon face

    Pin 3+5 V

    DCinput power

    Pin 2Ground

    Pin 3

    Output

  • 8/10/2019 Utsi Halleffect

    3/13

    3

    This should be wired as follows :

    7805

    Hall Effect Sensor

    +15 AGND

    AI0+ AI0-

    myDAQ

    Lego motor

    Legobatterypack

    10 micro-faradcapacitor

    5.6 kOhm

    NOTE: Make sure myDAQ is not plugged into the USB port while wiring the +15VDC/GND pins; if it is, simply unplug the myDAQ and plug it back in after thewiring process is completed.

  • 8/10/2019 Utsi Halleffect

    4/13

    4

    Developing the software

    Step 2First open LabVIEW and select the block diagram display. Then define the DAQMXchannel by selecting the Create Channel Function from the DAQMX function on the

    Measurement Section of the Function Palette.. It should then be wired by selecting thewiring function off the tools menu and right-clicking on the required functions andcreating controls on the front panel associated with

    - input terminal configuration- minimum value- maximum value- physical channel

    On the front panel, the input terminal configuration should be selected to differential.The minimum value should be set to 0. The maximum value should be set to 5 andthe physical channel should be set to Devx/AI0

  • 8/10/2019 Utsi Halleffect

    5/13

    5

    Step 3Then select the DAQMX read function and place on the block diagram, wiring from thecreate channel function to the DAQMX read as seen below and create an indicator on thefront panel for the output

    Step 4Place the read in a while loop and control the execution of the while loop with a Booleanon the front panel as follows:

    Step 5Then add the DAQMX stop function as follows at the output of the while loop so that itexecutes when the stop button is pressed on the front panel and a dialog decode box fromthe dialog sub palette on the function palette so that any error messages will be displayedwhen the stop button is pressed.

  • 8/10/2019 Utsi Halleffect

    6/13

    6

    Step 6On the Front Panel select a waveform chart off the Controls palette and place on the front

    panel. On the block diagram, wire this to the output of the read function as follows.

  • 8/10/2019 Utsi Halleffect

    7/13

    7

    The front panel should look like the following

    Step 7 Now run the VI. Place the motor with the gear facing the lettered side of the Hall effectswitch and observe the results. You will have to place the gear with the magnet veryclose to the Hall effect switch. It

    may be helpful to place a jumperover the Hall effect switch so itdoesnt jump around very much inresponse to the changing magneticfield. The result should look likethis

  • 8/10/2019 Utsi Halleffect

    8/13

    8

    Step 8With the loop running the sampling at 1 sample at a time, it is hard to get a good captureof the rotation. To fix this we will insert some timing into the data acquisition and let thedata acquisition hardware buffer the data acquisition. From the DAQMX sub-palette,

    place the timing function on the block diagram. Wire the samples/channel and rate to

    1000. Also change the read function to be a single channel multiple samples acquisitionand add 1000 to the number of samples per channel. This will acquire 1000 samples overone second period.

    Once that is done, you have to change the waveform chart to a waveform graph andchange the output variable data from a scalar to an array.Once that is done it should look like

  • 8/10/2019 Utsi Halleffect

    9/13

    9

    And when you run it while running the motor it should look like

    Step 9

    To determine the RPM, all we need to do now is count the number of pulses in ARRAY,divide by 2 to get revolutions per second and multiply by 60 to get the Revolutions PerMinute or RPM.

    To do this, we will post-process the ARRAY after it is acquired by using a FOR loop anduse a CASE statement to determine if we have found another pulse to count.

    First place a FOR loop on the block diagram. Then wire the number of samples into theloop. Wire the ARRAY into the FOR loop and leave the auto indexing enabled (indicated

    by [] on the loop terminal). Take the elements of the ARRAY and add a comparison todetermine if the value is GREATER THAN 2. Wire the output of this comparison intothe selection input for a CASE structure.

    Add 2 shift registers to the FOR loop. One of the shift registers will keep the count of the pulses. The other shift register will hold a Boolean that will keep track of whether thesignal was in a high or low state on the last pass of the FOR loop.

    Basically the case statement will work by only incrementing the count of pulses when thevalue in ARRAY is greater than 2 volts and when it was less than 2 volts on the last valueof the array (last pass of the FOR loop).

    Initialize the shift register for the pulse count to 0 by placing a numeric constant outsidethe shift register and feeding it to it.

    Program the TRUE and FALSE cases as below

  • 8/10/2019 Utsi Halleffect

    10/13

    10

    Divide the output of the pulse count shift register by 2 and wire to an indicator on thefront panel to display the revolutions per second.

    Give this a try and record the number of revs/per second. Then modify the VI to multiplythe revs/second by 60 and display RPM.

  • 8/10/2019 Utsi Halleffect

    11/13

    11

    Your final display should look something like this

    Data

    There are two LEGO motors that we are workingwith. The first is the original LEGO motor (2838)and has high RPM but low torque.

    The second (5292) is a more modernmotor which has higher torque but lowerRPM. There are two locations forconnecting an axle to this motor. Theinnermost connection has higher RPMthan the outer.

  • 8/10/2019 Utsi Halleffect

    12/13

    12

    The performance of these motors is documented at www.philohome.com .

  • 8/10/2019 Utsi Halleffect

    13/13

    13

    AS 508 Lab 8 Hall Effect Sensor

    Name_______________________

    1. Which motor has highest RPM?

    2. What is the difference in RPM between the two shaft outputs of the 5292 motors?

    3. Are the RPMs recorded in your experiment higher or lower than those reported on thewwww.philohome.com website for an equal voltage? Plot your observations on the

    plots from the website.

    4. What is another sensor typically used to determine rotation rate of a shaft?

    5. How could this magnetic sensor be modified to determine direction or rotation of amotor? To determine position?

    6. What other types of sensors could you use other than the magnetic characteristics ofthe Hall effect switch to count pulses as the shaft rotated?

    7. What LabVIEW function would you use if you needed to detect and track themaximum RPM observed?

    8. What LabVIEW function would you use to time the performance of the dataacquisition loop?

    9. What LabVIEW function would you use to compute the mean and standard deviationof the observed RPM?