# simple object recognition, any idea ?

#### emmanuel63

##### Well-known member
Hello,

For a musical project, I need to find a way to identify simple wooden coins lying on a board.

Say we have :
- a board divided in a 64 cells, exactly like a chess board.
- on a few cells, I put some wooden coins. They all have the same shape (say a small cylinder) but have different values printed on them : 10, 50, 100, 1000.

I want to find a way to identify which cells are covered with a coin, and what is the coin's value.

I was thinking of :
- RFID/NFC tags for every coin. But how to read the entire board at once ?
- QR code printed on the bottom of every coins. But same question : how to read the entire board at once ?
- photo resistors. Every cell of the board have a builtin photo resistor. When a coin hide the photo resistor, resistance changes. It is easy to know which cell has a coin, but I don't know if it is possible to discriminate the value of the coin. Maybe painting the bottom of the coins with different shades could induce different reflexion ratios, and thus a different signal ? Seems difficult to calibrate...

Thank you to share your ideas !
Emmanuel

Now, I've never done anything with shift registers, but one thought would be to combine shift registers and analog inputs.

Each of the 8 rows has a shift register on it that multiplexes 8 inputs for the data value for the corresponding column in that row. You would have a shift register per row, or you could have cascading shift registers. Each block would have 2 pins underneath, one 3.3v, and the other the output. Each coin has a unique set of resistors so that when you do an analog read, you get a value 0..1023. Each value that is returned by the analog input would be mapped into the appropriate value (10, 50, 100, 1000...). You would use 8 analog input pins, and set the shift register to iterate between the different columns. Obviously one issue is to have it so the coin is placed correctly to align the data and 3.3v pins.

Thank you Michael,

I have done projects with multiplexers, with hundreds analog inputs. I can confirm that is a very consistent approach, easy to code, robust and cheap. Your idea to code the coin value is interesting. I can imagine some kind of slots so each coin fit in its right position, making contact.

I was thinking of another solution : object position tracking like this :https://www.youtube.com/watch?v=GspBaVbhzkU
Any idea of the technologie behind ?

Emmanuel