1
\$\begingroup\$

I have a fishfinder,Lowrance Carbon HSD 7, and I want to connect it with the Arduino Uno to let the fishfinder transmit the Sonar data and GPS data via NMEA0183. According to the maker's site, the power/data cable uses RS422 communication having 4 cables which are RX+ RX- TX+ TX-. But the Arduino's serial communication ports are only RX and TX.

I search about the shield that can interface RS422 with Arduino, but there are very few of them. Instead I found RS485 to Arduino.

I've read some articles saying that I can connect the RS422 to RS485, with some conditions(like RS422 is full-duplex but if you connect it to RS485, it will become half-duplex, so the Arduino can only receive data, but cannot send), but I still not understand how should I connect the 4 wires to 2 wires. Should I connect RX+ and RX-(those of RS422) with RX(those of RS485), and TX+ and TX- to TX. If that is valid can I just connect RX+ and RX-(those of RS422) directly to the Arduino Uno's RX and TX+ and TX- to TX?

\$\endgroup\$
1

2 Answers 2

11
\$\begingroup\$

To answer this I need to explain a few things. (TL;DR? See Consequences below.)

Voltages

There are a number of different serial hardware solutions, to solve different problems.

  • TTL:
    The Arduino's serial connection (TX and RX) are at "TTL levels", which means 0-5V. RX needs to be within this range to be detected, and TX will only be 0 or 5 volts - 0V for "off", and 5V for "on". Each of the alternatives below use dedicated chips to convert TTL to their own voltages - but the same "off" and "on" concepts exist, so the Arduino can fully communicate using TTL with them through these chips.

  • RS-232:
    The problem with TTL is that it won't travel far on a cable - and it is easily affected by noise produced by motors and other electrical appliances in the vicinity. Therefore, the TTL levels are often converted to RS-232 levels, which are as high as 25V(!) But even weirder, the other side isn't 0V, but actually as much as negative 25V (yes, -25V). "Off" is anywhere from +3V to +25V, while "on" is -3V to -25V. That means that if you connect to a true RS-232 appliance, you need to deliver at least ±3V, but need to accept at least ±25V. Needless to say, that's a problem for microcontrollers, without support circuitry. Also, RS-232 is specified to allow only one receiver per TX - although I've put two on a short cable at 9,600 baud with no problem.

  • RS-423:
    RS-423 is a compromise between RS-232 and RS-422. Like RS-232, it only uses one wire each for RX and TX - although maxing out at ±6V. But unlike RS-232, the TX specification is strong enough, and the RX specification is sensitive enough (±0.2V), to allow up to 10 receivers on one TX line. Because RS-423 is so similar to RS-232, I'll refer to RS-232/RS-423 from now on, unless they're different.

  • RS-422:
    The problem with RS-232/RS-423 is that they're not great in (electrically) noisy environments either. To help this, RS-422 has a two-wire pair for each of RX and TX. RS-232/RS-423 reference RX and TX from a third wire, GND. RS-422 references the sense of the signal between the two-wire pair - if one wire has a higher voltage than the other, it's "on", while if it's the other way around it's "off". This is known as a "differential" system, and the two halves of the signal pair are labelled + and -.

    Electrically, if an interfering signal alters the voltage on the cable, it will affect both wires in the pair the same way - but not change the relative voltage difference between them. This increases the cable's resistance to external noise. For this reason, the voltages don't need to be as high - in fact, they're only ±6V.

    Note that for TX, the two RS-422 signals could be created by powering one wire of the pair with 0V&5V, the other with 5V&0V - and always making sure they were opposite each other. This would create a ±5V differential, which would be detected by the receiver perfectly. But this is not the way it is usually done; it's usually done with a true differential (isolated) transmitter.

  • RS-485:
    This variant came about when two things were realised:

    • Most serial communications were half-duplex: one side would transmit, then the opposite side would answer - both sides wouldn't be transmitting at the same time.
    • With one master and multiple slaves, you'd need lots of separate wires between them. Was there a way of "bussing" them all together so that they could all share the same wires? This is called "multi-drop".

    Stringing multiple wires between them all was a waste, since the same pair of wires could hold the traffic in either direction (and yes, RS-485 uses the same differential standard as RS-422). Of course, this meant that all sides couldn't be "powering" the wires at the same time - but that's OK, each side would "know" when to power their side:

    • The master would power its side while it was transmitting the request to a particular slave, then de-power its side to listen for the answer;
    • The slave wouldn't power its side until it had heard a request for itself and was ready to transmit the answer, so it would power its side, reply, then de-power again.

Compatibility

The different voltages indicate, superficially, that they are not electrically compatible - for example, you can't plug any directly into TTL (unless you want smoke!). However, there are some circumstances where they can work together - but you have to be lucky!

  • RS-232/RS-423 and RS-422:
    Because RS-422 is differential, and RS-232/RS-423 work as low as ±3V, you might be able to fool the two into working together - as long as the RS-232 TX signal is no more than ±6V! RS-423 is already limited to that.

    • RS-232/RS-423 TX is easy: it is already a differential voltage relative to GND, and so can be directly wired to the RS-422 RX+ and RX- - as long as you realise that due to the different specifications, you wire GND to RX+ and TX to RX- (no, that's not a typo: just the way it is!)
    • RS-422 TX+ and TX- is usually a differential transmitter, and if you tie one wire of the pair to actual ground, then the other will "swing" above and below that one with the required ±3V differential - perfect for RS-232/RS-423. If you connect TX+ to GND, and TX- to RS-232/RS-423 RX (again, no typo!), and the RS-422 transmitter is truly differential, you can get the two sides to inter-operate.
  • RS-422 and RS-485:
    Because these both use the same voltages and direction, then you could have the two work by wiring the RS-422's TX and RX pairs together, with the RS-485's TX/RX pair. But, this can only work if all of the below is true:

    • There is only one master and only one slave;
    • The master controls when it powers its TX side;
    • The slave can 'handle' hearing its own output without interpreting it as a command;
    • You can wire the connections between them as follows:
      • Master TX/RX+ to Slave's TX+ and RX+;
      • Master TX/RX- to Slave's TX- and RX-.

    Frankly, that third requirement is the most difficult since you have no control over the slave's protocol - but I have lucked into this in the past.

  • RS-232/RS-423 and RS-485:
    Sorry, no can do.

    • RS-232/RS-423 has no mechanism to turn off TX for half of the conversation;
    • Since RS-485 has both TX and RX on the same pins, it implies that you'd have to tie RS-232/RS-423's RX and TX together - which means that the signals are no longer differential.

Consequences

So, in answer to your situation:

  1. NO you cannot tie TX+ and TX- together and call them TX, since the differential voltage between the two is what carries the signal. Shorting the two together would lose the signal.

  2. If you look at the RS-485 shield specs, you will probably see an extra signal that needs to be set or reset to indicate that the output should be powered or not. You need to program this signal at the appropriate times, or else the shield will be stuck in transmit or receive mode continuously.

  3. If you cannot find an RS-422 shield, your closest bet would be using an RS-232/RS-423 shield and hope that you meet all of the criteria for that scenario above: the voltage isn't too high, and the fishfinder uses a true differential transmitter.

Edit

I just realised: if all you want to do is listen to the fishfinder - never transmit to it - then yes, you absolutely can wire just the fishfinder's TX+ and TX- to either RS-232's GND and RX (respectively) or RS-485's RX+ and RX- (respectively) as described above. You won't be able to command the fishfinder - but it sounds like you don't want to?

Edit #2

I just re-read your question, and the last part got me confused. I hope I explained above why you can’t tie + and - signals together to feed directly into the Arduino’s TTL signals - for two distinct reasons - but you also imply those signals exist on the RS-485 shield too.

No doubt they do - but they correspond directly to the Arduino’s TTL signals of the same name. There should be other, non-Arduino signals (on a screw terminal block perhaps?) that are labelled something with + and -: hopefully TX/RX, but perhaps D or even I/O. Like I said, RS-485 is differential, so they need to distinguish the two wires of the pair.

\$\endgroup\$
3
  • 1
    \$\begingroup\$ Would you mind adding RS423 to this mix, please? \$\endgroup\$ Commented Jun 16, 2020 at 21:42
  • 1
    \$\begingroup\$ @TrippKinetics For someone with as cool a picture as yours? Sure! See above. \$\endgroup\$ Commented Jun 17, 2020 at 1:50
  • \$\begingroup\$ Thanks, John. I appreciate it. \$\endgroup\$ Commented Jun 17, 2020 at 16:35
0
\$\begingroup\$

The simplest solution is to get an RS-422 IC and solder it to a prototyping shield if you can’t just find one off the shelf.

But it is clear that your device is RS422 not RS485. It would not know how to communicate through an RS485 interface.

You might be able to use two RS485 shields instead, use one to transmit and the other to receive. That would be equivalent to RS422.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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