3
\$\begingroup\$

I'm looking for a circuit/IC to shift logic levels between 1.8/3.3/5V and 3.3V.

This is to connect various devices via UART to the ESP8266. As such, I only need unidirectional translation - the ESP8266 TXD operates at 3.3V and should be shifted to 1.8/3.3/5V according to a reference voltage. Likewise, the data coming into the ESP8266 RXD port will have to be shifted from 1.8/3.3/5V to 3.3V. The device will likely operate at 115200 baud, but it would be nice if the translation worked up to 128000 baud. Most translation ICs I've found have the condition that VCCA<=VCCB, which doesn't work for my use case, as the shifter should work both in "step-up" and "step-down" mode, depending on the reference voltage. Could this problem be solved by using 2 BJT inverters like in the image? Would 2N2222 transistors work? I'm also open to the idea of using a dedicated IC, as various sources have led me to believe it could be a more power efficient and reliable solution. The only problem is finding a suitable IC. Would a SN74LVC1T45 work?

BJT inverter

\$\endgroup\$
8
  • \$\begingroup\$ "I'm looking for a circuit/IC to shift logic levels between 1.8/3.3/5V and 3.3V.".What do you mean? \$\endgroup\$
    – Jun Seo-He
    Apr 23, 2022 at 15:45
  • \$\begingroup\$ @JunSeo-He Perhaps it could be worded better, but I think I explained what I mean rather explicitly in the rest of my question. Did you read it? \$\endgroup\$
    – ettom
    Apr 23, 2022 at 15:53
  • 1
    \$\begingroup\$ how will you select the operating voltage? \$\endgroup\$
    – jsotola
    Apr 23, 2022 at 16:04
  • \$\begingroup\$ @jsotola By using a 2x4 header/jumper combination with the following arrangement: i.imgur.com/gdD3mTi.png \$\endgroup\$
    – ettom
    Apr 23, 2022 at 16:08
  • \$\begingroup\$ You could look at various digital isolators. Beside isolation they usually also change logic levels and they are plenty fast. For example max22246. \$\endgroup\$
    – Rokta
    Apr 23, 2022 at 16:35

4 Answers 4

4
\$\begingroup\$

I don't see why you wouldn't use a single part designed for the task such as 74LVC1T45. (I would avoid using parts without a DIR input- the so-called automatic type).

The switching characteristics are specifically guaranteed for your requirements (pages 6 and 7 on the linked Diodes Inc datasheet) and are impressively high performance. Below is assuming Vcc(A) is the ESP8266 power supply, but the reverse is also guaranteed in all relevant cases.

enter image description here

The only downside I see is that the SC-70 packaged parts are not easy to source at the moment, but various other packages are easily sourced.

\$\endgroup\$
1
\$\begingroup\$

You could do it with a two-channel comparator. Note, don't simulate with a 115 kHz square wave. Use half that frequency to get 115kbaud. A comparator in Schmitt trigger configuration with a small first-order filter will give you some noise immunity. This demonstrates one of your two directions, with transitions at 20% and 80%:

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
1
\$\begingroup\$

Translation to lower voltages can be done passively:

schematic

simulate this circuit – Schematic created using CircuitLab

The resistor bypass capacitors help keep the edges sharp when facing capacitive loading. They are optional and can be removed if not necessary.

Translation to higher voltages requires active circuitry.

\$\endgroup\$
0
0
\$\begingroup\$

Texas Instruments TXB0108PWR 1.2 V to 3.6 V on A Port and 1.65 V to 5.5 V on configurable power-supply rails. The A port is B Port (VCCA ≤ VCCB)

\$\endgroup\$
1
  • 2
    \$\begingroup\$ Chin Yi Liaw - Hi, Thanks for trying to help. However IMHO the TXB0108PWR is not suitable for the OP's use case. As explained in the question, VCCA (or VCCB) can be 1.8 V or 3.3 V or 5 V, and the other VCC will be 3.3 V. Therefore a device which has a restriction of VCCA ≤ VCCB is not suitable. However in the datasheet, the TXB0108PWR has exactly that restriction. Can you please edit your answer to explain how that device will work with the range of voltages explained in the question, and still meet its "VCCA ≤ VCCB" restriction? Thanks. \$\endgroup\$
    – SamGibson
    Mar 14 at 3:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.