I am looking to create a charging device that can provide 5v power to charge a smartphone (or other consumer electronics device) via micro USB. How would I go about making this charging device "aware" of when it is plugged into the smartphone or not? It would need to be able to detect a simple "unplugging" of its micro USB male end from the smartphones's micro USB female end. It would need to be able to detect the "unplugging event" regardless of whether the smartphone is charging or not (i.e., it should not be affected by whether or not it is charging).
Electronic – Sensing when micro USB power cable is unplugged from a smartphone (or other device)
detectionpowersensorusb
Best Answer
A USB device requiring charging will usually signal its presence either by attempting to negotiate digitally or by placing certain combinations of resistance on the data lines (depending on its sophistication).
At end of charging it will decrease charge current to essentially zero but is liable to maintain a voltage monitoring presence on the line. It may also maintain a resistive ID on the data lines.But that is less certain.
It is extremely unlikely that a phone will draw NO current when connected. Load will be very small when fully charged but is liable to be detectable.
[1]. Wikipedia on common universal power supply.
[2]. Here is USB.ORG's developers approved class specification documents download page. The documents are longer than the title. Much.
For all there is to know about the battery charging interface you could download.
The old version is also there as
Also see these - with the 2nd possibly most relevant
Cable and Connector Class 2.0
Series 'A' Plug form factor Guideline 1.0
USB Connector for Mezzanine Applications Guidelines Rev. 1.0
Micro-USB Cables and Connectors v1.01 Spec and Adopters Agreement
OR (recommended), just try it.
Get a microusb cable which you have access to the conductors of. Plug into a socket you can probe or cut the end off a cable or ... .
Plug in a phone and measure the voltages bewtween data + and - and power + and -.
Repeat with a few phones.
A pattern will emerge.
Tell us about it.
Note that as the spec has evolved so too will the phones, so what phones do now will be subtly (usually) different than a year or few ago. Drwaing current somewhere is liable to be a common thread.
I haven't tried this with recent phones but intend to. May not be soon enough for you though.