• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Multiple UART Hub to USB?

Visitor

Well-Known Member
I'm working on a measurement system with several modules with UART interfaces, and I'd like to have it connect to a computer via a single USB cable. One way to do this is to use a UART-USB converter on each device and a USB hub to combine the USB inputs. But I'm wondering if there's a module that's essentially a UART hub to a signal USB connection. It looks to the computer as a number of serial ports, but each UART interface wouldn't need a USB converter.

I seem to recall seeing a USB hub board (no enclosure) designed to be embedded in a system but I don't recall if it had UART inputs. Anybody seen such a beast?
 

Pommie

Well-Known Member
Most Helpful Member
EasyEDA have the ch341 and TUSB2036 chips available. You could always make your own. All those 9 pin RS232 sockets will make the board big enough that you'll fit all those chips easily. Depends really on how many you need.

Mike.
 

Visitor

Well-Known Member
That's a possibility. I'd just use headers for the connections, since that's what's on the various boards.
 

Visitor

Well-Known Member
I think this is coming together nicely, but my RS232 knowledge is a little fuzzy in the back of my head somewhere.

My primary interest is in UART interfaces at the moment, but it seems a shame not to include RS232 as an option. What I'd like to do is populate the board with a MAX232 chip (which supports 2 Tx/Rx interfaces) or two, with the idea that either the UART connection OR the RS232 connection will be used.

The transmit lines from the USB/UART chip aren't a problem. The MAX232 chip in parallel with the UART connection won't impact anything. The complication is with the receive lines. If the MAX232 chip has no signal, it's going to hold the RxOut line high, so an active UART connection would fight with that.

I think the following sketch solves the problem without the need for jumpers or other interventions. The diode will allow the MAX232 chip to pull the line low (1N4148, or maybe a shottky?) and the resistor pulls it high otherwise. Have I got the logic straight on this?

RS232 levels.jpg
 

Pommie

Well-Known Member
Most Helpful Member
I'm confused, are your devices TTL level non inverted RS232? Your problem is going to be from the MAX232 ttl out to the USB chip, this will be low when idle so if in your diagram Micro RxIn is the USB chip then I think that will work. I'm not sure if you'll need a pullup on the MAX232 input.

Mike.
 

Visitor

Well-Known Member
At present, my devices are all TTL-level UARTs, but that's not to say that at some point I won't want to include a RS-232 device. One example would be my Fluke 45 bench DVM.
 

KeepItSimpleStupid

Well-Known Member
Most Helpful Member
Might prove useful: https://www.sparkfun.com/tutorials/215

Note the "Inverted" for TTL.

besides that, your dealing with >=3V and <=-3V for RS232. The original spects were +-25V excursions were allowed. Cheap RS232 used +-5V levels. I think the MAX 232 uses +-10V levels. The switching point is still + and - 3 volts with -3 to 3V being undetermined.
 

Visitor

Well-Known Member
I've laid out a board using the EXAR chip I linked above. One USB connection will provide four UART serial interfaces. Along the bottom edge of the board are four 0.1" headers for Dupont connectors and 4 "Grove" connectors used by Seeed Studios and Elecrow (called "Crowtail"). My thought is that one or the other style will be installed as convenient for the application.

I've included a MAX232 chip to provide true RS232 interfacing on 2 of the UART channels. The cost to add this option is minor, and as I see this being used to interface instrumentation, the option is useful.

I used USB power for the interface, but I didn't power power to the UART connectors. In my use case, the devices are powered and I didn't want to worry about USB power limitations. There is a terminal block for supplying power to the UART devices if needed.

I'm going to have these assembled at JLC; if anybody is interested, I may have a few extra.

USB-UART HUB 1.jpgUSB-UART HUB 2.jpg
 

Visitor

Well-Known Member
Darn it. LCSC has stock of the USB chip. JLC does not. I guess I'll get the boards made and a solder paste stencil......
 

KeepItSimpleStupid

Well-Known Member
Most Helpful Member
You could probably get a stencil for the one part at protoadvantage and don;t populate some of the caps nearby.
maybe the PCB manufacturer can make you a stencil and cut it, so all you have to do is a do a few parts,
 

Visitor

Well-Known Member
Compared to the TQFP package of the USB chip, the rest is easy. I've never figured out how to use a solder paste stencil for one component after the rest of the board is assembled. I guess if there's enough clearance around the part, you could cut the stencil to a small size, but that seems like more trouble than it's worth in this case.
 

KeepItSimpleStupid

Well-Known Member
Most Helpful Member
What I;m saying is have them cut it, so it includes the nearby parts. They will get cleaner edges than you can or you make a "board: and ask them to just make a stencil. You define the boundries. If you want larger holes so a capacitor can swim in it, do it.

You have c5, c6, c7 and c8. just make a big hole for those components. You need the outline and the pad layer to make the stencil I think.
Fiduciary marks helpful. e.g. make two holes in your phantom PCB and real PCB so you can line things up.
 
Last edited:

rjenkinsgb

Well-Known Member
Most Helpful Member
I've never used a stencil, though I have only done small quantities by hand.
I just lightly smear the underside of the IC pins and the PCB pads with solder paste using a cotton bud, position the IC carefully and heat it with the hot air gun while holding it down with another cotton bud or toothpick.

The solder naturally flows in to the pins and pads as it melts.

(I'd not want to do it for more than a dozen or so boards at a time, though).
 

Latest threads

EE World Online Articles

Loading
Top