新聞中心

RS485總線的深層理解

作者: 時(shí)間:2016-12-14 來(lái)源:網(wǎng)絡(luò) 收藏
對(duì)于RS485以前沒(méi)有深層次的理解,我們只用到了點(diǎn)-點(diǎn)通信,對(duì)于多節(jié)電通信關(guān)注的不多,現(xiàn)在主要分析下輸入阻抗、上拉、下拉的分析;

輸入阻抗是多節(jié)點(diǎn)的一個(gè)分析點(diǎn)

本文引用地址:http://butianyuan.cn/article/201612/330027.htm

RS-485標(biāo)準(zhǔn)采有用平衡式發(fā)送,差分式接收的數(shù)據(jù)收發(fā)器來(lái)驅(qū)動(dòng)總線,具體規(guī)格要求:
1. 接收器的輸入電阻RIN≥12kΩ
2. 驅(qū)動(dòng)器能輸出±7V的共模電壓
3. 輸入端的電容≤50pF
4. 在節(jié)點(diǎn)數(shù)為32個(gè),配置了120Ω的終端電阻的情況下,驅(qū)動(dòng)器至少還能輸出電壓1.5V(驅(qū)動(dòng)負(fù)載為54Ω,終端電阻的大小與所用雙絞線的參數(shù)有關(guān))
5. 接收器的輸入靈敏度為200mV(即(V+)-(V-)≥0.2V,表示信號(hào)“1”;(V+)-(V-)≤-0.2V,表示信號(hào)“0”)注意!!V+ 我們一般說(shuō)的A,V-我們一般說(shuō)的是B;
 因?yàn)镽S-485的遠(yuǎn)距離、多節(jié)點(diǎn)(32個(gè))以及傳輸線成本低的特性,使得EIA RS-485成為工業(yè)應(yīng)用中數(shù)據(jù)傳輸?shù)氖走x標(biāo)準(zhǔn)。

1. 在RS485通信系統(tǒng)中,是否需要加終端匹配電阻分析:

引用MAXIM官網(wǎng)上的一篇應(yīng)用筆記,原文如下

l No Termination(http://www.maxim-ic.com.cn/appnotes.cfm/an_pk/1090)

The first approach in minimizing power consumption is to eliminate termination resistors altogether. This option is available only for short cables and low data rates, which allow reflections to settle before data is sampled in the receiver. As a rule of thumb, no termination is needed when the rise time of a signal is at least four times longer than the one-way propagation delay through the cable. In the following steps, this rule is employed to calculate the maximum usable length for an unterminated cable:

Step 1. For the cable in question, find the one-way velocity of propagation, usually provided by cable manufacturers as a percentage of the speed of light in free space (c = 3x108 m/s). A typical value for standard insulated PVC cable (consisting of a #24 AWG twisted pair) is 8in/ns.

Step 2. For the RS-485 transceiver, find its minimum rise time (tr min) from the data-sheet specifications. A MAX3471, for example, specifies 750ns.

Step 3. Divide the minimum rise time by 4. For the MAX3471, tr min/4 = 750ns/4 = 187.5ns.

Step 4. Calculate the maximum cable distance for which no termination is required: 187.5ns(8in/ns)(1ft/12in) = 125ft.

原文大致描述了在什么情況下可以不添加終端匹配電阻,當(dāng)信號(hào)的轉(zhuǎn)換時(shí)間(上升沿時(shí)間)超過(guò)電信號(hào)沿總線單向傳輸所需時(shí)間的4倍以上時(shí)可以不加匹配電阻。例如,信號(hào)傳輸速率為0.2m/ns (24AWG PVC電纜),對(duì)于MAX3417下降時(shí)間為750ns,則只要線纜長(zhǎng)度<37m就可以不加終端匹配。(注:有的RS485芯片具有限擺率功能(上升沿時(shí)間長(zhǎng)),有的不具有此功能(上升沿時(shí)間短),具有此功能的芯片一般傳輸速率較低250kbps或500kbps,上升沿時(shí)間Tr>200ns,具體值請(qǐng)參考datasheet。)具有限擺率功能的器件有:MAX3082、MAX3085、MAX3060、MAX3061 、SP3072、SP3075、SP3082、SP3085等。

上拉、下拉問(wèn)題:

1. 在RS485通信系統(tǒng)中,是否需要加上、下拉電阻分析:

引用MAXIM官網(wǎng)上的一篇應(yīng)用筆記,原文如下:

Failsafe (http://www.maxim-ic.com.cn/appnotes.cfm/an_pk/1090)
For RS-485 receiver inputs between -200mV and +200mV, the output is undefined. That is, if the differential voltage on the RS-485 side of a half-duplex configuration is 0V, and no master transceiver is driving the line (or a connection has come loose), then a logic "high" output is as probable as a logic "low." To ensure a defined output under these conditions, most of todays RS-485 transceivers require failsafe bias resistors: a pullup resistor on one line (A) and a pulldown on the other line (B), as shown in Figure 1. Historically, the failsafe bias resistors on most schematics were labeled 560Ω, but to reduce power loss (when terminating one end only) this value can be increased to approximately 1.1kΩ. Some designers terminate both ends with resistor values between 1.1kΩ and 2.2kΩ. The trade-off is noise immunity versus current draw.

Maxims MAX3080 and MAX3471 family of transceivers solved both of these problems by specifying a precise receiver-threshold range of -50mV to -200mV, thereby eliminating the need for failsafe bias resistors while complying fully with the RS-485 standard. These parts ensure that 0V at the receiver input produces a logic "high" output. Further, this design guarantees a known receiver-output state for the open- and shorted-line conditions.

所以當(dāng)所有的RS485節(jié)點(diǎn)處于接收狀態(tài)時(shí),總線狀態(tài)不穩(wěn)定會(huì)出現(xiàn)錯(cuò)誤數(shù)據(jù)。

解決方法有二:

1. 加上、下拉電阻,來(lái)避免總線錯(cuò)誤數(shù)據(jù)。電阻的大小要滿足總線差分電壓>200mV 。

2. 使用具有失效保護(hù)的RS485芯片-200mV < Vth <-50mV。具有實(shí)效保護(hù)功能的器件有:MAX3082、MAX3085、MAX3060、MAX3061、SP3072、SP3075、SP3082、SP3085等。

我們知道A>B,200mv,A-B阻抗120R,由此知道電流I;可以算出上拉、下拉電阻是多少。



關(guān)鍵詞: RS485總線深層理

評(píng)論


技術(shù)專(zhuān)區(qū)

關(guān)閉