1
\$\begingroup\$

I'm looking at using the RS485 to communicate between two Arduinos. I'm trying to wrap my head around the current requirements though... If I connect a driver to a receiver through a differential pair, then what concerns do I have regarding current sourcing and sinking, as the datasheets I've seen all seem to point to negative currents somewhere along the line.

Am I not interpreting the datasheets correctly. Is it more of a case of a small amount of current will flow from the arduino to the driver. Likewise, a small amount of current will flow from the receiver to the arduino, but for the most part the driver and receiver will source and sink current from their relevant power supplies?


I have included the relevant parts of the datasheet as follows. For the driver (datasheet):

Driver datasheet


The relevant receiver (datasheet) extract is as follows:

Receiver datasheet

Edit (example circuit)

To clarify the given answer, if I had a circuit below (it cannot be simulated) and had a driver and receiver wired up with the diode it would work okay as the driver and reciever would not attempt to sink current to their respective control pins?

schematic

simulate this circuit – Schematic created using CircuitLab

Also, the driver I can see sources 200mA from VCC, but sinks a minimum of 200mA into GND, which is a standard forward voltage circuit... Is this correct? (I'm not too familiar as yet with reverse voltages, sinking current etc...). However the input current (assuming that is what I'm calling the 'in' port that connects to the microcontroller) has a +- of 1 uA, which I am assuming means it can sink or source current from the microcontroller. If this is the case, it would seem to me the diodes would stop this circuit working?

\$\endgroup\$
  • \$\begingroup\$ Maybe show the part of the data sheet that confuses you as an embedded image. \$\endgroup\$ – Andy aka Apr 18 '16 at 8:54
3
\$\begingroup\$

THe RS485 line is terminated by 120 Ohm resistors on both ends, so when the transmitter polarizes the differential pair, the current flows and the power is absorbed for the most part on the termination resistors, since the receiver has high impendence inputs.

Obviously the current is provided by the transmitting side power supply, and is always entering the VCC power pin, exiting the transmitter high pin, flowing through the line and the terminating resistors, re-entering the transmitter low pin, and finally exiting form the ground one.

The microcontroller-driver connection is a simple logic gate matter, you must provide the tx, tx enable and rx enable signals, and receive the rx signals, that are all general purpose logic signals.

You don't need diodes between logic inputs and outputs, the Arduino has 5V logic, and logic levels compatible whith those of the line driver and receiver, you surely can connect the inputs and the outputs directly without problem.

Consider that the transmitter and the receiver can have different ground levels, so that the input of the receiver accepts a wide range of voltages, -15V / +15V, allowing approximately a +/- 10 V difference between the two ground connections.

Moreover, I might add that the driver and receiver that you selected are not proper RS485 compliant devices. See the SN65LBC174, that is RS485 compliant, to evaluate the differences.

\$\endgroup\$
  • \$\begingroup\$ Hello CasaMich, thanks for your answer. I have added a schematic would you mind just having a look over and just stating if the schematic would work? Thanks. \$\endgroup\$ – R4D4 Apr 19 '16 at 17:12
  • \$\begingroup\$ I simply don't understand why you inserted the two diodes between the microcontroller port and the line driver. These are logic connections, and the microcontroller outputs are of course capable to supply the small current necessary to drive the input, this is what they are intended for. The diodes have two negative side effects, the first is that you have a drop of 0.7V, which reduce the noise margin; the second is that you cannot drive the input low; when your output goes low, the input remains floating. \$\endgroup\$ – CasaMich Apr 20 '16 at 7:46
  • \$\begingroup\$ The diodes wouldn't be part of the circuit, it was more to help me appreciate the idea that microcontroller is not forced sink current other than through the "uC In" port. However, taking the diodes out the question, why does the input current of the driver have a +- 1 uA? Thank you! :) \$\endgroup\$ – R4D4 Apr 20 '16 at 14:54
  • \$\begingroup\$ @R4D4 It is perfectly normal for a digital input to require a small current to be driven and this current can be in two directions, based on the logic level. The output port of the microcontroller can sink current when the output is low, your idea that the current of a digital output can only be positive does not correspond to reality. In fact there are two mosfets on the output, one for each current direction. \$\endgroup\$ – CasaMich Apr 21 '16 at 7:49
  • \$\begingroup\$ Thank you so much for your patience with this... Really do appreciate it. :) \$\endgroup\$ – R4D4 Apr 21 '16 at 10:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.