-1

I understand the principle of operation of a simple MOSFET logic level shifter like the one described in this question. However, the answer to that question only states what happens when we apply logic levels to one of the sides leaving the other floating. I'm about to need a logic level converter for a bi-directional data line, so I'm interested in what we would expect to happen if both sides accidentally try to drive the circuit (e.g. by either side malfunctioning).

And then, how can the circuit be enhanced to ensure that we don't try to sink/source more than we can on either side? What about a situation where either or both sides aren't open drains but rather have internal pull-ups?

KubaFYI
  • 190
  • 1
  • 12
  • 2
    Does this answer your question? [Would this circuit interface be a safe interface between full duplex and half-duplex UARTs of different logic levels?](https://electronics.stackexchange.com/questions/496320/would-this-circuit-interface-be-a-safe-interface-between-full-duplex-and-half-du) – Dave Tweed Apr 29 '20 at 11:19
  • If you have additional information related to your original question, use the "edit" button to add the information there. Do not create a duplicate question. – Dave Tweed Apr 29 '20 at 11:20
  • It wasn't additional information. I thought I'd ask a more general question instead of the more specific one asked earlier. – KubaFYI Apr 29 '20 at 21:35

2 Answers2

0

Driving the single MOSFET level converter is done with driving circuits described as "open collector" or "open drain". This type of driver can only sink current. The only source of current in the translator circuit are the two pullup resistors.

So as long as either driver can sink the current sourced by both pullup resistors the is no concern regarding overload. And in this instance it is fully safe if both drivers want to turn on and sink current at the same time. No harm done.

Be aware that this type of level converter is often used in an I2C interface. In these the SDA line is always bi-directional so there you have another confirmation that you can use the circuit in a bi-directional manner as long as all the drivers are current sinking only type drivers.

Michael Karas
  • 56,889
  • 3
  • 70
  • 138
  • And what happens of either/both of the sides are not open drain? What it they are internal pull-ups? – KubaFYI Apr 29 '20 at 11:26
  • If just internal pullups in the drivers on each side they simply parallel with the external resistors and contribute a bit more sourcing current. Do not use active push-pull drivers with that type of translator circuit. If one side wants to pull down and the other side with a push-pull driver tries to drive high you can get bus line contention with the current limited only by the design of the high side of the driver. – Michael Karas Apr 29 '20 at 11:36
  • That's what I'm trying to protect against. Unfortunately I don't get to choose what connects on the right side other than it's an SDI-12 device - and that protocol doesn't seem to specify what kind of drive exists on that device side (or I somehow missed it). – KubaFYI Apr 29 '20 at 11:42
  • 1
    @KubaFYI - If you do not get a choice then it is your job as a circuit designer to both find out what types of drivers the sensors use and to design a circuit that will work for the range of sensors that can be attached. Do not guess and hope for the best. – Michael Karas Apr 29 '20 at 11:47
  • The reason I asked this question is to see if there is a way to over-spec the circuit to cater to both types of drivers. I'm not a circuit designer and I won't be responsible for the final electronic design, this is meant as a stop gap solution for me to SW-dev with a sensor which doesn't provide this kind of information neither from its datasheet nor from its sales team. – KubaFYI Apr 29 '20 at 11:50
  • 1
    @KubaFYI - Then you should be asking your circuit designer for support instead of here. This site is hopefully orientated toward helping people that take responsibility for what they are working on instead of handwaving it away. – Michael Karas Apr 29 '20 at 11:55
  • not everyone in every organisation has the access to a circuit designer – KubaFYI Apr 29 '20 at 12:39
  • I'd say that this website is orientated towards trying to answer technical questions rather than make unsolicited judgements on work ethics of others. – KubaFYI Apr 29 '20 at 12:40
0

Nothing much.

  • (1) both low: nothing. Low voltage.
  • (2) both high: also nothing. Each side will see its max reference voltage.
  • (3) different levels: some voltage between high and low, depending on the relative strengths of the drivers.

The case (3) is not good, but not terrible either. There's a fair amount of continuous current through the level shifter, but it will be biased fully 'on' so internal dissipation should not be a problem for the level shifter FET.

In general, any protocol that has multiple drivers imposes a burden on the implementer to ensure that the drivers don't clash, or if they do, in a way that doesn't cause harm. I2C for example uses open-drain drivers, so the worst that can happen is that if masters can clash, the master driving the '0' where the other is (not) driving '1' wins.

hacktastical
  • 49,832
  • 2
  • 47
  • 138