I'm using the TTL to RS485 Module as shown below. I want to connect 2 slaves to the master with a distance of 5-7 meters and use the RTU modbus library. I'm still confused about the cable that can be used. Can I use a cable like the picture below? Please give me suggestion and information about this?
yes, but use a pair for A & B , so Brown & Brown-White or Orange & Orange-White etc.
Though for the 7 meters it won't matter too much, but having thin wires with low capacitance is the way to go, so yes use UTP cable
Sorry, maybe this is a very basic question. But I'm still confused, in the picture above, there are 4 wires namely red, green, white and black and there is also a ground. I'm still confused about connecting anywhere because there are only 2 pins, namely A B to connect the slave, while in the picture above there is ground. Can you explain it to me?
Each pair is twisted together.
Note the colours.
You would only need to use one of the pairs for A and B.
For example the Orange wire and the White/Orange wire are a pair.
The reason we suggest cat cable is the convenience of having it ready twisted, which is ideal for 485 needs.
Ok...if I buy the cable like the picture I posted above and I twist the white-green and black-red like the picture below. Then, white-green to pin A and black-red to pin B. Can it be like that? sorry if im wrong.
And for the ground connected to which ground? ground module rs485 or ground microcontroller?