Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


10 posts

Wannabe Geek


Topic # 201548 23-Aug-2016 16:48
Send private message

Hi all, question - is there anyone in here able to help out an old engineer with an OTG circuit board?

 

I have built one, and it works! but its kinda old school with lots of wires, 4 contact mechanical relay - with my limited electronic knowledge I'm sure a much tidier smaller unit could be built.

 

You can purchase OTG cables (for Samsung 7" tablet) that enable data to be read by the tablet.

 

I can unplug this and plug in the charge cable and charge. I purchased a clever little box that could do both at the same time.

 

Issue is with anything plugged in the box (data), and the tablet charging, the tablet would never go to sleep.

 

Turn the charging off, tablet sleeps but discharges at greater rate so that's no good.

 

Effectively now I have a 2 way switch - one way for charging other for data.

 

But as I said I utilised a mechanical relay. Also I using a 4 way mechanical switch to not only switch the relay but to connect and disconnect the wire feeds to the tablet. I figured would be to have a nicer switch and use another 4 pole relay - it didn't work. It seems too much resistance through the contacts.

 

So I though a SSR would be good... I stopped about here and thought there must be someone a lot smarter than me that can put this all together.

 

Appreciate any comments

 

Thanks

 

Peter

 

 

 

 

 

 


Create new topic
529 posts

Ultimate Geek
+1 received by user: 125

Subscriber

  Reply # 1616472 23-Aug-2016 18:18
Send private message

The OTG implimentation can vary by Android device / kernel so you may find not all Android devices behave the same way with regard to idle activity and OTG.

 

I can understand why the device would want to attempt to maintain connection to the OTG device thereby preventing the device from going to sleep; if this was a data storage device (USB drive) an unexpected disconnection could cause data loss.

 

One is to use a software-based solution to modify the tablet's sleep behaviour. You could try using an app like this to disable the "wake lock" from the OTG system service (on your rooted device): https://play.google.com/store/apps/details?id=com.linangran.nowakelock&hl=en

 

 

 

It sounds like you're using an adapter like below to split the phone's Micro USB port between the OTG device and USB charger:

 

 

This adapter likely has a basic arrangement as below whereby if the USB charger is disconnected it will draw power from the tablet.

 

 

 

 

If you got hold of a Y cable version you could try adding a diode on the 5v phone output side of the circuit to prevent the phone from powering the OTG device in absense of charger power.

 

 




10 posts

Wannabe Geek


  Reply # 1616841 24-Aug-2016 13:50
Send private message

Thanks so much for your reply.

 

Appreciate you are on the case with what I need. What I would like now though is someone who could build this for me.

 

Happy to pay - could you? or suggest someone?

 

Thanks

 

Ps. yes that adapter is very much like I have but not the same - where did you find that one? 


529 posts

Ultimate Geek
+1 received by user: 125

Subscriber

  Reply # 1616845 24-Aug-2016 14:03
Send private message

If you can provide some more details about your project; what you're connecting, how long the cables need to be etc we can see what we can do.



10 posts

Wannabe Geek


  Reply # 1617361 25-Aug-2016 13:43
Send private message

Thanks so much, most appreciated.

 

Should I upload here, or you have an email?

 

 


529 posts

Ultimate Geek
+1 received by user: 125

Subscriber

  Reply # 1617727 26-Aug-2016 10:17
Send private message

I was curious enough to do some testing on this.

 

I built the above circuit and it appears to operate as intended on 2x Meizu phones and a Samsung S5.

 

My Samsung Note 4 however doesn't seem to charge whilst connected to this or an unmodified powered OTG adaptor I had so your mileage may very by device.

 

PM me your address and I'll flick it down to you to test or can arrange pickup from Henderson in you're in the area.


529 posts

Ultimate Geek
+1 received by user: 125

Subscriber

  Reply # 1617968 26-Aug-2016 16:16
Send private message

It's on its way, let us know how you get on.


529 posts

Ultimate Geek
+1 received by user: 125

Subscriber

  Reply # 1625202 7-Sep-2016 17:23
2 people support this post
Send private message

How'd you get on with this?


Stu

Hammered
5051 posts

Uber Geek
+1 received by user: 1063

Moderator
Trusted
Lifetime subscriber

  Reply # 1625206 7-Sep-2016 17:39
Send private message

@solutionz Did you manage to get it working on your Samsung Note 4?





Keep calm, and carry on posting.

 

 

 

Click to see full size Click to see full size


529 posts

Ultimate Geek
+1 received by user: 125

Subscriber

  Reply # 1625210 7-Sep-2016 17:57
Send private message

Stu:

 

@solutionz Did you manage to get it working on your Samsung Note 4?

 

 

It appears the stock Samsung Galaxy Note 4 kernel may not support simultaneous charging + OTG.

 

The solution apparently is to run a kernel with "CONFIG_MUIC_MAX77693_SUPPORT_SMART_DOCK" enabled and replace the 100kΩ sense resistor on the OTG cable with a 64.9kΩ one.

 

As mentioned other devices I had on hand to test worked fine out of the box including Samsung Galaxy S5 and Meizu m3 Note.


Stu

Hammered
5051 posts

Uber Geek
+1 received by user: 1063

Moderator
Trusted
Lifetime subscriber

  Reply # 1625224 7-Sep-2016 18:47
Send private message

Thanks for that update. 





Keep calm, and carry on posting.

 

 

 

Click to see full size Click to see full size




10 posts

Wannabe Geek


  Reply # 1625544 8-Sep-2016 11:49
Send private message

Hi JP, I received the cables - nice job!

 

Unfortunately it didn't work. It would OTG ok but no charging.

 

Remember I'm an engineer so can only look at this black & white. As it stands I could figure how it could work.

 

The front end OTG cable has pin 4 and 5 connected to activate OTG. I assume once activated then it will never get a charge in?

 

Close look at the 'auto' OTG/Charge unit I received from USA uses a 5 wire connected - so effectively the little box is switching this 4 wire on and off (to 5).

 

So I made a little circuit board - using a 3 way switch a few small relays. Click one way and it charges - click the switch to neutral (as it seems the tablet needs a second to say disconnect, then throw the other way and it connects wire 4 and 5 and its good for OTG. 

 

I did try a 2 way relay but seems the fast one side to the other the tablet couldn't figure what's happened.

 

So for now I'm all good - have some sort of overkill it but its working.

 

Thanks again for sending the  cables, I'll PM

 

Peter

 

 


529 posts

Ultimate Geek
+1 received by user: 125

Subscriber

  Reply # 1625761 8-Sep-2016 15:24
Send private message

Too bad it didn't work for your device. I'm glad you currently have a solution though.

 

See above I believe it is an issue with the resistor value on the OTG connector and/or whether you device kernel supports a smart dock accessory.

 

If you wanted to test it further you could try getting hold of a 5-wire Micro-B extension cable (to save trying to disassemble and re-solder a Micro-B connector) and sticking an 64.9kΩ between 4 [ID] and 5 [GND] to emulate a smart dock.

 

Or possibly throw in a couple of trimpots to test against the values below on your particular device; which by the what is a what model Samsung 7" tablet?

 


Create new topic

Twitter »

Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:



Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.