Hi,
I seem to have run into a problem. I am using MAX485 (RS485 to ttl, at uno side) and MAX485 (RS485 to USB serial @ at pi side). Now the problem is that this simple setup works at shorter distance,(tested 10 meters). But now I have got a reel of 305 meters(cat 6E, shielded) and it’s not working.
There is absolutely no voltage drop across the terminal.
The wires are properly crimped
The resistance across the end of each wire is 56-57 ohm.
Below image is only for reference, there is no special code as I am using this only for simple data transfer. Not master slave configuration. I have two separate TRANSRECEIVER for full duplex connection. So, one of them is always in receiving state(de,re pin set to low at all times) and other is sending(de,re untouched).
Have you connected GND on both sides ? Your picture does not show that.
It is important that you use a 'twisted pair' for lines A & B , so that is 2 wires with the same color, one of which with white stripe.
For the Common GND i just take 1 of the other 6 wires in the UTP cable, though i don't see a GND connection on the depicted units you are using.
Also make sure that there is just a single terminator (The 120R resistor) at the receiving end.
Like that you should be able to reach up to 330 meters at 250kbps, but if you don't manage, may i suggest to temporarily drop the speed to 115200 to see if that fixes things.
If it works at shorter distance there is no need for checking the code,
Shield/ground is only needed at one end, as RS485 is a differential signalling connection.
The twisted pair is required for common-mode noise rejection.
Ground at both ends might introduce a ground/earth loop… test if you’re using it.
The data signalling is almost irrelevant, as long s both ends are sending and expecting the same protocol.
You could use one of the onboard hardware serial,ports, or software serial at a lower rate.
No, you need the ground, as while the signalling is differential, the voltage on the signal wires needs to be (more or less) within the supply voltage limits.
First of all, thankyou so much for replying
As of now no, but i will give it try. (future implementation would be with a PI 3b and would share the power source, the lan cable consist of two power wires). (cat 6e also has a drain wire)
Coming to the terminating resister, it's an off shelve MAX485 and USB to MAX485 module.
refer to the image. As far as i can see and understand there is just one terminating resister at the sending side ( if this is the problem i could desolder from MAX485 and solder it to MAX485 usb)
So do you think i should do that ?
It works perfectly for short distance, i get full duplex connection. It provides me reading from 12 different sensors.
@Deva_Rishi check the image here of the MAX485 to usb. I’m replying to multiple comments because it won’t let me upload more than 1 image at a time. This converter doesn’t have a terminating resister and is at receiving end.
The resistance across each strand of wire from end to end (305 meters) is around 56-57 ohm.
If this is what you are asking for, or please explain. thankyou.!
Yeah it doesn't appear to have, i agree, maybe the unit is mainly meant to send. Anyway, the terminator needs to be on the receiving end, and with longer cables this matters more.
Well that is where it is supposed to be. At the end of the 'chain' , not at the beginning. RS485 can have multiple receivers, where the last one should be terminated.
@Deva_Rishi It works like a charm now. The major problem was with the terminating resistor at the sending side. I also change the baud rate to 38400 and now it's working fine.
I also tested the system with and without grounding for research purpose. It showed no difference and was able to perform just fine. Though, I would be connecting the ground as I will be using this in industrial environment with high inductive loads.
Again, Thanks a lot and thanks to everyone who pitched in.