RS-485 Polarity: Difference between revisions

From BACnet Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(37 intermediate revisions by the same user not shown)
Line 1: Line 1:
RS-485 comprises two signals, one that 'tracks' the UART logic levels (high voltage == 1, low voltage == 0). The other signal does the opposite. The meaning of these two signals has been polluted by chip and box vendors, which leads to a lot of confusion. A lot of further confusion arises when one considers the UART logic levels vs signal levels and labels. This article attempts to resolve the status without adding to the confusion
RS-485 comprises two signals, one that 'tracks' the UART logic levels (high voltage == 1, low voltage == 0). The other signal does the opposite. The meaning of these two signals has been polluted by chip and box vendors, which leads to a lot of confusion. A lot of further confusion arises when one considers the UART logic levels vs signal levels and labels. This article attempts to resolve the status, hopefully without adding to the confusion.
 
'''Basic Rule from the specification (and I have the actual specification)
 
* A > B means "binary 0 on the bus" or "ON".
* A < B means "binary 1 on the bus" or "OFF".
 
And A is non-inverting (and thus B is inverting)
 
'''Identifying 'A' and 'B' signals'''
 
Remember that UARTs output a logic '1' (high voltage) for idle state! This signal will go to 0v for the start bit.
 
The A signal is the wire that, when in the idle state, is at a slightly higher voltage than the 'B' signal. This difference in voltage measurements is the result of the biasing and termination resistors of the circuit. See [https://en.wikipedia.org/wiki/RS-485#/media/File:Rs485-bias-termination.svg Wikipedia]
 
 
'''Identifying 'Mark/Idle' and 'Space' '''
 
Look at the data bits. The idle condition is always the 'mark' condition. The start bit is always a 'space'. Drawings on the internet are in conflict with each other and cannot be relied upon.


Our terminology:


{| class="wikitable" style="text-align: center;"
{| class="wikitable" style="text-align: center;"
|+ Nominal Terminology
|+ Nominal Terminology
|-
|-
! Our Terminology !! Description !! RS-485 line voltage levels !! Data (UART) Representation
! Our Terminology !! Description !! Terminonlogy !! Data (UART) Representation !! When Idle
|-
|-
| A || Tracking UART value || High voltage (typically +5 or +3.3) || 1 when line is high, 0 when line is low
| A || Tracking UART value || Non-Inverting || A is high when UART emitting 1, A is low when UART emitting 0 || High
|-
|-
| B || Non-tracking ||  ||  
| B || Non-tracking ||  Inverting || B is low when UART emitting 1, B is high when UART emitting 0 || Low
|}
|}




Labeling found in the field


{| class="wikitable" style="text-align: center;"
{| class="wikitable" style="text-align: center;"
|+ Manufacturer's Labeling
|+ Manufacturer's Labeling
|-
|-
! Comment !! Tracking !! Non-tracking !! Class !! Manufacturer examples
! Non-inverting !! Inverting !! Class !! Manufacturer examples !!
|-
| A || B || Nominal || BITS, FieldServer
|-
|  + || - || Symbol || BACnet Specification || The non-inverting input of the
EIA-485 transceiver is designated in this specification as "plus" or "+"
|-
|  RT+ || RT- || || EnOcean SmartServer IoT
|-
|  + || - || Symbol || FT-Click, BASRouter LX, Onicon F-4300
|-
|  B+ || A- || || MBS UBR-01 Mk II
|-
|-
| Our terminology || A || B || Nominal || BITS
| 485+ || 485- || Symbol || FieldServer
|-
|-
| || + || - || Symbol || BACnet Specification
| U+ || U- || || [https://en.wikipedia.org/wiki/RS-485#Waveform_example Wikipedia]
|-
|-
| || + || - || Symbol || FT-Click, BASRouter LX
| B || A || || [https://en.wikipedia.org/wiki/RS-485#Signals Wikipedia. See, what a fiasco]
|-
|-
| || B+ || A- || || MBS UBR-01 Mk II
| A+ || B- || || [https://www.waveshare.com/product/iot-communication/wired-comm-converter/usb-to-rs485.htm Waveshare USB to RS-485], AirBox
|-
|-
| || U+ || U- || || [https://en.wikipedia.org/wiki/RS-485 Wikipedia]
| A || B || || [https://e2e.ti.com/cfs-file/__key/telligent-evolution-components-attachments/13-143-00-00-00-26-49-60/RS485-_2D00_-Polarity-Conventions.pdf TI Polarity Conventions]
|-
|-
| TI convention|| A || B || || [https://e2e.ti.com/cfs-file/__key/telligent-evolution-components-attachments/13-143-00-00-00-26-49-60/RS485-_2D00_-Polarity-Conventions.pdfs TI Polarity Conventions]
| ? || ? || || KMC router, A- and B+, true polarity TBC
|}
|}


The BACnet Specification (135 - 9.2.2) says: The non-inverting input of the
EIA-485 transceiver is designated in this specification as "plus" or "+" and the inverting input as "minus" or "-". It is recommended, but not required, that the black or red insulated wire of the twisted pair be designated as "plus" and the white, clear, or green insulated wire be designated as "minus."


TI has a very definitive [https://e2e.ti.com/cfs-file/__key/telligent-evolution-components-attachments/13-143-00-00-00-26-49-60/RS485-_2D00_-Polarity-Conventions.pdf document], but one that has to be read carefully in terms of terminology. Read this document with the following table in mind. Note, according to TI (and our opinion), the [https://en.wikipedia.org/wiki/RS-485 Wikipedia article] on bus states is WRONG ! :
TI has a very definitive [https://e2e.ti.com/cfs-file/__key/telligent-evolution-components-attachments/13-143-00-00-00-26-49-60/RS485-_2D00_-Polarity-Conventions.pdf document], but one that has to be read carefully in terms of terminology. Read this document with the following table in mind. Note, according to TI (and our opinion), the [https://en.wikipedia.org/wiki/RS-485 Wikipedia article] on bus states is WRONG ! :
Line 40: Line 69:
|+ RS-485 Bus State Terminology
|+ RS-485 Bus State Terminology
|-
|-
! UART bit !! Logic level !! A-B (T+ - T-) result !! Legacy !! RS-485 state !! RS-485 A volt !! RS-485 B volt
! UART input/output !! A vs B !! Legacy !! RS-485 Bus State !! RS-485 Bus Binary state
|-
|-
| 1 || high|| A > B|| Mark/Idle || On (0) || high || low
| 1 || A > B|| Mark/Idle || On || Logic 0
|-
|-
| 0 || low || A < B || Space || Off (1) || low || high
| 0 || A < B || Space || Off || Logic 1
|}
|}

Latest revision as of 07:41, 31 July 2025

RS-485 comprises two signals, one that 'tracks' the UART logic levels (high voltage == 1, low voltage == 0). The other signal does the opposite. The meaning of these two signals has been polluted by chip and box vendors, which leads to a lot of confusion. A lot of further confusion arises when one considers the UART logic levels vs signal levels and labels. This article attempts to resolve the status, hopefully without adding to the confusion.

Basic Rule from the specification (and I have the actual specification)

  • A > B means "binary 0 on the bus" or "ON".
  • A < B means "binary 1 on the bus" or "OFF".

And A is non-inverting (and thus B is inverting)

Identifying 'A' and 'B' signals

Remember that UARTs output a logic '1' (high voltage) for idle state! This signal will go to 0v for the start bit.

The A signal is the wire that, when in the idle state, is at a slightly higher voltage than the 'B' signal. This difference in voltage measurements is the result of the biasing and termination resistors of the circuit. See Wikipedia


Identifying 'Mark/Idle' and 'Space'

Look at the data bits. The idle condition is always the 'mark' condition. The start bit is always a 'space'. Drawings on the internet are in conflict with each other and cannot be relied upon.


Nominal Terminology
Our Terminology Description Terminonlogy Data (UART) Representation When Idle
A Tracking UART value Non-Inverting A is high when UART emitting 1, A is low when UART emitting 0 High
B Non-tracking Inverting B is low when UART emitting 1, B is high when UART emitting 0 Low


Manufacturer's Labeling
Non-inverting Inverting Class Manufacturer examples
A B Nominal BITS, FieldServer
+ - Symbol BACnet Specification The non-inverting input of the

EIA-485 transceiver is designated in this specification as "plus" or "+"

RT+ RT- EnOcean SmartServer IoT
+ - Symbol FT-Click, BASRouter LX, Onicon F-4300
B+ A- MBS UBR-01 Mk II
485+ 485- Symbol FieldServer
U+ U- Wikipedia
B A Wikipedia. See, what a fiasco
A+ B- Waveshare USB to RS-485, AirBox
A B TI Polarity Conventions
? ? KMC router, A- and B+, true polarity TBC

The BACnet Specification (135 - 9.2.2) says: The non-inverting input of the EIA-485 transceiver is designated in this specification as "plus" or "+" and the inverting input as "minus" or "-". It is recommended, but not required, that the black or red insulated wire of the twisted pair be designated as "plus" and the white, clear, or green insulated wire be designated as "minus."

TI has a very definitive document, but one that has to be read carefully in terms of terminology. Read this document with the following table in mind. Note, according to TI (and our opinion), the Wikipedia article on bus states is WRONG ! :

RS-485 Bus State Terminology
UART input/output A vs B Legacy RS-485 Bus State RS-485 Bus Binary state
1 A > B Mark/Idle On Logic 0
0 A < B Space Off Logic 1