Designing a diagnosable uart to rs232 link with limited redundancy - Page 1
Forum section: electronics / projects

author: Craio
author_rank: Newbie
timestamp: August 06, 2025, 02:49:33 pm
content: I'm working on a datalogger (build around the Nuvoton MA35D1 dual cortex-A35+M4) mainly meant for remote operation with limited power availability.An important part of it, is the connection to serial sensors.Initial design goal was allowing continued logging while the main mpu is powered down or asleep.For that i added a low power STM32G0 with external FRAM.Along the way I've added the goals:- remote troubleshooting of single points of failure- use discrete parts over 'complex' ones (like analog switches) because they are easier to debug (a dead mosfet either conducts or it doesn't)- Figure out ways to work around those failures withou adding new ones (like a switch to toggle between main transceiver and backup is easy, but prevered powering down the unused one)But I'm kinda new to this (and learning along the way), so i was wondering if someone could have a look at the schematic and tell me- What is correct or could be done better or just overlooking a simpler solution?- What might be overkill or only half measure?There are annotations on the attached schematic (png and pdf because, original is diptrace) explaining the purpose/reason behind most of the components.The discretes haven't been chosen yet.

author: PGPG
author_rank: Frequent Contributor
timestamp: August 06, 2025, 05:28:43 pm
content: For me:1. Half of wires are invisible,2. At Q1 D I see MPU_RX net. I spend few minutes searching for other occurrence of this net name until I gave up.

author: Craio
author_rank: Newbie
timestamp: August 06, 2025, 06:34:18 pm
content: Thanks for trying.In regards to MPU_RX, that rectangular box is how links across schematic sheets are done in diptrace, i made that clearer.The thumbnail seems to zoom in a lot by default, the pdf should be easier to read.Just to be sure I've added black&white versions of both (mainly for the gray text).

author: PGPG
author_rank: Frequent Contributor
timestamp: August 06, 2025, 11:15:42 pm
content: Quote from: Craio on August 06, 2025, 06:34:18 pmB&W version is much easier to read.I don't want to analyse the circuit in detail.You are writing about "limited redundancy" that I practically don't understand the idea behind it. I would never do such circuit.I will write you short story...Long time ago (90s) I have seen at one fair someone having a PCB with all elements soldered except RS485 IC that was in socket. I have asked him why.His answer was that RS485 drivers (like bulbs) simply wear out and need to be replaced from time to time.Now practically all designed by me PCBs contains RS485 drivers and our RS485 connection is not isolated and all RS485 drivers are SMD and soldered to PCB. During last 20 years it happened 2 times that lightning struck the building where our system was installed. Many systems with long cables have failed there, but in both cases our system survived without failure.The key in my opinion is not to have two TRS3221 connected to RS232 cable without any protection (incoming surge has a big chance to damage at once both this ICs).The way I use is to imagine that at your RS232 cable 50us pulse from 1kV source through 40 ohm will happen and design your circuit to survive this.You should have at least 2 protection stages. One can be 600W SMB transils. Then you should have some impedance (for RS232 I think 100ohm in serie can be good first shot) and second can be IC integrated ESD protection if your ICs have it. If not you have to limit pulse after transil and resistor with fast small signal diodes to not exceed IC datasheet absolute max limits.It should give you much, much more field robust solution than using 2 ICs how you did it.If your RS232 cable is going to be not contained in its entirety in one building than the additional protection before transils should be considered (or galvanic isolation). I have no experience with such extra protection as I don't use it (we specify our RS485 to not go out of one building).About galvanic isolation I was told by someone that when he was using in his RS485 isolation withstanding 3kV than from time to time failures happened, but when he used 4kV isolation his problems gone.

author: Craio
author_rank: Newbie
timestamp: August 07, 2025, 08:22:41 pm
content: RS485 has it's advantages in that regard but for a datalogger I mainly need to provide RS232 but RS485 is planned. Which transceiver do you use?That resistor you mention is already in the schematic, picked 100Ohm because that won't affect the signal in the worst case (max cable length) at 250kBd (maximum of the transceiver).The transceiver used is the TRS3221Eversion which comes with the following built in esd:* ESD Protection for RS-232 Pins– ±15kV Human-Body Model (HBM)– ±8kV (IEC 61000-4-2, contact discharge)– ±15kV (IEC 61000-4-2, air-gap discharge)Should there still be a smbj in front of that? Because I figured that was enough so i won't need external in addition.The idea behind dual transceiver isn't just for failure from external influence (if indeed that's not enough to kill both at the same time) but also incase the chip just fails. The idea of the design is to know if something fails and if possible work around rather than adding a switch that silently fails.For example:- Transceiver switchover is done with a mosfet instead of a an analog switch to avoid more complex failures- The drain is monitored by the mcu so i can vrify that the mosfet actually switched- If the mosfet is stuck open, i can change that input to an output and still switch to the backup- The gate can also be driven by the mpu incase the mcu is unresponsive- Both invalid pins are connected to the mcu so i can monitor which transceiver is active and functioningThat the kind of reasoning I'm trying to apply throughout the design to make things diagnosable but i wonder if i'm not overengineering things.