Please suggest a quality RS232 interface

Status
Not open for further replies.

j338

Member
Maybe I just haven't stumbled upon the right researching resource for this yet. Still looking.
Can someone tell me what book I should buy to help me answer these basic questions? I feel very embarrassed about being so ignorant about this.



I'm looking to utilize the Hardware Serial of Teensy3.1, and found myself in a mine field on Amazon for breakout boards and chips.
Are the MAX3232 / MAX232SOIC16 chips limited to 9600 baud? I haven't seen any concrete details stating yay or nay.

The most similar breakout board I've found to the official Teensy guide (https://www.pjrc.com/teensy/td_uart.html)
is this specific one sold at Amazon by NKC Electronics: https://www.amazon.com/RS232-converter-board-male-3-3V/dp/B0088SNIOQ/ref=sr_1_4

...with datasheets: (One of the few I could find that have them readily available)
http://media.nkcelectronics.com/downloads/rs232ttl_DTE_v1.1.pdf (Schematic) MAX232 SO IC16
http://media.nkcelectronics.com/datasheet/rs232ttl_dte_v1.1_UG.pdf (User Guide)
 
What are you going to be connecting the T3.1 serial to that you need something like a MAX232?

Pete
 
I have not used them for my stuff, sometimes I will use an USB to Serial adapter to talk to one of the hardware serial ports.

But you might take a look at places like Sparkfun. They have boards like:
https://www.sparkfun.com/products/11189
I believe it spec says it can go up to 250kps.
 
Rereading this thread the next day, I can see my question could be rephrased to put it kindly.
How do people get >1Mbps from T3.1 <-> Win7x64?

I have no explicit reason for using the 232 IC specifically. The 3232 looks like it could be equal.
Just trying to duplicate what I saw in the PJRC guide to reduce newbie variables.

If USB is supposed to be 12,000 kbps, and the 3232 has a max rate of 250 kbps, I'm confused how people get high speed transfer.
On Windows 7, USB Serial messages take too long to send a bunch of data.

I'm trying to put a Neural Network on the T3.1, and the program I wrote which sends floats with hex words takes too long on Windows 7.
https://forum.pjrc.com/threads/42505-Strange-USB-Serial-15ms-maximum-latency-on-Win7



@KurtE
I was looking at a kit that fits inside the standard 9 Pin D-Sub Hood, then a small Breadboard+T3.1 attached to the Hood.
Nice and clean.
 
Last edited:
If USB is supposed to be 12,000 kbps, and the 3232 has a max rate of 250 kbps, I'm confused how people get high speed transfer.
On Windows 7, USB Serial messages take too long to send a bunch of data.

I'm trying to put a Neural Network on the T3.1, and the program I wrote which sends floats with hex words takes too long on Windows 7.
https://forum.pjrc.com/threads/42505-Strange-USB-Serial-15ms-maximum-latency-on-Win7
Have you looked at the other thread? Are you certain that you are using a high-resolution clock to time your transfers? Have you tried the updated latency test I posted?

Slow USB speed / high latency typically mean that buffering is happening somewhere and the data only gets sent if there is a lot of it (e.g. a full 64-byte packet) or after a timeout. RS232 is a lot slower than a properly working USB serial connection. IME, both latency and throughput are worse.
 
Have you looked back at your thread: https://forum.pjrc.com/threads/42505-Strange-USB-Serial-15ms-maximum-latency-on-Win7

Have you tried the updated program by tni? What speed are you getting?

As for DB9 connectors - I don't have any computers anymore that have these... Don't know how fast these can run... Probably depends on underlying hardware. When of the PC like boards I am playing with is an UP board (same form factor as RPI) and it's UART has a max speed of 3686400. I have not tried it at that speed but have had a teensy talk to it at 2 and 3mbs...

Also what speed are you expecting to get? From the above you say USB can do a max of 12MBS...

I have used the standard USB on the Teensy to act as a Servo controller for AX servos and the servos run with a buss speed of 1mbs... I know that likewise some other boards that use FTDI or Atmega32u2 boards also run at that high of a speed.

You might also experiments with another USB to serial adapter (like an FTDI cable), which you can connect up to one of the Serial ports. My gut tells me it won't go any faster than Teensy native USB but you can always try. I keep a few of these around (a couple 5v ones plus a 3.3v one). I sometimes use these to debug stuff when I am using the USB for other stuff (like the Teensy is connected to RPI/Odroid and I wish to see debug data on the PC...). I also have them around as I have some boards by other manufactures who require them to program their boards...

Edit: tni - beat me to some of this. But also check your code. If you need the stuff to get to the PC quickly, regardless if you have a full packet, you may want to try something like Serial.flush(). Assuming it works the way I believe it does, it should shorten the latency for getting the data. However used indiscriminately you will be sacrificing throughput.
 
Last edited:
Note, if you are doing high speed input connections to the Teensy, your best bet is to use either Serial1 or Serial2 with CTS/RTS enabled (assuming it is enabled on the other side as well). Both Serial1 and Serial2 have hardware FIFO buffers, and there is a dedicated pin to use for CTS (pins 18/A4 or 20/A6 on Serial1, pin 23/A9 on Serial2). CTS (clear to send) and RTS (request to send) are hardware flow control where each side indicates whether it is ready to get data.

I can't help you on breakout boards.

If your data cable is long, you might need to look into error correction protocols like RS-422.
 
The breakout board I mentioned in my previous post is the only one that brings all possible serial signals out to available pins. It also has a 3V3/5V jumper block for Arduino operating voltage selection. In addition, I/O pins from the FTDI chip are available on the other board edge, but I could find no reason to use them.
 
The Amazon board does not have all of the serial signals available and the Vcc selector is a circuit trace jumper. However, if you have a dedicated use, and the necessary signals, then it will likely work for you.
 
The Adafruit board has all the serial signals but does not appear to have a selectable 3v3 output to power the Arduino. You could add a jumper wire to go from the adapter 5V to the Arduino Vin and let the onboard regulator provide the correct operating voltage. That's the reason I selected the one from eBay as it has all the signals and the jumper block for Vcc. The down side is that it comes from China and take several weeks to arrive.

I did find a seller on eBay that has many of the Adafruit products at much lower shipping costs. I don't know if he has this adapter but will look for it today.
 
Status
Not open for further replies.
Back
Top