
A Hall sensor can respond to a magnetic field. Inside it, the field pushes moving charge sideways and produces a small voltage. Electronics in the sensor can turn that response into a signal that changes when a magnet comes near.
What does that tell a motor controller?
In some brushless motors, sensors can tell the controller which part of the rotating magnet is passing them. The controller uses that information to choose which windings to energize next. That gives the rotor a push in the direction it’s supposed to turn.
Are those sensors only for motors?
They can also detect the position of a lever or the speed of a rotating part. The sensor only has to be close enough to detect a useful change in the field. It doesn’t need to rub against the moving part.
For more on how motors and magnetic fields work together, see Basics of Electric Utilities 101.