🔌 Wiring questions need photos + numbers
-
Nobody can debug wiring from "I connected everything correctly but it doesn't work." Show this instead:
- A clear top-down photo — every wire visible, good light, no spaghetti hiding the pins.
- A sketch of the circuit — hand-drawn is fine: which pin goes where, where power enters, where ground returns.
- Part numbers and supply specs — exact sensor module, what powers it (USB? 5V adapter? battery?), and what the rail measures under load.
- The symptom with numbers — "reads 0", "reads 4095 constantly", "resets when the motor starts", plus what you already tried.
The gotchas that solve most posts here
- No common ground. Two boards or a board + external supply without shared GND gives garbage or nothing. Tie grounds together, always.
- 5V into a 3.3V pin. A 5V sensor output (looking at you, HC-SR04 echo) into an ESP32 GPIO will damage it. Divide down or level-shift first.
- Missing pull-ups. I2C needs them (4.7k to 3.3V is the standard starting point); floating inputs read noise.
- Motors and relays on the logic supply. They droop and spike the rail — the MCU browns out and resets exactly when the motor starts. Separate supply (shared GND), bulk capacitance at the driver, and a flyback diode across relay coils and brushed motors.
- GPIO pins can't drive loads. A pin signals; it doesn't power. Relays, motors, and long LED strips switch through a transistor or MOSFET with its own supply — never straight off the pin.
- Decouple like you mean it. A capacitor close to every IC's supply pins eats the high-frequency noise that causes "random" glitches.
Post the photo, the sketch, and the measured numbers. Tag with hardware, wiring or sensors.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login