Proper usage of the level shifter. (Current limit of the level shifter IC)

Hi world.

Purpose

I've recently had a problem using a level shifter to drive 5V device using 3.3V Arduino nano iot 33 (nano33).
I'm writing this to share my mistakes and hopefully get some advice on the proper usage of the level shifter.

Story

The main goal of my circuit is to send low-speed (less than 1Hz) digital HIGH/LOW signal from 3.3V nano33 device to multiple devices which receives 5V logic signal. The problem is, I do not know how much receiver devices will draw current from my circuit. Without thinking about that at the time, I built a circuit looks like this.


Pin 2 ~5 is directly connected to the nano33's digital IO and receiver devices' digital input port is directly connected to the Pin10 ~13. I should mention that nano33 and all the receiver devices share the same GND.
The datasheet of the part is attached to below.
txs0104e.pdf (1.3 MB)

The first problem that I've encountered from this project is cause by my ignorance on the maximum current output from the nano33's digital output port. I've never thought that the maximum current (7~8mA) that the digital port can output is a way smaller than the optocoupler's input current (20mA). I solve this problem using a small NPN transistor to drive 20mA LED.

Main Problem

**The next problem was related to the level shifter. 5V devices connected to the circuit above could not receive digital HIGH signal from the level shifter. **After encountering my first problem, I was able to quickly find that this is the current problem.

When I tested with a 500Ohm resistor, voltage applied to the resistor was 1.776V and the current was 3mA.

Backgrounds

As several senior members in this thread([Current and Voltage Level Shifters]) mentioned about the improper usage of the level shifter, I understood that at least I should not use the level shifter where sending digital HIGH requires more than 3mA.

Questions

Followings are my questions.

  1. I've found the information about the nano33's maximum current output is 7~8mA in the datasheet. But I could not find a similar info from the datasheet of the level shifter I used. Is there somekind of consensus about the level shifter's current output? For example "only use level shifter were current draw is much less than 1mA" One of the mention in the thread says " this one is only for interfacing bidirectional I2C lines."( Paul_B) I want to know whether level shifters are only for very specific usages.

  2. I would have never used the level shifter if I was trying to power an LED. I chose this because the receiver device just handles the logic inputs. In this case, where you have no idea how much current the receiver device will draw, but you know that it uses 5V, what is the best way to send 5V digital signal from 3.3V nano33?

Any advices or idea is always welcome. :smiley:

In nowadays MOS technology all digital inputs are assumed to draw almost no current.

The selected level shifter has open-drain outputs and only 10k pullups. Driving LEDs or optocouplers may work with active LOW output only.

2 Likes

Your level shifter is bidirectional, which can complicate its use. Do you really need a bidirectional shifter? If not, then a simple output buffer would provide additional current if needed. Edit: see 74VHCT125 or 74VHCT126.

A more basic question is whether you need a shifter at all. If you are driving a 5V GPIO input device from a 3.3V GPIO output, I think it's likely that 3.3V would be interpreted as "high" by the 5V device. The Adafruit SD card module makes this assumption on the MISO line, and it works quite well.

Perhaps you could give us more information about the 5V devices.

1 Like

FYI:
Sparkfun's BSS138-based is a bit pricy at $3.50 for 4-ports, but has impressive specs:
SparkFun Logic Level Converter - Bi-Directional - BOB-12009 - SparkFun Electronics

Above is not a recommendation for purchase and similar devices can be located for less cost.

1 Like

A very simple solution is to use a TTL gate such as

or better

1 Like

all digital inputs are assumed to draw almost no current.

I thought that too! Thats why I thought level shifter will do the job properly with digital IO function.
After digging the receiver device, I found that the digital input that it is receiving is tied to the optocoupler. I guess thats why the circuit did not work.
Thank you for the reply!

Do you really need a bidirectional shifter? If not, then a simple output buffer

No I don't need the bidrectional function.

Edit: see 74VHCT125 or 74VHCT126.

I guess this will work on my project! I never heard of the output buffer device, I better check it out.

A more basic question is whether you need a shifter at all.

Actually, I've tried this with my two receiver devices, but none of them actually received digital HIGH using 3.3V. The manual of the input devices does not says about what kind of input method it uses, only the voltage it receives; 5V - 12V.

I'll try the two parts you mentioned. Thank you for the reply.

The drain current of 200mA is a really wonderful option for me. I've checked this board, but I'm trying to mount the parts on the small pcb board, so this was not an option for me.
Thanks anyway!

I think this parts will work with my project too.
Thank you!

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.