Contents1. Identify the exact board and module
A sensor can run from the right power supply and still send a signal that is unsafe for your controller. Before wiring a module to an Arduino, ESP32 or Raspberry Pi, check two things separately: the voltage that powers the module, and the voltage on each pin that carries data. This guide is about connecting boards you already have; if you are still choosing one, start with the Arduino, ESP32 and Raspberry Pi comparison.
1. Identify the exact board and module
Write down the model and revision from each board. “Arduino” does not mean every board has the same GPIO voltage, and a connector marked 5V may be a power pin, not a statement about the data pins. The Arduino Uno Rev3 hardware documentation is specific to that board. For an ESP32 module, check the board documentation alongside the original ESP32 chip datasheet; don't assume its electrical limits apply to every ESP-family chip or that a USB-powered board has 5 V GPIO.
2. Make a short wiring plan
- Power: Find the allowed supply range for the module and verify that the chosen supply can provide the current it needs.
- Ground: Ordinary non-isolated GPIO needs a shared reference. Connect the grounds as the modules specify; that does not mean tying different supply outputs together.
- Signals: List each wire, which side drives it, and where it goes. Compare the source's specified high and low output levels with the receiver's input thresholds and allowed input range. A signal can be too high to tolerate or too low to register reliably.
For example, if a module's output is specified as 5 V and the controller input does not tolerate that level, don't connect them directly. In the opposite direction, don't assume a 3.3 V output reliably meets every 5 V input's high threshold. Check the numbers rather than relying on the shape of the connector.
3. Match the translator to the signal
A one-way output and a shared two-way bus are different problems. Match the voltage range, direction and speed of any translator to the interface. On an ordinary I²C bus, pull-up resistors set the high level on SDA and SCL. Check which rail the module pulls them up to; if the boards need different bus levels, use a translator designed for open-drain I²C and follow its pull-up guidance. The SparkFun level converter hookup guide shows what the low- and high-voltage sides look like on a concrete example. It is not a universal wiring diagram.
4. Test one connection before adding motors
Power off while wiring. Leave the motors disconnected and verify the supply polarity and voltage before attaching the sensor. Start with one module and a minimal readout. Look for a plausible reading that changes when you deliberately move the target or switch. A meter can confirm a steady supply or idle level, but it does not prove the voltage or timing of fast pulses. Use the datasheet rather than guessing on a live pin.
If the board resets, the module becomes hot, or the readout behaves unpredictably, turn off power and revisit the plan before adding another connection. Label the finished harness so the supply and signal pins cannot be confused later. See the robot wiring and connectors guide for connector and assembly choices.

