0

I want to transmit signals over a long distance wire.

Let's imagine that I want to transmit the temperature information from the LM35 sensor over a long wire: instead of transmitting the voltage (which is proportional to the temperature) through the wire because the noise will change the voltage value, I can use a voltage-to-current converter and then transmit the information by current (lets say 0ºC-50ºC -> 4mA-20mA). I just need to make sure that at the receiver I convert the current back into voltage.

But now let's imagine that I want to transmit serial data, i2c or spi between long wires (+ 20 meters). Do you think it is possible to use voltage to current converters as well? I read somewhere: "Apply the signal to a digital to current converter unit and then use the current loop transmission, with 4 mA representing" 0 "binary and 20 mA representing" 1 "binary. This allows transmission rates up to 9600 bit / s over transmission distances up to 3 km. "

What do you think?

  • 2
    Your question is confusing as you ask to transfer **digital** data over a wire using a current. To do that you have to convert the digital data into an analog signal. However, you mention an LM35 which outputs an **analog** signal. I see a contradiction there. – Bimpelrekkie Jan 14 '21 at 13:11
  • 2
    I2C and SPI are designed for **short distance** communication so why mention them? There is a standard called RS485 which is specifically designed for long distance communications. I'm not saying it isn't possible with I2C or SPI but you **will** run into issues that are avoided if you use RS485. *Do you think it is possible to use...* Don't ask "Is it possible..." because although many things are **possible** that does not mean they're a **good idea**. Like I2C over long distance: possible but there are better ways. Current over a long wire: possible but there are better ways. – Bimpelrekkie Jan 14 '21 at 13:16
  • The metion about LM35 is an example that prove that is possible to transmit voltage information over current in long wires. But now, lets imagine that instead of having a voltage (proportional to temperature), I have digital data (that in fact are still voltages signals 5V='1' and 0V='0') and I want to transmit this data signals using current: '1'=5V=20mA and '0'=0V=4mA). Do you think that is possible? Do you think that in a receiver if I convert once again the current into voltage, the uC will be able to understand I2C/SPI or Serial communication? – BossGandalf Jan 14 '21 at 13:19
  • 2
    It is possible. But why reinvent the wheel, when a robust, validated standard like RS485 exists? – rdtsc Jan 14 '21 at 13:24
  • Cause I have +10 nodes in star configuration (each one +20m from the master node) and using CAN or even RS485 looks hard cause like Figure 12 of this articlev* shows, I quiet impossible to do that because impedance mismatch line transmition problems. So the only solution I can imagine is transmit data over current. idk *The article: https://www.maximintegrated.com/en/design/technical-documents/tutorials/7/763.html – BossGandalf Jan 14 '21 at 13:27
  • 2
    So your maximum distance is less than 100m? Then I would use **wireless** data transfer using cheap 433 MHz modules. Also you have a tendency to dive deep into certain solutions (using currents of xx mA to send information over a wire, can't do xyz because of impedance mismatch...) while not telling us anything about what you're trying to achieve. – Bimpelrekkie Jan 14 '21 at 13:29
  • 1
    *CAN or even RS485 looks hard cause like Figure 12 of this article shows* Uhm, yeah because that Figure 12 shows how someone **who does not understand networks and transmission lines and impedance termination works** would do it. The message is: don't do it like that. Each connection needs **it's own** input/output. It is not **hard** but it requires **a lot of hardware**. Same as an Ethernet network, you cannot just "tap off" an Ethernet connection for an extra PC. Instead you need a **switch** (or hub) for connecting devices / sharing the connection. – Bimpelrekkie Jan 14 '21 at 13:36
  • 1
    Just get onto your boss to rewire the job and do it properly (related to previous question I suspect). He's got to bite that bullet not you. – Andy aka Jan 14 '21 at 13:46
  • @Bimpelrekkie you certainly can tap off Ethernet at each point if you use 10base2, although it's kind of obsolete: https://en.wikipedia.org/wiki/10BASE2 – pjc50 Jan 14 '21 at 15:22
  • @pjc50 I was thinking of 100BASE and 1000BASE types ethernet, not the old 10 Mbit type that uses Coax. I'd say it is **very** obsolete. – Bimpelrekkie Jan 14 '21 at 15:26

2 Answers2

2

There are two problems here:

  • I2C is bidirectional. It relies on the ability of the target device to pull the data line low, as well as the host device doing so. While you might be able to replicate this with a current loop it's going to be more complicated.

  • Timing requirements. Current loops aren't magic, they still take time for the signal to propagate. For protocols using a clock line the "skew" between the host changing the clock and the relevant bit from the target returning may be a problem.

pjc50
  • 46,540
  • 4
  • 64
  • 126
0

The impedance of a loop and the BW*Distance product as well as the EMI ingress determines the SNR and thus the probability of error vs error criteria.

Current loops are historically low signal BW and high impedance to CM noise thus fairly immune to differential voltage into a load R.

Digital signals must be balanced wires to utilize the CMRR over the spectrum of the signals and cable length for noise ingress, so are fairly immune with a dispersion limit to eye-pattern measured jitter.

Parity, FEC and closed-loop retries can be used to improve digital error rates. on 30k baud-km limits.

Cable modems split the spectrum to use over a dozen parallel modems with BW compression to reduce the high BW dispersion jitter yet are amplified with high SNR (40) to achieve very high Mbd-km limits and very low BER.

Shannon-Hartley's Law can be used in all cases to design a solution for each situational requirement.

Tony Stewart EE75
  • 1
  • 3
  • 54
  • 182