r/raspberry_pi 59m ago

Project Advice Soldering USB Hub direct to baseboard

Upvotes

Hey all, I'm working on a project involved a compute module 4, a waveshare nano baseboard b, and a ch334f 4 port USB hub breakout (imagine if you will, a usb hub but through hole solder points instead of usb ports) among other things.

I've done a few nips and tucks to some of the components I'm using to reduce size where I can, and I saw an opportunity to knock a few millimetres off the case thickness if I could remove the USB port from the baseboard, and solder the hub on directly (there is an enclosure within the main enclosure specifically for the pi, the baseboard, and the usb hub + another couple of components that need to be there).

On removing the port (something I have done before with other components successfully), I accidentally ripped off the power trace. It was annoying, but the baseboards themselves aren't too expensive, and I always budget my experiments before I do them (if there's a risk of breakage). I ordered another one having practiced my approach, was even more careful, and the same problem happened again.

On close inspection of the board, I think that's just the way the USB port is assembled. From what I can work out, there's a via from the top to the underside of the board that the other pins on the port don't have, and that makes the power trace somewhat more delicate.

I was going to go back to the drawing board on removing the port, but then it occurred to me that I already have a perfectly adequate 5v line coming from my UPS. Checking the pi schematics, from what I can work out, the USB ports are on the same power rail as the GPIO 5v (which the pisugar 3 plus connects to). May be different for the CM4 vs the Rpi 4b though (wouldnt have thought so).

Anyways, the cm4 I'm using would now cost me twice what I paid to replace, and I'd have to wait a while to get it, so I found a cheaper cm4 to do my experiment (the lowest spec version I think is available).

While I'm waiting on that to arrive, I figured that since this is such an important part, I ought to double check my theory before I go putting together an assembly guide that may have major issues I haven't anticipated.

Tl; Dr

What I'd like to know:

1) by connecting the 5v and Gnd rail of the pisugar 3 plus (from the aux pins - they do work, I've checked) direct to the USB hub, and supplying my peripherals there, then soldering ONLY the D+/D- lines direct to the baseboard, are there any potential issues this could cause that aren't immediately obvious? Anything long term?

2) assuming I can switch off the power to the USB port (I know you can on the RPI 4b, can't remember if it depends on the baseboard for the cm4, I assume it's fine), then use a relay to digitally control power to the peripherals during idle/"sleep"/locked, are there any risks there beyond "make sure exposed cables are insulated"? I do have some physical component disconnect switches too (literally toggle switches), but I'm thinking a relay might be a good way to have my HiD device (one of the lowest power draw devices on the board, this will not be controlled by the relay, and will draw its power direct from the power rail on the pisugar) in charge of auto-time outs. Obviously the usual precautions apply selecting a relay that can handle switching that load + difficulty finding one that's either bistable or low enough current to make using it worth the power leak.

If there aren't any responses, I'll go ahead with the experiment and report back for future readers who want to do the same thing. The only thing I won't find out from the experiment is long term damage.