RS485總線的深層理解
RS-485標準采有用平衡式發(fā)送,差分式接收的數(shù)據(jù)收發(fā)器來驅(qū)動總線,具體規(guī)格要求:
1. 接收器的輸入電阻RIN≥12kΩ
2. 驅(qū)動器能輸出±7V的共模電壓
3. 輸入端的電容≤50pF
4. 在節(jié)點數(shù)為32個,配置了120Ω的終端電阻的情況下,驅(qū)動器至少還能輸出電壓1.5V(驅(qū)動負載為54Ω,終端電阻的大小與所用雙絞線的參數(shù)有關(guān))
5. 接收器的輸入靈敏度為200mV(即(V+)-(V-)≥0.2V,表示信號“1”;(V+)-(V-)≤-0.2V,表示信號“0”)注意!!V+ 我們一般說的A,V-我們一般說的是B;
因為RS-485的遠距離、多節(jié)點(32個)以及傳輸線成本低的特性,使得EIA RS-485成為工業(yè)應(yīng)用中數(shù)據(jù)傳輸?shù)氖走x標準。
1.
引用MAXIM官網(wǎng)上的一篇應(yīng)用筆記,原文如下
l
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.
1.
引用MAXIM官網(wǎng)上的一篇應(yīng)用筆記,原文如下:
Failsafe
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.
所以當所有的RS485節(jié)點處于接收狀態(tài)時,總線狀態(tài)不穩(wěn)定會出現(xiàn)錯誤數(shù)據(jù)。
解決方法有二:
1.
2.
評論