Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,771,174 Members 51,615 Now Online
XDA Developers Android and Mobile Development Forum

Possible USB OTG Power collision in hub ?

Tip us?
 
HeliumX10
Old
(Last edited by HeliumX10; 22nd April 2012 at 07:57 PM.) Reason: mistakes
#1  
HeliumX10's Avatar
Senior Member - OP
Thanks Meter 112
Posts: 302
Join Date: Apr 2011
Location: Psáry, Czech Republic
Question Possible USB OTG Power collision in hub ?

Hi everyone!

Firstly I am not sure if this is correct forum, but its only one related with hardware...

I has built my own emergency charger powered with solar energy.
It can provide 5V with 2A max. (about 10W) and provides two USB ports for devices.

Althought I dont have any phone/tablet with USB OTG (Host) function, I d like to prepare it to provide all this functions:

- charge two client devices
- charge two host devices
- charge one host and one client device

But, there is one problem with power - some OTG devices provides power, and some not.
Thats the thing, why I am asking - if both chargers connectors are powered and one host device is connected in it there will be a power collision - on one wire will be 5V from both sides - from e.g. phone and from charger. This will surely damage the phone because of shortcut.

I am right? Or, is a hosts power enabled, only, if there is not any external power plugged?

Hope, that anyone will understand, I can also provide a schematics later it it could help

Thanks anyone !!!


ROM: CyanogenMod 9.1 by Scritch007 - ICS 4.0.4 - version 6
KERNEL: 2.6.29. by ScritchOO7 - version 5
BOOTLOADER: unlocked
ROOTED: yes



All done from Linux !!!
 
Elusivo
Old
#2  
Elusivo's Avatar
Senior Member
Thanks Meter 24
Posts: 243
Join Date: Oct 2008
The wire is the same, so there won't be any collision, it doesn't matter where the voltage source point is when it's applied on the same wire (without any component in between the voltage sources).

I guess maybe the only thing will happen is that the phone battery won't have much or perhaps even no drain?
And speculating here on same line of thought, dunno exactly how the charging circuits work on the phone, but i guess it won't charge when in OTG mode even with an external power power source available...
 
spunker88
Old
(Last edited by spunker88; 27th April 2012 at 04:50 AM.)
#3  
Senior Member
Thanks Meter 333
Posts: 1,304
Join Date: Sep 2006
Location: Watertown, NY
My Touchpad doesn't provide OTG power but refuses to charge when in OTG mode, maybe other devices are different though. OTG will still work on it even if I disconnect the +5v Vcc (red) wire. If you wanted to force USB devices to be powered from the external supply maybe you could try disconnecting Vcc from the device.
Motorola Droid Bionic
Stock 4.1.2 Rooted
CM11 4.4 Safestrap

HP Touchpad
Evervolv 4.4

Toshiba Encore
Windows 8.1
 
HeliumX10
Old
#4  
HeliumX10's Avatar
Senior Member - OP
Thanks Meter 112
Posts: 302
Join Date: Apr 2011
Location: Psáry, Czech Republic
Thanks - more people, more ideas,more knowledge

As told - there are two kinds of OTG devices - self powered (few Xperia`s and Samsung devices) and non powered (spunkler88`s Touchpad and e.g. my Xperia X10i).

In case of non powered devices, there shouldn`t be any problem, think that host just won`t accept power and nothing bad happens. But in case ot self.powered devices there is in OTG mode voltage on vcc pin - 3,3 or 5V (low power or high power mode).

I`m not so demanding to want host and slave to be charged at the same time.

We dont have to worry about non powered host devices, but afraid about powered ones... Or even if we don`t know, if our device is powered or not

Elusivo:

I know, that it is the same wire You maybe didn`t caught my point - there could be two power sources on one wire - one could be phone (in OTG mode) and one power on hub.
Will post an scheme as soon as possible.


ROM: CyanogenMod 9.1 by Scritch007 - ICS 4.0.4 - version 6
KERNEL: 2.6.29. by ScritchOO7 - version 5
BOOTLOADER: unlocked
ROOTED: yes



All done from Linux !!!
 
spunker88
Old
#5  
Senior Member
Thanks Meter 333
Posts: 1,304
Join Date: Sep 2006
Location: Watertown, NY
Quote:
Originally Posted by HeliumX10 View Post
I know, that it is the same wire You maybe didn`t caught my point - there could be two power sources on one wire - one could be phone (in OTG mode) and one power on hub.
Will post an scheme as soon as possible.
Yes, actually there shouldn't be any issues with this now that I think of it. The phone if providing powered USB OTG would simply act as a parallel voltage source with the charger meaning voltage stays the same and the available currents add.
Motorola Droid Bionic
Stock 4.1.2 Rooted
CM11 4.4 Safestrap

HP Touchpad
Evervolv 4.4

Toshiba Encore
Windows 8.1
 
HeliumX10
Old
#6  
HeliumX10's Avatar
Senior Member - OP
Thanks Meter 112
Posts: 302
Join Date: Apr 2011
Location: Psáry, Czech Republic
So, there is the block diagram of device which i have built:



The red cross indicates the one wire collision when DEVICE B provides power. If device B doesn`t provide power there won`t be any problems surely.

But as I thought of it, there is no solution for it - parallel voltage will surely damage one device on one side. The power sources providing high-efficient PWM power has very very low input resistance. So if we connect any voltage to its output, very high current will flow throught and surely damage the power source. This can happen very easily, because from phycisict`s point of view the higher voltage source will damage the less voltage source (there is +/- 10% tolerance on USB power, so this could happen everytime).

So now I am thinking about some mosfet auto switching circuit, which could automatically connect or disconnect power from master device... Or maybe will simple add an switch which will disconnect the power from master device everytime and power just a slave.


ROM: CyanogenMod 9.1 by Scritch007 - ICS 4.0.4 - version 6
KERNEL: 2.6.29. by ScritchOO7 - version 5
BOOTLOADER: unlocked
ROOTED: yes



All done from Linux !!!
 
E:V:A
Old
(Last edited by E:V:A; 2nd May 2012 at 11:49 AM.) Reason: user error
#7  
E:V:A's Avatar
Recognized Developer
Thanks Meter 1746
Posts: 1,332
Join Date: Dec 2011
Location: -∇ϕ
< wrong posting removed >
MSM8960 Info, Architecture and Bootloader(s)
El Grande Partition Table Reference
How to talk to the Modem with AT commands

[REF][ServiceMode] How to make your Samsung perform dog tricks
[REF|R&D|RF] RF/Radio properties of Samsung ServiceMode

Want to know when your phone is getting tracked or tapped?

Help us develop the IMSI Catcher / Spy Detector!
(To be part of the EFF & The Guardian Project toolsets.)
_______________________________
If you like what I do, just click THANKS!
Everything I do is free, altruism is the way!
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
I do not answer support related PM's.

 
Renate NST
Old
(Last edited by Renate NST; 10th February 2014 at 11:18 AM.)
#8  
Renate NST's Avatar
Recognized Contributor / Recognized Developer
Thanks Meter 792
Posts: 1,967
Join Date: Feb 2012
Location: Boston
It doesn't pay to overthink this.
These devices are usually designed to take a beating.
Just connect all the Vcc's together.

I've been using something similar on my B&N Nook Touch for months.
It's not a solar charger, but a modified $10 USB hub.
I can use USB host mode on my Nook and charge at the same time.
Of course, all the peripherals are powered off the hub power supply too.
A general schematic is attached, pull the diode and insert a jumper.

Since USB was really not designed to charge in host mode,
there are two problems related to getting the device charging circuit to play nicely.
  • When using host mode to directly power a peripheral you must make the device charging circuit go off.
    To go into host mode the device must raise the Vcc line to 90% of 5V, i.e. >4.5V.
    If the device charging circuit is still enabled it will try to charge itself using itself!
  • When using host mode with incoming power the device charging circuit must be convinced to charge.
Attached Thumbnails
Click image for larger version

Name:	hub.png
Views:	48
Size:	5.7 KB
ID:	2570692  
The Following 6 Users Say Thank You to Renate NST For This Useful Post: [ Click to Expand ]
 
HeliumX10
Old
#9  
HeliumX10's Avatar
Senior Member - OP
Thanks Meter 112
Posts: 302
Join Date: Apr 2011
Location: Psáry, Czech Republic
Quote:
Originally Posted by Renate NST View Post
It doesn't pay to overthink this.
These devices are usually designed to take a beating.
Yeah, mostly yes, but dont want to try if this is also for all devices. Most of them could take beatings,some not... So trying to design absolute save solution

Quote:
Originally Posted by Renate NST View Post
A general schematic is attached, pull the diode and insert a jumper.
See that, diode is used as blocking diode, which prevents shortcut So VCCs cant be connected together without protection. It seems that is for case I spoke about power provided from OTG device....

So as I see, simpliest solution will be the best. I will add a switch at the output for one USB ports VCC wire. And if I will use my charger as host active hub, will disconnect power (with switch) to one port, second port will be powered all the time. When charging two slave devices, i could switch power back too to the second USB port.

Quote:
Originally Posted by Renate NST View Post
  • When using host mode to directly power a peripheral you must make the device charging circuit go off.
    To go into host mode the device must raise the Vcc line to 90% of 5V, i.e. >4.5V.
OK, mainly thankx for this lines, once it happened that my phone indicated, thats chagring, but battery ran down.... Thought that was some kind of software relaed thing....


ROM: CyanogenMod 9.1 by Scritch007 - ICS 4.0.4 - version 6
KERNEL: 2.6.29. by ScritchOO7 - version 5
BOOTLOADER: unlocked
ROOTED: yes



All done from Linux !!!
 
zuberio
Old
#10  
zuberio's Avatar
Senior Member
Thanks Meter 202
Posts: 290
Join Date: Sep 2010
Location: Mississauga, ON
Hi Renate,

I've read and re-read your points several times and I think I understand.

My goal is to put together a battery powered USB Hub that also charges the phone at the same time. From your points, the B&N Nook is capable of going into Host mode while still accepting a charge - do you believe this to be true of most/all devices?

Did you have to do anything to get the Nook to charge in host mode other than supplying power by putting a jumper in lieu of the diode?

What $10 powered USB hub did you use?

Sorry for all the questions.

Quote:
Originally Posted by Renate NST View Post
It doesn't pay to overthink this.
These devices are usually designed to take a beating.
Just connect all the Vcc's together.

I've been using something similar on my B&N Nook Touch for months.
It's not a solar charger, but a modified $10 USB hub.
I can use USB host mode on my Nook and charge at the same time.
Of course, all the peripherals are powered off the hub power supply too.
A general schematic is attached, pull the diode and insert a jumper.

Since USB was really not designed to charge in host mode,
there are two problems related to getting the device charging circuit to play nicely.
  • When using host mode to directly power a peripheral you must make the device charging circuit go off.
    To go into host mode the device must raise the Vcc line to 90% of 5V, i.e. >4.5V.
    If the device charging circuit is still enabled it will try to charge itself using itself!
  • When using host mode with incoming power the device charging circuit must be convinced to charge.
Nexus 5
- Stock [Rooted] + TWRP
Nexus 7
- CM10.2
Nexus 4 (Hers)
- Stock
Galaxy Tab 10.1 (GT-P7510) (Hers)
- Stock
Nexus One (Babys)
- CM7.2

Feel free to feed my addiction to THANKS

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes