Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Android ext. circuit, does not connect unless provided w/ 5V, need workaround

Status
Not open for further replies.

frank26080115

Newbie level 2
Joined
Jun 13, 2012
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,322
My circuit involves an AVR microcontroller and a MAX3421E USB host interface IC. This IC is exactly the same one as what is used on the "USB Host Shield" and "Android Accessories Development Kit" for Arduino. The circuit is powered at 3.3V, not 5V, keep that in mind. The 3.3V supply comes from a LDO regulator that is actually connected to my Android smartphone's battery (I placed copper tape on the back of my battery, soldered to the terminals, the PCB has springed contacts that connect with the copper tape. The PCB is held to the battery securely because I 3D printed a phone case designed specifically for my PCB and phone. These steps are already done so it is too late to change the project approach regarding this).

Alright, so I've gotten code to work, I know the circuit works, the AVR is programmed, serial debug is working. I have a logic analyzer and checked that the MAX3421E is talking on the SPI bus and is initialized properly.

So I connect it to my smartphone. Keep in mind that since my circuit runs at 3.3V, with no possible source of 5V at this time. So even though GND, D+, and D- are connected to my smartphone, the 5V line is not connected.

The INT output of the MAX3421E does not show activity, meaning from the MAX3421E point of view, nothing has happened. I verified this by checking the D+ and D- USB signals. One of them should show a logic high indicating a connection (only one of D+ or D- depending on the USB speed classification), but none of them do.

Now I'm suspecting that I need to inject 5V into the 5V line to make the smartphone even bother to respond. When I connect it to a 5V external source, Android shows USB as connected, the battery as charging, and there is activity on the MAX3421E's INT signal and SPI bus. This confirms my suspicions. I did try injecting 3.3V instead but the phone does not respond to that.

I connect a DC/DC step-up converter circuit from the 3.3V supply to output 5V. It works and does successfully trick the smartphone into connecting via USB. But the step-up converter gets hot. It's rated for 200 mA, my 3.3V voltage regulator is rated for 300 mA. I did a measurement and the phone was pulling around 600 mA. This is unacceptable.

Through research, I read that I should not place DC/DC converters in parallel. So I have no way of simply increasing the current rating by placing anything in parallel.

I cannot use a bigger battery due to the 3D printed case.

I cannot constantly have an external source of 5V, the final device must be portable.

I know USB devices has to "negotiate" a charge current, in the USB descriptors, it tells the host whether or not it is self or bus powered, and how much current is required. Is there any way to tell the device to not take so much current?

From my knowledge of circuit theory I think there are no practical devices that can maintain 5V and yet still impose a limit on current without dropping voltage, such a device would break Ohm's law. But if I am wrong, please let me know.

Or... is this something that is controlled by the Android OS or a component of the Android OS?

I am using "microbridge" from https://code.google.com/p/microbridge/ which pretends to be a ADB server's TCP connection. I am running Android 2.3.3 I cannot use ADK since it is not supported. Yes I know ICS supports ADK but NO I cannot upgrade to ICS so that's not an option. I did try various ways of hacking ADK into 2.3.3 but had no success.

Another option is to simply get a new DC/DC converter with higher capacity and connect it to the phone's battery, in theory it should work but this is really inefficient. I want to leave this as the last option because it does involve more hardware hacking as opposed to a clean software solution.

EDIT: Progress

MORE PROGRESS

bNumConfigurations is only 1, which means I can't really tell the phone to use another current setting through software, and bMaxPower is reported to be 500mA
 
Last edited:

I am highly pessimistic that a charge pump type converter will work since the phone will start to pull 500 mA as soon as it's connected, if I can find one that supports a constant 500 mA without massive caps then maybe
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top