Electronics > Microcontrollers

Sending UART to multiple devices - opamp buffer needed?

(1/2) > >>

paulca:
Simple question.  If you want to share a UART Tx line between multiple Rx pins...  does it's impedance allow for that or does it need buffering with an opamp?

It's not a critical line, just a debug line.  I'd like the main MCU to be able to pass through the debug channel of the Wifi module.  At the same time though that Tx line is required to reflash the Wifi module also.  So the Tx will connect to the MCU Rx AND a header pin.

Googling gives me a mixed bag of results.  At the extreme end is using actual line buffers to protect the MCU pins from "Users".  In the middle was teh suggestion to use line drivers/transducers even for a PCB to PCB link!

Surely I don't need to go that far for a debug line?  Do I even need an op amp to drive 2 Rx transceivers from a single Tx pin?

Kleinstein:
It depends on the µC and Wifi module. The UART signals are normally just logic signals with normal drivers at the µC.  In most cases they are OK to drive multiple targets and the UART protocoll is even a bit tollerant with ringing and similar due to the normally somewhat reduced speed (e.g. 115 kBaud).
Extra buffers would protect the µC / module from ESD and similar events a little.  A normal PCB to PCB link is normally OK without extra drivers. Extra drivers and maybe termnation resistors may help when the trace is long, like more than 1 m.

Mahagam:
Any I/O ports between the user and the MCU must be buffered. Otherwise you don`t need any buffer for the uart.

Siwastaja:
"Fan-out" and "fan-in" mostly remain the terms of 1980's and TTL.

MCU IO is CMOS: in output mode, it is a fairly low-resistance switch to GND or VCC. In input mode, it's almost ideal "voltage meter" rounding the input value to GND or VCC; almost no leakage resistance; a tiny tiny bit of capacitance, like a scope probe.

Thus, the output can drive hundreds of inputs quite easily. If interested about doing it more properly, sum up the IO pin capacitances as given in the datasheet (or approximate as 10pF per pin). Assuming 50 ohms of source impedance (basically the Rds_on of the MOSFETs in the output port, varies with part and temperature around 10 - 50 ohms), you can then calculate the RC time constant, which will limit your UART baudrate.

If good signal integrity is important and lines are long, then you would buffer them separately and add a source termination (series) resistor right after each buffer, before the line.

Within a PCB and traces of few inches, this does not matter, just route the UART to the (few) devices.

Going into a connector, especially user-accessible, might prompt for some extra consideration for EMC, ESD and source termination to prevent overshoot and ringing. Even then you may not need a buffer, I just passed all EMC qualifications on first go with a simple design using RC filtering plus TVS diodes on microcontroller IO directly. Zapping the inputs with 8kV of ESD was no problem and passed immunity tests by A criteria (valid inputs) even though self-recovering failures were allowed.

If you decide to use a buffer, don't use an opamp, use a digital logic buffer like something from 74HC series (or 74HCT if you want to convert levels from 3.3V to 5V). But I don't recommend the weird practice of adding random buffers and transistors "just because". Whenever the IO of the MCU is fine as is, then just enjoy the simplicity of design.

paulca:
I suppose as a minimum I should put 100Ohm resistors on the UART Rx/Tx header pins.  At least this seems to be more the "minimum" from further googling. These are debug lines, so no users. 

The device will not need any EMC qualifications.

If it works, it works, if it doesn't I'll explore using a 74HC bus transceiver, I think I have a few of those as through hole already.

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod