How much field a count is
On an Uno one count is about 1.5 gauss; on a Pico about the same; on an ESP32-S3 about 0.36 gauss on paper, though its ADC jitters by several counts. With a 10 × 3 mm neodymium disc that is readable out to about 3 cm, on paper. A wire carrying 5 A makes about 1 gauss at 1 cm, which is why this block is not a current sensor.
What one count is worth
An Uno's analogRead has 1023 steps across 5 V, 4.9 mV each. At 3.25 mV
per gauss that is about 1.5 G per count. A Pico in Arduino reads 1023
steps across 3.3 V, 3.2 mV, and at 2.1 mV per gauss that is also about
1.5 G. An ESP32 reads 4095 steps across about 3.1 V, 0.76 mV, so a third
of a gauss on paper; its ADC jitters by several counts, which is why the
sketches average.
Pick your board and a magnet, then slide it away. The field is the same model the TK18 book uses: a neodymium disc, face on, the chip on its axis. It is the best case; a real magnet at an angle does less. For a 10 × 3 mm disc it gives about 460 G at 7 mm, where the straight line ends, 40 G at 20 mm, where the TK18 would switch, and 10 G at 34 mm.
So a neodymium disc is readable from touching distance to a few centimetres, and the useful range for a number is roughly the middle of that: close enough to be well clear of the jitter, far enough to stay on the straight line. The distances depend on the magnet far more than on the chip. Try yours.
A wire is not a magnet
The page this book replaces said contactless current sensing starts here. It does not, with this block on its own.
A straight wire carrying a current makes a field that circles it and falls off with distance: 2 G for every amp, divided by the distance in millimetres. 5 A at 10 mm is 1 G, under one count on an Uno and about the size of the Earth's field, which changes as you turn the board. Pressed against the wire you might see a few counts, and any magnet or steel nearby moves the reading as much.
Current sensors that use a Hall element do it differently. The ACS712 runs the current through its own package, right against the Hall element; clamp meters wrap an iron ring round the wire to gather the field into a gap where the sensor sits. For a number in amps, use a sensor made for it, such as the TK119 INA219 block.
When it does not work
Either the magnet is weak or it is held edge-on. A flat fridge magnet is striped into narrow poles and its field dies within a millimetre or two. A small neodymium disc with a flat face toward the chip reaches centimetres.
That is the ADC's jitter, several counts, and at a third of a gauss per count it is a gauss or two. Average more readings: the sketches take 16 per line. Do not expect a steady figure below a few gauss on any board.
No, not in any useful way. A wire carrying 5 A makes about 1 gauss at 1 cm, under one count on an Uno and no bigger than the Earth's field. Use a current sensor built for it, such as the INA219 block or an ACS712 module.
A sketch that names north or south without flickering at the edge.
A pole finder →Edit this page — content/books/linear-hall-sensor/how-much-field-a-count-is.mdx
Questions about this product
See what other owners have asked, and read their solutions.
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.