I am wondering how to interface with this bus switch from a ESP32. I need to drive OE1 and OE2 LOW at 5v , see datasheet

I know that I can only drive up to 3.3v from the ESP32 directly, so is there something I need in the middle here?

Also - Is it possible to drive both OE1 and OE2 pins low from one GPIO on the ESP32? It would be great to get a schematic for any suggested solutions.

  • \$\begingroup\$ Use an NPN transistor to drive the pins low (and a resistor to pull them up when the transistor is not conducting). If you always want to drive those pins together (always both 1 or always both 0), you may connect them and use a single transitor+resistor. \$\endgroup\$ Mar 13, 2018 at 12:30
  • \$\begingroup\$ Las can you jot down a quick schematic for your answer \$\endgroup\$ Mar 13, 2018 at 12:31
  • \$\begingroup\$ Sorry, farnell says your link is dead. \$\endgroup\$ Mar 13, 2018 at 12:33
  • \$\begingroup\$ Apologies Marcus, fixed now :) \$\endgroup\$ Mar 13, 2018 at 12:42

2 Answers 2


This way you can connect a 3.3V-powered ESP32 to drive a 5V-powered input. Note that this circuit is an inverting one, you have to output 1 from the microcontroller to drive the OE pin LOW, and the OE pin will be pulled up to 5V when you output 0.


simulate this circuit – Schematic created using CircuitLab

  • \$\begingroup\$ Ok, so could there be OE1, and OE2 connected between R2 and the collector? \$\endgroup\$ Mar 13, 2018 at 12:44
  • \$\begingroup\$ Yes, if you don't need to drive them independently, you can connect both of them there. If you need independence, you have to duplicate this circuit for each of them (and of course you need two pins to control them). \$\endgroup\$ Mar 13, 2018 at 12:58
  • \$\begingroup\$ Where did you get the 10kOhm resistor value from? I don't see in the datasheet what the OE1 / OE2 current rating of the signal should be \$\endgroup\$ Mar 13, 2018 at 19:41
  • \$\begingroup\$ That comes from choosing 0.5mA as the current to be wasted (it's arbitrary to a certain extent). 5V / 0.5mA = 10k \$\endgroup\$ Mar 13, 2018 at 20:16
  • \$\begingroup\$ Ok, so its not that we need to drive OE of the bus at a particular current, 0.5ma....? \$\endgroup\$ Mar 14, 2018 at 0:15

This is a common need and IC's have been developed to make it simple. Take a look at a single gate level translator like the TI SN74LV1T34DBV.

If you power the SN74LV1T34DBV with 5V then a 2.02V or greater signal level is considered a logic '1'.

The ESP32 should be able to drive a logic '1' to a minimum of 2.64V if powered by 3.3V

You may need to pick a different translator device if your build process cannot deal with the SOT23-5 or SC70-5 packages. Google on "single gate level translator" and you should find a few from which to choose.

  • \$\begingroup\$ Why would I use something like this against the simple transistor effort below? \$\endgroup\$ Mar 13, 2018 at 15:12
  • 2
    \$\begingroup\$ There are several reasons to use an IC instead of the discrete solution. Some of them are: Reliability, PCB space, power, speed, and cost. Fewer soldered connections mean fewer chances for a bad solder joint. Less PCB space is usually a goal on my boards since smaller boards cost less. Using a CMOS solution instead of a BJT and pull-up will use less power. The CMOS will be quicker than the pull-up. The BJT cost is a little less compared to the IC I mentioned although there may be a cheaper IC. In the end the board designer needs to weigh the options and decide which are more important. \$\endgroup\$ Mar 16, 2018 at 14:07

Your Answer

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

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