CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

rs485 biasing ( slightly off topic )

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
smee



Joined: 16 Jan 2014
Posts: 24

View user's profile Send private message

rs485 biasing ( slightly off topic )
PostPosted: Tue Jun 10, 2014 8:09 am     Reply with quote

Hi I am putting together a rs485 bus that can handle up to 255 nodes, and because of the number of nodes i have decided to use a distributed biasing scheme, by the way i am using pic24fj256gb210 and ccs compiler - not that that matters much for this question.
I have seen from the modbus topics that there are quite a few members here that have used 485, and i have a question about determining the size of the bias resistors. I was hoping you could point out my mistakes if i am not doing it right. Also i have a digital pot to provide the biasing so that the bias can be adjusted on the fly, according to number of nodes.

To determine the size of the bias resistors i treat everything as dc resistances.
I assumed that the circuit essentially boiled down to 3 resistors in series.

vcc----Rpup---Rrcvr----Rpldwn----gnd.

Total receiver resistance
based on the number of nodes ( 1/Rt=1/R1+1/R2 .. 1/Rn, + terminator resistances )

The current required
to maintain 200mV across this receiver resistance.

Then calculate
the bias resistances ( both identical Rpup,Rpdwn) using the previously
determined current calculation.

There is another mitigating factor, in that the vcc at each node is from a separate power supply( 78 series regulators ) but i figured it wouldn't be too bad.

I would greatly appreciate any comments advice anyone can offer.
temtronic



Joined: 01 Jul 2010
Posts: 9241
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Tue Jun 10, 2014 8:30 am     Reply with quote

1) nothing like 'real world' experience to see what is going on ! No amount of 'math' will ever show what is real.

2) be sure to choose RS485 transceivers that are 255 node capable. I used Maxim products decades ago....

3) distance is a factor! wire size is a factor. connections are too.

if all nodes are in the same room then wire cabling may not be important, except for the capacitance effect. More C = less distance( signal degradation)

4) get a scope and put 'at the end' to see what's happening.

5) 255 nodes on one bus can be 'troublesome'. ANY failure(loose wire,open,etc.) and you'll lose nodes! It's always better to break it up into 2 busses of 128.My systems were maxed at 128( a magical number) when dealing with 15 miles of copper wire)

other will chime in with more I'm sure.

hth
jay
Ttelmah



Joined: 11 Mar 2010
Posts: 19535

View user's profile Send private message

PostPosted: Tue Jun 10, 2014 8:54 am     Reply with quote

There are two things involved.

Termination, and biasing.

Now termination _cannot_ be 'distributed'. It needs to be at the ends of the bus. So it makes no sense to add extra complexity, by trying to distribute the biasing.

Keep it simple. Have plug on terminators that also provide biasing as well, and plug these onto the ends of the bus.
asmallri



Joined: 12 Aug 2004
Posts: 1635
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Tue Jun 10, 2014 9:00 am     Reply with quote

Speed is another important metric. The slower the speed, the more forgiving.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
smee



Joined: 16 Jan 2014
Posts: 24

View user's profile Send private message

PostPosted: Tue Jun 10, 2014 9:47 am     Reply with quote

thanks for all the comments, i take it then that the way i am calculating the bias value is the correct way. just have never used 485 before.

i take on board all your comments.
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Tue Jun 10, 2014 10:08 am     Reply with quote

In a multi-node array like your application, it is very important to use a good quality twisted pair shielded wire, that provide a convenient low noise
ground return path. This shield act as an RFI barrier resulting in minimal common mode noise or ground potential difference.
While not recommended, using the shield as a network system ground will be ok in most cases, but take care not to create a ground loop in doing so.
_________________
Humber
Ttelmah



Joined: 11 Mar 2010
Posts: 19535

View user's profile Send private message

PostPosted: Tue Jun 10, 2014 10:59 am     Reply with quote

I'd make a big suggestion. Look at devices that do not require biasing, or lower the voltage needed. I cannot see if you have a low enough resistance per node for the bias, to work with a low number of nodes, that you will get inside the minimum allowed common mode load on the bus, as it becomes more populated.
Though not standard transceivers, look at the LTC2870/2871, which are designed to provide termination and not need biasing. Texas also do the SN65HVD72, that again does not require biasing.
smee



Joined: 16 Jan 2014
Posts: 24

View user's profile Send private message

PostPosted: Tue Jun 10, 2014 11:08 am     Reply with quote

Typically the nodes will be within 1-2m of each other, so i opted to interconnect the nodes using ethernet patch leads as they are easily replaced by the end user, there are likely to be elements of the bus that will not be patch leads varying in lengths from 2m to 100m i would expect, which will use cat5e.
I have allocated a line for the common ground on the bus.
all of the cabling will be inside the same building.
I anticipate most if not all of the buildings have a 3 phase supply, so nodes will be distributed across separate phases.

My design doesn't use the resistor in the ground connection, but i can revise for it.
I also didn't consider shielded twisted pair
could you elaborate some more.

thanks.
smee



Joined: 16 Jan 2014
Posts: 24

View user's profile Send private message

PostPosted: Tue Jun 10, 2014 11:21 am     Reply with quote

The device i am using is the ltc2854. I have had a quick look, at the ltc2870 from what i can see the 2854 is pretty similar feature wise. I'm out of time at the moment to look into it any further.
Your comment suggests i do not need to bias the bus.
My vcc is 3.3v i was going to pullup to that for the biasing.
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Tue Jun 10, 2014 1:16 pm     Reply with quote

Quote:

I also didn't consider shielded twisted pair
could you elaborate some more.


Why twisted pairs? Instead I guess: why biasing resistors?
RS485 specifies that receiver output state should be Logic High for differential input voltages higher than +/-200mV and Logic Low
for voltages smaller than +/-200mV. For input voltages in between these limits, a receiver output state is not defined and can randomly
assume high or low.
The only purpose for biasing the node is to remove the uncertainly of random output states. This was true for first generation transceivers
(I guess + than 20 years ago) Modern transceivers design include internal biasing circuits that put the receiver output into a defined state.
I never used biasing resistors, but a good quality shielded twisted pair and termination resistors in both end when using long distances net.
_________________
Humber
temtronic



Joined: 01 Jul 2010
Posts: 9241
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Tue Jun 10, 2014 1:43 pm     Reply with quote

re: twisted pairs...

Twisted pairs will add another 'layer' or 'level' of noise reduction, reduce cross-talk, reduce EMI, etc.

Same holds true for shielded cables providing shielding is 100% and not 'floating'.

Same also for larger wire sizes. 18ga is better than 24ga. more copper = better signal path.

There's also the 'speed vs. distance' factor. If you can go slower you can go MUCH further.

hth
jay
drh



Joined: 12 Jul 2004
Posts: 192
Location: Hemet, California USA

View user's profile Send private message

PostPosted: Wed Jun 11, 2014 8:09 am     Reply with quote

These white papers may be useful:
http://www.bb-elec.com/Learning-Center/Serial-Connectivity.aspx
_________________
David
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group