6

The specific question I want to ask is whether I can transmit VCC(5VDC) and GND power signals for powering the destination circuit (in an RS-485 arrangement) or not.

The power lines will be grouped with the differential signals of the RS-485.

For background...

I am working on a project on a water level detector which involves communication between two microcontrollers over a long distance. As far as I have done research for my needs, RS-485 will be the best technique for long distance communication. It's between two building floors, as the level detector will be installed in the water tank on a terrace and the other monitoring MCU will be installed at my home, two floors below the terrace.

I will be using MAX-485 IC which connects with the MCU using DI, DE, RE, RO. It transmits the data over the differential lines A and B. My doubt is: can I power the MCU of the level detector using the VCC and GND signals that will be transmitted over two additional wires along with the differential signal lines of RS-485. There is no power source available on the terrace and I am trying to avoid using any batteries.

The RS-485 signalling will be using the UART protocol at 115200 bps typical.

The level detector circuit will be consist mainly of an MCU (probably atmega328p) and an HC-SR04 ultrasonic module. (I am open to using any less complex low-power MCU.) The atmega328p datasheet states 200 mA max DC current consumption and this website states that the HC-SR04 has 15 mA working current consumption.

Optionally, I am planning to include a small low power DC motor for operating a small plastic shutter for Ultrasonic module, and also some sensors like a Microphone and an Infrared TxRx LED pair. Hence the maximum supply current drawn by the level detector circuit will not exceed 500 mA, assuming a very lightweight low current motor.

I am a little bit confused with the below points:

  1. 5VDC-GND will interfere with the differential signals A-B.
  2. The differential signals will interfere with the VCC-GND.
  3. The VCC-GND signals will be affected/degraded due to outdoor environmental noise or long-distance transmission wires.
  4. Additional: As per the need of a 4 Wire cable, I am planning to use CAT-2 Cable as I already have it in a length of 20m-30m. The CAT-2 cable is a two pair (Single strand thick copper wires) copper cable used for ADSL networking (broadband connection). Is it a good idea to use that particular type of cable or there is a better alternative for this need.

Any suggestion/solution within/out of the scope of my question is highly appreciated.

TonyM
  • 21,742
  • 4
  • 39
  • 62
  • 1
    A warm welcome to the site and thanks for a well-written question. What current will your water level sensor draw from the 5 V supply? If you don't have an accurate figure, you can estimate a typical current, and a worst-case current with margin added. What bit rate will you running your comms at? Please edit this information into your question (no need to write 'EDIT' in your question, just expand it neatly). Thanks. – TonyM Sep 29 '20 at 15:55
  • 1. No. 2. Not much because they are differential. In any case they operate in different frequency bands, so any interference can be removed by filtering the DC supply. 3. Yes. Calculate resistance and current and decide if teh voltage drop is tolerable. 4. It can work : the rest of the question is opinion based. –  Sep 29 '20 at 15:59
  • 3
    RS485 only really makes sense at cable lengths beyond those for which you could wisely transmit a direct 5v supply rail. If your range is short, you don't need RS485. If the range is long you want to transmit a higher supply voltage and have regulation at the load end. You power requirement probably is such that you need the 48 volts of typical power-over-ethernet & telecom implementations of this kind of idea, but using a 12 volt supply and a (perhaps switching) regulator at the far end would be sensible. – Chris Stratton Sep 29 '20 at 16:07
  • 1
    I would agree with user @ChrisStratton about the supply. You could power both boards with a higher voltage PSU, then use a LDO for 5V or 3.3V. You then supply a remote board with 12/24VDC over two twisted pairs. – Marko Buršič Sep 29 '20 at 16:14
  • 1
    thanks for the replies @TonyM I have updated the question as per you told me. – Maneesh Verma Sep 29 '20 at 16:26
  • 1
    @ChrisStratton thank you very much for your opinion. I am also open to other better alternatives for my wiring issue. Any other suggestion will be highly appreciated. – Maneesh Verma Sep 29 '20 at 16:26
  • What is the differential impedance of Cat2 cable? The RS-485 pair must be terminated at both ends of the cable with a resistance equaling to characteristic impedance of the cable. – Justme Sep 29 '20 at 16:46

2 Answers2

6

Properly regulated and filtered (decoupled) supply rails will have practically no a.c. content. Therefore they will not radiate into your communications lines and interfere with communications.

Decent decoupling capacitance at both the supply source and the load will keep the supply impedance very low. If the RS485 communications lines are properly terminated and with your 115,200 bps bit rate, the effect of the communications lines on the supply rails can go from small to practically nothing.

To compensate for voltage drops caused by the load current and the cable resistance, you can provide a higher supply voltage at the source cable end and regulate it down to 5 V at the load cable end.

If the load current was low enough, you could have used a linear regulator and the losses may be insignificant to your system. Example figures (based on no application data) might be supplying 9 V down the cable to power a 5 V LDO regulator in your sensor.

However, with the 500 mA maximum load current, it is worth using a switching step-down regulator in the sensor. An advantage of that is the supply cable current will drop as the source-end voltage is increased. The disadvantage is more complexity that wouldn't be worth it for a low current load.

I can't find max. current data for CAT-2 cable but CAT-5 cable is in the order of 577 mA. So you could use a 12 V source cable-end supply and a load cable-end switching regulator to drop 12 V to 5 V. If the load-end regulator was only 80% efficient, it'd draw 260 mA from 12 V supply to deliver 500 mA to the load. This ignores the losses in the cable, which is your further consideration when you select the actual cable. But your actual currents are likely to be much lower, from your question, and more efficient regulators are readily available.

TonyM
  • 21,742
  • 4
  • 39
  • 62
2

5VDC-GND will interfere with the differential signals A-B.

Because of the close proximity of the cables they have cross inductance and capacitance. Which looks like this (with two conductors, more conductors gets more complicated, but any two conductors can be modeled like this) :

enter image description here Source: http://www.bluejeanscable.com/articles/whatwiredoes.htm

(the bottom diagram is simplified from the top)

So what ends up happening is if you run a current in one wire, especially a changing current, it can cross over to the other wire. Use a different wire with two shielded pair or two UTP to minimize crosstalk

The VCC-GND signals will be affected/degraded due to outdoor environmental noise or long distance transmission wires.

Because the VCC and ground form a loop with the load, any magnetic fields or changing magnetic fields will create a current in the loop. To minimize the loop area twisted pairs can be used (the twist creates cancelling loop areas).

Additional: As per the need of a 4 Wire cable, I am planning to use CAT-2 Cable as I already have it in a length of 20m-30m. The CAT-2 cable is a two pair (Single strand thick copper wires) copper cable used for ADSL networking (broadband connection). Is it a good idea to use that particular type of cable or there is a better alternative for this need. Any suggestion/solution within/out of the scope of my question is highly appreciated.

One problem you will face is cable resistance. Cat 2 should be somewhere around 0.066/m, with 30m of wire this would be ~2Ω of loss in one direction (vcc), and 2Ω more for the return (gnd). This means that you will most likely run into problems with a changing current from the load (I don't know what your load is, but 100mA will cause a 0.4V change in voltage from the cable, which could be a problem for the load), you will need to compensate for this loss by either using a bigger cable size than awg 24 for Vcc and GND. Or using more conductors for Vcc and gnd. If your load does not have a regulator it could be extra sensitive.

Voltage Spike
  • 75,799
  • 36
  • 80
  • 208