Introduction

A linear Hall-effect sensor delivers its specified accuracy only when the magnetic circuit and the electrical layout are designed with care. The device itself integrates the Hall element, the temperature compensation, the amplifier and the offset cancellation, so the remaining error comes from the magnet, the air gap, the supply and the interference. This application note explains the practical rules for applying an Allegro A1324/5/6 linear Hall-effect sensor in a position, angle or current measurement.

The Magnetic Circuit

The magnetic circuit starts with the magnet and the air gap. A magnet with a high energy product such as neodymium gives a strong field for a small size, but the field falls quickly with the gap, so the sensitivity and the gap must be chosen together. The field across the travel range should be smooth and monotonic, so the output maps unambiguously to the position, and the gap should be fixed with a mechanical stop or a bushing so the reading repeats from unit to unit and over time.

Air Gap and Alignment

A consistent air gap is the single most important factor for a repeatable measurement. A gap that varies with the assembly, the temperature or the vibration adds error directly to the reading, so the mechanical design should hold the magnet and the sensor in a fixed relationship. Keep the magnet and the sensor aligned in the sensitive axis, and avoid a tilted magnet that produces a field gradient across the die.

Choosing the Sensitivity

The sensitivity is chosen to match the field: 5.0 mV/G (A1324) for a small field, 3.125 mV/G (A1325) for a medium field and 2.5 mV/G (A1326) for a large field. The goal is the largest output signal that still stays within the linear span at the maximum field, because a larger signal gives a better resolution for the ADC. Because the parts share a package and an interface, a prototype can be tuned by swapping the sensitivity.

Rotary Measurement

For an angle measurement, a magnet mounted on the shaft produces a field that rotates with it. Two sensors placed at 90 degrees in quadrature give two signals that vary as the sine and the cosine of the angle, and taking the arctangent gives the angle over the full turn, while the sign of the change gives the direction. The field should vary sinusoidally with the angle, so a diametrically magnetized ring magnet is often used.

Supply and Layout

The device operates from a 4.5 V to 5.5 V supply and provides a ratiometric output, so keep the supply clean and stable and add the recommended bypass capacitor across the supply pins to realize the low-noise performance. Keep the output trace short and away from the switching nodes, and use a ground plane to reduce the coupling. Because the output is ratiometric, a supply that moves with the ADC reference cancels out, but noise on the supply still couples to the output.

Stray Fields

Keep the sensor away from stray magnetic fields such as a nearby inductor, a motor magnet or a high-current trace, because an external field adds directly to the measured field. Where a stray field is unavoidable, use a differential arrangement or a magnetic shield, or choose a sensor that is immune to an external field. Measure the field at the sensor in the final assembly to confirm.

Accuracy and Temperature

The device uses a proprietary dynamic offset cancellation technique to remove the offset drift and the low-frequency noise, which gives a stable offset and a low-noise output, and the sensitivity is trimmed at the factory and is temperature-stable. To preserve the accuracy over temperature, use a magnet with a stable temperature coefficient, keep the air gap fixed and confirm the performance across the range on the bench. The parts operate over -40 °C to +150 °C and are immune to mechanical stress.

Validation

After integration, validate on the bench: sweep the position or the angle and record the output, measure the noise and the offset at the ends of the range and check the accuracy across the temperature range. Our FAE team can review your magnetic circuit and your measurements and help you interpret them, so the sensor performs in the product as it does on the datasheet.