Community Forum Share your projects and post your questions

Register or Sign In

RS485 differential pair seems not so differential?

61 Views - Created 27 days ago

27 days ago

Posted by:
xlp512

Users Avatar

I'm trying to get the RS485-Pi to output a signal that would be compatible with DMX. The UART part is fine, you can see on the picture below Signal 1 (yellow), which is UART out. Then you can see 2 (blue) and 3 (pink), which are the A & B output from RS485. Finally you can see M (red), which is the differential between 2 & 3 (or A & B). And as you can see, the voltage "direction" never changes, it's always negative or 0 (if I would do the math the opposite way, it would be between 0 and X, always positive).

(You cannot see the "2" marker because it's under "3")

 

Post imageNow let's look at a sample from a commercial DMX USB interface hooked to a Windows running PC:

 

Post imageThis time, 2 & 3 are clearly opposed, and more importantly, when you look at M, you can see the signal varies between negative and positive.

How do I get such a result with the RS485 board?

27 days ago

Posted by:
andrew

Users Avatar

Location:
United Kingdom

Users Twitter  Users Website  

Hello

With the RS-485 protocol the voltage is measured as the difference between the two wires A and B. 

If A - B is less than -200mV then that is registered as binary 1.  If A - B is more than +200mV then that is registered as binary 0.

The receiver only measures the voltage between the two wires so where they are relative to ground is not important.  The specification for RS-485 and EIA-485 allows the voltage to be anywhere between -7V and +12V.  The only important part is the difference betwen the two wires is more than 400mV.

As DMX uses the EIA-485 standard for its physical layer it should be compatible with the RS485 Pi.  If the signal output on your commercial DMX USB interface is reversed compared to the RS485 Pi then you should be able to replicate this by swapping the A and B wires around.

AB Electronics UK Tech Support

27 days ago

Posted by:
xlp512

Users Avatar

Thank you for your very quick answer! My issue here I guess is that the difference between the 2 wires goes (depending on which you substract to which) between 0 and 2V or -2V and 2V.

In the 2nd screenshot, the difference signal (red) goes approx from -3V to +3V, which complies with what you described (more than +200mV, less than -200mV).

In the first one (output of RS485Pi), the difference never goes above 0V (or never below 0V it plugged in opposite direction), meaning either the <-200mV or the >200mV threshold won't be reached.

Wouldn't that be a problem?

27 days ago

Posted by:
xlp512

Users Avatar

Forgot to mention: channel 2 & 3 don't have the ground connected, I read that was the way to measure a differential pair

27 days ago

Posted by:
andrew

Users Avatar

Location:
United Kingdom

Users Twitter  Users Website  

It shouldn't be a problem.

The +200mV and -200mV are relative to the center point between the two voltages, rather than relative to ground. 

In the case of the RS485 Pi the center point would be 2.13V so to comply with the RS-485 standard the voltage needs to drop to less than 1.93V and rise to more than 2.33V.  As the voltage shifts beween 941mV and 3.07V or -1.06V to +1.06V it should be compatible with any RS-485 device.

AB Electronics UK Tech Support

Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view, download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.