Raspberry Pi GPIO pins work at 3.3 V and are not 5 V tolerant. A 5 V signal can damage the board.
What the message means
The pins connect directly to the processor. They give only a few milliamps per pin, so they cannot drive motors or relays directly.
Fix it in this order
- Use a level shifter or a resistor divider for any 5 V output going into a GPIO.
- Drive motors, relays and large LEDs through a driver or transistor, not from the pin.
- Power sensors from the 3.3 V or 5 V pins as the sensor requires, and join the grounds.
- Check the pin numbering mode in your code: BCM numbers or physical board numbers.
- Disconnect power before changing wiring.
Why it happens
Raspberry Pi GPIO pins are connected directly to the processor, which runs at 3.3 V. Applying 5 V to an input can push current through internal protection diodes, and repeated or heavy exposure can damage the pin or the chip. The pins also supply only a small current each, so they cannot run motors, relays or bright LEDs directly without a driver.
A 5 V sensor output therefore needs a level shifter or a resistor divider before it reaches a GPIO input. The Pi’s 3.3 V outputs are read correctly by many 5 V logic inputs, but you should check each device’s input thresholds in its datasheet. Shared ground wiring between devices also matters, because logic levels only mean something relative to a common reference.
If you see this, do this
| You see | Do this |
|---|---|
| Pi restarts when a motor starts | Separate the motor supply and add a driver. |
| Pin reads wrong level | Check the numbering mode. |
Confirm the fix
- With the sensor wired but the Pi powered down, check the sensor datasheet for its output high level, and add a divider or level shifter if it is 5 V.
- Measure the voltage on an input pin with the sensor connected. It should stay between 0 V and 3.3 V, never near 5 V.
- Run a short script that toggles the pin and reads it back, using BCM numbering. A match confirms the pin and numbering are right.
Common mistake: Most readers assume that a Raspberry Pi pin reads 5 V logic because the board is powered from 5 V, when the GPIO pins themselves are 3.3 V and need protection.
Related
wiring checker, relay module active low.
Last reviewed: November 2026. These are the usual causes and the order that finds them fastest. Test on your own board; clones and cables differ.