4779 views|13 replies

105

Posts

0

Resources
The OP
 

Questions about 485 communication [Copy link]

 
This post was last edited by Fengling on 2018-7-30 18:02 file:///C:\Users\Administrator\AppData\Roaming\Tencent\Users\401406045\TIM\WinTemp\RichOle\}2O%B5AICQHJ~6JBM`T}M{D.png As shown in the circuit diagram, 485 communication RX is normal, TX is not. Remove the 120 ohm resistor and D1 at the terminal, TX can work normally. What is the specific reason? In normal communication, TX occasionally has bit errors. Is it caused by the circuit? Is there anyone familiar with it who can explain it? Thank you! The TVS uses SMBJ6.5CA, the 485 chip uses 3PEAK's TP8485E, and the transistor uses MMBT5551.

485.png (25.31 KB, downloads: 1)

485.png

TP8485E.pdf

1.06 MB, downloads: 11

This post is from Discrete Device

Latest reply

According to my experience, many 485 communication problems are caused by the quality of the conversion chip. Many devices on the market are of poor quality, and some are even counterfeit! You'd better check the device first. The 485 conversion device is particularly "delicate". This is my personal experience.  Details Published on 2018-8-5 22:28
 
 

1w

Posts

142

Resources
2
 
Only one 120 ohm terminal resistor can be added at each end of the bus, no more, otherwise it will not only affect the impedance matching, but also cause the bus to be overloaded. The TVS should be tested with a meter, pay attention to the pressure test, to determine whether the breakdown voltage is too low.
This post is from Discrete Device

Comments

Thanks for the answer, I made this automatic switching to save the IO port of the microcontroller, but it doesn't work very well! Now it feels that it is normal to send 0, but there are occasional errors when sending 1, and there are errors at baud rates of 9600 and 115200.  Details Published on 2018-7-31 09:30
Personal signature上传了一些书籍资料,也许有你想要的:http://download.eeworld.com.cn/user/chunyang
 
 
 

1w

Posts

142

Resources
3
 
The original poster's circuit is a so-called self-commutating 485 interface that sends 0 but not 1. The bus logic 1 needs to be realized through a bias resistor, and the value needs to be calculated using Ohm's law based on a 200mV threshold. In addition, the communication rate of this type of circuit cannot be too high, otherwise there will be bit errors.
This post is from Discrete Device
Personal signature上传了一些书籍资料,也许有你想要的:http://download.eeworld.com.cn/user/chunyang
 
 
 

506

Posts

0

Resources
4
 
There is something wrong with your circuit. DI is connected to ground. How do you send data? Normally, RO and DI are the data sending and receiving pins, and de and re are the enable control pins.
This post is from Discrete Device

Comments

This is an automatic reversing interface. Just as the moderator said, it is a so-called self-reversing 485 interface that sends 0 but not 1. The bus logic 1 needs to be realized through a bias resistor, but it doesn't seem to work well.  Details Published on 2018-7-31 09:31
 
 
 

105

Posts

0

Resources
5
 
chunyang posted on 2018-7-30 21:39 120 ohm terminal resistors can only be added one at each end of the bus, no more, otherwise it will not only affect the impedance matching, but also cause the bus to be overloaded. TVS should be used...
Thank you for the answer, the main purpose of this automatic reversing is to save the IO port of the microcontroller, but it turns out that it doesn't work very well! Now it feels that it is normal to send 0, but there are occasional errors when sending 1, and there are errors at baud rates of 9600 and 115200.
This post is from Discrete Device

Comments

Recalculate the bias resistance and the baud rate should not be too high.  Details Published on 2018-7-31 13:29
 
 
 

105

Posts

0

Resources
6
 
bioger posted on 2018-7-31 08:11 There is something wrong with your circuit. DI is connected to the ground. How do you send data? Normally, RO and DI are the data pins for sending and receiving, and de and re are the enable control pins...
This is an automatic reversing interface. Just like the moderator said, the so-called self-reversing 485 interface that sends 0 but not 1, the bus logic 1 needs to be realized through a bias resistor, but it doesn't work well.
This post is from Discrete Device
 
 
 

1w

Posts

142

Resources
7
 
Feng Ling posted on 2018-7-31 09:30 Thank you for the answer. I made this automatic reversing mainly to save the IO port of the microcontroller, but it turned out that it doesn’t work very well! Now it feels like sending 0 positive...
Recalculate the bias resistor, and the baud rate should not be too high.
This post is from Discrete Device

Comments

OK, thanks!  Details Published on 2018-8-1 11:20
Personal signature上传了一些书籍资料,也许有你想要的:http://download.eeworld.com.cn/user/chunyang
 
 
 

1048

Posts

1

Resources
8
 
1. The automatic reversing circuit is recommended to be used at 9600 baud rate or below (because the circuit essentially sends 0 or 1 by switching the chip's transceiver status, which requires the time required for the chip to switch between transceiver status, which is roughly 1us, so the transmission rate cannot be high). 2. Because the baud rate is very low, in general applications, it is not necessary to add 120 ohm matching resistors at both ends (according to "an article from MAXIM Corporation in the United States mentions an empirical principle that can be used to determine at what data rate and cable length matching is required: when the signal conversion time (rise or fall time) exceeds 3 times the time required for the electrical signal to be transmitted in one direction along the bus, no matching is required." It takes about 3us for an electrical signal to propagate 1 kilometer, 3 times is 10us, and the signal period of 9600 baud rate is 100us, so a distance of several hundred meters should have a chance to meet the conditions). 3. The main reason for using this automatic reversing circuit is not to save IO pins, but in many anti-collision architectures (polling architecture should not have conflicts, so there is no need to use this method). The main control chip cannot accurately determine whether the transmission is completed (it just throws the transmission data into the UART transmission buffer, and it is impossible to know when the transmission is completed), but it wants to enter the receiving state as soon as possible to avoid occupying the bus and causing collision conflicts.
This post is from Discrete Device
 
 
 

1048

Posts

1

Resources
9
 
In the original poster's circuit, the bias resistor is 10K, and the resistor between AB is 120 ohms. Assuming a 5V power supply, the voltage between AB is pitifully small (a few dozen mV), which cannot meet the threshold requirement of A>B 200mV (generally, the design should be above 300mV), which is probably a factor causing instability. If the resistor between AB is increased to 4.7K (as mentioned above, do not add a 120 ohm matching resistor), and the pull-up and pull-down are reduced to 1.5K, there should be improvement.
This post is from Discrete Device

Comments

Thank you, I removed the 120 ohm resistor in the middle and changed the bias resistor to 4.7K. Now the communication is basically normal. There are still occasional bit errors at 9600. I will adjust the bias resistor and see if it works better with a NOT gate than a triode for automatic commutation. I have seen some modules on Taobao use a NOT gate circuit.  Details Published on 2018-8-1 11:19
 
 
 

105

Posts

0

Resources
10
 
topwon posted on 2018-8-1 09:39 In the OP's circuit, the bias resistor is 10K, and the resistor between AB is 120 ohms. Assuming a 5V power supply, the voltage divided between AB is pitifully small (a few...
Thank you. I removed the 120 ohm resistor in the middle and changed the bias resistor to 4.7K. Now the communication is basically normal. The 9600 still has bit errors occasionally. I will adjust the bias resistor and see. In addition, is the automatic commutation using a NOT gate better than a triode? I have seen some modules on Taobao use a NOT gate circuit.
This post is from Discrete Device
 
 
 

105

Posts

0

Resources
11
 
chunyang posted on 2018-7-31 13:29 Recalculate the bias resistor, and the baud rate should not be too high.
OK, thank you!
This post is from Discrete Device
 
 
 

1889

Posts

0

Resources
12
 
The default resistor that most people first know is 120Ω, which is connected across the (+) and (-) data terminals at the far end of the network. But 120Ω is not always the best choice. This original termination was originally selected to match the impedance of commercial twisted pair cables.
This post is from Discrete Device
Personal signature浪拓电子-----专业的GDT、TSS、TVS产品及服务提供商
 
 
 

2867

Posts

4

Resources
13
 
According to my experience, many 485 communication problems are caused by the quality of the conversion chip. Many devices on the market are of poor quality, and some are even counterfeit! You'd better check the device first. The 485 conversion device is particularly "delicate". This is my personal experience.
This post is from Discrete Device

Comments

OK, thanks!  Details Published on 2018-8-6 14:04
 
 
 

105

Posts

0

Resources
14
 
bigbat posted on 2018-8-5 22:28 According to my experience, many 485 communications are caused by the quality of conversion chip devices. Many devices on the market are of poor quality, and some even...
OK, thank you!
This post is from Discrete Device
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list