I am working on a design of smart home system mainly based on Modbus relay modules.
The house have 3 floors
2. Ground floor
3. First floor
The main electrical board is on ground floor. I would like to understand the following:
1. What is the right way to chain all RS 485 devices assuming that the master located in Ground floor.
Should I chain the first device on the basement then chain to the next device on the ground floor?
I did not fully understand the right way to chain devices
2. Would CAT 6 cable is a good solution for wire type? and other recommended cable I.E knx communication line?
3. Where is the right location for the termination resistor (only at last one i assume)
4. can i use bus connection for the Modbus? have this currently but have lots of errors not sure if due to cable or connection.
5.What is the right way to chain? use wire terminal with two wires inside is ok?
6. in addition to relay modules, i have some power meters, sensors and so on. Should i place the number to just follow the relay modules or it is right to slip to groups? I.E 1-50, for first 20 modules, (30 empty), 51-80, 81-110... etc?
>The main electrical board is on ground floor. I would like
>to understand the following:
>1. What is the right way to chain all RS 485 devices
>assuming that the master located in Ground floor.
RS485 uses a bus topology, the physical order of the devices doesn't matter that much
>Should I chain the first device on the basement then chain
>to the next device on the ground floor?
Again, use the shortest path between devices
>I did not fully understand the right way to chain devices
Bus Topology, one cable in, one cable out and termination resistors at both ends.
>2. Would CAT 6 cable is a good solution for wire type? and
>other recommended cable I.E knx communication line?
no. You should use twisted, shielded pair of good quality
>3. Where is the right location for the termination resistor
>(only at last one i assume)
>4. can i use bus connection for the Modbus? have this
>currently but have lots of errors not sure if due to cable
>5.What is the right way to chain? use wire terminal with two
>wires inside is ok?
It can be done that way if the wire will fit. If not then use a terminal block
>6. in addition to relay modules, i have some power meters,
>sensors and so on. Should i place the number to just follow
>the relay modules or it is right to slip to groups? I.E
>1-50, for first 20 modules, (30 empty), 51-80, 81-110...
any address within the acceptable range will do as long as the master is 0
You can also use Wireless Current monitor which is specially designed to work at miles of range with longer battery management to detect the voltage spikes.
Wireless Current monitor - https://store.ncd.io/product/industrial-iot-wireless-ac-current-monitor-sensor/
I've a couple clients (light industrial) use CAT 5 (twisted pair) cable for RS-485 and it has worked just fine. It's not shielded but is twisted pair. I'm sure CAT 6 would have functioned OK in the apps I did, especially at 19.2K baud. The thing I don't like about CATx cable is the 24G conductors - those apps had crimp ferrules and the 24g has broken twice at two different points.
I've found a couple devices that are modbus Masters have a terminating resistor installed, one had a switchable terminating resistor, the other could only be taken out by cutting the resistor on the board. The assumption was that the master is at one end. But nothing requires a Master to be at one end, it's more convention than anything. Having a terminating resistor mid-bus (not at the ends of the bus) is definitely a no-no.
Just how many slave devices are you working with? 485 typically supports (on paper) up to 32 devices per bus, then requires a repeater. Do you have more than one serial port for more than one bus?
I must say that i am confused..
1. I use one bus (using USB to RS485 converter) connected with CAT5E
2. I have about 30 devices
3. So CAT 6 is OK or not? should i keep the insulation or not?
4. Resistor on both ends means First device and last device?
5. I seen that if no terminal resistor the device still works.. what is the impact?
> I must say that i am confused..
That's to be expected in a world of opinion.
My bar stool opinions:
3. CAT6 will work. Keep the stripped ends as short as possible. Untwist the pairs as little as possible.
I'm not sure what you mean by "keep the insulation or not".
4. The termination resistor absorbs signal transmission energy which is reflected by lack of a resistance that absorbs the energy. Without terminating resistors, the signal's initial pulse gets distorted to point where it is no longer a 'square wave', due to the inherent cable impedance and the reflected energy.
When a resistance that matches the characteristic impedance of the cable is installed, the energy dissipates across the resistor instead of reflecting back down the line and the signal's desired square wave maintains its "square-isity".
This 8 minute Youtube video is a better explanation than my verbiage:
Both Cat 5e and CAT 6 have 100 ohm characteristic impedance. Install 100 ohm terminating resistor across the driver lines at the ends of the bus (first device, master or slave, and last device).
5. The lack of terminating resistors and its effect is more noticeable at higher baud rates. Lower baud (9600) rates will usually run without terminating resistors. Impact - when there's a problem the first you'll hear is from the helpers is, "are there terminating resistors installed?"
Still confused ... the first device is in the middle floor
So the open edges would be on the basement and on the upper floor which means one end will have the last device and one will have just random device on the network. Does it matter if the devices are connected in series?
like device 1..2..3..4.. etc
or connection of 2..33.3.55..6 etc will also work as long the when the wire is ending meaning not chained to another device need to add termination resistor. I am using 19200 baud rate.
Google "10 ways to bulletproof rs485 interfaces."
It has all the best practices in one place.
>Google "10 ways to bulletproof rs485 interfaces."
by the way assuming i would like reliable connection which baud rate is better for use 9600 or 19200?
With wire intended for the purpose, 38,400 works well. Done haphazardly, it may not be reliable at 1200 baud, but when well done, it is amazing. That's why it's still around after many others have come and gone.
>Does it matter if the devices are connected in series?
Answer: The physical position along the daisy chain bus has no relationship to a slave's assigned node ID address.
Any device along a multidrop 485 bus can have any unique slave node ID address.
>connection of 2..33.3.55..6 etc will work
answer: Yes, and each device has to have a unique address.
>when the wire is ending meaning not chained to another device need to add termination resistor.
Answer: Only the devices on the ends of bus have one cable attached, all the others have two cables attached, a cable going to the next device upstream or downstream. The end devices that have only one cable have the terminating resistor.