Before you plug anything in
- Check the sensor's actual operating voltage — not what you assume it is. "5V" printed on a breakout board usually refers to the supply voltage, not necessarily the logic level of its output pins. These are not always the same thing, and mixing them up is the single biggest cause of fried GPIO pins.
- Confirm ground is actually connected. A sensor with power and signal wired but no shared ground with the board will often give erratic or nonsensical readings, and in some cases lets voltage find an unintended path back through the signal line.
- Count your wires against the datasheet, not the tutorial photo. Tutorial photos are frequently for a slightly different revision of a module with a different pin order. Always cross-check the labels printed on the board itself.
Sensor-specific gotchas worth knowing
Ultrasonic distance sensors (HC-SR04 and similar)
Needs 5V to operate, but its Echo output is also 5V — a direct short to a 3.3V-only input on a Raspberry Pi. Always use a voltage divider or level shifter on the Echo line specifically. The Trig line is an input to the sensor, so it's fine to drive directly from 3.3V logic.
One-wire temperature sensors (DS18B20)
These need a pull-up resistor (4.7kΩ is standard) between the data line and the supply voltage, or you'll get unreliable or missing readings — not damage, just a sensor that seems to intermittently "not work." If your readings are flaky, check the pull-up before you assume the sensor is faulty.
I2C sensors and displays (BME280, SSD1306 OLED, etc.)
These are designed to share the same two bus pins (SDA/SCL) with other I2C devices — that's normal, not a wiring mistake. The thing that does trip people up: two devices on the same bus with the same I2C address will conflict. Check the datasheet for the default address, and look for a solder-jumper on the board if you need to change it.
Relay modules
Two separate circuits live on one board: the low-voltage trigger side (talking to your microcontroller) and the high-voltage switched side (whatever the relay is actually controlling — often mains power). Keep them mentally and physically separate while wiring. Never assume a relay board is safe to touch on the switched side just because the trigger side is low voltage.
Servos and motors
Signal wire goes to the board; power should come from a separate, adequately rated supply, not from the board's own 5V or 3.3V pins. Share ground between the external supply and the board, or the signal won't have a reference point and behaviour will be erratic.
The 30-second pre-power check
- Trace power and ground with your finger, wire by wire.
- Confirm nothing bridges the 3.3V and 5V rails.
- Double-check any sensor with a "5V" spec — is its output also 5V, or just its supply?
- If in doubt, measure it with a multimeter before connecting it to the board at all.
If you're planning a multi-sensor project, run it through PinTinker first — it flags the voltage issues above (like the HC-SR04's Echo pin) automatically as you add each component.
New to what all these parts actually are? The components guide explains each one in plain language.
Wiring an I2C device that won't respond? This guide walks the diagnosis. Mixing 5V parts with a 3.3V board? Start here.
Gear that helps
A logic-level converter board is cheap and solves the 5V-sensor-into-3.3V-Pi problem without doing resistor math every time. Worth keeping a couple in your parts drawer.