Hall effect sensor/How a magnet becomes LOW/03. How a Hall switch works
How a magnet becomes LOW · 03 of 10

How a Hall switch works

Inside the chip a thin plate carries a current, and a magnetic field through the plate pushes that current to one side, leaving a tiny voltage across it. The chip amplifies it and compares it with two thresholds: at 40 gauss the output goes LOW, below 32 it lets go. Either pole does it.

A voltage across a plate

Pass a current along a thin strip of semiconductor and put a magnet near it. The field pushes the moving charges sideways, towards one edge of the strip, and a small voltage appears across it from edge to edge. That is the Hall effect, and the voltage is proportional to the part of the field that passes straight through the strip.

Straight through is the important part. The strip lies flat inside the chip, parallel to its top face, so the field that counts is the one entering that face, and the datasheet's own note says the field is applied to the marked side. Held edge on, a magnet sends most of its field across the chip instead, and the chip barely notices it.

The voltage itself is tiny. The chip amplifies it, cancels its own offsets, and hands it to a comparator.

Two thresholds

Two thresholds, either pole
Field at the chip0 G, none
Switches LOW at
40 G
Lets go below
32 G
Output
HIGH: none
No field worth the name. SIGNAL is HIGH. Slide either way: a north pole and a south pole both switch it at 40 G.

Slide the field up from zero. At 40 gauss the chip pulls its output LOW. Slide it back: the output stays LOW until the field drops below 32 gauss. Both are typical values from the datasheet, which gives no range around them, so a particular chip may switch a little early or late.

The 8 gauss between them is hysteresis: a band in which the output keeps whatever it had. Without it a magnet resting right at the threshold, or a door rattling in its frame, would flip the output on every look. With it the output changes once and stays changed.

For scale, the Earth's field is about half a gauss, far below either threshold. A small neodymium magnet gives thousands of gauss at its surface.

Either pole

Slide the other way. A north pole gives a field of the opposite sign, and the CC6201 switches at the same 40 gauss. It compares the size of the field and ignores its direction, which is what omnipolar means. Many Hall switches respond to one pole only, and the page this book replaced said this one did. It does not: turn the magnet over and nothing changes.

A switch, not a latch

Take the magnet away and the output goes back HIGH. Some Hall chips are latches, which one pole sets and only the opposite pole clears. The CC6201 is not one of them. Its datasheet does use the word latch, for something smaller: the output holds its level between one look at the field and the next, which is the subject of once every 22 ms.

No contact moves, so there is no bounce either. A push button makes and breaks a few times on every press; this chip changes once.

When it does not work

Does it matter which way round I hold the magnet?

Not which pole. The CC6201 is omnipolar: a north pole and a south pole switch it the same way, so turning the magnet over changes nothing. What matters is that a flat face points at the chip. Held edge on, most of the field runs across the chip rather than through it, and it counts for little.

It stays LOW after I take the magnet away. Is it latching?

No. This is a switch, not a latch: it lets go once the field falls below about 32 gauss. If it stays LOW, the magnet is still close enough, or something else magnetic is. Take the magnet well away; the output follows within about 22 ms.

Will it work through the lid of a box?

Through plastic, wood, glass or cardboard, yes: none of them affects a magnetic field, and the only cost is the distance they add. A steel lid is different. Steel carries the field away sideways, and very little reaches the chip.

Can it tell me how strong the field is?

No. It gives one bit: past the threshold or not. For a reading that rises and falls with the field, the TK70 linear Hall sensor gives a voltage instead.

Where this goes next

Why a magnet makes SIGNAL LOW, and why the red LED lights when it does.

Active low, and the light

Edit this page — content/books/hall-effect-sensor/how-a-hall-switch-works.mdx

Community

Questions about this product

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

Ask a question ↗

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