I need to interface few Arduino GPIOs to a 12 V device.

The direction of GPIOs is not fixed and can be programmed using a different set of control pins, so I need a bi-directional level shifter.

Is it okay to use this bi-directional level shifter which is meant for conversion between 3.3 V and 5 V?

I couldn't find any bi-directional level shifter for 5 V and 12 V. Looking for any info/other ideas too.

  • \$\begingroup\$ Are both sides always configured as open drain/open collector if they are configured as outputs? \$\endgroup\$ Feb 3 at 0:03
  • \$\begingroup\$ @SpehroPefhany as of now, 12V device outputs 0V or 12V full voltage, not open drain/ collector... but if I get an open drain device version, you suggest I simply connect the drain to 5V ? \$\endgroup\$
    – across
    Feb 3 at 0:10
  • 2
    \$\begingroup\$ I know this exact product. The 3.3/5V in the description is just one example scenario where you might us it. If you click through to the transistor datasheet, the transistor is rated for up to 50V. \$\endgroup\$
    – user253751
    Feb 3 at 0:53

2 Answers 2


There are 9 possibilities with 2 tristate ports.


simulate this circuit – Schematic created using CircuitLab

As one might expect, the problems happen when one port is actively driven high and the other is driven low. Those conditions cannot occur with open-drain drive on each side.

The transistor is adequately rated for +5/+12 (gate is good for +/-20 and it sees only 5V and drain is good for 50V or more and it sees only 12V).


If you're using a dedicated level translator IC, you'll need to check datasheet to confirm that each side voltage is in safe operation range.

Your link is just simple MOSFET based circuit. You can use it for 12V. But be careful. By the nature of the circuit, each side are pulled-up by default. If your application has some relays that needs to be turned off at power start up, your relays may turned on shortly until your software boots and outputs LOW to the level shifter.

Here's an example project named High-Voltage Encoder, where I used it to translate 3.3V logic to VPP (9~36V). Note that this translation works bi-directional way.

Here's a great article from Phillips about how it works. Below is the screenshort of the High-Voltage Encoder schematics.

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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