Mux and level shifter in one part?

Thread Starter

eee2

Joined Aug 18, 2023
4
Hello everyone!

Pardon if this is a relatively simple problem. I have 2 UART sources (RFID reader modules) that run on 5V. Consuming this data (asynchronously) is a Raspberry Pi with a data bus that runs at 3v3. As such, I (ideally) need some type of selector/mux that can also work as a level shifter. Intuitively this seems like that something that would exist and googling seems to confirm that, but I keep hitting a wall with which part specifically to get and how to configure the circuit. I ran into this page on the EE Stack Exchange with a similar problem to solve which seems pretty straight forward, but they recommend a demux which makes me feel like I'm missing something. Here is a simple block diagram of what I'm describing:1692388079839.png
Any part recommendations or maybe a good source I can review to learn more about this?

P.S.: My understanding is that at this speed (9600 baud) a simple voltage divider might actually do the trick, but I need something more robust that I might also be able to scale.

Thanks in advance!
 

sghioto

Joined Dec 31, 2017
5,135
P.S.: My understanding is that at this speed (9600 baud) a simple voltage divider might actually do the trick, but I need something more robust that I might also be able to scale.
If the data is unidirectional a resistor divider should be fine.
A CD4066 analog switch will work for the channel select.
 

dl324

Joined Mar 30, 2015
16,185
Intuitively this seems like that something that would exist and googling seems to confirm that, but I keep hitting a wall with which part specifically to get and how to configure the circuit.
What you makes you think a part like that would be commercially available? I'm not aware of any, but it's been many decades since I read manufacturer databooks like novels. Plus no one seems to make databooks these days and I'd be less inclined to read a PDF like a book.

What frequency are the signals? If they're slow enough, you could use 2 MOSFETs and 4 resistors as level shifters for a "slow", general 2-way solution. For one way, you might be able to get away with a couple resistors and a Schottky diode. Pull-up on the 5V side and a clamp on the 3.3V side.
 

Thread Starter

eee2

Joined Aug 18, 2023
4

Ian0

Joined Aug 7, 2020
8,966
This device seem to be exactly what I'm looking for. However, since I'll have to hand solder the prototype, it's too small! Any advice?
Get some Magnifying goggles. Then tin the board, place the IC on the board and hold in place with tweezers. Use a soldering iron with a 2.4mm or 3.2mm “screwdriver” tip. Press gently down on the pins to solder them.
 

AnalogKid

Joined Aug 1, 2013
10,796
I (ideally) need some type of selector/mux that can also work as a level shifter.
Are you sure? I thought rPi I/O pins were 5 V compliant for inputs. You don't need a shifter going out to the UARTs, because a 3.3 V signal is well above a 5 V part's minimum high-state voltage requirement (usually 2.4 V).

ak
 

Thread Starter

eee2

Joined Aug 18, 2023
4
Are you sure? I thought rPi I/O pins were 5 V compliant for inputs. You don't need a shifter going out to the UARTs, because a 3.3 V signal is well above a 5 V part's minimum high-state voltage requirement (usually 2.4 V).

ak
Yes, from what I know all GPIO pins (including UARTs, at least for the Pi Zero Rev 1.1 which is what we have) are 3v3 and not 5v compliant. While you're probably right about 3v3 meeting the threshold for the 5v part, the signal is unidirectional from the 5v part to the Pi, thus the signal will be 5v and needs to be stepped down to avoid damaging the Pi.
 

AnalogKid

Joined Aug 1, 2013
10,796
If it's one-way only, I think a resistor and 3.3 V zener diode will work better than 2 resistors. Better signal integrity if the 5 V input sags down to 3.5 V due to whatever.

ak
 

ScottWang

Joined Aug 23, 2012
7,389
I like this device, but after a quick look at the datasheet it isn't clear how it would manage the 5V input signal while stepping the output down to 3.3V. I wasn't able to extract this info from your example circuit, but maybe I'm just missing it. Can you point me to any examples of it being used this way?
Please draw the input signal and output device from left to right next time.

You can use the voltage divider from 5V reduce to 3V or read this -- How to Level Shift 5V to 3.3V.
 
Top