maxrs485 network question

Status
Not open for further replies.

Ahmed Wahdan

Newbie level 5
Joined
Sep 4, 2013
Messages
10
Helped
1
Reputation
2
Reaction score
1
Trophy points
3
Activity points
66


i have one MCU collects data from others (5 MCUs) using max485 each microcontroller is about 100 m away from master MCU
1- can one max at master drive the network or i will need max485 for each line
2- what is the benefit of resistors ( pull up & pull down ) of line (A & B ) in the figure , how it work ? and how to calculate value of it ?
3- how to caluclate termination resistance ?
 

First of all, you've got one too many 120 ohm terminating resistors. The pullup/pulldown resistors are called 'failsafe' termination-they pull the bus to a know state if there is no driver active. They are just sized to ensure the proper voltage appears across the 120 terminator.

Not sure what you mean by "will need max485 for each line". If each of your nodes needs to transmit data, then of course you'll need one at each node. As to whether one max485 can drive the bus, that depends on your speed and cable and physical arrangement. Short answer is: yes it is capable. It's not clear how the network is physically arranged. Is there a central master, with nodes arranged radially, as opposed to being located on a linear bus?
 



i mean > at master can one max485 ic drive others each 100 m cable or i need ic for each line ( point to point )

why can't use rs232 for multinode ?
all sites said that rs232 @ 115200 pbs >> calble is max 30 ft
but i tested loop rs232 at 115200 pbs using 150 m cable and no problem occured why ?
 

why can't use rs232 for multinode ? Because drivers are always active; RS485 only one driver active at a time.
but i tested loop rs232 at 115200 pbs using 150 m cable and no problem occured why ? Because you were lucky. Just because the spec says 30 ft maximum doesn't mean it WON'T work at 30.1 feet.
 

but it also said 20 kbps max :]

- - - Updated - - -

notes : not recommended star topology !! all said that

- - - Updated - - -

what about SPI speed & cable length ?
 

Not to nitpick, but the RS-232 specification doesn't actually define bit rate, but implies that it is intended for <20K. Keep in mind that RS-232 is pretty old, so 20K probably sounded pretty good back then.

I also agree that your star topology is not a great idea. RS-482 (or 422) want to have a continuous bus with a terminator at the far end-the star topology makes that impossible. But it might work...
 

what about SPI ? speed ? cable length ?
 

SPI is a protocol, not a hardware interface; it's generally used for chip-to-chip communications. Maybe LVDS over CAT5 would work for you. You could use an SPI protocol for your transmitter/receivers with LVDS translators at each end
 

you don't say anything about SPI cable max length
if i continue using rs485 can i test start topology and terminate each line with 120 ohm
or use 4 rs485 at master each drive a line ?
 

I can't answer that cable length question. For one thing, you haven't even said what your data rate is. For another, I couldn't answer it even if you DID tell us. But my sense is that it's well below 1Mb/s, true?

Here's a document that might help.

https://www.ti.com/lit/an/slla127/slla127.pdf
 

115 kbps
i asked for star connection with termination resistance for each line , i tested and it work >> but it's in my room , no noise , can i face a big trouble ??
 


yes you can directly drive RS485 from mcu no need to use max232.....you may go for max485 ic.....but from pc you have to use max232.....
 

Elaborating on what has already been said:

RS232 cannot be used for multi-node networks because only one driver at a time can be active on one wire. A single transmitter can talk to many receivers but if two transmitters try to operate at the same time the data will be corrupted.

RS232 or any other serial method, does not have a sudden cut-off at a set speed or cable length. The signal gradually degrades until it is no longer usable. Faster data and longer cables make the problem worse. In addition, if more loads are placed on the lines, their current consumption and load capacitance will reduce the data integrity.

RS485 is designed to be multi-node. Transmitted and received data share the same wires but the rule that only one transmitter can be active at any time still applies. This is why RS485 interface devices have enable pins so they can disconnect from the lines when not using them.

RS485 ideally is chained from one starting point "the master" and up to 32 slaves. The single terminating resistor goes across the wires at the most distant node from the master.

In an RS485 system, for data safety, 'failsafe' pull-up and pull-down resistors should each be fitted between one of the data wires and one of the supply or ground points, preferably but not essentially at the master end. This is to ensure that in the event that no transmitters are active, the lines cannot float but instead assume a known level. The values should be chosen so that the minimum differential voltage to establish a logic output is present across the wires. Typically 0.2V or more.

If you use a star topology instead of a chain, you cannot add the necessary termination resistors at the end of each line because the transmitters will not be able to adequately drive the low resistance that will result from them all being in parallel.

As previously mentioned, the results you see may indicate it is safe to use other interfaces, protocols and speeds but beware that operating outside of recomended specifications may lead to problems, in particular due to unpredicatable and intermittent data transfers.

Brian.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…