A digital magnetic sensor is a device in which the output switches toggles between the ON and OFF states as an effect of the presence of an external magnetic field. Devices of this type, based on the physical principle of the Hall effect, are widely used as proximity, positioning, speed, and current detection sensors. Unlike a mechanical switch, they are a long-lasting solution as they are free from mechanical wear and can operate even in particularly critical environmental conditions. Digital magnetic sensors are becoming more and more widespread, especially in the automotive and consumer electronics sectors, thanks to features such as contactless operation, lack of maintenance, robustness, and immunity to vibrations, dust, and liquids.
In the automotive sector, for example, these sensors are used to detect position, distance, and speed. Inside the engine they are used to identify the position of the crankshaft, in the passenger compartment they are used to detect the position of the seats and seat belts (basic information for operating the air-bag control system), and on the wheels, they detect the speed of rotation, needed by the ABS.
Principle of operation
The heart of each magnetic sensor is represented by the Hall element, whose output voltage (also called Hall voltage and indicated with VH) is directly proportional to the intensity of the magnetic field that passes through the semiconductor material. Since this voltage is very low, of the order of a few microvolts, it is necessary to include in the design of other components such as operational amplifiers, voltage comparators, voltage regulators, and output drivers. Depending on the type of output, magnetic sensors are divided into linear, in which the analogic output voltage varies linearly with the intensity of the magnetic field, and in digital, in which the output can assume only two states. In both cases, the VH voltage satisfies the following equation:
VH = RH · ((B · I) / t)
where: VH is the Hall voltage in volts, RH is the Hall effect coefficient, I is the current flowing through the sensor in amps, t is the thickness of the sensor in mm, and B is the magnetic flux density in Teslas. Figure 1 shows the block diagram of a generic linear Hall effect sensor, whereas the diagram of Figure 2 refers to a digital sensor. The Hall element is represented in Figure 1 by the square box with an “X” and, depending on the type, a sensor might include multiple cells of the same type (two are required to detect differential magnetic fields, three for detecting direction or movement). To increase the flexibility of the interface, the analog sensor usually includes an open emitter, open collector, or push-pull transistor connected to the output of the differential amplifier. The main difference between the two schemes consists in the fact that the sensor with digital output includes a Schmitt trigger with built-in hysteresis, connected to the opamp.
When the magnetic flux passing through the sensor exceeds a certain threshold, the output switches from OFF to ON. The hysteresis is used to eliminate any oscillation of the output signal when the sensor enters and leaves the magnetic field. The devices based on Hall effect are divided into unipolar and bipolar sensors. Bipolar sensors require a positive magnetic field (south pole) for operating and a negative magnetic field (north pole) for release. Unipolar sensors require a single magnetic pole (south pole) both for operating and release. Furthermore, sensors are normally designed to produce an output in the OFF state (open circuit) in the absence of an electromagnetic field and output in the ON state (closed circuit) when they are subjected to a magnetic field of sufficient intensity and with the correct polarity.
Regardless of the particular type of application, a fundamental requirement for the correct operation of Hall-effect sensors is that the magnetic flux lines are always perpendicular to the sensor surface and have the correct polarity. The applications of digital magnetic sensors are many, including automotive, consumer electronics, electromedical systems, telecommunications, control of industrial processes. Position sensors are used to detect a sliding movement between the magnet and the sensor, with the two elements placed at a very short distance. The relative movement between magnet and sensor generates a positive magnetic field when the sensor moves towards the south and a negative magnetic field when the sensor moves towards the north pole.
Several techniques are available to determine the position: for example, if the application requires a limited and discrete position, simple switches can be used, while for applications requiring greater precision, a linear device can be used in combination with a microprocessor. Position or proximity sensors can also be used to monitor the level of a liquid, with applications in household appliances such as washing machines or dishwashers. In this case, several Hall switches are used in combination with a magnet placed on the float.
When the float rises inside the tube, the corresponding discrete switches positioned outside the housing are activated, providing a digital indication of the water level. Another important application concerns DC brushless motors, whose speed is controlled by electrical rather than mechanical commutation. In this regard, three digital magnetic sensors are positioned on the motor stator, while permanent magnets are placed on the rotor shaft. The automotive sector has emerged as a leader in the global magnetic field sensor market, accounting for over 40% of market share. The increasing demand to integrate multiple safety features into automobiles has created an opportunity for Hall sensors, exploited in several safety-related applications such as the Electronic Stability Control System (ESC) and the Anti-lock Braking System (ABS).
An example of digital magnetic sensors for position detection is the Allegro MicroSystems A1210-A1214 device family. Provided with AEC-Q100 certification for automotive applications, the A121x series sensors offer high reliability with stable and continuous operation over the extended temperature range, robust EMC performance, and high ESD rating. The A1210-A1214 Hall-effect latches include the following on a single silicon chip: voltage regulator, Hall-voltage generator, small-signal amplifier, Schmitt trigger, and NMOS output transistor.
The output of these devices switches low (turns on) when a magnetic field perpendicular to the Hall element exceeds the operate point threshold. The sensor features a latching behavior that is, a south pole of enough strength turns the device on, and it remains on also after removal of the south pole. When the magnetic field is reduced below the release point, the sensor output goes high (turns off). The difference in the magnetic operate and release points is the hysteresis of the device.
Magnetic sensors are also suitable for accurate detection of angular position. An example is the AMS AS5048A/AS5048B magnetic rotary encoder, a sensor providing a 14-bit high-resolution output for 360° angular position detection. Figure 3 shows the main functional blocks of the device: Hall sensor, analog-digital converter, and digital signal processing. The absolute position of the magnet is directly accessible over a PWM output and can be acquired through a standard SPI or a high-speed I²C interface, depending on the version. The zero position can be programmed via SPI or I²C command, simplifying the overall system since the magnet does not need to be mechanically aligned. The sensor tolerates misalignment, air gap variations, temperature, and external magnetic field variations. Reliability, robustness, and wide temperature range makes it ideal for rotation angle sensing in harsh industrial and medical environments.
Digital magnetic Hall effect sensors are well known among designers for their robustness, durability, and dependable operation for any position sensing application. Whether simply detecting the closing of a laptop lid or performing complex motor commutation and accurate position measurement, Hall effect sensors will sense the position with extreme precision even in the most severe environmental conditions.
By S. Lovati, electronics engineer and technical author