Electronic – Creating chained digital current loop

atmegacurrent-sourcetransmission line

I need to send some digital data and power for long distance (around 60 meters) using only 3 wires.

Data speed is low, something like 100bps is enough, 1000bps would be perfect (12.5Bps and 125Bps).

There is always one transmitter and multiple receivers (amount can change at any moment), so transmission is always in the same direction.

Transmitter and receivers are based on ATMega uC. My idea is to use current loop here, however I'm not able to use only one loop, because then I would have to use some termination in last receiver, which I can't. So I'm thinking about creating multiple current loops, so that each receiver would re-transmit data to next current loop.

What's the simplest way to create reliable digital current transmitters?

The current itself doesn't really matter, it can be classic 4-20mA, or something less then that, since it will transmit digital signals. What I got for now is LM317 as current source with switchable resistor (with MOSFET), so I'm getting 4 or 20mA output, but maybe there is some easier way.

As receiver I have optocouplers, which again, I'm not sure if it's best way to accomplish that. Here probably would be easier to just use resistor between data line and ground as receiver.

RS232 is not applicable here because of voltage drop that will occur between two power wires, so that in last receiver I'll get for example {+20V, -4V} instead of {+12V, -12V}

Best Answer

Given your slow data rate and uni-directional communications you can get away with voltage signaling on a common bus, as long as you make sure to reduce the rise/fall transition slopes so as to avoid EMI and reflections and take into account the voltage drop on your ground return.

A slow RS232 driver, such as this one, has a rise time of ~2µs which implies a wavelength of more than 1km if you take into account cable propagation speeds. That means that you can get away without termination for your <100m cable run (I would still add some resistance to increase the losses and further attenuate any reflections).

To compensate for the ground drop the easiest solution is to capacitively couple to the cable, and add a couple of diodes to restore your DC to the proper levels. Just like this:

schematic

simulate this circuit – Schematic created using CircuitLab

As long as there is not too much attenuation, you would have full RS-232 signal levels in your receivers and you could actually use the normal return-to-zero RS-232 protocol. The capacitors add a minimum load to the line except when there is a large (temporary) DC mismatch from a receiver to the cable. Adjust the voltage divider to ensure your voltage levels are enough to cross the thresholds of the RS-232 receiver. Alternatively, you could use Manchester coding with an RS-232 driver so as to remove any need for DC recovery.

A bigger issue is dealing with cable length. Standard RS-232 might be marginal for this, but you could get away by (1) reducing the capacitance of your cable, and/or (2) increasing drive strength by, for example, placing a couple of line drivers in parallel.

If you are doing point-to-point communications in a daisy-chain fashion, I don't see why you would need a current loop at all (particularly when the return of the loop is your ground, which negates any noise-immunity advantages) use RS-232 receiver/transmitter pairs as repeaters on the cable. Given that the return grounds will be local, the overall ground voltage rise would not be significant for each link.