RS232 using an FT232H controller - Line Driver Needed? - Page 1
Forum section: electronics / projects

author: rx8pilot
author_rank: Super Contributor
timestamp: July 18, 2017, 01:44:35 am
content: Hi all -I making a simple USB to RS232 interface to include in one of my projects. It is the first time I have designed an RS232 device so hoping to educate myself a little. So far, the common FT232H seems easy and it allows me to drive a few status LED's as well.http://www.ftdichip.com/Support/Documents/DataSheets/ICs/DS_FT232H.pdfAfter going through the FT232H datasheet and looking at the Adafruit breakout board - I am trying to figure out if I should use an external line driver for RS232. The datasheet seems to indicate I should, but the Adafruit breakout (and others) does not have one and direct drives the RS232. My guess is that 3.3v direct from the FT232H is on the edge while the external driver would offer more proper drive levels and some ESD protection.One of many driver options I looked at:http://www.ti.com/lit/ds/symlink/max202.pdfIt is not a cost issue, but I don't want to over complicate it either. The cable length will be modest, like less than 3ft/1m or so. Anyone have advice on how to best configure this one?

author: alm
author_rank: Super Contributor
timestamp: July 18, 2017, 02:03:29 am
content: The FT232 outputs CMOS level signals, not RS-232. So if you need RS-232 compatibility, you need something like a MAX232 (or one of the variants for 3.3 V operation or smaller caps). I am pretty sure the FT232 will die if you feed it -15 V from a real RS-232 transceiver..

author: Monkeh
author_rank: Super Contributor
timestamp: July 18, 2017, 02:09:51 am
content: Yes, you will definitely need an RS232 transceiver. MAX3232 for example, or a TRS3253 (nice modern package). Smaller types available if you don't need the full set of signals.I would advise using a newer chip than the FT232 - the FT231X is cheaper, for example. Personally I jumped ship to Silabs - CP2102, CP2104, the new CP2102N (cannot send breaks!).

author: rx8pilot
author_rank: Super Contributor
timestamp: July 18, 2017, 02:24:52 am
content: Quote from: alm on July 18, 2017, 02:03:29 amQuote from: Monkeh on July 18, 2017, 02:09:51 amThat all makes sense. Curious how the Adafruit breakout does not blow up. The people working on the software end of this (on the other side of the world) claim they used the Adfruit breakout for development, but maybe they added a level-shifter.Looking at the suggested drivers.....thanks!

author: alm
author_rank: Super Contributor
timestamp: July 18, 2017, 02:27:43 am
content: The Adafruit board does not blow up if you connect it to other CMOS-level UART (asynchronous serial) interfaces, like available on many development boards and directly from microcontrollers. But this is not RS-232, which has a logic low of +3 to +15 V and a logic high of -3 to -15 V.

author: Monkeh
author_rank: Super Contributor
timestamp: July 18, 2017, 02:29:56 am
content: Depending on the 'RS232' on the other side.. it could survive a lot. The pins are 5V tolerant (at least), and many devices using charge-pump drivers (like the above choices) only reach around ±5V. Some of them get to ±9V with a 5V supply. The negative levels might just get clamped adequately.. but I wouldn't want to try it. Some crappy implementations (which obviously don't comply with RS-232) only swing from 0V to 5V and rely on the receiving device to be okay with it.Connecting one directly to a classic RS232 transceiver directly powered by the ±12V rails of a device surely ends in smoke.

author: rx8pilot
author_rank: Super Contributor
timestamp: July 18, 2017, 02:37:43 am
content: The TRS3253 looks promising - a nice compact VQFN package too. Thanks @monkehOn a side note, I can hardly believe RS232 has survived this long. It was old news the first time I used it around 1984. It is now 2017 and I am designing it into a new circuit, lol!It's like the 'C' of protocols. Somehow, C is not only still around, but still relevant. Nuts.

author: Monkeh
author_rank: Super Contributor
timestamp: July 18, 2017, 02:43:16 am
content: The TRS3253's quite pricy as I recall, I'm sure there are others in similar package. Digikey has the best part of a thousand lines of RS232 transceivers.

author: TK
author_rank: Super Contributor
timestamp: July 18, 2017, 02:44:22 am
content: Are you sure you need RS232 levels? Sometimes UART TTL gets confused with RS232. RS232 uses negative voltage for level 1 and positive voltage for level 0.

author: TK
author_rank: Super Contributor
timestamp: July 18, 2017, 02:45:34 am
content: There are RS232 to TTL breakout boards, i.e. google RS232TTL Price is around $8

author: rx8pilot
author_rank: Super Contributor
timestamp: July 18, 2017, 03:07:35 am
content: Quote from: TK on July 18, 2017, 02:44:22 amI am not positive. The circuit will have an external connector and it could be plugged into anything that is labeled RS232. If I am guessing - it seems like 'standard' RS232 would indeed see some big voltages relative to TTL - making smoke.Quote from: Monkeh on July 18, 2017, 02:43:16 amIndeed - there is a PILE to choose from. A huge pile. I am not particularly concerned about price. I will prioritize reliability and small size over price in this case. This is an add on to an existing PCB that I want to add RS232. That is why a break out board is not practical as it is too big.

author: ejeffrey
author_rank: Super Contributor
timestamp: July 18, 2017, 03:19:28 am
content: Quote from: rx8pilot on July 18, 2017, 03:07:35 amYes, in that case you need a level converter.You wouldn't use a level converter if you were just going to connect it to the UART pins on a microcontroller.

author: rx8pilot
author_rank: Super Contributor
timestamp: July 18, 2017, 06:05:58 am
content: I settled on this part - The TI version MAX3243 which is pretty generic and very available. Small QFN-32, and a rather low cost as a bonus.Thank you for the insight and suggestions everyone.

author: TK
author_rank: Super Contributor
timestamp: July 18, 2017, 11:00:40 am
content: If you are adding a DE9 connector, be careful as you need to select male or female depending on if you want your device to be DCE or DTE. They have different pinout configuration and will require the use of a straight cable or a null-modem cable to connect to any RS232 device. You don't need to use a MAX device, you can go with ICL or other RS232 drivers available. Usually ICL or ST devices are less expensive than the MAX devices.

author: alm
author_rank: Super Contributor
timestamp: July 18, 2017, 11:07:45 am
content: Just make sure the transceiver supports 3.3V operation (assuming you do not have 5V available). The ability to work use smaller caps for the charge pump can also be useful. These features are sometimes missing from the 'clones'.

author: Zero999
author_rank: Super Contributor
timestamp: July 18, 2017, 01:27:41 pm
content: If you already have a dual +/-15V supply, you can use the old '1488.http://ecee.colorado.edu/~mcclurel/nds1488ds.pdf

author: suicidaleggroll
author_rank: Super Contributor
timestamp: July 18, 2017, 04:40:29 pm
content: Quote from: rx8pilot on July 18, 2017, 02:24:52 amYou mean this Adafruit breakout?https://www.adafruit.com/product/2264Yeah, that's not an RS232 adapter, that's a UART adapter. They couldn't have used it to talk to a real RS232 device, because it doesn't speak RS232. Even if it didn't blow up, which it likely would have, the logic levels for RS232 and TTL UART are inverted, the communication wouldn't have worked. They either added an inverter and level shifter to get to RS232 levels, or they weren't talking to an RS232 device, they were talking to another TTL UART device.

author: TK
author_rank: Super Contributor
timestamp: July 18, 2017, 09:29:25 pm
content: I used ICL3232 in the past. It can be powered from 3V to 5.5V (TTL side level matches the supplied DC power). It uses 5 small 0.1uF pump (ceramic) capacitors. It only has 4 drivers, so if you need full RS232 signals, you might need a different chip.

author: rx8pilot
author_rank: Super Contributor
timestamp: August 02, 2017, 04:54:58 am
content: I settled on the MAX3243 and got the PCB's back. It all worked on the first try and does the business - totally compliant with RS232 signaling. Thank you all for the input. REALLY happy it is working.The FT232H has handy GPIO's that were used to control status LED's.

author: David Hess
author_rank: Super Contributor
timestamp: August 02, 2017, 08:58:05 pm
content: Quote from: rx8pilot on July 18, 2017, 02:37:43 amAsk instead why asynchronous serial has survived. It is self clocking, requires only 2 signals and ground for full duplex operation, is simple to encode and decode, and is easy to galvanically isolate. With RS-232 signal levels, it has very long range.