USB Hub as an iPod/iPhone Charger [solved]

  • Thread starter Thread starter Man-wai Chang
  • Start date Start date
Man-wai Chang said:
Another observation:

When the battery was charged to about 90% full, the yellow triangle was
shown again ("Charging not supported on this device"). Maybe the iPod
tried to find the PC again, failed and reported an error.

That seems reasonable.

Paul
 
When the battery was charged to about 90% full, the yellow triangle
That seems reasonable.

I agree, to report back to the iTunes in the PC.

Could the potential divider fool it then?

--
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and farces be with you!
/( _ )\ (x86_64 Ubuntu 9.10) Linux 2.6.39
^ ^ 22:38:01 up 1 day 7:40 0 users load average: 0.00 0.02 0.05
ä¸å€Ÿè²¸! ä¸è©é¨™! ä¸æ´äº¤! ä¸æ‰“交! ä¸æ‰“劫! ä¸è‡ªæ®º! è«‹è€ƒæ…®ç¶œæ´ (CSSA):
http://www.swd.gov.hk/tc/index/site_pubsvc/page_socsecu/sub_addressesa
 
Man-wai Chang said:
I agree, to report back to the iTunes in the PC.

Could the potential divider fool it then?

It's complicated.

http://www.usb.org/developers/presentations/pres0602/jim_choate_sp.pdf

The protocol likes to drive D+ and D- independently. The protocol also
relies on pullup and pulldown resistors. Even your divider circuit,
while allowing independent D+ and D- driving, may disturb the pullup
and pulldown resistors. That protocol is too complicated, for me to
predict what's going to happen...

Paul
 
The protocol likes to drive D+ and D- independently. The protocol also
relies on pullup and pulldown resistors. Even your divider circuit,
while allowing independent D+ and D- driving, may disturb the pullup
and pulldown resistors. That protocol is too complicated, for me to
predict what's going to happen...

Then how do all those iPod/iTouch/iPhone docks, that charges, fool the
iPod? There must be something that works...

--
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and farces be with you!
/( _ )\ (x86_64 Ubuntu 9.10) Linux 2.6.39
^ ^ 00:08:01 up 1 day 9:10 0 users load average: 0.00 0.01 0.05
ä¸å€Ÿè²¸! ä¸è©é¨™! ä¸æ´äº¤! ä¸æ‰“交! ä¸æ‰“劫! ä¸è‡ªæ®º! è«‹è€ƒæ…®ç¶œæ´ (CSSA):
http://www.swd.gov.hk/tc/index/site_pubsvc/page_socsecu/sub_addressesa
 
Now where is the fun in that ? :-) We need the resistors.
Resistors are good. Soldering is fun...

I have just bought some resistors to do it this afternoon. :)

--
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and farces be with you!
/( _ )\ (x86_64 Ubuntu 9.10) Linux 2.6.39
^ ^ 18:52:01 up 3 days 3:54 0 users load average: 0.00 0.02 0.05
ä¸å€Ÿè²¸! ä¸è©é¨™! ä¸æ´äº¤! ä¸æ‰“交! ä¸æ‰“劫! ä¸è‡ªæ®º! è«‹è€ƒæ…®ç¶œæ´ (CSSA):
http://www.swd.gov.hk/tc/index/site_pubsvc/page_socsecu/sub_addressesa
 
I ended up not using the potential divider method but this circuit:

http://www.instructables.com/id/Ipod-Touch-Charger-100-works/step3/Schematic-info/

2 150k carbon resistors at HK$0.1 each, and it works, including hot-plug.

--
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and farces be with you!
/( _ )\ (x86_64 Ubuntu 9.10) Linux 2.6.39
^ ^ 17:13:01 up 4 days 2:15 0 users load average: 1.20 1.15 1.14
ä¸å€Ÿè²¸! ä¸è©é¨™! ä¸æ´äº¤! ä¸æ‰“交! ä¸æ‰“劫! ä¸è‡ªæ®º! è«‹è€ƒæ…®ç¶œæ´ (CSSA):
http://www.swd.gov.hk/tc/index/site_pubsvc/page_socsecu/sub_addressesa
 
I ended up not using the potential divider method but this circuit:

http://www.instructables.com/id/Ipod-Touch-Charger-100-works/step3/Schematic-info/


2 150k carbon resistors at HK$0.1 each, and it works, including hot-plug.

Um... it still had that triangles sometimes, but less frequent than
shorting D+ & D-.

--
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and farces be with you!
/( _ )\ (x86_64 Ubuntu 9.10) Linux 2.6.39
^ ^ 20:03:01 up 4 days 5:05 0 users load average: 1.04 1.05 1.09
ä¸å€Ÿè²¸! ä¸è©é¨™! ä¸æ´äº¤! ä¸æ‰“交! ä¸æ‰“劫! ä¸è‡ªæ®º! è«‹è€ƒæ…®ç¶œæ´ (CSSA):
http://www.swd.gov.hk/tc/index/site_pubsvc/page_socsecu/sub_addressesa
 
2 150k carbon resistors at HK$0.1 each, and it works, including hot-plug.
Um... it still had that triangles sometimes, but less frequent than
shorting D+ & D-.

When the battery was full, the yellow triangle appeared again... Well
Well Well... I guess there is no way to fool it by voltage and resistors
alone.

So do all those Apple chargers have a special chip to pretend as iTunes? :)

--
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and farces be with you!
/( _ )\ (x86_64 Ubuntu 9.10) Linux 2.6.39
^ ^ 22:33:01 up 4 days 7:35 0 users load average: 1.06 1.08 1.10
ä¸å€Ÿè²¸! ä¸è©é¨™! ä¸æ´äº¤! ä¸æ‰“交! ä¸æ‰“劫! ä¸è‡ªæ®º! è«‹è€ƒæ…®ç¶œæ´ (CSSA):
http://www.swd.gov.hk/tc/index/site_pubsvc/page_socsecu/sub_addressesa
 
Man-wai Chang said:
When the battery was full, the yellow triangle appeared again... Well
Well Well... I guess there is no way to fool it by voltage and resistors
alone.

So do all those Apple chargers have a special chip to pretend as iTunes? :)

I think you should consider, that each solution is putting a particular
voltage on the pins.

In the "short D+ to D-" case, obviously the pins are at the same voltage.
If a differential receiver is looking at the two pins, and detecting + -
or - + (i.e. valid differential voltage), there is no differential voltage
when D+ is shorted to D-. The receiver cell needs to see a voltage difference
between the leads, to get a valid logic level.

Tying the D+ and D- to +5V with 150k (very weak) pullups, means D+ and D-
will battle with any weak resistors already on the iPod. USB uses pullup
and pulldown resistors as part of indicating whether a USB 1.1 or USB 2.0
device is connected.

The three resistor network

+5V --- resistor ---+--- resistor ---+--- resistor --- GND
| |
D+ D-

puts two different voltages on the D+ and D- pins. In the example I
just created, D+ will be a more positive voltage than D-. If the
receiver threshold was 0.1V say, and the difference between D+ and
D- is 0.5V, then the receiver detects a valid logic level. Which is
different than the other case. The voltages are also "mid-rail",
meaning they aren't close to 5V in value. And the receiver may have
built-in detection features, for mid-rail voltages, as a mid-rail
voltage may indicate that the other end of the link is trying to
send valid logic levels.

So all three circuits do something different, but exactly what they
do, really depends on the weak resistor structure used by a USB device.
This circuit is an overlay on top of that. As a matter of fact, the
USB device (iPod) might even be switching its pullup and pulldown resistors
on and off, as a function of what state it is in. If it is suspended
or sleeping, and wishes to maximize battery life, the resistors on
a USB device might be switched off.

All the details are undoubtedly in the 500 page USB spec, but I
don't plan on reading the whole thing, any time soon :-)

In the slide deck link I posted before, you can see that the interface
is "tricky" and uses a lot of different levels. The question is,
how does your circuit overlay, affect how this stuff works ?

http://www.usb.org/developers/presentations/pres0602/jim_choate_sp.pdf

Paul
 
I have just soldered the 3-resistor potential divider onto another USB
port. It seemd to work much better than the 2 previous solutions.

--
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and farces be with you!
/( _ )\ (x86_64 Ubuntu 9.10) Linux 2.6.39
^ ^ 18:30:01 up 5 days 3:32 1 user load average: 1.05 1.05 1.05
ä¸å€Ÿè²¸! ä¸è©é¨™! ä¸æ´äº¤! ä¸æ‰“交! ä¸æ‰“劫! ä¸è‡ªæ®º! è«‹è€ƒæ…®ç¶œæ´ (CSSA):
http://www.swd.gov.hk/tc/index/site_pubsvc/page_socsecu/sub_addressesa
 
In the slide deck link I posted before, you can see that the interface
is "tricky" and uses a lot of different levels. The question is,
how does your circuit overlay, affect how this stuff works ?
http://www.usb.org/developers/presentations/pres0602/jim_choate_sp.pdf

So the USB protocol is just about changing the voltage level? Thanks.

This 2 150kOhm solution actually would be very dangerous if the AC
adaptor was changed from a 700mA to a 2A one. The potential divider
method and the data pins short are safer.

--
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and farces be with you!
/( _ )\ (x86_64 Ubuntu 9.10) Linux 2.6.39
^ ^ 18:40:01 up 5 days 3:42 1 user load average: 1.01 1.14 1.13
ä¸å€Ÿè²¸! ä¸è©é¨™! ä¸æ´äº¤! ä¸æ‰“交! ä¸æ‰“劫! ä¸è‡ªæ®º! è«‹è€ƒæ…®ç¶œæ´ (CSSA):
http://www.swd.gov.hk/tc/index/site_pubsvc/page_socsecu/sub_addressesa
 
Interesting video I found:

http://www.zdnet.com/blog/hardware/build-your-own-iphoneipod-charger/9211?tag=nl.e539

And a 3rd potential divider circuit:
http://www.ifans.com/forums/showthread.php?t=69294

--
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and farces be with you!
/( _ )\ (x86_64 Ubuntu 9.10) Linux 2.6.39
^ ^ 19:20:01 up 5 days 4:22 0 users load average: 1.05 1.06 1.06
ä¸å€Ÿè²¸! ä¸è©é¨™! ä¸æ´äº¤! ä¸æ‰“交! ä¸æ‰“劫! ä¸è‡ªæ®º! è«‹è€ƒæ…®ç¶œæ´ (CSSA):
http://www.swd.gov.hk/tc/index/site_pubsvc/page_socsecu/sub_addressesa
 
Man-wai Chang said:
So the USB protocol is just about changing the voltage level? Thanks.

This 2 150kOhm solution actually would be very dangerous if the AC
adaptor was changed from a 700mA to a 2A one. The potential divider
method and the data pins short are safer.

No. The 150K ohms to +5V circuit, does nothing different if a 700mA versus
a 2A adapter are used. The circuit function relies on the voltage, which
is 5V in both cases.

How the current flow level changes things, is if the device being charged,
drew more than 700mA. Say the charger drew 1 ampere. The 700mA charger
would shut off, because it was overloaded. The 2A charger would be
able to sustain a 1A load, so would continue to run. The charger only makes
a different, if the 700mA one wasn't able to do the job. If the charging
current is less than 700mA, then either charger would be sufficient.

Paul
 
Man-wai Chang said:

I feel this style, is sufficiently different from the "shorting D+ to D-",
to be considered as the second solution.

R1 R2 R3
+5V --- resistor ---+--- resistor ---+--- resistor --- GND
| |
D+ D-

If you set the value or R2 to zero ohms, then the D+ and D- pins are
shorted together again. And that is similar to your ifans.com circuit.

I feel a little voltage difference between D+ and D- is better. I
think the circuit that was placing 2.5V on one pin and 2.0V on
the other pin, intuitively makes more sense. It leaves a voltage
difference across D+ and D-. And 2.5V is a mid-rail voltage.

I don't know whether the device is going to reliably behave
differently, to all these circuit variations, but you're the
experimenter, and time will tell. Using the three resistor
circuit, with values above 10K ohms, should be safe, and I
can't see how the three resistor circuit could damage anything,
as long as R2 is greater than zero ohms. I'm not comfortable
with shorting D+ to D-. In the event the I/O pads drive out,
it's better if there was a weak resistor between D+ and D-.

By using relatively weak resistors, you define a bias network
when the USB I/O pads aren't driving out. That allows weak
2.5V and 2.0V voltage sources to exist. Later, when the
device attempts to "chirp" and drive out some value, the
three resistor network is weak enough to let it happen,
and the resulting current flow is low enough, the I/O driver
will hardly even notice it is there. And that's why I like
the situation, where R1, R2, R3 are greater than 10K, as they
can't possibly hurt anything.

If all three resistors were the same value, then D+ would be
2/3rds of rail voltage, and D- would be 1/3rd of it. But
I think the resistors were different values, to set D+ and
D- closer to 2.5V and 2.0V. And that seems like a good choice.

Paul
 
If all three resistors were the same value, then D+ would be
2/3rds of rail voltage, and D- would be 1/3rd of it. But
I think the resistors were different values, to set D+ and
D- closer to 2.5V and 2.0V. And that seems like a good choice.

No yellow triangle when the iPod was fully charged. So the 3-resistor
solution is working fairly well. But hot-plug still didn't work. I had
to first connect all the wires, then turn on the power to the USB hub.

--
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and farces be with you!
/( _ )\ (x86_64 Ubuntu 9.10) Linux 2.6.39
^ ^ 00:20:01 up 5 days 9:22 0 users load average: 1.00 1.03 1.09
ä¸å€Ÿè²¸! ä¸è©é¨™! ä¸æ´äº¤! ä¸æ‰“交! ä¸æ‰“劫! ä¸è‡ªæ®º! è«‹è€ƒæ…®ç¶œæ´ (CSSA):
http://www.swd.gov.hk/tc/index/site_pubsvc/page_socsecu/sub_addressesa
 
No. The 150K ohms to +5V circuit, does nothing different if a 700mA versus
a 2A adapter are used. The circuit function relies on the voltage, which
is 5V in both cases.

Thanks

--
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and farces be with you!
/( _ )\ (x86_64 Ubuntu 9.10) Linux 2.6.39
^ ^ 19:36:01 up 6 days 4:38 0 users load average: 1.22 1.09 1.06
ä¸å€Ÿè²¸! ä¸è©é¨™! ä¸æ´äº¤! ä¸æ‰“交! ä¸æ‰“劫! ä¸è‡ªæ®º! è«‹è€ƒæ…®ç¶œæ´ (CSSA):
http://www.swd.gov.hk/tc/index/site_pubsvc/page_socsecu/sub_addressesa
 
Back
Top