GPIO Digital input voltage more than 3.3V

Hi all,

I am newbie to BBB. I am planning to interface a speed sensor to BBB which produces output pulses.

These pulses have,

HIGH level voltage = 4.2 V and LOW level voltage = 0.52 V

Can I interface it directly to BBB ? or should I put a resistor divider ?

Is there any better way out ?

Thank you,
Onkar

Hi you must use a level translator before interfacing it to BBB

The Texas Instruments TBX0101 IC should do the trick. The BBB connects to port A and the speed sensor to Port B. Use the BBBs 3.3V supply to connect to VccA. Depending on the speed sensor supply I’d regulate that down to +5V to connect to the VccB pin (can only take up to 5.5V max).
Farnell do the IC part number 2335605. There’s a good data sheet to accompany it as well.

Cheers

Dave

Alternatively you can buy the TXB0104 as a breakout board here… the only difference being that the TXB0104 has 4 channels and the TXB0101 has a single channel:

https://www.adafruit.com/product/1875

https://www.sparkfun.com/search/results?term=txb

If you are using i2c or SPI over these ports then opt for a different logic level shifter. The TXB0104 does not work well for communications. For instance:

https://www.adafruit.com/products/757

If your sensor pulses don’t occur at a very fast rate – under a few MHz – the resistor divider should work fine. If they occur at a faster rate, I’d go with one of the other solutions suggested here.

If your data rate is very high, level shifter TXB0104 or TXB0108 may not be a good option since the level transition is not very smooth. For faster data rates use open collector buffer(7407 ic) circuit give at http://elinux.org/RPi_GPIO_Interface_Circuits

If your data rate is very high, level shifter TXB0104 or TXB0108 may not be
a good option since the level transition is not very smooth. For faster
data rates use open collector buffer(7407 ic) circuit give at
http://elinux.org/RPi_GPIO_Interface_Circuits

If the level transition is not very good, (noisy or irregular
perhaps), then using an input with hysteresis is a good idea.

An open collector buffer has a rise time at the output determined by
the pullup resistance and the capacitance at that pin (from anything).
It is generally very slow since there is no low impedance (say 20 ohms
of an active transistor) pulling it up.

You can get either a 74 series level translator as a DIP package, or
you can get surface mount. if you want surface mount and need only
one line, then try the 1G series logic.

The chips have two VCC supplies, one can be used for 5 volts, one can
be used for 3.3.

These chips are bidirectional, so will translate from one level to the
other depending on the state of the direction line. They are designed
to work in less than optimum conditions.

Harvey