1

Most of the sensors available in the market requires 3.3V-5V. The GPIO of the Raspberry Pi is 3.3V max only and not 5V tolerant. I have seen tutorials around the internet that they supply the sensors from 5V from the Raspberry Pi then connecting sensor's output pin to GPIO by using voltage dividers such as resistors in series to reduce it to 3.3V. My main concern is:

  1. Will it affect the transmission of sensor data to raspberry pi or affect the performance of the data transmission when decreasing voltage (as the sensor output voltage is reduced) ?

I am trying to compare the sensor performance if we connected the same sensor to Arduino for which we would not require a voltage divider/level shifter.

ui2020
  • 11
  • 3

2 Answers2

1

I've had pretty good luck with these opto-coupled voltage shifters. In addition to shifting the voltage from 5V to 3.3V they provide some protection and voltage reference isolation. They also have LEDs that light when an adequate voltage is sensed. Not sure what the frequency response is. I think they also come in single or four lead versions and also with different voltages (e.g. 12, 24, etc).

Al-Zard Voltage Shifter

gorlux
  • 266
  • 1
  • 6
1

In general, any level shifter reduces the performance of a digital data line. For digital signals, it's often convenient to characterize a level shifter by the maximum frequency it can pass though.

Mechanical relays are very slow, working only at single-digit Hz frequencies. General-purpose optocouplers and MOSFET-based bidirectional level shifters are usually OK for up to 100kHz. Resistive voltage dividers are unidirectional by nature (you can only get lower voltage, not higher), and work up to a 1-2 MHz if the resistance values are sufficiently low. Specialized chips or RC voltage dividers can support frequencies of tens of MHz.

In practice, R voltage dividers work fine with standard I2C speeds and slow SPI.

Dmitry Grigoryev
  • 28,277
  • 6
  • 54
  • 147