Hall effect sensor is a component that detects or measures the magnetic field. It works on the principle of Hall effect.
There are two basic types: the first type are linear Hall sensors, which have the output voltage proportional to the magnetic induction.
The second type are logical Hall sensors, whose output can be present only in two states. It changes its state on a certain threshold
and may have a hysteresis.
In my experiment I have used Hall sensor from the brushless PC fan. In those the logical sensor is used. In my case it was the sensor in version with two outputs open collector type - one output is always on and one off. Such a sensor is used in fans with a double coil motor. The center of the double coil is connected to + and the end of the sensor outputs, which usually have maximal current of 300-800 mA. Most I have met are classic through hole (THT) design in housing with 4 pins. Sensors are marked 276, 277, etc. The maximum voltage is usually 18 - 24V. They are resistant against reverse polarity, but do not rely on it until you find the datasheet. Flip levels are typically + / - 50 to 120 Gauss (5-12 mT).
Using this sensor, I built a simple detector of magnetic fields, see diagram in Fig. 2. The detector indicates the presence and polarity of the magnetic field. Due to the slight asymmetry of the sensor, the same output is always open in low or no magnetic field condition. The video number 2 shows the operation of the magnetic field detector.
You could also be interested in Fan with LED color effect.