What are your ideas for protecting I/O?

Thread Starter

tyro01

Joined May 20, 2021
87
Hi, Now suppose we have a communication circuit like the one in the attached image.
UART_connection.jpg
This UART communication line has no power supply.
The VCC power supply for each board is 5VDC, but they are separated.
These boards may hot plug.
If the timing of power-on is off, the circuit may be damaged.
Board A has already been designed.
Board B will be designed from now on.
What kind of protection circuit would you design?

tyro
 
Last edited:

ericgibbs

Joined Jan 29, 2010
18,766
hi tyro,
Which type of transmit and receive devices are being used in 'A' & 'B'..?
Over what distance and at what voltage levels.?
E
 

Ian Rogers

Joined Dec 12, 2012
1,136
RS232 is normally hot swappable... There is no "power" as such... We have all accidentally crossed TX and RX with no problems caused.

The 232 drivers are separately supplied.
 

Ian0

Joined Aug 7, 2020
9,667
Use a 45Ω 265V PTC thermistor in series with RXD and TXD at each end, with a 5V bidirectional transorb between each line and ground.
It will withstand an inadvertent connection to mains live without damage.
It has an added advantage on RS485 lines that it matches the drivers to the 120Ω characteristic impedance of the cable.
Don‘t connect microprocessor pins directly to the outside world if you can possibly avoid it - use a buffer or line driver or some sort. An 8-pin line driver is an awful lot easier to replace than a 48-pin LQFP microcontroller.
 

Thread Starter

tyro01

Joined May 20, 2021
87
There is Renesas RL78 on the Board A, ATMega328 on the Board B. They communicate via the UART port at 5V level.
VCCA and VCCB are generated from the same high-voltage DC power supply.
 

Thread Starter

tyro01

Joined May 20, 2021
87
5V should not be output from the TXD pin of Board B when hot-plugged.
My idea is to get permission for communication from Board A and then apply voltage to the TXD pin of Board B.
 

Ian0

Joined Aug 7, 2020
9,667
There is Renesas RL78 on the Board A, ATMega328 on the Board B. They communicate via the UART port at 5V level.
VCCA and VCCB are generated from the same high-voltage DC power supply.
I wouldn’t recommend it without some form of buffer, even if it’s just a 74hc125
 

Thread Starter

tyro01

Joined May 20, 2021
87
I usually connect the UART communication line of my USB to serial conversion board to a microcontroller that is powered off with a live wire. I have not experienced any microcontroller breakage by this action. However, some protection is necessary for applications that require reliability.
The start bit of UART communication is negative logic. I am concerned that this could damage the input pins on the receiving side, since they are outputting 5V before communication is initiated.
 
Last edited:

Ian0

Joined Aug 7, 2020
9,667
I usually connect the UART communication line of my USB to serial conversion board to a microcontroller that is powered off with a live wire. I have not experienced any microcontroller breakage by this action. However, some protection is necessary for applications that require reliability.
You’re lucky. If the microcontroller has no power, and the input is at 5V, then current can go from the input, through the protection diodes and try to power up anything that is on the processor supply. The protection diodes are only capable of 10mA.
 

Thread Starter

tyro01

Joined May 20, 2021
87
Thanks lan0, With my little knowledge, I invented a circuit that is controlled by GPIOs to prevent 5V from being applied to TXD.
output_ctrl.jpg
 

Ian0

Joined Aug 7, 2020
9,667
If you have a short distance and a relatively slow data rate, how about an open-drain output and a pull-up on the input?
You can protect the output with a transzorb, and the input with a series resistor.
But don’t forget that you have inverted the signal. Unless your UART has an “invert” option, you‘ll have to invert it again to be able to read the data.
 

Thread Starter

tyro01

Joined May 20, 2021
87
The trouble is that Board A has already been designed by the customer and I can only design Board B.
RL78 has an invert option, but ATMega328 don't have an invert option as hardware. I'll protect RXD on Board B using 2N7002.
TVS diodes are my favorite devices and I personally think of them as band-aids.

The LTSpice shown earlier is a hand-made Output-Enable. After the OE is deactivated, it should be able to transmit again if it sustains a stop bit width of few clocks.
 
Last edited:

Thread Starter

tyro01

Joined May 20, 2021
87
I found SN74LVC1G126 Single Bus Buffer Gate With 3-State Output. This IC has Partial power down (Ioff) feature.
Various packages are available for this IC.
SN74LVC1G126.jpg
 
Last edited:

Ian0

Joined Aug 7, 2020
9,667
The trouble is that Board A has already been designed by the customer
Always the problem. It only takes one bad component to make a bad system.
Suggest to the customer that he should redesign his board with a proper interface, or accept that there may be some failures when hot-plugging, which won't be covered by your guarantee.
If you try to invent a workaround, it may or may not be successful, and you will end up being held responsible for the failures. If they are failures in the field which you have to rectify, it may cost more than your profit on the job. Sometimes it is best to walk away from the project.
 

Thread Starter

tyro01

Joined May 20, 2021
87
My customer says that Board B will use the same high voltage power supply (48VDC) as Board A. They also want the board to be as small as possible.

The current consumption of Board B is only 20mA. If they had provided 5V for the UART line from the beginning, Board B would not need a three-terminal regulator, heat dissipation resistors, or electrolytic capacitors. Getting 5V from 48V requires a large board area.

I don't know what other seasoned techs think, I hate being ordered to make 5V or 3.3V from high voltage. Incidentally, if you have the budget, BD9V100MUF-CE2 and R1260S023A-E2-FE can efficiently generate 5V from high voltage.
 
Last edited:

ag-123

Joined Apr 28, 2017
276
a way though is to use a pretty large 1 k ohm resistor, that would give 48 mA max for 48 VDC, then you can add a regulator in the path to just be sure the voltages are sane.
 
Top