Logic Level Shifters? - Page 1
Forum section: electronics / beginners

author: theatrical scene
author_rank: Contributor
timestamp: January 22, 2019, 12:05:03 am
content: I'm working on a project which uses 3.3V from a Raspberry pi with 5V peripherals. I only need to send/receive data in one way (so the logic level shifter wouldn't have to be bidirectional). I'm choosing between these two parts:http://www.ti.com/lit/ds/symlink/cd4050b.pdfandhttp://www.ti.com/lit/ds/symlink/txb0108.pdf.Is the latter component overkill for simple digital IO conversion? I assume a standard buffer like the first component would be able to shift up signals if I supplied 5V to VCC with a 3.3V input signal but the data sheet has no mention of this and rather highlights the 4050B's use as a 'high to low' shifter as opposed to low to high. Is my assumption valid or am I missing something?Cheers

author: oPossum
author_rank: Super Contributor
timestamp: January 22, 2019, 12:28:22 am
content: CD4050 is only for 5V to 3.3V (74AHC series can also be used). For the other direction 74HCT series parts can be used, such as 74HCT244 and 74HCT125.

author: theatrical scene
author_rank: Contributor
timestamp: January 22, 2019, 01:59:56 am
content: Low bandwidth (around 20KHz), delay budget not too critical, no restrictive cost requirements (within reason), bus width of 6-8.

author: Mr.B
author_rank: Unknown
timestamp: January 22, 2019, 02:04:44 am
content: When I am level shifting I2C (bus width = 2) I simply use a couple of cheap FETs and a few resistors.Dead simple.Google *FET level shifter*

author: theatrical scene
author_rank: Contributor
timestamp: January 22, 2019, 02:06:23 am
content: Quote from: oPossum on January 22, 2019, 12:28:22 amThanks for that, will have a look. The RPi has uses both inputs and outputs which means I would need to get both the 74HCT and 74AHC parts right (for low-high level shifting and high-low)? Would it make it easier to just use a single bidirectional converter like the TXB0108 even though my signals are unidirectional (i.e. either outputs or inputs)?

author: oPossum
author_rank: Super Contributor
timestamp: January 22, 2019, 02:10:26 am
content: 74LVC1T45 if you don't mind tiny SMD parts. That can go either direction.I have not used the autosense level shifters, but have read that they can be twitchy.

author: oPossum
author_rank: Super Contributor
timestamp: January 22, 2019, 02:17:18 am
content: Quote from: theatrical scene on January 22, 2019, 02:06:23 amYes. Forgot to mention the 74xxx541. That has a pinout that can be easier to work with than the 74xxx244.

author: beanflying
author_rank: Super Contributor
timestamp: January 22, 2019, 02:19:29 am
content: Have a read of this recent topic toohttps://www.eevblog.com/forum/beginners/best-way-to-drive-a-5v-ttl-line-with-a-3v3-gpio/msg2046028/#msg2046028

author: theatrical scene
author_rank: Contributor
timestamp: January 22, 2019, 02:22:58 am
content: Quote from: oPossum on January 22, 2019, 02:17:18 amThanks, is there a version of this (or similar part) with 6-8 buffers built into a single package?

author: mvs
author_rank: Frequent Contributor
timestamp: January 22, 2019, 08:53:13 am
content: Quote from: theatrical scene on January 22, 2019, 01:59:56 amIn this case i would not work with GPIOs of raspberry pi directly. Have a look on SPI shift registers, 74hct595 for outputs and 74hct165 + one resistor divider for inputs. You can connect them in a chain to use only one SPI port.I2C GPIO expanders (PCF8574) may also do the job if you level shift I2C bus.

author: Zero999
author_rank: Super Contributor
timestamp: January 22, 2019, 09:39:06 am
content: Quote from: theatrical scene on January 22, 2019, 02:22:58 amReplace the xxx in those part numbers with HCT, for low to high and AHC for high to low. The 74xxx14 is a good hex inverting buffer and has Schmitt trigger inputs.

author: FrankBuss
author_rank: Unknown
timestamp: January 22, 2019, 09:51:49 am
content: Quote from: theatrical scene on January 22, 2019, 02:22:58 am74LVC8T245 has 8 buffers, and one pin to decide the direction control, which you can just tie to VCC(A) or GND for a fixed direction.

author: Zero999
author_rank: Super Contributor
timestamp: January 22, 2019, 02:10:58 pm
content: There's also the CD40109B, which is slow but can come in handy, especially for higher voltages.http://www.ti.com/lit/ds/symlink/cd40109b-q1.pdf

author: theatrical scene
author_rank: Contributor
timestamp: January 22, 2019, 10:46:38 pm
content: Quote from: FrankBuss on January 22, 2019, 09:51:49 amThat looks very cool! I like the ability to control the DIR pin. Out of interest, is there a reason why I might usehttp://www.ti.com/lit/ds/symlink/txb0108.pdfover a 74LVC8T245 or is the TXB more useful in a bidirectional application?

author: Doctorandus_P
author_rank: Super Contributor
timestamp: January 23, 2019, 12:29:03 am
content: Those TXB0108 are sort of overkill, but you can use them all the same.Ali / Ebay / China sells breakout boards with them, and the price and size of these breakout boards is about the same as a postage stamp.Often you can also use the good old 74LSxxxx logic as level converters. Those old transistor outputs can not deliver much current if the output gets above 3V3

author: FrankBuss
author_rank: Unknown
timestamp: January 23, 2019, 10:57:48 am
content: Quote from: theatrical scene on January 22, 2019, 10:46:38 pmIf you know the direction, it is always better to use a chip where you can set it. Look here for details:https://www.eetimes.com/document.asp?doc_id=1231111QuoteDepends on your application, if this works for you.