chr1s

Using USB as power source
« on: April 04, 2021, 01:07:54 PM »
While USB supplies 5V with 100mA (500mA or more depending on the USB specificationI think) this only works for devices meaning simply putting a load across the 5V won't work.

Is there any not too complicated way to get more current out of a USB port? I wouldn't mind using an ATMega/ATTiny uC. For example the V-USB library might be an option but I'm not enough into USB to understand how a higher current can be demanded from the USB host.

At the moment I'm working on a project where I'd like to switch on an audio amplifier for a TV by the TV's USB port. I have a FRT5 5V relais which needs about 30mA but this doesn't work without chaining a USB hard drive in parallel. Using a USB flash drive or WiFi dongle on the other hand won't work which might be due to the device using up most of the supplied current itself.



squarewave

Re: Using USB as power source
« Reply #1 on: April 04, 2021, 04:21:46 PM »
I was tinkering with USB as a power source not long ago and I tested a number of USB sources and I don't recall running into a USB port that would not supply the current my SMPS device (DETN01L-15) wanted which was 253mA. I did have a 4.7mH/750mOhm common mode choke and 10uF cap between the USB supply and the SMPS.

Try it with other USB ports. My guess would be that either your TV has some extra circuitry that is a factor or maybe you are trying to draw too much inrush current such as because you have a large capacitor directly on the USB supply. IIRC you're actually not supposed to have more than 10uF directly across the USB supply. What are you doing with the data lines? I would say you should probably just leave them floating. Certainly don't ground them.

chr1s

Re: Using USB as power source
« Reply #2 on: April 05, 2021, 04:35:32 AM »
While building I used an older Dell laptop as USB host where I saw a similar behavior: It didn't work without additional USB device but worked when using the WiFi dongle.

The data pins are floating, there's simply the relais with a reversed 1N4007 diode in parallel (to catch switch-off peaks) and a 1N5817 in series connected to USB power. (The 1N5817 was meant to additionally protect the USB host but as it's only rated for 20V reverse voltage it's probably superfluous)

cyrano

Re: Using USB as power source
« Reply #3 on: April 05, 2021, 05:03:10 AM »
IIRC, you need a resistor over the data lines to get 5V on the power lines. But that's the standard hardly any manufacturer seems to follow today.

The reason is, USB ports need to provide 5V while the laptop sleeps, to charge phones. There are numerous gadgets out there that work with these non-standard ports, like LED lights, fans... that don't contain USB circuitry or even the resistor.

Maybe the OP's TV still follows the standard?
Why is it people love to believe and hate to know?

chr1s

Re: Using USB as power source
« Reply #4 on: April 05, 2021, 06:22:19 AM »
While adding a resistor between the data lines I noticed that I connected the negative supply for the relais to a data pin instead of USB-ground which of course won't help. Now with the resistor it seems to work with the laptop which is from around 2008 (Dell M4400) and thus might still need the resistor. The TV isn't here so I have to test this separately.

The strange thing is that I thought I had a USB flash drive daisy-chained which worked. But on the other hand I'm not sure any more what I tested under which conditions. I added a USB-A port to connect various USB devices like the flash drive for testing at which point I must have resoldered the power leads the wrong way. Luckily I don't seem to have destroyed any USB ports.

Thanks for the input. I'll write again when I checked with the TV.

chr1s

Re: Using USB as power source
« Reply #5 on: April 05, 2021, 02:41:33 PM »
It also seems to work now with the TV. Thanks again.

RuudNL

Re: Using USB as power source
« Reply #6 on: April 10, 2021, 05:27:59 AM »
As far as I know, a USB device sends a 'request' for the amount of power it needs.
Maybe some USB ports won't provide power without such a 'request', although most seem to deliver 5 volts even without anything connected.
Keep in mind that the 5 volts of the USB connector isn't always 'clean' DC!
(For a relay this doen't matter of course.)
The maximum current a USB connector can deliver is 500 mA. as far as I know.
There is a solution for every problem!

http://www.vansteenisaudio.nl

squarewave

Re: Using USB as power source
« Reply #7 on: April 10, 2021, 10:00:57 AM »
Keep in mind that the 5 volts of the USB connector isn't always 'clean' DC!
I thought for sure that would be the case but surprisingly it was not. I have been tinkering with a device to make ultra clean +-15 from what I assumed would be or in some cases could be quite dirty USB power. But in every device I checked from the standard Apple white cube to multiple different laptops, a tower PC and the USB port on my cheap oscilloscope scope, I was able to get >200mA of already pretty clean power and not just at low frequency. There wasn't even much high frequency hash.

I didn't try a TV however. And I suspect the story could be a little different in a car or train or some such but I haven't tried anything like that at this point.

RuudNL

Re: Using USB as power source
« Reply #8 on: April 10, 2021, 10:11:50 AM »
In the past I have had a lot of problems with a USB powered external soundcard.
You could even hear when I moved the mousecursor on the screen!  ;D
Nowadays I use a self powered USB soundcard without any problems.
There is a solution for every problem!

http://www.vansteenisaudio.nl

cyrano

Re: Using USB as power source
« Reply #9 on: April 10, 2021, 03:06:49 PM »
Most USB powered soundcards really need 500 mA. It's not that USB ports supply dirty power, but at 500 mA or a bit over, the 5V often drops a bit and the converter inside the audio interface turns noisy because it's at it's limits.

Of course, some computers have noisy power, but it's not a rule. And some USB ports are happy to supply more than 500 mA. Most notably, Apple's old Cube G4, that can supply up to 2A for the included external soundcard, that has onboard 2X4W amps.
Why is it people love to believe and hate to know?


 

Related Topics

  Subject / Started by Replies Last post
4 Replies
2306 Views
Last post December 29, 2006, 05:38:24 PM
by drpat
4 Replies
2424 Views
Last post March 17, 2008, 06:41:08 AM
by playboss
33 Replies
3060 Views
Last post October 27, 2020, 03:47:24 AM
by chilidawg
20 Replies
1252 Views
Last post November 21, 2020, 07:00:59 PM
by squarewave