How far a magnet reaches
The chip needs 40 gauss, and a magnet's field falls away steeply with distance. On paper a 10 × 3 mm neodymium disc switches it from about 20 mm, a 5 × 2 mm disc from about 11 mm, and a flat fridge magnet may have to touch the board. Worked out, not measured: test your own gap.
A field that falls fast
A magnet's field is strongest at its face and drops away steeply. Once you are more than a magnet's width away, doubling the distance cuts the field to between a fifth and an eighth: a 10 × 3 mm disc gives about 230 gauss at 10 mm, about 42 at 20 mm and about 6 at 40 mm. The chip needs 40.
The curve is the field along the axis of a disc magnet, straight out from the middle of one face. For a uniformly magnetised disc of radius R and thickness L, at a distance z from its face:
B(z) = Br/2 × [ (L + z) / √(R² + (L + z)²) - z / √(R² + z²) ]Br is the material's own strength. N35 neodymium, the most common grade, is about 1.2 tesla, which is 12 000 gauss. Put the numbers in and each magnet in the figure crosses 40 gauss at one distance: about 11 mm for a 5 × 2 mm disc, about 20 mm for 10 × 3 mm, about 39 mm for 20 × 5 mm.
Why it is only a guide
Those numbers are worked out, not measured, and they are the best case:
- On axis, face on. Off to one side, or tilted, less of the field passes straight through the chip, and that is the only part it counts.
- Typical thresholds. The datasheet gives 40 and 32 gauss as typical values with no range, so one chip may need a little more.
- The chip's own plastic. The sensing plate is inside the package, a fraction of a millimetre below its top.
So use the figure to choose a magnet, then measure. Run the first read, bring the magnet in along a ruler until the LED lights, and build the gap well inside that distance.
Fridge magnets
A flat flexible fridge magnet is made of narrow stripes magnetised in alternating directions. That is what makes it cling hard to a steel door and hardly at all to anything a few millimetres away: the stripes' fields cancel almost at once. It may have to touch the board, and the formula above does not describe it.
The ring where it holds
Walk the magnet out slowly in the figure. The output goes back HIGH a little further out than it went LOW, because it lets go at 32 gauss rather than 40. Between the two distances it keeps whatever it had. A door that settles right at the edge of range sits in that ring, and the output does not flicker.
When it does not work
No. The box holds the block only. Any small neodymium magnet works; a 10 × 3 mm disc is a good first choice. Ordinary ferrite magnets and fridge magnets are much weaker for their size and have to come much closer.
The figure is the best case: the magnet on the chip's axis, a flat face towards it, and the chip switching at its typical 40 gauss. Off to one side, tilted, a weaker grade of magnet, or a chip at the far end of its spread all shorten it. Measure where yours switches, and build the gap well inside that.
Yes. The fibreglass board does nothing to a magnetic field, and the chip responds to either pole, so a magnet behind the board switches it too. The board adds about 1.6 mm to the distance, so the magnet has to come that much closer.
That is the hysteresis, and it is deliberate. The chip switches LOW at 40 gauss and lets go below 32, and 32 gauss is a little further out. The ring between the two distances is where the output keeps whatever it had, which is what stops it flickering at the edge.
The chip looks at the field in brief glances, and what falls between them.
Once every 22 ms →Edit this page — content/books/hall-effect-sensor/how-far-a-magnet-reaches.mdx
Questions about this product
See what other owners have asked, and read their solutions.
Hall Effect Sensor
Loading discussions…
Discuss this article
Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.