Author Topic: What it mean when we say RS-485 is used for long-distance communication.  (Read 6205 times)

0 Members and 3 Guests are viewing this topic.

Offline EVblog1Topic starter

  • Regular Contributor
  • *
  • Posts: 145
  • Country: 00
I am mainly trying to understand what people actually mean when they say RS-485 is used for long-distance communication.

I have never used a physical RS-485 chip yet. I know that RS-485 can be used for CAN communication. I also know that UART, SPI and I2C are normally used for shorter-distance communication.

For example, with UART, I think we can connect the MCU UART to an RS-485 transceiver and send data over a longer distance.

What I am not clear about is SPI and I2C. Can we also use RS-485 transceivers with SPI or I2C to send data over a long distance, something like 100 km? For example, if we have an I2C sensor located some distance away 100KM, can we connect an RS-485 chip to SDA and SCL and use the RS-485 cable for the communication?
 

Online coromonadalix

  • Super Contributor
  • ***
  • Posts: 8755
  • Country: ca
i think you need to  RS485 RS422  working principles ...

AI  some basics

How RS-485 Works
Uses two twisted wires (labeled A and B) to send data as a pair of opposite voltage signals.
Relies on the voltage difference between the two lines rather than a single wire compared to ground, which blocks out electrical noise.
Operates mostly in half-duplex mode, meaning devices share the same wires and take turns sending or receiving data one way at a time.

Key Performance Limits
Maximum distance: Up to 1,200 meters (about 4,000 feet) at slower speeds.
Device limit: Connects up to 32 standard unit loads (devices) on one network, expandable with repeaters.
Speed: Reaches up to 10 Mbps over short ranges, dropping to around 90–100 kbps at maximum distance.

Neither SPI nor I2C are designed for long distances.
Both are meant for short board-level communication under a few inches or centimeters.
SPI uses push-pull drivers that handle noise slightly better, but its high clock speeds and sharp edges cause reflection issues over long wires.
I2C uses weak pull-up resistors that limit distance severely due to capacitance.

Why They Fail Over Distance
Capacitive Loading: Long wires add high capacitance, rounding off square waves.
Signal Reflection: High-frequency clock and data edges bounce back, corrupting bits.
Noise Vulnerability: Unshielded lines pick up outside electrical interference easily.
How to Extend Them (If Necessary)Slow the Clock: Drop speeds to lowest kHz settings.
Lower Pull-ups: Use stronger (lower ohm) resistors for I2C.
Use Extender ICs: Add differential I2C/SPI buffer chips (like P82B715 or RS485 transceivers) to convert signals.



Or use wireless systems, add some repeaters  etc ...

and theses question where asked in the past on some threads
« Last Edit: August 16, 2026, 01:29:33 pm by coromonadalix »
 
The following users thanked this post: 5U4GB

Offline eugene

  • Frequent Contributor
  • **
  • Posts: 600
  • Country: us
I am mainly trying to understand what people actually mean when they say RS-485 is used for long-distance communication.

I have never used a physical RS-485 chip yet. I know that RS-485 can be used for CAN communication. I also know that UART, SPI and I2C are normally used for shorter-distance communication.

For example, with UART, I think we can connect the MCU UART to an RS-485 transceiver and send data over a longer distance.

What I am not clear about is SPI and I2C. Can we also use RS-485 transceivers with SPI or I2C to send data over a long distance, something like 100 km? For example, if we have an I2C sensor located some distance away 100KM, can we connect an RS-485 chip to SDA and SCL and use the RS-485 cable for the communication?

I think you've mistaken EEVBlog for a chat bot.

What efforts have you made to answer these questions yourself? You shouldn't expect others to work harder on your education than you do yourself.
90% of quoted statistics are fictional
 
The following users thanked this post: nctnico, coromonadalix, Kilrah, Doctorandus_P, cfbsoftware

Online Unixon

  • Frequent Contributor
  • **
  • Posts: 761
RS-485 uses single differential signal over twisted pair which makes it resistant to different kinds of noise, in this regard it is similar to CAN. Since it's a only a single signal over dual conductor it is not susceptible to accumulating phase difference along different wires + less affected by long line capacitance and inductance. However, RS-485 still requires proper line termination.
RS-422 uses two twisted pairs for full-duplex communication and that is basically equal to two RS-485 on each side.
 

Online Unixon

  • Frequent Contributor
  • **
  • Posts: 761
What I am not clear about is SPI and I2C. Can we also use RS-485 transceivers with SPI or I2C to send data over a long distance, something like 100 km? For example, if we have an I2C sensor located some distance away 100KM, can we connect an RS-485 chip to SDA and SCL and use the RS-485 cable for the communication?
Well, physically you can connect things this way but this has zero sense.
SPI an I2C are two buses for ICs talking to each other on a single PCB or within a device with fixed configuration that is not adding or removing components and not changing line properties.
If you have a sensor with SPI/I2C interface and you want if over long distance, you have to attach it to an MCU and then add a proper transceiver capable of long distance communication.
Nobody bridges these low level buses over RS-485/Ethernet/etc directly, this is not workable.
 
The following users thanked this post: 5U4GB

Online nctnico

  • Super Contributor
  • ***
  • Posts: 30153
  • Country: nl
    • NCT Developments
I am mainly trying to understand what people actually mean when they say RS-485 is used for long-distance communication.

I have never used a physical RS-485 chip yet. I know that RS-485 can be used for CAN communication. I also know that UART, SPI and I2C are normally used for shorter-distance communication.

For example, with UART, I think we can connect the MCU UART to an RS-485 transceiver and send data over a longer distance.

What I am not clear about is SPI and I2C. Can we also use RS-485 transceivers with SPI or I2C to send data over a long distance, something like 100 km? For example, if we have an I2C sensor located some distance away 100KM, can we connect an RS-485 chip to SDA and SCL and use the RS-485 cable for the communication?

I think you've mistaken EEVBlog for a chat bot.

What efforts have you made to answer these questions yourself? You shouldn't expect others to work harder on your education than you do yourself.
I agree!
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline EVblog1Topic starter

  • Regular Contributor
  • *
  • Posts: 145
  • Country: 00
I think you've mistaken EEVBlog for a chat bot.

What efforts have you made to answer these questions yourself? You shouldn't expect others to work harder on your education than you do yourself.
I did try to make it clear what I already know and what I am actually confused about.

I have also bought two MAX485 TTL-to-RS485 converter modules so I can experiment with them myself. I just thought it would be better to clear up the basic concept before I start connecting an I2C or SPI device directly to them.

I am not expecting anyone to do the learning for me. I am trying to understand whether my basic understanding is correct before I experiment with the hardware
 

Offline artag

  • Super Contributor
  • ***
  • Posts: 1542
  • Country: gb
I think you've mistaken EEVBlog for a chat bot.

What efforts have you made to answer these questions yourself? You shouldn't expect others to work harder on your education than you do yourself.

I thjink you've mistaken EEVBlog for StackOverflow.
We try to be helpful and friendly here.
 
The following users thanked this post: Fire Doger, 5U4GB, EVblog1

Offline Kilrah

  • Supporter
  • ****
  • Posts: 1993
  • Country: ch
I am mainly trying to understand what people actually mean when they say RS-485 is used for long-distance communication.
Simply read specs/widespread documentation about it?

I know that RS-485 can be used for CAN communication.

If you want to use RS485 you use RS485 transceivers, if you want to use CAN communications you use CAN transceivers.
« Last Edit: August 16, 2026, 03:45:03 pm by Kilrah »
 
The following users thanked this post: Bearded One

Offline HwAoRrDk

  • Super Contributor
  • ***
  • Posts: 1919
  • Country: gb
I have also bought two MAX485 TTL-to-RS485 converter modules so I can experiment with them myself. I just thought it would be better to clear up the basic concept before I start connecting an I2C or SPI device directly to them.

You won't be able to use a MAX485 module with SPI. It only has a TX/RX pins. SPI needs four signal lines: MOSI, MISO, CLK, CS. I couldn't say whether you might be able to misuse an RS-485 transceiver to pass I2C (CLK & DATA).
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 6102
  • Country: nl
Re: What it mean when we say RS-485 is used for long-distance communication.
« Reply #10 on: August 16, 2026, 03:53:07 pm »
You have to understand the properties of each interface to know if it can be combined with specific line drivers.

This document of TI shows some background on RS485 and in what circumstances it can be used. https://www.ti.com/lit/wp/slla545/slla545.pdf?ts=1786843826709

It also shows that for bidirectional operation each node has to control the bus transceiver to set it in the correct state. This requires "intelligence" that I2C devices, that are not a MCU, lack. I2C uses a clock signal and a bidirectional data signal, both based on open collector or drain technology. This allows every device on the bus to pull a line low without damaging the drivers. It is not easy to simulate this onto a RS485 bus. This needs two pairs, so two RS485 transceivers at each node, and then still some way to control the direction, which in I2C itself is inherent to the open collector/drain technology.

SPI is also not very suited for RS485 because it has a clock signal besides a data signal. Sure it is possible to use special setups to mix the clock in with the data at the transmitter side and extract it again at the receiver side, but makes things very complex.

If one wants SPI over a longer distance LVDS drivers/receivers are better suited, but RS485/RS422 can be used to, though using multiple pairs and set to unidirectional is easiest. This still does not make it a multi node/master bus.

Best to ask yourself why you would want to have either I2C or SPI over a longer distance and in a setup it is not designed for.

About distance, there are limits imposed by physics, like coromonadalix already mentioned. For 100km even fiber is not without issues.

Online nctnico

  • Super Contributor
  • ***
  • Posts: 30153
  • Country: nl
    • NCT Developments
Re: What it mean when we say RS-485 is used for long-distance communication.
« Reply #11 on: August 16, 2026, 03:59:50 pm »
I think you've mistaken EEVBlog for a chat bot.

What efforts have you made to answer these questions yourself? You shouldn't expect others to work harder on your education than you do yourself.
I did try to make it clear what I already know and what I am actually confused about.

I have also bought two MAX485 TTL-to-RS485 converter modules so I can experiment with them myself. I just thought it would be better to clear up the basic concept before I start connecting an I2C or SPI device directly to them.

I am not expecting anyone to do the learning for me. I am trying to understand whether my basic understanding is correct before I experiment with the hardware
Again, there are really good books on this topic which will help you much better compared to asking questions on a forum. A book bundles information properly and guides you along the way explaining all the fundamentals and how they are intertwined. A forum (or AI) is not a replacement for that.
« Last Edit: August 16, 2026, 04:04:49 pm by nctnico »
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Online coromonadalix

  • Super Contributor
  • ***
  • Posts: 8755
  • Country: ca
Re: What it mean when we say RS-485 is used for long-distance communication.
« Reply #12 on: August 16, 2026, 04:31:23 pm »
and what would be the spi or i2c needs, sensors, communications, i/o  ?
 

Offline Zoli

  • Frequent Contributor
  • **
  • Posts: 793
  • Country: ca
  • Grumpy old men
Re: What it mean when we say RS-485 is used for long-distance communication.
« Reply #13 on: August 16, 2026, 04:47:36 pm »
...
What I am not clear about is SPI and I2C. Can we also use RS-485 transceivers with SPI or I2C to send data over a long distance, something like 100 km?
...
100km is the optical domain, with multiple hops, so no, you cannot use RS485/422 to reach 100km, beside the electrical/logical conversion.
 

Offline fchk

  • Frequent Contributor
  • **
  • Posts: 409
  • Country: de
Re: What it mean when we say RS-485 is used for long-distance communication.
« Reply #14 on: August 16, 2026, 04:55:41 pm »
I have never used a physical RS-485 chip yet. I know that RS-485 can be used for CAN communication.
Wrong. You can't. Both are differential, but on RS485 exactly one node can drive the bus. On CAN many devices may drive the bus to dominant (0) level. If no node drives the CAN bus the bus is on Recessive (1) level.

What I am not clear about is SPI and I2C. Can we also use RS-485 transceivers with SPI or I2C to send data over a long distance, something like 100 km?
100km is out of reach. SPI and I2C are good for some cm to to 50 cm or so. CAN and RS485 are good for distances in meters up to 10s of meters, maybe 100m. Fiber optics (single mode) are good for some kilometres up to 30 or 50km.

For example, if we have an I2C sensor located some distance away 100KM, can we connect an RS-485 chip to SDA and SCL and use the RS-485 cable for the communication?
No. Usually you use a microcontroller connected to ethernet that controls the local SPI and I2C devices.
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 30153
  • Country: nl
    • NCT Developments
Re: What it mean when we say RS-485 is used for long-distance communication.
« Reply #15 on: August 16, 2026, 04:58:44 pm »
100km is out of reach. SPI and I2C are good for some cm to to 50 cm or so. CAN and RS485 are good for distances in meters up to 10s of meters, maybe 100m. Fiber optics (single mode) are good for some kilometres up to 30 or 50km.
With fiber optics you can span well over 100km using long range 1Gbit SFPs. The actual distance depends a bit on the dampening of the link and components in between (like patch racks and OADM filters) but 100km is not problematic (been there, done that).
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline eugene

  • Frequent Contributor
  • **
  • Posts: 600
  • Country: us
Re: What it mean when we say RS-485 is used for long-distance communication.
« Reply #16 on: August 16, 2026, 05:09:07 pm »
I thjink you've mistaken EEVBlog for StackOverflow.
We try to be helpful and friendly here.

OK. UART and RS482 are both asynchronous protocols, but RS485 uses a differential pair of wires to largely eliminate common mode noise. so can be used over longer distances and in noisier environments.

I2C is a synchronous protocol so there is no easy way to convert it to RS485. Moreover, clock and data lines are actively driven low but use pull-up resistors to bring the lines high. This allows multiple devices on a single I2C bus while handling bus contention gracefully, but seriously limits bus speed and distance mainly due to capacitance of the lines.

SPI is a synchronous protocol so, like I2C, it is not simple to convert to RS485. Unlike I2C it drives both clock and data lines actively. Unlike RS485 it is single ended, so is more prone to common mode noise. Multiple devices can be used on a single SPI bus, but require a separate chip select line for each slave device.

I think you've mistaken EEVBlog for a chat bot.

What efforts have you made to answer these questions yourself? You shouldn't expect others to work harder on your education than you do yourself.
I did try to make it clear what I already know and what I am actually confused about.

I have also bought two MAX485 TTL-to-RS485 converter modules so I can experiment with them myself. I just thought it would be better to clear up the basic concept before I start connecting an I2C or SPI device directly to them.

I am not expecting anyone to do the learning for me. I am trying to understand whether my basic understanding is correct before I experiment with the hardware

You haven't told me what efforts you've to answer the questions yourself. However, if you follow all of the links I provided and do all of the reading, then you will have done your homework
« Last Edit: August 16, 2026, 05:14:34 pm by eugene »
90% of quoted statistics are fictional
 
The following users thanked this post: artag

Online Sorama

  • Super Contributor
  • ***
  • Posts: 1048
  • Country: be
Re: What it mean when we say RS-485 is used for long-distance communication.
« Reply #17 on: August 16, 2026, 06:03:21 pm »
Actually,RS485 is not a protocol, but an electrical specification.

You can use it as well for short distances too, like for a domotics system bus to all the control panels in the walls that replaces the classic switch.
 

Online Siwastaja

  • Super Contributor
  • ***
  • Posts: 11181
  • Country: fi
Re: What it mean when we say RS-485 is used for long-distance communication.
« Reply #18 on: August 16, 2026, 06:53:26 pm »
One thing to remember, which is widely known but still underemphasized: RS485, when used with UART-like higher level which depends on bus idle -> start bit sequence (for example, MODBUS), is prone to seeing false start bits from noise. Standards like MODBUS mandate bus biasing (very often incorrectly titled as fail-safe biasing; MODBUS standard purposely does not use this term, others should follow the standard and avoid it as well) so that idle level is well defined and just past the hysteresis band of the transceivers, but even then that reduces the noise margin by an order of magnitude compared to e.g. always-on, unidirectional RS422 (which otherwise uses the same signalling and would be thus comparable) - so RS485 multi-drop (modbus or modbus-like) bus isn't, even when correctly constructed, as robust against noise as one might hope if they don't look deep into the details. Sure, usually good enough, when correctly done. But the situation is made worse by lack of knowledge of this issue - and to some extent, some professionals even refusing to believe the whole thing is true - causing atrocities like completely unbiased buses in the wild; made even worse by the fact that some transceivers include some very weak (tens of kOhm) bias resistors so that the product appears to work in perfect lab conditions and a short cable. But relying on those instead of the mandated (e.g., MODBUS standard) ~0.5kOhm biasing values sets the noise margin to negative. In this case, it would be better if transceivers didn't try to bias at all - then the failures would reproduce more easily already in early lab testing, and designers would be forced to read the documentation and understand it, or hire actual experts for consultation.

Transceivers with altered logic threshold levels add to the confusion: they "solve" the problem at the point where it cannot be usually solved; sacrificing interoperability with other systems. Such transceivers are the solution only to a fully closed product ecosystem - those do exist, of course; then they create a dependency on a specific part that can't be second-sourced. Even calling that "RS485" is a risk in itself; some might think there is interoperability. But, if I were to design a fresh, closed 3-wire multidrop ecosystem, at least I wouldn't choose RS485. CAN would be a much more obvious choice; it solves the whole bias issue in a much more elegant way (60-ohm pull-together with logic level thresholds that give decent noise margin out of box). Of course with CAN you are also getting the protocol level, so that leaves less flexibility than RS485, but then again the CAN protocol is quite versatile and good approach to most such wired multi-device networks.

So, what it means when we say RS-485 is used for long-distance communication: that's easy, it means nothing. It means whoever said that read that somewhere. They probably have no idea whatsoever how RS-485 actually works and what sort of problems RS-485 specialists battle with every day.
« Last Edit: August 16, 2026, 06:55:18 pm by Siwastaja »
 
The following users thanked this post: 5U4GB

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 5323
  • Country: nl
Re: What it mean when we say RS-485 is used for long-distance communication.
« Reply #19 on: August 17, 2026, 02:10:07 pm »
Of course with CAN you are also getting the protocol level, so that leaves less flexibility than RS485, but ...

For one of my next projects, I'm planning to bolt on CAN transceivers to a bunch of UART's of uC's.
This way I can make use of the advantages of the CAN transceivers, without having to deal with the "weird" addressing scheme of CAN, that does not fit well with my goals.

Advantages for me is that I can omit the optocoupler for the "RS485 enable" signal for the nodes that have to be isolated, and that I can do collision detection to make the communication a bit more reliable.

So, what it means when we say RS-485 is used for long-distance communication: that's easy, it means nothing.

It's often quoted that RS485 works up to 1km or 1.5km (with baudrate limitations). For longer runs, you'll have to insert repeaters along the way. This is common practice for all long cables. For example, intercontinental optical fiber sea cables also have copper wires for DC power (often 1000V or more to reduce the current) and this is used to provide the power for "signal reconditioning units" that are built into the cable at regular intervals.

It means whoever said that read that somewhere. They probably have no idea whatsoever how RS-485 actually works and what sort of problems RS-485 specialists battle with every day.

Aye. A lot of such "specialists" don't know much about electronics or how an oscilloscope work. There are a lot of stubborn misconceptions around RS485. One of the most stubborn misconceptions is that two wires are enough and you don't need a 3rd wire to get a defined common mode reference for the transceivers.
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 15910
  • Country: ch
Re: What it mean when we say RS-485 is used for long-distance communication.
« Reply #20 on: August 17, 2026, 03:21:25 pm »
What I am not clear about is SPI and I2C. Can we also use RS-485 transceivers with SPI or I2C to send data over a long distance, something like 100 km?
100km is out of reach. SPI and I2C are good for some cm to to 50 cm or so.
FYI, if you're not pushing it to the higher speeds, it's not too hard to get several meters out of I2C. I think I was able to do something like 3 or 4m.
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 5323
  • Country: nl
Re: What it mean when we say RS-485 is used for long-distance communication.
« Reply #21 on: August 17, 2026, 09:43:15 pm »
Yes, you can get a few meters out of I2C, but it's pushing the limits and you have to verify signal intetrity. Especially the risetime.

Midi may also be interesting. It basically uses 7-bit serial / uart with a series resistor in the driver, and an optocoupler in the receiver. This turns it into something close to a current loop and you can probably get some "decent" distance out of it.
 
The following users thanked this post: tooki

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 6102
  • Country: nl
Re: What it mean when we say RS-485 is used for long-distance communication.
« Reply #22 on: August 18, 2026, 04:21:17 am »
Midi may also be interesting. It basically uses 7-bit serial / uart with a series resistor in the driver, and an optocoupler in the receiver. This turns it into something close to a current loop and you can probably get some "decent" distance out of it.

MIDI is galvanically separated current loop. There is no mutual ground involved and the signaling is based on current flowing trough a loop. They need the galvanic separation to avoid ground loops on the audio.

It uses 8 bit no parity and 1 stop bit to transmit data. The 7 bit is a protocol thing limiting the usable data range, as the eight bit is used to signal a command byte.

The usable distance will decrease with the raise of the bitrate. At 31250bps it is stated to do 15 meters. It very much depends on the optocoupler as to what the max bitrate can be.

Online Siwastaja

  • Super Contributor
  • ***
  • Posts: 11181
  • Country: fi
Re: What it mean when we say RS-485 is used for long-distance communication.
« Reply #23 on: August 18, 2026, 07:08:37 am »
The usable distance will decrease with the raise of the bitrate. At 31250bps it is stated to do 15 meters. It very much depends on the optocoupler as to what the max bitrate can be.

Yeah. MIDI was designed at a time when optocouplers were horribly slow. Even achieving the MIDI's weird 31250bps, which sounds slow to today's standards, meant choosing a specific types of fast optocouplers, not any random part could make it.
 

Online Unixon

  • Frequent Contributor
  • **
  • Posts: 761
Re: What it mean when we say RS-485 is used for long-distance communication.
« Reply #24 on: August 18, 2026, 08:53:31 am »
One of the most stubborn misconceptions is that two wires are enough and you don't need a 3rd wire to get a defined common mode reference for the transceivers.
Hmm... what and how should they do with this reference?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf