Hall Sensor Air Gap Designer
Start from the number on your Hall IC datasheet and work backwards to a magnet. Enter the operate and release thresholds, the travel, the gap tolerance and the temperature range, and this tool reports the worst-case field at every corner of the stack — then tells you whether the design actually switches, and actually releases.
interactive — worst-case operate & release margin
A design switches reliably only if the field at the largest actuated gap, at the hottest temperature, with the sensor at its weakest threshold, still exceeds Bop max. It releases reliably only if the field at the smallest released gap, at the coldest temperature, falls below Brp min. Those are opposite corners of the same tolerance box — checking the nominal case tells you almost nothing.
the design rule
Hall switch datasheets publish operate and release points as ranges, not single numbers, and the two are not independent — a part that lands at maximum Bop cannot also land at minimum Brp, because the hysteresis band is itself specified. The safe method, and the one the IC vendors themselves document, is straightforward:
| requirement | test against | worst-case corner |
|---|---|---|
| must switch on | field > Bop maximum | largest gap, hottest magnet, weakest sensor |
| must switch off | field < Brp minimum | smallest released gap, coldest magnet, most sensitive sensor |
| must not chatter | travel between the two field levels must be crisp | slowest approach speed, maximum vibration amplitude |
The calculator applies a symmetric drift band to both thresholds on top of the datasheet numbers, defaulting to ±15 %. Many modern ICs are internally temperature-compensated and hold tighter than that; older bipolar parts are considerably worse. Use whatever your datasheet's full-temperature limits actually say — those numbers usually already include drift, in which case set the field to zero.
what people get wrong
| mistake | consequence |
|---|---|
| measuring the gap to the package face | The Hall element is a die inside the package, typically 0.25–0.5 mm behind the marked face on a SOT-23 or TSOT. At a 2 mm design gap that is a 20 % error in distance and a much larger error in field. |
| designing at nominal | The nominal case almost always passes. Reliability lives at the corners, which is why this tool reports nothing else. |
| forgetting release | An oversized magnet switches beautifully and then never lets go, because the retracted field never falls below Brp. Excess strength is a failure mode, not a safety margin. |
| ignoring magnet temperature drift | Neodymium loses roughly 0.11–0.12 % of remanence per °C. Over a −40 to +125 °C automotive range that is a swing of nearly 20 %, all of it against you at the hot end. |
| using a latching sensor with one pole | A latch needs an alternating field to toggle. Single-pole actuation sets it once and it stays set. Use a two-pole or multipole ring. |
| steel near the sensor | A ferrous bracket or screw reshapes the field entirely. Model or measure with the real hardware present. |
| polarity | A unipolar switch responds to one pole only. Get it backwards and the assembly does nothing — an omnipolar part removes that build risk for a few cents. |
If the design fails at the hot, wide-gap corner, adding thickness in the magnetized direction buys more field than moving up a grade, and it raises the permeance coefficient at the same time — which protects the magnet from the very temperature that caused the problem. Check the operating point with the demagnetization & permeance calculator before you commit.
head-on versus slide-by
Head-on gives a monotonic field-versus-position curve, which makes threshold design simple and tolerant of lateral misalignment. It needs axial travel, and the sensor sees only one polarity — fine for a unipolar or omnipolar switch.
Slide-by puts the magnet on a transverse path at a fixed gap. The axial field peaks at alignment and reverses sign on either side, which is exactly what a latching sensor requires and what makes slide-by the standard arrangement for rotary and linear encoders. It is more sensitive to gap variation and to lateral positioning, and the actuation window — the span of travel over which the field exceeds Bop — needs to be wide enough for the sampling rate at the intended speed. That window is reported above when slide-by mode is selected.
For rotary position, multipole ring magnets give a repeating slide-by profile with pole count setting the resolution. That is our core product line — see magnets for sensors and ring & annular magnets, or go straight to stocked sensor magnets.
reference — the formulas used
| cylinder, on axis | Bz(z) = (Br/2) · [ (z+L)/√((z+L)² + R²) − z/√(z² + R²) ]z = distance from pole face to the Hall element, L = thickness, R = radius |
| block, on axis | Bz(z) = (Br/π) · [ tan−1( ab / (2z·√(4z² + a² + b²)) ) − tan−1( ab / (2(z+L)·√(4(z+L)² + a² + b²)) ) ] |
| ring, on axis | Bz(z) = Bz,cyl(OD) − Bz,cyl(ID) |
| slide-by lateral profile | Bz(x) = Bz(0) · z³ · (2z² − x²) / ( 2 · (z² + x²)^{5/2} )dipole-shaped profile normalised to the exact on-axis magnitude; z measured to the effective dipole centre, zero crossings at x = √2·z |
| remanence vs. temperature | Br(T) = Br₂₀ · [1 + α · (T − 20) / 100] |
| operate check | Bz( g_act,max + d_die ) at T_hot > Bop_max · (1 + drift) |
| release check | Bz( g_rel,min + d_die ) at T_cold < Brp_min · (1 − drift) |
The on-axis expressions are exact for a uniformly magnetised body and are the same ones used by the pull force calculator, so results are consistent across both tools. The slide-by lateral shape is a dipole approximation and degrades when lateral offset is small compared with magnet width — treat the actuation window as indicative and confirm on hardware.