[OTG USB] Using OTG cable and charging at the same time - SOLVED 29.08.12

Search This thread

sonic_boom

Senior Member
May 20, 2010
184
100
39
Dublin
Thanks for reply Sonic. Just to explain better, I'm uploading the diagram of my situation. I don't know where to connect the ID/Sense.

hi, if you want to use 2 separate power supply's that should be ok anyway.

here is the diagram for you :

OTG31.jpg

more diagrams here : https://sites.google.com/site/sonicboomworld/my-projects/otg-diagrams

Quote:

Originally Posted by mvmacd
so I just put 100 K ohm resister in pin 4, then add the external power?

what cables or adapters should I buy? what would be the easiest setup of cables/adapters to then modify? I'm drawing a blank.. thx

check link here --> https://sites.google.com/site/sonicboomworld/my-projects/otg-diagrams OTG Y CABLE should be perfect for non powered USB HUB, also on the same post you can SEE SAMSUNG DATA CABLE get one. To make complated USB OTG CABLE WITH CHARGING You will need :

- Male MicroUSB or MiniUSB to regular male USB data cable ( SAMSUNG DATA CABLE RECOMMENDED)
- Non Powered HUB or Powered HUB or regular FEMALE USB CONNECTOR ( for mouse keyboard gamepads etc )
- 100k ohm resistor for enable OTG MODE AND CGARGING ( tested on SONY XPERIA S - working fine, on other devicecs you may need to use other resistor with different value)
 
Last edited:

GregórioAxiaMagno

Senior Member
Apr 23, 2012
332
67
hi, if you want to use 2 separate power supply's that should be ok anyway.

here is the diagram for you :

View attachment 1278359

more diagrams here : https://sites.google.com/site/sonicboomworld/my-projects/otg-diagrams

Quote:



check link here --> https://sites.google.com/site/sonicboomworld/my-projects/otg-diagrams OTG Y CABLE should be perfect for non powered USB HUB, also on the same post you can SEE SAMSUNG DATA CABLE get one. To make complated USB OTG CABLE WITH CHARGING You will need :

- Male MicroUSB or MiniUSB to regular male USB data cable ( SAMSUNG DATA CABLE RECOMMENDED)
- Non Powered HUB or Powered HUB or regular FEMALE USB CONNECTOR ( for mouse keyboard gamepads etc )
- 100k ohm resistor for enable OTG MODE AND CGARGING ( tested on SONY XPERIA S - working fine, on other devicecs you may need to use other resistor with different value)

Thanks man!

Confirmed ST15 OTG function plus charging with USB HUB working pretty good! I made an Y cable using your diagrams.
 
Last edited:

sonic_boom

Senior Member
May 20, 2010
184
100
39
Dublin
Make it available for mobile I can't watch it. Well if you don't I will check this later on laptop

Sent from my LT26i using xda app-developers app
 

sonic_boom

Senior Member
May 20, 2010
184
100
39
Dublin
Good job sonic_boom.

From what I understand the only way to make it work with the charging + OTG and OTG (no charging) is using a switch to prevent the resistor, right?
I have a Kidigi Cradle, and I want to add the OTG, but do not want to use the switch.
http://www.kidigi.com/product_lv2.php?pid=1370

Any idea?

Hi. You need 100k resistor between PINS 4 and 5 to get OTG MODE AND CHARGING SAME TIME, thats all what you need ! ( on MALE MICROUSB PLUG !! )

Optional i put there switch to by pass resistor, because if you are away and you don't have power supply circuit/ my dock will not work ! sometime i am away and testing some 2nd hand USB devices, so is handy for me to have this working "offline"

regards
 

cmgonzalez

Senior Member
Nov 4, 2010
307
92
Santiago
www.chiledroid.com
Looking forward for report

Sent from my LT26i using xda app-developers app

It's working like a Charm... There's some pictures

I used a powered USB HUB, this model also send the power back to the host. (I found on the Raspberry PI forums, that you can hack normal usb hubs to send power back to the host just soldering back them).

Now I will try playing some mame roms on my TV :), I also have a cheapo 2.4GHZ mouse and keyboard, I only miss a Gamepad (The one I have isn't recognized)
 

Attachments

  • 1.jpg
    1.jpg
    159.7 KB · Views: 2,904
  • 2.jpg
    2.jpg
    141.5 KB · Views: 3,110
  • 3.jpg
    3.jpg
    148.8 KB · Views: 3,014
  • 4.jpg
    4.jpg
    152.6 KB · Views: 2,767
  • 5.jpg
    5.jpg
    138.8 KB · Views: 2,584
Last edited:

sonic_boom

Senior Member
May 20, 2010
184
100
39
Dublin
Hi. Thanks for info. I am glad to see another person get it working! Would you confirm phone model number just incase?

I bought my PS3 sixaxis controller for 2 euro on CAR BOOT SALE ;)

Sent from my LT26i using xda app-developers app
 

hotshotgt

New member
Jan 18, 2008
3
1
Seems easy enough from the diagrams. Do all phones with microusb share the same pin layout? As much as I hate to admit it, I had an iPhone up until I got my Galaxy S3, so I'm new to android and the microusb standard.
 

TheByteSmasher

Senior Member
Jan 14, 2010
1,040
752
Atlantis
Can anyone figure out how to make a "Y" cable with one input to device, and the split being A) OTG, and B) standard USB to plug into a power bug? Thanks.

Sent from my Nexus 7 using xda premium
 

r000li

Member
Jul 18, 2008
28
0
www.r00li.com
I have the same question, but sadly no real answer.

I have an Ainol Novo 7 Paladin tablet (android 4.0.3) which supports USB host mode via its mini USB connector. I am using a standard OTG adaper that I bought for a few € on ebay. This is all working great, but sadly I need the thing to run from the USB power or charge the battery with the OTG active.

From what I've read there are two possible solutions to this problem - a hardware one (as seen here) that is less commonly supported (doesn't work on most devices) and a software solution that should work anywhere. So I am trying to find a way to get a working software solution.

Now apparently you can change the mode by doing this:
Code:
echo host > /sys/devices/platform/musb-jz47xx.0/musb-hdrc/mode
On other devices (with standard ARM architecture, and not MIPS) it is usually without the musb-jz47xx.0 part.

Now ok this works for a standard usb host mode - at least it doesn't give out any errors. Now using otg instead of host should enable charge and host mode. Sadly it doesn't. It throws out Segmentation Fault and throws me out of root shell with exit status 139. Now using unsupported mode usually just gives out exit status 1 and that is it. So there must be something with the otg command. But I have no idea what is wrong.

I also found out that plugging and unplugging my USB otg cable (with an Y splitter - one side connected to a charger and the other one with an inserted USB device) a few times the tablet actually switches to host mode while showing that it is charging. Sadly the battery percentage then stays the same and the whole thing just shuts down after a few hours (when you start it again you find out that the battery is empty) - although it lasts longer than normally. So something strange is going on here.

Any ideas?
 

ollie.olsson

Member
Aug 29, 2012
21
1
Looking at the separate components, and for the resistor, I can find two at my local retail store (I'm in Sweden mind you) and not too sure which one to get:

Power resistor 100 kΩ 25 W±1 %
OR
Power resistor 100 kΩ 20 W±5 %

And then you used a diode in your third edition, can tell us the specs on? Is there anything special with it? I know it only allows the current to flow in one direction, but are there any values we should think about?

I want to try and build this for my Nexus 7, unless of course someone already has build their own iteration of this bad boy to confirm whether or not it works.

Cheers, and great work!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 22
    UPDATE 30/08/2012

    For "daily" updates, tutorials more videos visit my website

    https://sites.google.com/site/sonicboomworld


    Added more diagrams and pictures on my website --> https://sites.google.com/site/sonicboomworld/my-projects/otg-diagrams
    Don't forget to check NEWS as well : --> https://sites.google.com/site/sonicboomworld/



    OLD POST - HOW I STARTED

    Firstly hi all

    Secondly i want describe myself as a person who has only little knowledge about electronics etc. Also i am very busy at work and at home after work with kids, so to be honest with you i can test it only while i am actually working ( i do Testing and servicing medical devices )

    At this moment i can't "afford" to buy SONY ERICSSON LIVEdock ( OTG MODE + CHARGING AT THE SAME TIME )

    I just want to share my progress in making cheaper verision of LIVEdock, also i looking fore some smart arse to help me/us finish what i started,

    I know this is little bit messy and don't kill me for my english please

    Diagram:

    DSC_0076.jpg

    I made simple OTG CABLE with permanently shorted PIN 4 (sense) AND 5 (ground) on my microUSB. The i realized that phone battery must support power for phone and connected USB device such as keyboard, mouse, gamepad etc. Then i added ON/OFF switch between PIN 4 and 5 what i achieved ?

    DSC_0080.jpg

    Now i can switch between OTG MODE and CHARGING MODE ( unfortunately both modes wouldn't work at the same time ). Then i added another two ON/OFF switches to cut off the power from the battery VCC (red wire) and GROUND (black) while you are in OTG MODE. I added another USB cable ( this one suply power from computer or charger or car charger ) but i used VCC and GROUND only i connected these wires to each switches and FEMALE USB ( one you connect keyboard ,gamepad etc ). What i achieved ? now Battery support only my phone but phone is still in OTG mode, and whole power goes to our device ( Keyboard, USB flash memory etc ) .

    DSC_0077.jpgDSC_0078.jpgDSC_0079.jpgDSC_0081.jpg

    Now we know how to get external power source to our external device , but i still haven't find an solution how to get phone in charging mode or to do anything to prevent phone from discharging while we are in OTG MODE . I know that SONY instead of so many switches used just some simple electronics components. Also i still haven't try everything but if you have any idea please let me know.

    Later on i will upload Video on YouTube ( HOW IT WORKS )

    Regards
    8
    SUCCESS

    BTW i got this working !!! ( USING HUB WITH 4X USB PORTS )

    OTG AND CHARGING AT THE SAME TIME !!! should work for any device with OTG SUPPORT ;) so far i can post screen shoot only , more details later on if you interesting...

    Screenshot_2012-08-16-20-05-15.jpg

    regards
    5
    At this moment i can post some pictures with my crappy beta most ugly dock - but was design for testing only and i have done already so many transformations . Most important

    OTG and CHARGING working at the same time !!


    CIMG8683.jpg


    CIMG8684.jpg

    On the photos you can see LED ON , USB STORAGE CONNECTED NOTIFICATION and MOUSE CURSOR ! ;)

    I connected same time :

    - 8GB USB MEMORY STICK
    - WIRED MOUSE
    - WIRED KEYBOARD
    - USB WITH POWER SUPPLY FOR MY SPEAKERS ( then i connected jack for AUDIO )
    - and phone CHARGING SAME TIME

    at work also i connected HUB - 1 USB ( WIRELESS MOUSE AND KEYBOARD ) - WORKING PERFECT !

    Before i will post any information HOW TO GET THIS DONE i will post video on YOUTUBE - i should have video before MIDNIGHT ( current time 6:22 PM)

    VERY IMPORTANT !!! ( i connected GALAXY SIII - unfortunately not working at all - but dont worry - in 99% i know where seems to be the problem)

    Regards
    4
    I hope will work for all devices . Successfuly tested on my Xperia S. I will test soon on Galaxy S2 and S3. Also I completely redesign everything. Forget about first post and crappy switches. I made docking station for my phone I just have to finish my it. I want to add some LED. Is all about right cables and resistors in right place. I think this should also work on simple Y cable.

    Give me some time to get everything ready. I have two kids a home plus looking for new house plus I am working. But I will post instruction here soon

    Sent from my LT26i using xda app-developers app
    3
    Hi again SONY USERS !

    There is my final video + link to my website with INFO , DIAGRAM , PICTURES --> HOW TO GET THIS WORKING ;)

    Link to website ---> https://sites.google.com/site/sonicboomworld/