External USB power to Sound card when PC is off - Page 1
Forum section: electronics / beginners

author: foxmjay
author_rank: Contributor
timestamp: May 08, 2020, 12:05:02 am
content: Hi,I'm in this situation where i have an external sound card powered from the PC through its USB port, but when the PC is off it's no longer provide the power to the Sound card , and i usually need it to stay on so i can use it with with my guitar multi-effect .I know that it's possible to set the bios of the motherboard to keep the USB on even though the PC is shutdown , Unfortunately my Asus P8 Z77-v LX doesn't have this option .So i was wondering if i can connect the Sound card to the PC and to an external phone charger at the same time. if it's ok to do so , then what comes next is probably stupid.I assumed that it's not possible, so i started thinking of a circuit that can enable power either from the PC or from the Phone charger using few MOSFETs , so i came up with this :https://ibb.co/q9bv4WwWhen PC is on, the 1st P-channel MOSFET is on through the NPN transistor and at the same time the 2nd P-channel MOSFET is off through the PNP transistor. The opposite happens when the PC is off .The circuit kinda works , but i noticed that phone charger sinks some of the current when it's unplugged . Is there a way to prevent the current from flowing in the opposite direction through the MOSFETs ?Is there a better way to achieve this ? , Am i over thinking this ?.Thanks in advance .

author: wraper
author_rank: Unknown
timestamp: May 08, 2020, 12:07:29 am
content: First check bios settings. Often you can enable USB power while computer is off.EDIT: Manual says there is ASmedia battery charging support option. Probably it will solve your issue when using particular USB ports. Also you can try disabling ErP if it's enabled.

author: wraper
author_rank: Unknown
timestamp: May 08, 2020, 12:09:38 am
content: Your circuit quite likely will destroy USB port since it will be backfeeding 5V into PC through MOSFET body diode.

author: foxmjay
author_rank: Contributor
timestamp: May 08, 2020, 12:22:36 am
content: Quote from: wraper on May 08, 2020, 12:07:29 amI did check every menu in the bios . the LX model doesn't have ErP option or similar thing . I'll have a look once more .Thanks

author: foxmjay
author_rank: Contributor
timestamp: May 08, 2020, 12:25:28 am
content: Quote from: wraper on May 08, 2020, 12:09:38 amLol, thank god i decided to ask before i test it on the PC.Thanks

author: wraper
author_rank: Unknown
timestamp: May 08, 2020, 12:36:03 am
content: Quote from: foxmjay on May 08, 2020, 12:22:36 amAh, Ok. Did miss LX part. Certainly disable EZ mode and look through all settings. Sometimes setting may be in obscure place and completely non obvious. It might be under USB config, peripheral config, APM config, ErP or something else. Maybe update bios to later version, available settings often change with versions.

author: foxmjay
author_rank: Contributor
timestamp: May 08, 2020, 01:20:32 am
content: Quote from: wraper on May 08, 2020, 12:36:03 amYeah i did check every menu, I've updated the BIOS as well . If it's hidden, then it's hidden very well .Anyway . I'm actually interested to improve the circuit more than to fix the initial issue. that's the reason i post it in this forum rather than on a computers related forum .

author: wraper
author_rank: Unknown
timestamp: May 08, 2020, 01:28:43 am
content: On my Asus mobo it's "USB power delivery in S5 state" in "onboard devices config" besides serial port. Enabling ErP in different place resets this setting.

author: wraper
author_rank: Unknown
timestamp: May 08, 2020, 01:38:42 am
content: Here guy asks how to solve problem opposite to yours with exactly the same mobohttps://linustechtips.com/main/topic/102436-turn-off-usb-power-when-shutdown/Quote

author: drussell
author_rank: Super Contributor
timestamp: May 08, 2020, 01:39:51 am
content: Why don't you just use a powered USB hub?

author: foxmjay
author_rank: Contributor
timestamp: May 08, 2020, 01:50:24 am
content: Quote from: wraper on May 08, 2020, 01:38:42 amI've come across that post while searching, From what i understood he is doing hibernate, which is different than turning the PC off.I have a dual boot with Windows 7 and Ubuntu , so i guess it's not OS related .

author: foxmjay
author_rank: Contributor
timestamp: May 08, 2020, 01:56:50 am
content: Quote from: wraper on May 08, 2020, 01:28:43 amThe menu i have for onboard devices config has only :HD Audio ControllerFront Panel TypeSPDIF Panel TypeRealtek LAN ControllerRealtek PXE OPROMSerial Port ConfigI couldn't find anything close to ErP in the whole Bios menuI did find S4 sleep though , but enabling it or disabling it didn't change much .

author: kjr18
author_rank: Regular Contributor
timestamp: May 08, 2020, 08:42:22 am
content: I think a simple dpdt relay would be enough. NC pins to external power supply, NO pins to usb power and common pins to sound card. Coil powered by usb power.

author: wraper
author_rank: Unknown
timestamp: May 08, 2020, 10:28:52 am
content: Quote from: foxmjay on May 08, 2020, 01:50:24 amNope he did not hibernate as such. Windows 8/10 does not completely shut down by default.

author: Mp3
author_rank: Frequent Contributor
timestamp: May 08, 2020, 12:15:12 pm
content: Is there a reason you're not cutting the VCC and GND wires from the sound card, and powering it with an external 5VDC supply? I know it's a little weird, but it'd probably give you cleaner power than whatever comes off the USB port anyway.

author: foxmjay
author_rank: Contributor
timestamp: May 08, 2020, 01:00:24 pm
content: That's a good idea i think , and it should be fairly easy , I'll give it a try . ThanksQuote from: kjr18 on May 08, 2020, 08:42:22 am

author: foxmjay
author_rank: Contributor
timestamp: May 08, 2020, 01:01:12 pm
content: Good idea , I'll keep it as a last resort solution. ThanksQuote from: drussell on May 08, 2020, 01:39:51 am

author: foxmjay
author_rank: Contributor
timestamp: May 08, 2020, 01:03:57 pm
content: That what i though to do initially , but it's the same as connecting positives together , and grounds together , and that will feed back current to PC when it's off which is not a good thing I think .Quote from: Mp3 on May 08, 2020, 12:15:12 pm

author: Mp3
author_rank: Frequent Contributor
timestamp: May 08, 2020, 01:32:19 pm
content: Quote from: foxmjay on May 08, 2020, 01:03:57 pmI might be wrong but my understanding is that if you cut the 5v and gnd lines in the usb cable itself that goes to your pc, feed back current can't happen.I used to have a usb hub that would feedback current. I opened it and cut the vcc tab from the usb connector that goes to the pc, problem solved

author: drussell
author_rank: Super Contributor
timestamp: May 08, 2020, 01:35:12 pm
content: Quote from: foxmjay on May 08, 2020, 01:03:57 pmNo, you don't connect the +5 coming from the computer at all....You just power it always from the external supply.Basically just like if you were using a powered hub, but without multi-port capability. You're just injecting your own power closer to the device rather than using power from the USB host.

author: foxmjay
author_rank: Contributor
timestamp: May 08, 2020, 02:05:20 pm
content: Ah, got you . so then no need for me to cut anything , i can just make a small perfboard wired like this :I feel stupid now lol , i was over thinking this then .@Mp3 @drussell ThanksQuote from: drussell on May 08, 2020, 01:35:12 pm

author: drussell
author_rank: Super Contributor
timestamp: May 08, 2020, 03:36:49 pm
content: Quote from: foxmjay on May 08, 2020, 02:05:20 pmYeah, that should work. I had to set up the same kind of thing recently for someone who is doing food delivery so their phone didn't start/stop charging all the time, cycling the battery constantly, by just making an adapter cable splitting off the 5v to a USB power bank for them so the phone always charges, whether the car is running or not, but can still plug the phone into the car's USB port for the added integration functionality, voice direction overlays over the music, etc. that it won't do via bluetooth... and required no wiring changes to the car. If it were mine, I would just rewire the USB port to be always on with 5V, 24/7.QuoteProbably.

author: foxmjay
author_rank: Contributor
timestamp: May 08, 2020, 08:22:00 pm
content: Nice , i could use that in my car too.Quote from: drussell on May 08, 2020, 03:36:49 pm

author: drussell
author_rank: Super Contributor
timestamp: May 08, 2020, 10:09:55 pm
content: If you make a nice, polished version, please upload the gerbers somewhere, it is a useful device.Thanks!