VCC is your logic voltage
A closed switch joins SIGNAL straight to VCC, with no resistor in between. So VCC is the HIGH your board reads, and it has to be the voltage your board's pins run at: 3V3 on an ESP32, an ESP32-S3 or a Pico, 5V on an Uno. The block works on either; your pin does not.
What the pin sees
Open, SIGNAL is 0 V through the 10 kΩ. Closed, it is VCC, less a fraction of a millivolt across the contacts. Nothing on the block changes that voltage: no regulator, no divider, no resistor in series. Whatever you wire to VCC is what arrives on your pin every time a magnet comes near.
Pick your board, then try both supplies. The green bar is what a closed switch puts on SIGNAL. The dashed line is the lowest level the pin is sure to call HIGH: 0.6 × VCC on the Uno's ATmega328P, 0.75 × VDD on an ESP32, 2.0 V on a Pico's RP2040. The red line is the pin's own supply.
Which pin, on which board
- ESP32, ESP32-S3, Pico: VCC to 3V3. Their pins run at 3.3 V. The 5V pin (VBUS on a Pico) would put 5 V on a 3.3 V pin with nothing to stop it.
- Arduino Uno: VCC to 5V. 3V3 is read as HIGH too, but with only 0.3 V to spare.
The switch itself does not care. The sheet rates it for far more voltage and current than any of these boards can give it; at 5 V it carries about 3.5 mA. VCC is set by what reads SIGNAL, not by what the block needs.
When it does not work
It reads HIGH because 5 V is well above HIGH. It is also 5 V on a pin whose own supply is 3.3 V, every time the magnet comes near, with nothing to limit it. Move VCC to 3V3 before it costs a pin.
It works, with little to spare: the Uno reads HIGH from 3.0 V and 3V3 gives it 3.3. Move VCC to the Uno's 5V and the margin is the whole supply.
There is no need. Wire VCC to your board's 3V3 pin and SIGNAL can never go above 3.3 V. The block has nothing on it that wants 5 V.
Edit this page — content/books/reed-switch/vcc-is-your-logic-voltage.mdx
Questions about this product
See what other owners have asked, and read their solutions.
Reed Switch
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.