-1
\$\begingroup\$

I'm primarily a SW developer who dabbles with electronics. I needs to interface my SoC's HW full-duplex UART with an SDI-12 compliant sensor, without burning either of them and hopefully without wasting too much power. The following constraints are given:

  • Full-duplex side operates on 3.3V, normal polarity (i.e. logic LOW is 0V and logic HIGH is 3.3V), has separate TX (output) and RX (input) pins.
  • Half-duplex side operates anywhere between 3.5V-5.5V, inverted polarity, has a single TX/RX pin
  • There vast majority of the time the line will be silent (i.e. the wire connecting to sensors TX/RX pin will be at 0V
  • The wire leading to a sensors TX/RX pin might be long (just in case any funkiness of high parasitic inductance or something should change my design).

The circuit I drafted quickly:

schematic

simulate this circuit – Schematic created using CircuitLab

In particular I'm curious if you had any comments about the choice of particular components and their values.

\$\endgroup\$
  • \$\begingroup\$ @ElliotAlderson I'm aware of general logic level shifting with a MOSFET but in my question I'm most concerned about safety of such method and not wasting power, seeing that it involves a half-duplex serial so it might end up in situations where both sides try to drive it. \$\endgroup\$ – KubaFYI Apr 29 at 9:13
0
\$\begingroup\$

That kind of level shifter is intended for open-collector/open-drain circuits only, in which the devices on either side can only actively pull the signal low, and rely on a passive pullup to pull it high.

Your circuit will work only if the inverter connected to "µC Tx", as well as the sensor itself, have open-collector/open-drain outputs.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ So what happens when the inverter after µC Tx open-drains straight to ground while right side is driven high? Wouldn't that create a path of too little resistance from 5V sensor side TX -> M1 -> open-drain of the inverter -> ground? \$\endgroup\$ – KubaFYI Apr 29 at 11:39
  • \$\begingroup\$ That's why I said that they both have to be open-drain devices. If the sensor is not open-drain, there's no easy way to "fake it". You'll need a much more sophisticated interface adapter. \$\endgroup\$ – Dave Tweed Apr 29 at 12:51

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