Today I got my first unipolar Hall-effect Sensor and was eager to find out how I could test it. But first there was the issue of how can you determine which pin is the input voltage and which pin the sensor out. The documentation, as with most electronics part documentation, is very terse and assumes that you already know everything. Click on the thumbnail to the left to see the value of the pins.
The Hall-effect Sensor incorporates a magnet. This magnet is on the center of the sensor. The side with no label is north and the side with the label (the branded side) is south. If you hook up this sensor to a LED (with a pull-up resistor, pick a value that you normally use with your LEDs), when you move the north polarity of a magnet close to the sensor (the side with no label), the LED with light up. If you move the south pole of the magnet close to the side with the label, the LED will also light up. I connected the sensor to 4 AA batteries (6 volts).
If you now hook up the sensor output to the red wire and the ground to the black wire of a oscilloscope, and start moving the north pole of a magnet back and forth within the range of this sensor you’ll see a square wave.
This sensor is not particularly effective for weaker magnetic fields. In my test, a fridge sized magnet had to be millimeters away from this sensor for it to be detected. So depending on your application, you will need to pay careful attention on the Bop and Brp specs of this sensor and the requirements of your own application. Here is the sensitivity of this particular sensor:
Here is a good article on Hall-effect sensors that includes a useful trouble-shooting guide. For my application, I had to give up on this sensor and go with a magnetic sensor with 0.5 Gauss sensitivity, i.e., a magnet that can detect earth’s magnetic field.
Most linear Hall-effect sensors are ratio-metric, where the quiescent output voltage (typically half of the supply voltage) and sensitivity are proportional to the supply voltage. For example, with a supply voltage of 5 volts and no magnetic field present, the sensor’s quiescent output will typically be 2.5 volts and will change at the rate of 5 mv/g (milli-volts per gauss). The output of the sensor will depend on the regularity of the input. If the input magnetic field is defined by a rotating magnetic circle, then you may get a sine-wave type output. If you need a pulse output, then you must convert this sine-wave output to a square wave. Linear sensors act as input for analog-to-digital converters. A comparator cable needs to be added to the circuit to provide a set point or trip point and thereby convert the linear sensor into an adjustable digital switch.
A unipolar Hall-effect sensor act as switches require a single polarity magnetic field for operation. When the magnetic flux density increases above the operate point (Bop), the unipolar sensor will switch on (output changing from high to low). When the flux density drops below the release point (Brp) the sensor will switch off (output changes from low to high). Typically, a unipolar sensor require a positive magnetic field (a south pole) directed toward the branded face of the sensor.
An omnipolar sensor will activate with either a north or a south pole.
A latching sensor are digital output Hall-effect switches. They switch on (output from high to low) with a positive magnetic field and switch off (output from low to high) with a negative magnetic field. Both magnetic polarity are required for operation.