Problem with Serial MAX3232

I have a serial to TTL adapter (MAX3232) but have some issue with it over longer distances. The following works:

  • Connect my Arduino with MAX3232 over a short 6' cable.
  • Send some letters/numbers over an approx. 25' cable with pin 2 & 3 connected to each other (letters/numbers come back. Without the jumper cable they don't come back.)

However, when I connect my Arduino with MAX3232 on the other side of the long 25' cable I don't get any response. Actually, sometimes I get some random letters/numbers back (the Arduino board is supposed to send commands back for confirmation).

Do you have any suggestion how to overcome this limitation.

RS-232 is designed to use up to +-25 volts to avoid the problem you see. The MAX323 with proper capacitors will produce about +- 8 volts. The capacitance of your cable is degrading the signal.

Use a much lower baud rate. Use a low capacity cable designed for data. Use an adapter that will provide a much greater voltage, possible +-12 volts.

Paul

I second Paul’s comment. I’ve used RS232 up to 75’ with +/- 12V levels. As Paul mentioned , tge Max232 doesn’t provide that level of noise immunity.
Robert

Hi,

  • What cable are you using?
  • Does it have a shield?
  • What speed?
  • Did you try a lower speed?
  • Are you using Rx, Tx and Gnd/shield?

Thanks.. Tom.. :slight_smile:

  • Send some letters/numbers over an approx. 25' cable with pin 2 & 3 connected to each other (letters/numbers come back. Without the jumper cable they don't come back.)

Not sure what you mean "without jumper cable".
What is on the other end receiving the data?
Does it work when connected with a shorter cable?

I assume you have DB9 connectors and mean:

  • the Max 232 Pin 2 is connected to pin 3 of the receiver
  • the Max 232 Pin 3 is connected to pin 2 of the receiver
  • the Max 232 Pin 7 is connected to pin 7 on the receiver.

Is this correct?

Pins 2 & 3 “jumpered at receiving end is (and always has been) known as a ‘loop-back’ test since transmit and receive are tied together.
This is RS232-101.

Meh. If you jumpered 2&3 at the far end of the 25ft cable and got correct echoing, then an actual receiver at the far end of the cable should work fine as well. Something else is wrong... (rs232, even at +/-8V, is pretty robust.)
You do have a ground connection too, right? I've seen rs232 connections succeed in spite of bad cables and mis-connections due to common "earth" grounds, but then mysteriously fail when different equipment without the shared earth ground is used...

There IS still the possibility the the OP has commited tge cardinal sin of RS232 coonections:
Rx-> Rx
Tx-> Tx.
If so, he would not be the first to do so.
(it’s possible I did that once , but that was 40 years ago and I don’t remember.)
Robert

This is RS232-101.

I was assuming the OP may have not had the benefit of RS232-101.

Indeed, however, you were the one asking the question, for what it’s worth.
The jury is still out on the Tx-> Tx question.
The other sin is the one already mentioned about the GND connection .

@ raschemmel

Now I understand your comment. My mistake, I should have specified that I was directing my questions to the OP.

John

Speaking of which, where is he ?

Thanks everybody for the response. For some reason I don't get notifications (it's not in the spam folder, either) although I have signed up to be notified immediately. In any case, here is some more info:

I have the following connections: pin 2 -> pin 3, pin 3 -> pin 2, pin 5 -> pin 5

The cable I have is a shielded cable. On the PC side I connected the bare cable (which is in contact with the shield) to the metal casing (the metal that goes outside around the 9 pins). On the Arduino side that same metal cable is not grounded.

I am running at 9600 baud so pretty low speed. As mentioned before, it works with a shorter 6' cable but not with the 25' cable so I assume I wired things correctly on the Arduino side as really only the cable changes.

A couple people mentioned that the Max232 only provides about 8V. What other solutions are you using to get 12V? Also based on the above information did I wire something incorrectly?

Hi,

I am running at 9600 baud so pretty low speed

Try slower..

Tom.. :slight_smile:

TomGeorge:
Hi,
Try slower..

Tom.. :slight_smile:

When RS-232 was designed, 300 baud was state of the art! RS means Recommended Standard, by the Bell system.

Paul

Ok, I lowered it to 300 but still no luck. It might be some noise issue because I get characters back before any should be sent back to the PC (the Arduino waits for several characters before sending a confirmation back). Any more suggestion? Also how can I boost the voltage to 12V?

What are you using for cable?

Did you connect the Gnds?

Perhaps the MAX3232 is not working correctly. Did you check the generated +V and -V voltages?

I believe they are on pins 2 and 6 of the chip.

JohnRob:
Perhaps the MAX3232 is not working correctly. Did you check the generated +V and -V voltages?

I believe they are on pins 2 and 6 of the chip.

Those are measured to ground of the circuit board. You are using a board with caps soldered on, aren't you.

Paul