Author Topic: Open collector differential signalling, choosing the better option  (Read 596 times)

0 Members and 1 Guest are viewing this topic.

Offline InfravioletTopic starter

  • Super Contributor
  • ***
  • Posts: 1086
  • Country: gb
I'm looking at a situation where I want to have multiple sending devices able to pass a differential signal through a long distance in a potentially noisy environment to a receiver. As there are multiple senders I want to ensure electrically that there is no possibility of over-current damage from one sender taking a line low and the other taking it high (via push-pull signalling) at the same time, so I'm going to be using some form of open collector. I have got "protocol" stuff at higher levels to deal with making sure that actual data sent by different devices doesn't clash with one-another, so this forum thread is just about the electrical level.

So, for open collector differential signalling I've got two choices. I can have, for a differential pair, both as NPN collectors operating in opposition, or I can have one as an NPN open collector and the other as a PNP open collector. As far as the comparator at the receiving end is concerned there's no real dfference, but in terms of the type of output used to do the sending, and whether each line of the pair has a pulldown to Gnd or a pullup to the positive voltage rail, there is a difference.

Which then, see the diagram attached, is the better choice for noise immunity? Or if they are equivalent in that regard, which is "better" by other measures, for example the dual NPN type would always be consuming power supply current through one or the other pullup at any given time, while the NPN+PNP one would consume twice as much current when the PNP line was driven high (and the NPN driven low) and no current when in the other logical state (PNP released to be pulled low and NPN released to be pulled high).

Which choice is "better", and if noise immunity is identical then for what reason is one of them a better option.

Thanks
 

Offline InfravioletTopic starter

  • Super Contributor
  • ***
  • Posts: 1086
  • Country: gb
Re: Open collector differential signalling, choosing the better option
« Reply #1 on: July 07, 2024, 10:36:23 pm »
Any thoughts, I can't seem to find anything when searching regarding differential signalling with open-collectors. All the results I find seem to just be about push-pull differential versus open-collector with a single wire. Thanks
 

Offline langwadt

  • Super Contributor
  • ***
  • Posts: 4540
  • Country: dk
Re: Open collector differential signalling, choosing the better option
« Reply #2 on: July 07, 2024, 10:50:38 pm »
CAN bus ...
 

Offline InfravioletTopic starter

  • Super Contributor
  • ***
  • Posts: 1086
  • Country: gb
Re: Open collector differential signalling, choosing the better option
« Reply #3 on: July 07, 2024, 11:38:41 pm »
Thanks for suggesting looking at CAN bus instead of searching for open collector and differential signalling specifically, CAN looks to use the mixed "nppn" and "pnp" method. I guess that's the "better" choice then, if CAN chooses to use it, is there a reason why for this over the all-npn-method though? Thanks
 

Offline langwadt

  • Super Contributor
  • ***
  • Posts: 4540
  • Country: dk
Re: Open collector differential signalling, choosing the better option
« Reply #4 on: July 08, 2024, 12:06:03 am »
Thanks for suggesting looking at CAN bus instead of searching for open collector and differential signalling specifically, CAN looks to use the mixed "nppn" and "pnp" method. I guess that's the "better" choice then, if CAN chooses to use it, is there a reason why for this over the all-npn-method though? Thanks

mixed one state both + and - is driven other is pull up, with all npn both states have one or the other side only pull up

the first CAN transceivers where basically RS485 transceivers using the enable pin for data and the data pin fixed low
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14474
  • Country: de
Re: Open collector differential signalling, choosing the better option
« Reply #5 on: July 08, 2024, 06:40:31 am »
The case with both NPN would have current flowing through ground, not just the differential pair. The PNP NPN combination avoids the ground current. As a downside one still needs to make sure the lines are not swapped anywhere.

Ideally a long line should be terminated and the swiching transistors would be pretty low impedance. One may want some extra current limit, possibly just a current signal, so that the termination is passive on both ends and not from the drivers.
 

Offline selcuk

  • Regular Contributor
  • *
  • Posts: 181
  • Country: tr
Re: Open collector differential signalling, choosing the better option
« Reply #6 on: July 08, 2024, 07:01:08 am »
Is this circuit for experimental or educational purposes? If it is for an actual device, I recommend you to use a CAN transceiver. They have measures for bus collision, high common voltages, ESD, fast rise times etc. A reliable solution with discrete components will need a good amount of PCB space.
 

Offline InfravioletTopic starter

  • Super Contributor
  • ***
  • Posts: 1086
  • Country: gb
Re: Open collector differential signalling, choosing the better option
« Reply #7 on: July 15, 2024, 01:19:25 pm »
Thanks, I've just had an extra thought too.

I suspect PNP together with NPN also has the advantage that the "long" transition time is in the same place for both circuits (the NPN drops fast when the device outputs low but rises more slowly due to capacitance in the line and the resistance of the pullup putting a limit on the current, the PNP rises nearly instantly but drops more slowly when it returns to being low). With NPN and PNP your slow transitions are together, whereas with dual NPN one channel would make a slow transition while the other was making a fast, and you might get logic glitches unless some very major hysteresis was applied to the receiver?
 

Offline PGPG

  • Newbie
  • Posts: 3
  • Country: pl
Re: Open collector differential signalling, choosing the better option
« Reply #8 on: July 16, 2024, 04:40:24 pm »
What is 'long distance' for you?
Do your devices are in the same room, same building or in different buildings.

If long distance means different buildings than your solution to not work only until first storm certainly needs galvanic isolation (assume few kV difference with high current efficiency between building grounds).

It looks that you are fixed on making it from discrete elements. The simplest solution ensuring isolation is the current loop.
You can do the loop with its wires being not isolated from receiver but isolated from all senders. In receiver you do current source from + supply and send it into loop. Returning current can go through small resistor to ground and voltage at resistor can be used to determine if current in loop flows or not.
The current in loop can go through output transistors of optocouplers in all senders. Each of them can transmit data by interrupting current in loop.

For connection of up to 50 devices in one building I use not isolated RS485, but with seriously protected inputs (you should assume up to 50V ground difference).
In past for connections between buildings and up to 1km I was using isolated RS485.
In 90s for connections up to 1.2km I was using 20mA current loops.

RS485 drivers are protected against damage when more then one is driving the bus and by standard tolerate up to 7V ground voltage difference between elements on the bus.
« Last Edit: July 16, 2024, 04:55:42 pm by PGPG »
 

Offline langwadt

  • Super Contributor
  • ***
  • Posts: 4540
  • Country: dk
Re: Open collector differential signalling, choosing the better option
« Reply #9 on: July 16, 2024, 09:06:17 pm »
make the receiver a current source driving a resistor connected to +/-, make each transmitter short +/- using an optocoupler?
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 7856
  • Country: ca
Re: Open collector differential signalling, choosing the better option
« Reply #10 on: July 16, 2024, 11:53:03 pm »
In the past, to do this, I just used a 5v PIC microcontroller's  comparator's +/- inputs.

To receive, I read the PIC's internal comparator.
To transmit, I output enable the pins high or low, or make them inputs to acquire tri-state mode.

I managed 19.2kb throughout hundreds of feet of wire with 20 modules on the bus, each with their own PICs as receivers and transmitters, each one sharing the home made RS485 bus.

I just added a few series resistors with protection diodes for static charge, with a weak pull-up & down to default the bus into a null state when there were no active transmitters + a parallel cap for noise.

The PIC's 5v IOs could sink and source 25ma which was plenty.  The comparator's differential receiver took care of common mode noise in the wiring.  The PIC did all the negotiations through a software UART on the home made 485 bus while the hardware UART was used to link with a PC to talk on the bus.

« Last Edit: Yesterday at 12:25:59 am by BrianHG »
 

Offline dukelec

  • Contributor
  • Posts: 17
  • Country: cn
    • Duke Blog
Re: Open collector differential signalling, choosing the better option
« Reply #11 on: Yesterday at 03:35:50 am »
Compared to CAN, I recommend RS485.
Using RS485 allows you to use open-drain drive during the arbitration phase and push-pull drive during the data phase, balancing both arbitration functionality and data rate:

https://www.eevblog.com/forum/microcontrollers/the-small-open-source-ic-allows-us-to-use-rs485-as-full-duplex/
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf