How to wire RS232 serial to rx-tx?

I want to be able to connect a true serial (non-USB) port to the rx/tx pins to communicate with the arduino board. I can make this work if I put a rs-232 check tester:

between the cable to the PC and the connector going to pins 0/1 on the arduino.

If I connect bothe sides without the tester, the connection doesnt work.

Does anyone know what I need to address besides pins 0 and 1 for this to work?

Thanks in advance...

True RS-232 uses + and - voltages that are not appropriate for direct connection to the TTL voltage levels used by an Arduino. Damage can easily be done hooking RS-232 directly to an Arduino.

What you need is a voltage translation circuit designed for this purpose. Here is one example there are many different version available and can be easily home-brewed.

http://www.sparkfun.com/commerce/product_info.php?products_id=133

Lefty

Thanks, Lefty.

I don't know why that tutorial says they're a hassle, but max232 is really the way to go. They're cheap and ridiculously easy to get. Connect up a few capacitors, and you're good to go. Cheaper than that kit, too.

I don't know why that tutorial says they're a hassle

Me either. I've had orders of magnitude more hassle from the "trick" circuits such as the one linked compared to the MAX232 solutions, which Just Work.

The MAX232 does require power, but it's an interface between two things which are going to require power themselves, so power isn't usually all that hard to come by...

-j

MAX232 requires 1uF caps i.e. bullky. The MAX202 only requires 0.1uF ceramic caps. I use the TSSOP16 package and together with five 0.1uF caps, it only takes up a 0.3" square.

I agree with the points above. The MAX202/MAX232 are good solutions. They offer ESD protection true conversion to +/- 9V and ESD protection.

Most of the MAX232 family, including the current MAX232, can use 0.1uF caps.

Lots of manufacturers copy the 232, too. Always check the datasheet for your specific device.

I think the one I'm currently keeping in my parts box is the MAX3232; it takes 0.1uF caps and runs on 3.3V or 5V. It's a drop-in replacement for the 232.

-j

You are correct that pretty much all of the MAX232 derivatives can use 0.1uF.

However the MAX232 datasheet specifies 1.0uF. Perhaps it works with 0.1uF but that isn't within spec, to my knowledge.

You link to Texas Instrument's site; their device is a copy of Maxim's part. It does indeed require 1uF caps.

Maxim has the MAX232A which uses 0.1uF caps. (They also have the original 232 that requires 1uF.)

These differences are why it's important to get the datasheet for your particular device, not just one of the family.

I'll probably switch to the MAX3232 for future buys, as it's pin compatible with the MAX232, uses 0.1uF caps, and will operate on 3.3V or 5V.

-j

I did link to the Texas datasheet but the Maxim one has the same specification - see front page selection table and figure 5. The difference is the “A” of course (MAX232 versus MAX232A).

I see that the MAX232A has a higher slew rate. The Maxim parts, however, tend to be more expensive that the “clones” which is why I prefer the TI MAX202 than the one from Maxim. I have also been using the TSSOP16 package which is not available for the MAX232A.

MAX232 requires 1uF caps i.e. bullky.

You can get surface mount 1uF caps in the 0603 size, you can't describe them as bulky by any stretch.

in the 0603 size, you can't describe them as bulky by any stretch.

:) No kidding. I was working on a board and lost one. Later I found it under my fingernail.

-j

Sir, how long are your fingernails exactly ? I've seen shocking images of females with meter long keratin extensions. You too ?

Or did you mean "on the floor", which is usually below normal fingernails.

No, my nails are plenty short, probably typical for a guy (dunno, I don't notice guys' nails). It's just that you can lose something that is .006" long, .003" wide, and probably .001 or .002" thick quite easily - there are lots of places it can hide!

-j

retrolefty wrote

True RS-232 uses + and - voltages that are not appropriate for direct connection to the TTL voltage levels used by an Arduino. Damage can easily be done hooking RS-232 directly to an Arduino.

What you need is a voltage translation circuit designed for this purpose. Here is one example there are many different version available and can be easily home-brewed.

http://www.sparkfun.com/commerce/product_info.php?products_id=133

Lefty

I bought this shifter and it works perfectly. Thanks!