linear Hall sensor/How it works/03. Half the supply at rest
How it works · 03 of 9

Half the supply at rest

With no field the output sits at half the supply, 2.5 V from 5 V, and an Uno reads about 512. A field moves it 3.25 mV per gauss, typical, up for one pole and down for the other, in a straight line out to about 460 gauss either way. Zero field is the middle of the scale, not the bottom.

A straight line through the middle

A current runs through the Hall element inside the chip. A field through the element pushes that current to one side and leaves a small voltage across it, proportional to the field and with a sign that follows its direction. The chip amplifies that voltage and adds it to half of its supply. So the output has a middle, and the field moves it either way.

A voltage for every gauss
Field at the chip0 G
SIGNAL
2.50 V
From rest
+0.00 V
Uno reads
512
Rest spread
±77 G
No field: the output rests at half the supply, 2.5 V, and an Uno reads about 512. That is zero field, not a fault, and not a weak one. A real chip rests anywhere from 2.25 to 2.75 V, so measure your own zero rather than assume 512.

At 5 V the data sheet gives the numbers: 2.5 V with no field, 3.25 mV for every gauss, 1 V at −460 G and 4 V at +460 G. Slide the field and the output follows the line. The gauss is the unit: a fridge magnet is tens of gauss at its surface, a small neodymium disc thousands, and the Earth's own field about half of one.

The middle is not exact

The typical chip rests at 2.5 V. The data sheet allows 2.25 to 2.75 V, shown as the grey band, and at 3.25 mV per gauss that spread is worth about 77 G. A sketch that assumes 512 on an Uno can be out by more than a fridge magnet's worth before you start. So the sketches in this book measure the resting level with no magnet near and subtract it.

The slope varies too, 2.95 to 3.55 mV per gauss at 5 V, about 9 % either way. A reading in gauss from this block is good to about a tenth, and better as a comparison: nearer, farther, stronger, weaker.

Where the line ends

The sheet draws nothing past ±460 G. A small neodymium magnet makes that at a few millimetres, so the reading stops growing before the magnet touches the board. Treat a reading at the end of the range as "strong", and measure from a little farther out when you want a number.

When it does not work

It reads about 512 with no magnet. Should it be 0?

No. 512 on an Uno is half of 1023, and half the supply is where this chip rests with no field. The field is how far the reading has moved from there, up or down. A sketch that treats 0 as no field and 1023 as strong is wrong for this block.

My resting value is 530, not 512. Is it faulty?

Probably not. The data sheet allows the resting level anywhere from 2.25 to 2.75 V at 5 V, about 460 to 563 on an Uno. That spread is worth about 77 gauss, which is why the sketches measure their own zero instead of assuming 512.

The reading stops rising when the magnet touches the chip.

The sheet draws its straight line out to 460 gauss and no further, and a small neodymium magnet makes more than that at a few millimetres. Past it the reading says strong, not how strong. Measure from a little farther away.

Where this goes next

Up for one pole, down for the other, and why the back of the board swaps them.

Which pole, which way →

Edit this page — content/books/linear-hall-sensor/half-the-supply-at-rest.mdx

Community

Questions about this product

See what other owners have asked, and read their solutions.

Ask a question ↗

Linear 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.

Browse Modules and blocks on the forum →