What is on the board · 02 of 10

VCC sets the level

With no magnet near, the chip drives SIGNAL up to VCC and the pull-up holds it there. So the voltage on VCC is the voltage your pin sits at most of the time. Beside an ESP32, an ESP32-S3 or a Pico that has to be 3V3. Beside an Uno, 5V.

The output swings to VCC

The chip's output is a push-pull stage, the kind that drives a line both ways. No magnet: it connects SIGNAL to its own supply. A magnet: it connects SIGNAL to ground. Its datasheet promises the high level within 0.2 V of the supply and the low level within 0.2 V of ground.

The board adds a 10 kΩ pull-up from SIGNAL to VCC, which agrees with the chip whenever it is HIGH. So at rest, with no magnet in range, SIGNAL is VCC. Nothing on the block changes the level in between.

VCC sets the level
Your board
The block's VCC pin goes to
No magnet
3.3 V
Magnet
about 0 V
Pin reads
HIGH, then LOW
No magnet, SIGNAL sits at 3.3 V, inside the ESP32-S3's own range and well above the 2.475 V it needs to read HIGH. A magnet pulls it to near 0 V. This is the wiring.

3V3 beside a 3.3 V board

An ESP32, an ESP32-S3 and a Raspberry Pi Pico run their pins at 3.3 V, and none of them is built to take 5 V. Pick 5V in the figure with one of them selected. The pin reads HIGH, the sensor works, and the pin sits past its rating for every second the magnet is away, which on a door sensor is nearly all the time.

Connect VCC to the board's 3V3 pin. The chip works from anything between 2 and 5 V, and the only thing that changes at 3.3 V is that the red LED is dimmer. Active low, and the light works out by how much.

5V beside an Uno

The Uno's pins run at 5 V, so its 5V pin is the right supply. From 3V3 the chip's HIGH arrives at about 3.1 V, and the ATmega328P needs 3.0 V to be sure of it. That works on paper and leaves nothing for a long wire, so use 5V.

VCC left off

With VCC unconnected the chip has no power and drives nothing. SIGNAL drifts, and it often reads LOW, which is what a magnet looks like. The red LED stays dark, and that is the quickest way to tell a missing wire from a magnet you forgot about.

When it does not work

Can I power it from 5V next to an ESP32?

No. With no magnet near, SIGNAL sits at VCC, so 5 V reaches a pin built for 3.3 V and stays there for as long as the magnet is away. It will seem to work, which is the problem. Connect VCC to 3V3; the chip runs on anything from 2 to 5 V.

Will it work on an Uno from 3V3?

It will read, but with almost no margin. The ATmega328P needs 3.0 V to be sure of HIGH, and the chip only promises to come within 0.2 V of its supply, so 3.3 V gives about 3.1 V. Use the Uno's 5V pin, and the red LED is brighter too.

I left VCC unconnected and it reads a magnet that is not there.

With no supply the chip drives nothing, and SIGNAL drifts. It often reads LOW, which looks exactly like a magnet that never goes away. The red LED stays dark, which is the tell. Connect VCC.

What is the most VCC the chip can take?

Its datasheet gives 2 to 5 V to work in, and 5.5 V as the absolute maximum. A 5 V pin on an Uno or a USB supply is fine; anything higher, such as a 9 V battery, destroys it.

Where this goes next

What the chip measures, and why it switches at one field and lets go at another.

How a Hall switch works

Edit this page — content/books/hall-effect-sensor/vcc-sets-the-level.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