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.
- Battery Charging v1.2 Spec and Adopters Agreement (.zip format, size 589 KB)
The old version is also there as
- Battery Charging v1.1 Spec and Adopters Agreement (.zip format, size 292 KB)
Also see these - with the 2nd possibly most relevant
- USB 3.0 Connectors and Cable Assemblies Document Rev. 1.02
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.
First idea: RFID. One tag (very cheap) underneath each piece. Each tag should identify which type of piece it is (out of {6 white}+{6 black}=12 different types). One transceiver circuit and a 1-to-64 multiplexer for the whole board. Also, 64 little antennae, each one underneath each board position. The transceiver operates at a very low RF power (you should find the optimum one, experimentally). By changing the multiplexer connections, you scan all 64 positions, and read the IDs of the tags (if any) present over each one of them.
I've never used the ICs it talks about, but this document might help you implement the RFID multiplexer (which will be the most challenging part, together with its careful layout).
Second idea: distinguish each piece type by its unique magnetic permeability. To each piece, you will add a certain mass at its bottom. This extra mass will be the same for all 32 pieces (so that the users feel comfortable with them). Each extra mass will be the sum of two masses: a "magnetic" mass, plus a "compensation" (non-magnetic) mass. The only purpose of the compensation mass will be to make the total extra mass equal for all types of pieces. You need to distinguish 12 different types of pieces. Each type of piece must have a magnetic mass with a unique magnetic permeability, \$\mu\$. You will probably choose materials with a high \$\mu\$, but there are plenty of materials you can choose from, each with a different \$\mu\$ (see one table here).
Underneath each board position, you will need to wind several turns of wire (so that the diameter is almost the side of the square). You will have 64 coils. Again, use a 1-to-64 multiplexer, to connect only one of them to an inductance meter. The difference, now, is that the multiplexer does not need to deal with RF. You can tie one node of all coils together, and use 64 analog switches (very cheap), to direct, as I said, one coil to the inductance meter. The circuit will have to determine, in the shortest possible time, what is the self inductance measured at each one of the 64 coils. It doesn't need much accuracy. It just needs to determine 13 different possible values for L (that is less than 4 bits!). You can experiment with methods in the time domain (e.g., applying a constant voltage, and measuring the slope of the current), or in the frequency domain (e.g., trying to quickly seek what's the resonant frequency, with a certain added capacitor). To attain those 12 different values for L, you can play with different permeabilities, and different dimensions for the magnetic material.
Since you have to scan 64 positions (measure 64 self inductances) in a reasonable time, I would probably go for time-domain approaches. For instance, if you allow yourself 1 second to read the whole state of the board, you have 15.6 ms for each inductance measurement. Challenging, but doable.
If speed ends up really being the bottleneck, you could make your system 8x faster, if you include 8 analog front ends, instead of one. Each front end would be devoted for each row in the board. That way, you could measure 8 self inductances simultaneously (giving you 125 ms for each measurement, and you would still have a whole board state in 1 second). I'm sure that one MCU, even with a single ADC (with 8 channels), would be enough.
This could be (without all details) the schematic for each front end (which could be one for the whole board, or one for each row, as mentioned), and a way to quickly estimate self inductances \$L_1\$ to \$L_N\$ (N being 8 or 64). The common node for the coils would be the top one, and the control signals for the analog switches are not shown, for simplicity. TS would be constant, and VX sampled at TS would be used to compute the self inductance. TG would be just slightly longer than TS.
Benefit of this second idea: no RF involved. However, you need to build your own "tags", with different permeabilities.
Best Answer
Since an image is worth a thousand words, here's an example of LDM-24488NI: a 64-led matrix
For your application you will need one such matrix for LEDs, and another one for sensors, requiring a total of 32 IO pins. Since your RPi doesn't have that many, you will have to use 1-to-8 demux to select individual rows and columns:
For LEDs, you can use demultiplexers for both rows and columns, since you only need one led at a time. For sensors, I'd recommend using a demux for rows and individual lines for columns, to be able to detect multiple active sensors in one row. That will bring the required pin count to 17 pins, which an RPi can handle.