[chbot] Power control of USB socket

Volker Kuhlmann list57 at top.geek.nz
Fri Sep 29 02:18:50 BST 2023


> What I'm looking for is either a device, module or even a circuit
> diagram of something that would enable me to disconect the USB power
> to this down stream device.

Have you thought of the data lines? The USB plug (type A) is clearly
designed to have power connected before data. Maybe it doesn't matter,
if the data lines are current limited? Otherwise there's a chance to
blow things up.

I'd use a p-channel MOSFET to switch the power. I've used a DMP4051LK3
in the past to switch a slave RPi on or off from an RPi. Make sure the
base is not floating, e.g. by pull-up to source. You'll also need a 5V
digital output. 3.3V works too, but needs an extra NPN and 2 resistors.

A PC doesn't really have a digital output. There are some on the FT232
USB-serial converter chips that could maybe put to use. They may not
work on the fakes from ali though.

Volker

-- 
Volker Kuhlmann
http://volker.top.geek.nz/	Please do not CC list postings to me.



More information about the Chchrobotics mailing list