USB-RS485 Converter with Daisy-chain Topology

Sorry Bob for not labelling the 3 blue objects and missed out on a few others. They are the USB-RS485 converters, like the one I am thinking of buying from Core (stated in my first message). It is indeed half-duplex. Let me redraw the picture to make it a bit clearer. I removed the small unused green connectors which are RS422 and RS232 respectively. The data collector sends read requests to the simulated equipments, once the data are returned they are packaged into an http package to be sent to the PC.
Daisy_chain_RS485

2 Likes

I can see no reason the RS485 part of this would not work. Have you tried with 120Ω resistors. The 100Ω resistors I am sure are too low and would put too much load on the drivers.

The only thing I can think of is the info from the simulated equipment and the data collector incompatible or the USB info won’t work like that. I don’t know enough about that side of things to comment. I have however been involved with many interconnections daisy chained like this and have never had a problem. Somebody else always looked after the traffic nitty gritty and the whole systems worked.

These systems have usually been RS232 or something converted to RS485 then converted back to their original format. The RS485 only a transport medium and really played no other part in operations.

As I said, other than some incompatibly issue the only thing wrong with your set up would be low value terminating resistors.

Any other ideas guys???
Cheers Bob

2 Likes

Lockdown will be relaxed after midnight, will venture out to get some 120Ω resistors tomorrow :slight_smile:

Any recommended shielded twisted-pair wires you would recommend?

I am hoping to hear more ideas from other “guys” :slight_smile:

/YT

1 Like

Hi YT,

I’ve used shielded CAT6 (overkill probably) where a shielded twisted pair is required (1-Wire in my case)

Hope this gives you some avenues to look down!
-James

In the past usually have used single pair Belden audio cable. Maybe because it was on hand and sometimes used in other parts of a project (Audio). Should screened for best results.

Edit: Any good quality Audio or single pair screened cable should be OK. I only said Belden because that is what we pretty much used for professional (Broadcast, TV etc) installations at the time and was usually readily on hand.

Very important edit. Connect cable screen to chassis ground AT ONE END ONLY. In your case at the Data Collector. Connect the screen through at the outboard units but DO NOT connect anywhere else.
Cheers Bob

1 Like

Hi YL
I have had a couple more thoughts on your problem. Some time ago a contributor had a similar problem with I2C to RS485 converters. I had a bit of a hunt around for some info on these I had printed. I checked some TTL to RS485 units available from Core. The one mentioned in previous posts was SKU CEO5154. This has 3 resistors which everybody agreed should not be there. It has a pull up resistor to +5V from “A” and a pull down resistor to ground from “B”. I don’t know why and I think all they do is unbalance the line and lose all the advantages of RS485. The other is a permanent 120Ω terminating resistor across the line which definitely should not be there as you would be unable to daisy chain this unit.

Another 2 units CEO7681 and TEL0070 have the pull up pull down resistors but no termination.

One other circuit of unknown origin shows a dual (sda and scl) arrangement with no pull up/down resistors and a 120Ω termination inserted in or out of circuit by a 0Ω (wire link) resistor.

The 'industrial" unit you linked does not have a circuit provided but the application notes in the data sheet for the RS485 driver shows no pull up/down resistors and suggests a terminating resistor with a link to insert it across the line. I can’t find any mention of such a resistor in any text for this unit so may not be there (which is good).

What I am getting at here is that it is possible the units you are using may have these terminations installed, with or without a link and if so should be disconnected or removed. I would hesitate to leave one connected in the end unit in case they get mixed up. Leave it external so it can be readily seen.

You have not said exactly which unit you are using so I am unable to do any searching for this info.
You should be able to check if this resistor is installed internally by removing the wires and measuring the resistance across the A and B points. If there is a termination (120Ω) present it will have to be removed or any link disconnected to be able to daisy chain.

Similarly measure the resistance between A and B on your Data Collector. If the 120Ω termination is internally fitted you can leave that one there but DON’T fit another resistor.

If these terminations ARE internally fitted this would be a major part of your problem as the RS485 drivers would be seriously overloaded. I did check on that and the load resistance should be minimum 54Ω.

I still don’t know why some converters have pull up/down resistors on the A and B connections as I think everyone previously agreed that all they do is unbalance the line and lose the advantages that a balanced line presents. Unless these resistors are easily removable I personally would not use these units. But I stress that is only my preference. Perhaps someone at Core support can shed some light on this. I have not seen any explanation to date.
Cheers Bob

1 Like

Thanks Bob for taking the time to explain. Some of the electronics are over my head :slight_smile: I dusted my multimeter and measured across A and B on my USB-RS485 converters, they appeared to be open circuits. It’s the same on the data collector as well. Looks like no internal resistors have been fitted?
/YT

2 Likes

That’s what it looks like. You will now require 120Ω at each end. If you still have trouble I would investigate elsewhere. Try those USB ports one at a time. You may not be able to do what you want with USB. I just don’t know. You are aware that you can only communicate with one point at a time I suppose and can only communicate in one direction at any one time.
Cheers Bob

2 Likes

Good news, Bob. It worked! It actually worked with or without the 120Ω at each end. I used 4 USB-RS485 converters in my setup. The cables between each were ~250cm cat5e.

I ran 4 copies of Modbus Slave (from Modbus Tools) to simulate 4 equipments with ID=1,3,5,7 on my PC. See screenshot below. I highlighted the data transmitted from each simulated equipment.


/YT

2 Likes

Hi YT
Good news and thanks for the feedback.
Leave the 120Ω resistors there. This will ensure minimal problems if you change the cable length which you will probably do when you transition from simulation to the real thing.

It is an involved discussion but the resistors ensure there are no echos from the virtual open circuit ends of an unterminated cable and are VERY important. These echos WILL corrupt and distort the transmitted signal and can make the system unusable. This came up in a previous post some time ago and someone posted a video demonstrating the effects of a correctly terminated cable and an unterminated one. The effect is shown to be quite dramatic. If I can find it later I will post here.

The Modbus results posted are pretty much Swahili to me as I am not big on the details of such systems. However they will be undoubtedly of interest to many others.
Cheers Bob

1 Like

Add on:
Will try to insert a couple of videos.

There are lots more on YouTube. I think these 2 reflect (excuse the pun) what I have been trying to explain.
Cheers Bob

1 Like

Hi Guys,

Great work getting it working and amazing support Bob!

RS485 is a huge blank spot in my knowledge (for now) so it’s good to see someone stepping in and smashing it!
-James

Hi James
RS485 is only a transport medium. A converter of some flavour converts the unbalanced digital to balanced and the same converter converts back to unbalanced digital at the other end. Can be one way, half duplex (one way at a time) or full duplex (both ways simultaneously. Full duplex requires 2 circuits, one circuit each way. I2C requires 2 half duplex circuits (data and clock). All much like balanced Audio really with the same minimal noise and interference advantages. Also capable of transmission distances of 1200 metres. As outlined correct termination is very important particularly with the use of multi drops.
One way or full duplex only require terminations at the receiving end, half duplex terminates both ends.
Cheers Bob

2 Likes

Hi Bob,

Image below is the cable I use in my simulation environment. Would you be able to comment on what should be done differently when this setup is actually deployed?

(1) At the moment I simply twisted the wires together between cables 1 & 2, 2 & 3, 3 & 4. Is it necessary to solder the wires in the deployment environment?

(2) What is the proper way to install the termination resistors when deployed?

Thanks!
/YT

2 Likes

Hi YT
A quick couple of questions.
Are the wires single core or stranded.
I think I can see the Data collector terminal has screw connections. What are the others, I can’t really see.
A Rule!!! NEVER put soldered wires under a screw type terminal or crimp. Believe me it will not stay tight.
I can see now, I zoomed the image and they are screw terminals.
Single or stranded I think the safest bet will be bootlace ferrules.
Rule!!! NEVER put single (resistor lead) and stranded together under a screw terminal, always use a ferrule. If you use these ferrules right through here you will not go wrong and have good reliability.

What is the value of the terminating resistor at the “terminating end”. It doesn’t look much like 120Ω to me. The first band looks yellow which is 4 for a start.

And yes this is the way to go. But when using ferrules don’t twist the wires but keep them straight.
Jaycar have these ferrules under “Ferrule Crimp Connectors”
Cheers Bob

2 Likes

Add on
What are the other terminals on the USB devices? Can we have a close up where any markings can be seen or a make and type so we can look it up. Some devices have a RS485 IN and OUT so they can be easily daisy chained. This removes the requirement to put 2 wires under the one connection. They are simply connected together on board. If this is the case the ongoing cable would connect to the “out” terminal and the terminating resistor connected the same on the last one.
Cheers Bob

2 Likes

Hi Rob,

Those were 120Ω resistors I bought at Jaycar. Did you say the wires should be crimped with a ferrule and then screwed together in the connector? (As you can see, I absolutely have no experience with this :frowning: )
120_ohm

I am using stranded wires. Thanks for the advice, I will buy some ferrules from Jaycar. However, I am not too sure what you meant by “…removes the requirement to put 2 wires under the one connection”. If we do the connection like the picture below, wouldn’t there be two wires at the connector for each T (circled in the picture between wires 1 and 2)?

/YT

Hi YT
The circuit you have drawn is correct.

Probably the lighting made one of the bands look yellow instead of brown. My apologies.

Some RS485 devices have an “RS485 “IN”” and an “RS485 “OUT”” connection. These are connected together on board as a pass through connection exactly as you do by twisting the wires and you just connect the incoming cable to one and the ongoing cable to the other. The 120Ω termination can connect to where the ongoing cable would normally connect, “RS485 OUT”. This makes it a bit easier as you don’t have to connect 2 wires to the same point. If this is not the case then there is no alternative but to connect the wires together.

Yes but I hope I have explained above. If in doubt connect the 2 wires together (using ferrules) and you can’t go wrong.

Put the 2 wires to be joined (or the resistor and 1 wire in the case of the ends) in the same ferrule, crimp and put the ferrule into the connector. Do not twist the wires together.

There is a reason for not twisting the wires tightly as in most Electrician’s joints. If there is a wire protector in the connector it is not too bad but if a twisted wire is clamped under a bare screw there is a possibility of the wires being cut where the cross one another. If this occurs the connection will probably not remain tight and cause real problems. This same cutting action can occur in crimps so wires should never be tightly twisted, or tinned as the solder will “creep” and the connection loosens.
Cheers Bob
I have noticed in recent years most electricians using ferrules which can only be a good thing.

2 Likes

Hi Robert and YT,

+1 on ferrules, While the advice on not using tinned wires is new to me, the consensus in the DIY 3D printer community is that ferrules are great.

-James

Hi James
Tinning of wires or anything else which is clamped is a definite no no where reliability is a concern. Which really should be at all times. In military or other high reliability applications it will be rejected out of hand. No grey areas.

Example. Computer Tote on Sydney racecourses many years ago. Engineer insisted 3 phase (large) mains cable connecting computer vans be tinned prior to fitting to connector (screw clamp). Advised this needed a brass ferrule soldered to the end so screw clamped on ferrule not on tinned cable. This was overruled. Result: A few meetings later this connector literally exploded and destroyed both cable end and fixed connectors.

Another high reliability situation. We had to tin some copper sheet earth connections to prevent dissimilar metal electrolysis problems. This had to be clamped with a bolt and nut through a solid copper block like washer. Before this was allowed we had to demonstrate that all of the solder had been removed just leaving a shiny tin-like finish and no excess solder remained which was likely to “creep”

Use of ferrules is pretty mandatory under screw type connections especially when a solid core has to reside with stranded wire as it would be very unlikely that the 2 conductors would be the same diameter so the smaller would probably be loose. With the Krone to any other insulation displacement connection it is a definite no no to use solid and stranded in the same connection (Krone allows 2 wires of the same size and type in the same connection).Even when only 1 wire is involved it is good practise to use ferrules in the final installation to prevent wire damage from causing problems further downstream.
Cheers Bob

2 Likes