Arduino Uno between RS232 DB9 device and PC

Hello,

I am trying to use an Ardunio Uno as a translator between an Electronic Measuring Device and a Windows PC. The EDM has a Rs232 DB9 output.

I am using one of these adaptors and software serial for the second Serial connection. (the first being the onboard USB) https://www.amazon.ca/CANADUINO®-Adapter-Provides-Arduino-Raspberry/dp/B09TY657VF/ref=sr_1_1?crid=183VZ0JN3FJNM&keywords=CANADUINO+MAX232+RS232&qid=1670199999&sprefix=canaduino+max232+rs232%2Caps%2C116&sr=8-1

Everything works fine when I connect the DB9 to a USB to serial cable and open a second Terminal session on my PC. (one for default USB on the arduino and one for the DB9 - software serial adaptor on the ardunio.) I can send and recieve data from both terminal windows.

Also, when I hook my EDM directly to my PC via a serial to USB adaptor, I can read and write from the EDM.

So my ardunio (man in the middle translator) works but only when RS232 DB9 is connected to the PC via USB cable...and not when connected directly the EDM. I have tried switching my RX and TX lines as well as using a straight through and null modem cable.

It is like I am missing some type of handshaking between my RS232 DB9 and the EDM. Some type of "handshaking" or communication regulation that the Serial to USB cable provides.

Also I can't find anything online of someone successfully using a RS232 DB9 adaptor to connect to anything other then a PC. (which is what I am trying to do)

Apologies for the long read. Hopefully that is making sense. Any thoughts?

Where exactly did you switch the RX and TX lines? Generally the problem is that the RS-232 RX and TX are connected wrong between the RS-232 DB9 adapter and the equipment (EDM in this case).

Posting an annotated schematic as you have wired it will help us a lot. Links to technical information on the hardware devices will help.

it would probably be a good idea to move to a device with multiple hardware serial ports, e.g. Mega, ESP32, Arduino Due, etc
it would save all the problems associated with SoftwareSerial communications

1 Like

I agree. A Pro Micro might be a good choice.

Hello Everyone....thank you for the responses. I was able to look at this again today and when I went through things a little slower/more methodical I was able to get it to work.

The main issue was when I tried using my null modem cable the first time it didn't work. I suspect I was doing something else wrong at that time. I worked through things slowly, and realized I needed the null modem and was able to get it to work.

@david_2018, yeah...switching the wires were I was...was nonsensical. Good point.

@horace and @PaulRB - I have used mega's a bunch before....I agree they would be better.....now that it is working on the uno with sofware serial...if it gives me any grief I can easily move to the mega.

@gilshultz .....wiring was pretty simple...but it did help to double check the pinout from the EDM. There was/is only three wires in play....GRD, TX, RX (TX/RX crossing) Once I confirmed only the 3 wires...it was easier to work through possible combinations to help troubleshoot.

Thanks again for the help.

-kevin

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.