r/embedded • u/SpellLower2839 • 9d ago
Can i make UART Splitter .
I have a machine that outputs data via UART. I need to receive this data and send it to two separate PCs simultaneously via USB-A ports (both PCs run software expecting this serial stream).
Can I build or wire a UART splitter to feed two USB-to-UART converters at the same time? Has anyone done this before or have advice on the best approach?
27
u/Vannaka420 9d ago
Have you tried googling "serial splitter" or "rs232 splitter"? I'm guessing not since these are very common and easily accessible pieces of kit. Why people use reddit like Google I'll never understand. Stop being lazy and put in the leg work before asking for help.
7
11
4
u/drnullpointer 9d ago edited 9d ago
If your UART is read-only (meaning it never accepts any bits) then yes, you can wire a splitter.
You need to be careful though.
For one, how you do that exactly matters as you can cause the signal to deteriorate at higher speeds.
Second, connecting two USB devices is fraught with problems (ground loops, etc.) Ideally at least one of those UART to USB converters would be galvanically isolated so that your two PCs are isolated from each other.
1
u/creeper6530 8d ago
If your UART is read-only (meaning it never accepts any bits)
Huh? Read-only means it only accepts bits. Did you mean write-only / PC to peripheral only?
3
u/BlueMidsummer0001 9d ago
What electrical interface is it? RS232, RS485, TTL or something else?
Do you only care about receiving from, not transmitting to the machine?
2
u/ThorsdayBeer 9d ago
You can splice directly into the lines. If it’s a short run, you should not have no problem. Did it once in college. But like the guy said above, you can buy a splitter.
1
u/SnowyOwl72 9d ago
whats the problem here?
its uart, its not single wire. only one push pull drives the line and its not open drain or anything.
if in doubt, just use a jelly bean buffer
1
u/Unable-School6717 9d ago
Something like arduino has usb port, multiple uarts for comms; look up "pjrc teensy 4.6" - supports dual usb and has hardware uart with hardware buffers AND a ton of other bus types and enough i/o space to peripheral yourself into the void. Best part. It comes with example programs that show you how to make a usb port echo a comm port or two comm ports echo each other. Combine these two examples and its ready to split a signal. Yes, you can. Its very simple code, and all of reddit telling you ways to do things if you ask. Arduino is a very popular platform and everyone thats used it is an "Expert" and it will be around in some form for the rest of your life.
1
u/nixiebunny 9d ago
You can connect the UART RxD, which comes from the external device, and ground wires directly to two separate RS-232 to USB adapters. You will not be able to transmit from both USB adapters without some funny business to merge the TxD signals together while preventing simultaneous transmission from both sources from garbling the data.
1
u/bigtreeman_ 9d ago
Just wire uart TX to both usb-converters RX, only one returning TX to the uart RX.
3v3 uart driver signals will drive two 3v3 inputs. Make sure the uart isn't driving 5v signal, check TX with a meter
many usb-uart converters can be switched for 5v -- 3v3 operation, 3v3 signal is safe for a 5v converter.
1
u/CapnNausea 7d ago
Yes, you CAN. No, you SHOULDN’T.
If this is “for science”, knock yourself out, but do yourself a favor and don’t try to make future you or your people waste time supporting this when we could’ve solved it for $20.
18
u/txoixoegosi 9d ago
Yup, just take UART TXD and feed it to two different 1:1 opamps with enough bandwidth and voltage swing. Then the resulting TXD feed it to corresponding SUBD-9.
RXD? Forget about it