USB help!!!

Thread Starter

angeline_happyoo

Joined Sep 2, 2007
28
USB 2.0 has:
Output voltage: 4.75-5.25V (5V±5%)
Output current: 100-500mA

is the input voltage is also 5V and output voltage is also 100-500mA????
 

bloguetronica

Joined Apr 27, 2007
1,372
USB 2.0 has:
Output voltage: 4.75-5.25V (5V±5%)
Output current: 100-500mA

is the input voltage is also 5V and output voltage is also 100-500mA????
That is quite it, but remember that in portable computer the limit is just 100mA, while in desktop computer it will reach 500mA (saw some specifications mentioning 250mA, if I recall).
 

Thread Starter

angeline_happyoo

Joined Sep 2, 2007
28
That is quite it, but remember that in portable computer the limit is just 100mA, while in desktop computer it will reach 500mA (saw some specifications mentioning 250mA, if I recall).
Thanks you...

That means the USB is only used to draw out the power from computer but not act as an amplifier.
USB does not, for example, input voltage is 2V, and then it amplify the input voltage to 4V output (example)?

Am i right?
 

bloguetronica

Joined Apr 27, 2007
1,372
Thanks you...

That means the USB is only used to draw out the power from computer but not act as an amplifier.
USB does not, for example, input voltage is 2V, and then it amplify the input voltage to 4V output (example)?

Am i right?
The USB protocol doesn't work that way. The supply voltage is fed through the two external pins of the USB plug. The two pins in the middle are for data transmission (refered as D+ and D-).

Also, there are cases in which no voltage is supplied through the USB connection. This is the case of self powered perifericals or perifericals that are powered externally. I can give two examples: a USB pen would need the USB power to be fed, since it has no internal power source, but a printer is fed by other means, so it doesn't take power via USB. In that case, only three pins are used (the power ground included, but just as a voltage reference, not being biased by a significant current). Vcc is left floating.
 

Thread Starter

angeline_happyoo

Joined Sep 2, 2007
28
Well, in this case, what i concern is the supplying power though USB to the device...
So i'm not interest on trasfering data through USB.

How many input current and voltage should i provide to have an output power is 5V and 500mA?
 

beenthere

Joined Apr 20, 2004
15,819
Your last question is hard to interpret. If you are asking something like "how many devices can I power with the USB as a source?", then you will need to determine the current draw of each individual device/circuit and insure that total does not exceed the ability of the USB plug.
 

bloguetronica

Joined Apr 27, 2007
1,372
Well, in this case, what i concern is the supplying power though USB to the device...
So i'm not interest on trasfering data through USB.

How many input current and voltage should i provide to have an output power is 5V and 500mA?
It is a strange question, but I will do my best.

Your figure suggests a simple USB connector. Vcc is 5V and the current doesn't change either. Since USB connectors are simply conductors, you should provide the same voltage and current.
 

GS3

Joined Sep 21, 2007
408
using USB for power is generally not a good idea as you may damabe the motherboard. Furthermore, it is not like there is an unconditional power supply there. The power supply is software controlled and to get full power the device must solicit it and the controller must grant it.
http://www.beyondlogic.org/usbnutshell/usb2.htm

A USB device specifies its power consumption expressed in 2mA units in the configuration descriptor which we will examine in detail later. A device cannot increase its power consumption, greater than what it specifies during enumeration, even if it looses external power. There are three classes of USB functions,

Low-power bus powered functions
High-power bus powered functions
Self-powered functions

Low power bus powered functions draw all its power from the VBUS and cannot draw any more than one unit load. The USB specification defines a unit load as 100mA. Low power bus powered functions must also be designed to work down to a VBUS voltage of 4.40V and up to a maximum voltage of 5.25V measured at the upsteam plug of the device. For many 3.3V devices, LDO regulators are mandatory.

High power bus powered functions will draw all its power from the bus and cannot draw more than one unit load until it has been configured, after which it can then drain 5 unit loads (500mA Max) provided it asked for this in its descriptor. High power bus functions must be able to be detected and enumerated at a minimum 4.40V. When operating at a full unit load, a minimum VBUS of 4.75 V is specified with a maximum of 5.25V. Once again, these measurements are taken at the upstream plug.

Self power functions may draw up to 1 unit load from the bus and derive the rest of it’s power from an external source. Should this external source fail, it must have provisions in place to draw no more than 1 unit load from the bus. Self powered functions are easier to design to specification as there is not so much of an issue with power consumption. The 1 unit bus powered load allows the detection and enumeration of devices without mains/secondary power applied.

No USB device, whether bus powered or self powered can drive the VBUS on its upstream facing port. If VBUS is lost, the device has a lengthy 10 seconds to remove power from the D+/D- pull-up resistors used for speed identification.

Other VBUS considerations are the Inrush current which must be limited. This is outlined in the USB specification paragraph 7.2.4.1 and is commonly overlooked. Inrush current is contributed to the amount of capacitance on your device between VBUS and ground. The spec therefore specifies that the maximum decoupling capacitance you can have on your device is 10uF. When you disconnect the device after current is flowing through the inductive USB cable, a large flyback voltage can occur on the open end of the cable. To prevent this, a 1uF minimum VBUS decoupling capacitance is specified.

For the typical bus powered device, it can not drain any more than 500mA which is not unreasonable. So what is the complication you ask? Perhaps Suspend Mode?

Suspend Current
Suspend mode is mandatory on all devices. During suspend, additional constrains come into force. The maximum suspend current is proportional to the unit load. For a 1 unit load device (default) the maximum suspend current is 500uA. This includes current from the pull up resistors on the bus. At the hub, both D- and D+ have pull down resistors of 15K ohms. For the purposes of power consumption, the pull down resistor at the device is in series with the 1.5K ohms pull up, making a total load of 16.5K ohms on a VTERM of typically 3.3v. Therefore this resistor sinks 200uA before we even start.

Etc....
 

bloguetronica

Joined Apr 27, 2007
1,372
using USB for power is generally not a good idea as you may damabe the motherboard. Furthermore, it is not like there is an unconditional power supply there. The power supply is software controlled and to get full power the device must solicit it and the controller must grant it.
It depends on the device. USB was specially made to provide power to portable perifericals that won't have another power supply, external or internal. An USB pen is an example of such device. If you keep the current demanded lower than 100mA you should have no problem.

By the way, those are good guidelines.
 

Thread Starter

angeline_happyoo

Joined Sep 2, 2007
28
Thanks for the reply... :)

Actually, in this case, USB will only act as an adapter.
Means that, one end of USB is connected to power supply, the other end of USB is connected to device. This application can be used to charging handphone..

So i need to provide 5V and 500mA to get an output of 5V and 500mA.
Am i right?
 

bloguetronica

Joined Apr 27, 2007
1,372
Thanks for the reply... :)

Actually, in this case, USB will only act as an adapter.
Means that, one end of USB is connected to power supply, the other end of USB is connected to device. This application can be used to charging handphone..

So i need to provide 5V and 500mA to get an output of 5V and 500mA.
Am i right?
Yes, being that the case. So are you buinding a USB power supply?
 

Thread Starter

angeline_happyoo

Joined Sep 2, 2007
28
In this case, i want to replace the wall 3-pin socket to USB, since USB is getting common nowadays...

So in laboratory, i need an electrical input to flow into USB to get 5V, 500mA.
I have to decide what is the input current and voltage to supply that USB's output.
 

GS3

Joined Sep 21, 2007
408
It depends on the device. USB was specially made to provide power to portable perifericals that won't have another power supply, external or internal. An USB pen is an example of such device. If you keep the current demanded lower than 100mA you should have no problem.

By the way, those are good guidelines.
If you are referring to the text I quoted, those are not "guidelines" but USB specs which explain how USB works.

As you can see there a device cannot just draw 500 mA but has to request it via software and the controller has to grant the request.

It is obvious that many USB devices draw their power from the USB bus. That's what the quote text explains. What I meant is that it is not a good idea to use a USB port to power one's own experimental circuits unless one knows what he is doing very well. Fumbling around without knowing exactly what you are doing is risking a damaged or dead motherboard as a result of a short, overload or other accident. (That risk exists even if you DO know what you are doing as mistakes happen but the risk is much lower.) Yes, you can get 5V @ 100 mA from a USB port but I see no reason to run such a risk when you can get more power independently and in a much safer manner.

I have no idea what the original question is here. The question is confusing and needs to be clarified before any meaningful advice can be given. I do not understand what the OP is trying to do and I have a feeling he may be quite lost in which case the advice to not mess with the USB ports in the computer is the best advice.
 

beenthere

Joined Apr 20, 2004
15,819
Are we suffering under a wrong notion here? Are you going to supply power to a device by means of a USB cable? In this case, the USB cable will simply be used as a power cable into the device, and have no connection to a computer?
 

GS3

Joined Sep 21, 2007
408
If the intention here is to, separately from a computer, power a mobile phone or other similar device which can be powered from a computer USB port then the specifications for this power supply or charger are very simple: 5V, 100 mA. But I cannot see any practical reason to do this, other than learning, because these can be bought for close to nothing and are switching, light and tiny. The only case where it would seem justified would be if we need to get the power from some unsuual power source (say from 48 Vdc). The question needs to be clarified before we can go any further.
 
Top