How to protect RS232 RX/TX lines from overvoltage/overcurrent, not from ESD? - Page 1
Forum section: electronics / projects

author: niccoppo
author_rank: Newbie
timestamp: November 11, 2023, 04:34:39 pm
content: Hello,I have a DB9 connector RS232 compliant. This connector is attached to a PCB I designed using an MAX3232 IC to handle RS232 signal. I also have some TVS diodes to protect the RS232 lines against ESD. Everything works perfectly. Some of my users use the DB9 connector with the wrong device which is not RS232 compliant. This device sends 48V into RX/TX lines which destroys my PCB. I need a solution to protect the TX/RX lines against overvoltage/overcurrent. Can I use an IC eFuse for that? If yes, could you recommend a reference? If not, what kind of solution could be used?Nicolas.

author: peter-h
author_rank: Super Contributor
timestamp: November 11, 2023, 04:57:24 pm
content: Protecting an RS232 input from 48V is easy - it has a Zin of about 3k (look at say a 14C89 data sheet circuit).Protecting an RS232 output from 48V is harder because the Zout is about 300 ohms so you need beefier components.The traditional but still crude approach to protecting from a continuous overvoltage might be something like thisBoth lines have continuous protection but the 330R resistor will get hot, and a 5W part is a bit crazy so the fuse is worth putting in.You will lose a bit of input sensitivity, and you will lose a bit of output drive, but for a 1:1 connection (RS232 is supposed to be 1:1 not multidrop) it will be fine.For higher voltages you can do other stuff; I once implemented protection from 300V spikes of quite a long duration (100ms+) and that needed a SOT223 transistor and such.Just realised - that zener needs to be a higher voltage because a MAX3232 swings up to a max of about +6V and -6V, so maybe a 5.6V one. Also the bottom diode (4001) needs to have a 5.6V zener in series with it so that RS232 driver can swing freely.

author: voltsandjolts
author_rank: Unknown
timestamp: November 11, 2023, 08:29:06 pm
content: https://www.digikey.co.uk/en/products/detail/analog-devices-inc-maxim-integrated/MAX13223EEUP-T/2062162

author: peter-h
author_rank: Super Contributor
timestamp: November 11, 2023, 09:07:10 pm
content: Two problems with that chip:- it is made by Maxim which is a super arrogant company (no way to phone or email them; you have to raise "tickets" on their website and basically the comms is one-way and there is no normal sort of comms with Sales) and their purchase by Analog Devices has not changed this stupid useless policy- it is single sourced, and anybody using Maxim chips during the covid shortages will have got severely burnt, on availability, pricing, or both (the company was blatently opportunistic; I have designed out all Maxim chips from all products, except the MAX3089 which I am currently over the barrel on, but will get rid of it ASAP)The method I suggest costs peanuts and uses common-as-muck commodity parts.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: November 11, 2023, 09:16:49 pm
content: Murata make some 0603 PTC thermistors which are great for protecting data lines when connected in seriesThey will protect 3.3v unprotected PIC pins from direct connection to 24v. Not tried with 48v, maybe a couple in series.I usually use the 100r ones.

author: tom66
author_rank: Super Contributor
timestamp: November 11, 2023, 11:09:34 pm
content: Quote from: peter-h on November 11, 2023, 09:07:10 pmI've had no problem with Maxim during the semiconductor shortage. They actually got a few design wins with us because TI/ADI/LinearTech couldn't manage it. Their support is no worse than any other tier one supplier, try calling TI, good luck, you won't get to speak to an engineer I guarantee you that.Your solution may work fine, but what if the board doesn't have space for a 5W resistor - that is non trivial in terms of size and space from a hot resistor. Also, destroying a fuse from a one-time overvoltage, if it is common, is not necessarily any good to the user if that means the device is RTB.If the Maxim part wasn't an option, I'd consider something along the lines of your solution, with a lower power resistor but with a relay or other isolating device and a latching overvoltage detection circuit, that reset itself after a power cycle. Perhaps a solid-state relay IC with optocoupler so you don't have to do any level shifting to get the MOSFET to switch.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: November 12, 2023, 12:34:04 am
content: Well, let's see. Standard mitigations apply:- Fuse (including of PTC type, polymer or ceramic) and TVS (esp. SIDAC type)- Series resistor and clamp (as above schematic, but mind the voltage range better, as noted at the end)- Current limiter, especially back-to-back depletion MOS, or CCSs + diode bridge for high bandwidth (ref: old Tektronix sampler input stages)- AC/DC (MOS) type SSR + window comparator, turn it off when out of range (still needs a TVS or whatever to handle overvoltage/current before switch opens, some ~ms)- Custom interface: receiver could be constructed from resistors and a comparator; transmitter could use discrete transistors to achieve much higher power dissipation and voltage range while meeting specs.Mind, there is of course no such thing as a controller, just add external transistors, to pull off that last one. Like, even given the analog experience I have, I would consider that more of a last resort. Mainly / mostly / worstly because, making your own, the output slew rate, and feed-forward of internal switching noise, are not so well controlled, making it an EMI wildcard. And it needs to be proven out over temperature, and it still takes more parts, more idle power consumption (and you need a +/-15V converter, not just a charge pump -- well, maybe, but either way it's not going to be integrated in a handy MAX232, eh?), etc. Which is all testing I know how to do, and can do right here for that matter, and, YMMV of course, but needless to say it's going to be way more work than just... like... at that point, not even fuckin' using RS-232 anymore, right?Which is of course one among many non-answer answers. Others include: change the physical interface (don't use DE-9 or whatever!); stop using RS-232 (who even uses that anymore, right? Right?...); convince the customer that their interface(s) are dumb and need to change instead; etc.. (Obviously, contingent on how feasible any of these actually are.)Tim

author: PCB.Wiz
author_rank: Super Contributor
timestamp: November 12, 2023, 05:32:39 am
content: Quote from: niccoppo on November 11, 2023, 04:34:39 pmOuch.Default load spec for RS232 is > 3k, so 15V can deliver 5mA, as a driver. You need a driver series element that allows that, but limits energy from 48VA LED current driver like NSI50010YT1G limits to ~10mA up to 50V, whilst dropping about 500mV at 5mATwo of those in series, with two 14V series zeners, will limit the intrusion to 10mA/15V worst case, and be ok to +/- 65VIf you know the intrusion voltage is always one way, maybe a single NSI50010YT1G will be ok.Depletion mode mosfets have less control on current, and adding series resistors gives more voltage drop.

author: jonpaul
author_rank: Super Contributor
timestamp: November 12, 2023, 08:06:14 am
content: Bonjour Monsieur, What is the threat level eg what are you protecting against?No fuses needed. TAZ needs low C,Series R >>Schottky catch diodes (NOT 1N4148!) to Vcc, GRD.SMD arrays are available.See extensive notes on RS-485 which is similar to RS 232.Bon Chance,Jon

author: peter-h
author_rank: Super Contributor
timestamp: November 12, 2023, 09:49:13 am
content: A PTC thermistor is a good idea and would enable smaller resistors to be used.Obviously it very greatly depends on whether you need continuous protection.

author: Kleinstein
author_rank: Super Contributor
timestamp: November 12, 2023, 10:10:03 am
content: A PTC or PTC type resettable fuse is indeed a good way to limit the current. It should be used in combination with a TVS or similar clamp. Some types may even survive with mains for an extended time, though usually not certified for this.As more fancy current limits one can use back to back depl. MOSFETs with a small resistor in between. The LED drivers can be similar, though they may be for DC only. The PTC fuse is still simpler.

author: niccoppo
author_rank: Newbie
timestamp: November 12, 2023, 02:02:14 pm
content: Thanks a lot for helping me.After reading you what I would try to test is to use a Zener Diode with a PTC thermistor.Could you confirm the following design could work?DB9 RX pin --> TVS diode (to handle ESD) --> two Zener diodes (to limit +/- 15V) --> PTC thermistor (to limit 10ma) --> max3232For the DB9 TX pin, a simple blocking diode should be enough because I am not supposed to accept input signal. DB9 TX pin --> TVS diode (to handle ESD) --> blocking diode (to reject incoming signal) --> max3232My idea is to use a Zener diode first to limit voltage then after I could choose a PTC thermistor that works with a max voltage below 20V. Could it work?

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: November 12, 2023, 03:58:13 pm
content: Quote from: niccoppo on November 12, 2023, 02:02:14 pmthe PTC should be on the external side - its main job is to protect the zener.the Murata PTCs are PRG18BB101MB1RB

author: voltsandjolts
author_rank: Unknown
timestamp: November 12, 2023, 04:51:56 pm
content: Quote from: peter-h on November 11, 2023, 09:07:10 pmDissipating 5W continuous could have significant impact on the PCB, assembly, enclosure and therefore cost.All the solutions above which do not involve dissipating several watts are a better option IMO.

author: nctnico
author_rank: Super Contributor
timestamp: November 12, 2023, 04:54:33 pm
content: I'd go for a fuse (polyswitch / polyfuse) as a PTC resistor likely has too much resistance. Keep in mind that RS232 may run over long wires and putting too much resistance in series could affect the maximum baudrate. A typical cable has around 100pf / meter of capacitance so with 20 meters you'd already be looking at 2nf. With 500 Ohm in series (for example) you have created a 160Hz RC filter. And keep in mind the cross-talk as well.Quote from: niccoppo on November 12, 2023, 02:02:14 pmIMHO the best option is to have: external signal (in or out) -> 20mA polyfuse -> TVS diode (bi-directional! SMA size) -> 22 Ohm 0603 resistor -> max232Keep in mind that RS232 uses negative and positive voltages for the signals!

author: niccoppo
author_rank: Newbie
timestamp: November 12, 2023, 05:19:44 pm
content: About the cable length, my users will not use more than 2m long. So the the cable resistance should not affect the baud rate.It seems the Murata PRG18BB101MB1RB has a max voltage of 24V. I must handle up to 48v. Do you know a reference that could handle that max voltage?Or could you recommend a reference of a 20mA polyfuse?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: November 12, 2023, 05:56:23 pm
content: Quote from: nctnico on November 12, 2023, 04:54:33 pmYou're kidding right? This is RS-232, not RS-485; it's RC limitedby design. Increasing resistance only reduces the baud-length product proportionally (or less if slew rate and current limiting are still dominant at the load conditions).Tim

author: nctnico
author_rank: Super Contributor
timestamp: November 12, 2023, 06:21:55 pm
content: Quote from: T3sl4co1l on November 12, 2023, 05:56:23 pmAnd? It still is a bad idea to add a considerable amount of series resistance to the transmitter if you want to achieve a reasonably high signalling rate or distance. A good rule of thumb is too have any kind of protection circuitry interfere as less as possible with the signals present in normal operating conditions.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: November 12, 2023, 06:54:09 pm
content: Quote from: nctnico on November 12, 2023, 06:21:55 pmTherein lies the key: "considerable". You're the one saying it's bad, but you also just made up a number. Typical transmitter impedances are hundreds of ohms, so it takes a lot to be worth consideration.Ceramic PTCs are available in a wide range of values; the "on/off" ratio is quite reasonable for this I think, and polymer PTCs offer somewhat higher ratios albeit at lower temp ratings. The R_hot simply needs to be high enough to keep power dissipation adequate given the component sizes/ratings (presumably, well under a watt for typical chip parts).Tim

author: nctnico
author_rank: Super Contributor
timestamp: November 12, 2023, 07:06:43 pm
content: Quote from: T3sl4co1l on November 12, 2023, 06:54:09 pmI didn't make up a number. I see others suggesting putting several 100 Ohm (room temperature) PTC resistors in series. This will add a significant amount of series resistance compared to the driver's output impedance (which could be 'tweaked' to support higher transmission rates). Secondly, a PTC resistor may dissipate quite a bit of power under worst case conditions. All in all, using a PTC style fuse (which has a much steeper on/off characteristic by design) is a better choice even though power dissipation will need to be considered.

author: zapta
author_rank: Super Contributor
timestamp: November 12, 2023, 08:56:37 pm
content: What baud rate do you use?

author: Doctorandus_P
author_rank: Super Contributor
timestamp: November 13, 2023, 05:06:44 am
content: Another vote for the PPTC solution.The TVS shorts over voltages (So no need to also add 1n4148 diodes) and the PPTC reduces the current though the TVS quick enough to prevent it from destructive behavior during a DC fault. But you have to watch the PPTC rating. A lot of them are rated for only quite low voltages, so be careful which one you pick.

author: Smokey
author_rank: Super Contributor
timestamp: November 13, 2023, 05:26:37 am
content: Interesting.

author: niccoppo
author_rank: Newbie
timestamp: November 13, 2023, 06:49:44 am
content: Any reference suggestions for the PTC?

author: PCB.Wiz
author_rank: Super Contributor
timestamp: November 13, 2023, 07:28:54 am
content: Quote from: niccoppo on November 13, 2023, 06:49:44 amMaybe Littelfuse 0603L001/60, but you will need decent zeners (5W?) with a ptc style fuse.Note this PTC approach will load the 48V to 330mA~2.2A - can it manage that OK ?That's why I favour the series 10mA current regulator diodes 2 x NSI50010YT1G. They only impose 10mA on a fault.If you know the pins and polarity of the 'accidental 48V', you could design to that.

author: David Hess
author_rank: Super Contributor
timestamp: November 13, 2023, 02:00:51 pm
content: Quote from: PCB.Wiz on November 12, 2023, 05:32:39 amI used a parallel output discrete solution for a driver, described below.QuoteI recently took some LED bulbs apart to diagnose why they are failing and found those little LED ballasts. The datasheets say they shut down at high temperature, so could be an improvement over depletion mode MOSFETs. One LED ballast could be used inside of a diode bridge with only one more diode drop, although this applies to any DC solution.QuoteThe resistance value can be pretty low compared to the driver impedance and depletion mode MOSFETs can be sized for continuous overload.Quote from: T3sl4co1l on November 12, 2023, 12:34:04 amThe diode bridge is really good for high bandwidth, but also works fine at slow speeds. I like back-to-back depletion mode MOSFETs, which can be sized to handle continuous overloads, or one depletion mode MOSFET inside of a diode bridge for AC. The last time I did this, I used a discrete driver, see below.QuoteI needed an RS-232 level shifter some time ago to convert from a USB dongle to true RS-232 levels but since the signal was not inverted, no IC would work. I could have added another inverter, but instead made a discrete transistor design with current source outputs and a parallel termination. The compliance voltage limited the output voltage. The level shifter was basically a TTL input stage driving a x1 current mirror, with another x2 current mirror pulling down, so not very power efficient.It worked *great*, with better than textbook RS-232 waveforms. It would have been a small step to add 100s of volts of overvoltage protection.QuoteAt least avoid using the same connector for RS-232 and other things.

author: AndyC_772
author_rank: Super Contributor
timestamp: November 13, 2023, 02:21:34 pm
content: What's the operating temperature range of this device? A PTC is fine if it normally runs relatively cool, but the trip current is a function of temperature which means they're not suitable if your equipment is designed to operate in a hot environment.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: November 13, 2023, 02:37:39 pm
content: Quote from: AndyC_772 on November 13, 2023, 02:21:34 pmThis is fortunately one application where trip current is almost irrelevant; normal intended signal current is fractional mA and maximum intended signal current is maybe 10 or 20. A 50mA PTC fuse, just below rated temperature, might open at 20mA, and thus have no disruption on normal signal flow. For that matter even if it opens (say, R ~ 100*R25), given the short distance, and assuming baud rate is not bleeding-edge, it probably keeps working and no one's the wiser!Tim

author: AndyC_772
author_rank: Super Contributor
timestamp: November 13, 2023, 05:07:33 pm
content: I guess it depends how you define a 'hot' environment. I design sensors that are designed to survive being bolted to a gearbox running at 150C+, so PTC devices just aren't an option.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: November 13, 2023, 09:08:29 pm
content: Quote from: David Hess on November 13, 2023, 02:00:51 pmThe Onsemi part is based on a JFET, very simple, with no thermal shutdown, just a slight negative temperature coefficientI also found another supplier of constant current regulator diodes, that look quite nice.https://diotec.com/en/productlist/C.htmlTheir CL05M6F includes a spice model, which has JFET/Reverse parallel diode/5pFThis is the transfer symmetry - the JFET works both ways, and RDS drops slightly for small negative voltages, as that adds to VGS.A series pair can drive +/- 4.5mA with appx 1.5V drop, fault current is 5.66mA, up to 190V fault levels.Diotec CL05M6F:+1mA is 194mV -1mA is 177mV Average origin slope ~ 185 ohms+2mA is 406mV, -2mA is -300mV+3mA is 658mV -3mA is -348mV+4mA is 927mV -4mA is -400mV+4.5mA is 1.10V -4.5mA is 408mV+5.66mA is +100V -5.66mA is -394mV (70 ohms)Current zone is 100V delta for 54.25uA change ~ 1.84MegOhmsdT of 25'C is 200uA change in Ireg (3.5%)

author: niccoppo
author_rank: Newbie
timestamp: November 19, 2023, 06:15:05 pm
content: I have found this PTC thermistor from TDK: B59623A0090A062 -->https://product.tdk.com/en/search/protection/current/ptc-thermistor/info?part_no=B59623A0090A062Could it be a good candidate?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: November 19, 2023, 06:53:15 pm
content: Yes, that will be fine.I might choose a 100R myself, and, the Rhot/R25 ratio is plenty high enough for this.Tim

author: PCB.Wiz
author_rank: Super Contributor
timestamp: November 19, 2023, 07:57:50 pm
content: Quote from: niccoppo on November 19, 2023, 06:15:05 pmThe A622 and A623 could both be worth testing. You will need decent sized zeners to clamp the voltage, while these act.What baud rate and operating load does the system work at ?

author: niccoppo
author_rank: Newbie
timestamp: November 20, 2023, 06:51:03 am
content: The baud rate is between 2400 and 115200 depending on the device connected. The data communication does not last more than 1.5 minutes (mainly 30 seconds). Communication happens between 10 and 20 times a day.