Man-wai Chang said:
Could I just connect the 2 data pins of the USB port to a resister?
Could this fake a PC connection?
Why not just find a conventional USB connector, and wire the hub AC adapter
right to the USB connector ?
For example, the USB connector on the front of your computer case, may have
a wire harness on it that connects to the motherboard. If you wire the
USB VCC and GND pins on that cable, to a power source, you can make a
"charging station" for yourself. (In other words, disconnect the wire
harness from the motherboard, and then arrange it so the AC adapter
is connected to the appropriate pins.)
*******
The USB spec itself, is around a 500 page PDF.
Sites like this, attempt to put some of the information in a usable
form. So you may get a better idea of how difficult it will be, from
this information. I don't know what your hub would do, if
it was in Suspend mode.
http://www.beyondlogic.org/usbnutshell/usb2.shtml#PowerVbus
*******
I wouldn't even bother with the hub. I'd find a USB connector (even
a USB cable assembly you removed from a PC could be used), and make
a simple wire assembly to make a charging station from it.
I saw a number of dumb web pages, that concentrated more on building
a "box" to hold the charger project, than on the wiring itself. In
this example, they're using a battery as the source of power, and
a three terminal regulator. That's to show all that you'd need in
your case, is to connect the +5V and GND from your AC adapter DC output,
to the red and black wires on the USB connector. Red is usually +5V and
black is usually ground.
http://www.crunchgear.com/2009/11/02/build-your-own-battery-powered-usb-charger/
Before connecting any devices to your wired project, you'd check the pinout.
For example, take note of the "receptacle" diagram here, the location of the
polarizing tab, which pin has VCC and which has ground. Only pin 1 and
pin 4 on the receptacle should need to be wired, to make a charging
station. When wiring connectors like this, I like to verify my wiring,
before actually connecting any expensive devices to them. 6 pin Firewire
connectors for example, are extremely dangerous when it comes to wiring
mistakes. If you're going to wire a USB connector yourself, check
and double check the results before using it.
http://www.interfacebus.com/usb-cable-diagram.html
Paul