How do I wire a 9 pin serial connection to an Arduino?

1.6k views Asked by At

My question is pretty straightforward. I've got a big old machine that has an RS-485 connection on the back and I've got a converter from RS-485 to 9 pin serial.

The device I'm connecting to sends out an ACK signal to see if anything is connected. How do I wire up my Arduino (Uno) to the 9 pin serial connector so that I can read the ACK (and in future write back) and display the ACK signal in the Serial Monitor?

2

There are 2 answers

0
Keroronsk On BEST ANSWER

In most cases you need to wire only RX, TX and Ground signals (RX of Arduino to TX of RS-232 and vice versa). But it really depends on your RS-485 converter, if you need any additional lines. If this converter is half-duplex, may be you will also need to control it with DTR signal. You can use any digital IO on UNO then, and control it in software. Also you need to know the speed of serial port of this old machine, and configure UNO serial port accordingly.

0
JackCColeman On

I would first check the voltage of the data lines coming from the RS-485 converter. The arduino ports are expecting 0 to 5 volts. Also, look-up the standard for RS-485 to determine what should be on the lines from the RS-485.

Notice, the arduino does NOT directly implement an RS-232 port. Rather, it has a USB port for connecting to a PC. I know that the RS-232 connection does NOT use TTL or 0 to 5V signals, and would question what signal levels are produced by an RS-485.

If the RS-485 does NOT generate 0 to 5 volts, then you will need to get an arduino RS-485 shield.

Finally, in fact, this is what you need to do. I just searched on "RS-485 Arduino" and found multiple hits.

Now, this is the good news, because once you have installed a RS-485 shield then you connect the shield to pins 1&2 on the Arduino and you have a serial connection!!