When the reading is wrong
There is no LED, so the reading is the test. Near 0 means no power or the wrong pin; stuck near half means working, with no field reaching the chip; full scale at rest is an ESP32 without its attenuation set; a steady field from nothing is a zero taken with something magnetic near. Swapped names and jitter have their own fixes.
What it reads tells you where to look
The board has no light, so the number your sketch prints is the first test. Half the supply is the chip working with nothing to see; almost every fault is a reading somewhere else.
The three that are not wiring
A field from nothing. The sketch trusts whatever it measured at start-up. A magnet in your hand, a steel screw under the board, a speaker or a phone nearby: each shows as a field until you press reset with it gone. A few gauss either way is normal; tens is something near the board.
Swapped names. From behind the board the field passes through the chip
the other way. At the front, a compass settles it: the needle's north end
points at a south pole. Then set NORTH_RAISES to match.
Jitter. An ESP32's ADC jitters by several counts. The sketches average 16 readings per line; average more if you need a steadier number, and keep SIGNAL on an ADC1 pin so Wi-Fi does not take the converter away.
If none of that helps, measure SIGNAL with a multimeter against GND, no magnet near. Half of VCC means the block is fine and the fault is in the wiring to your board or in the sketch.
When it does not work
Read SIGNAL with no magnet near. About half of VCC, 512 on an Uno or about 1650 mV on a 3.3 V board, is the chip powered and working. Near 0 is no power or the wrong pin. There is no light on the board to tell you anything else.
The chip's zero is half of VCC, so a supply that changes moves it, and on an ESP32 the ADC does not follow. Warmth moves it a little too. Press reset to measure it again, or have the sketch re-measure whenever you know no magnet is near.
Only if a strong field drove SIGNAL past about 3.6 V; at rest it sits at 2.5 V. If the pin still reads a sensible half-scale value with VCC on 3V3, it is probably fine. Move VCC to 3V3 either way.
When a yes or no is all you need: a Hall switch with its own light, from either pole.
TK18 Hall Effect Sensor →Edit this page — content/books/linear-hall-sensor/when-the-reading-is-wrong.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.