Turn Capacitive Touch Sensor into a Coin Detector

Hello Forum,

Just as a warning, I am brand new to the Arduino and everything else that relates. I am slowly learning and enjoying the process as I go. I bought the Arduino UNO starter kit, along with other small packages to keep my ideas growing.

I have been tinkering with touch sensors lately, and trying to figure out the best way to read the metal of a coin either by the small difference in conductivity, capacity, or resistance and then output the type of coin that has been placed on the conductive surface.

(It is important to the idea I have, that the coins must be placed on a flat metallic/conductive surface.)

Example:

  • Place a quarter on the conductive surface. Input changes from constant/near constant of 200? to 500?. Arduino reads the difference as 300? and associates it with a quarter. Output = “This is a quarter”.

I have been using online tutorials to build out simple versions of these sensors, but have had no luck in recording small enough changes in values.

QUESTIONS:

  1. Is this something that sounds possible to do with the Arduino UNO?

  2. If so, what is the best way to go about it?

Thanks,
Nick

Coins are normally told apart by size and/or weight.

Conductivity will pretty much the same for all different types (a hair over 0Ω - depending on how much dirt, grime, corrosion and other high-resistance stuff has built up on the surface). Capacitance - well a coin doesn't have much of that either. You can't get much further than "coin" vs "no coin".

Conductivity = 1/resistance

as well as size and other possibilities, I’d try running an electromagnet under the coin, and measuring the distortion of the field above.

Different sizes, alloys and shapes will give you a pretty good starting point.

  1. Is this something that sounds possible to do with the Arduino UNO?

Just to make it clear the way you propose will not work.

I used a one dimensional CCD light sensor to measure the diameter of a coin rolling down a slope to detect its value.

"I have been tinkering with touch sensors lately, and trying to figure out the best way to read the metal of a coin either by the small difference in conductivity, capacity, or resistance and then output the type of coin that has been placed on the conductive surface."

Problem being the last part: "placed on the conductive surface." since the surface becomes part of what's measured.

See what capacity a wire-grounded but otherwise insulated coin has. See if you can get repeatable results.

Grumpy_Mike:
I used a one dimensional CCD light sensor to measure the diameter of a coin rolling down a slope to detect its value.

I think you really mean to say: "measure its SIZE, and based on the commonly used coins in my part of the world GUESS its value based on that".

Old coin mechs did the testing mechanically and magnetically (iron slugs got diverted from the coin bin in a freefall part of the path). The size and weight of the coin determine how it rolls and ramp jumps, fakes didn't make it to the coin bins.

Different metals do react differently to fields but I have to wonder how silver-copper sandwich coins react.

wvmarle:
I think you really mean to say: "measure its SIZE, and based on the commonly used coins in my part of the world GUESS its value based on that".

No I actually measured the diameter of the coin.

In the UK no two coins have the same diameter so you know the diameter you know the value. If that does not apply in your country then you have to add another measurement, like a colour measurement.

The magnetic properties of some coins in the UK has changed over the last 10 years so you can’t use that.

As well as the diameter - look out for center holes (washers & slugs), and coin thickness.
Keep in mind non-circular coins - you need to take more than one diameter, or average a rolling outline.
Brass, copper, lead, aluminium and all sorts of bad things come through!
The varying magnetic signature is a fact of life - coin acceptors often need to be re-calibrated when new coins come out.

EDIT: The good news is that implementing all these non-contact techniques isn’t all that difficult. Optical, magnetic and physical are simple technologies to make vandal-proof / fail-safe.

All coins here also have tdifferent diameter, but e.g. the 1 RMB coin is almost exactly the same size as 1 HKD, and I'm sure there are more (also lower value) foreign coins that have the same value. Someone pulling a 1 RMB coin in the machine and have it detected as 1 HKD is no big problem of course (other than the tricky sorting later), the other way around is less nice for the vendor...

Yes it depends on what you want to do with the information. My aim was simply to make a device that counted how much money I sent into a box. I was not interested in detecting counterfeit objects pretending to be coins because I was feeding them into my money box. I was not using the system for vending where you have to be a lot more careful.

But I think we are all agreed that capacitive sensing has no role to play.

In that case you can only cheat yourself, which usually doesn't work too well :slight_smile:

Sure, capacitive sensing is out for this application.

The 1 wire capsense tutorial works by timing the charging of a piece of wire most of the time not touched, from grounded to HIGH by counting loops. Adding wire or metal to make a bigger sensor takes longer to fill so why not see how long coins take to fill to HIGH? Can't hurt to try.

All of this helping! Thanks community!

To help clear things up and to spark more interest.

I was using coins merely as an example, but I see it has become too specific to the idea. That is my fault. Although I have learned now that shape and weight are options to be considered.

The actual idea I have is to distinguish multiple game pieces on a grid aligned game board, where each game tile in the grid is recorded in a loop. When a piece is placed on a specific game tile, the Arduino will recognize the change in value (depending on the method) and know that it is a certain player piece (blue piece and not red).

I used coins as an example, but I guess this limited my options to the attributes of coins. The game pieces can be modified anyway possible to distinguish values. Short wave RFID was an option to play around with, however I don't know how well this would work in a grid pattern with the game tiles a centimeter or 2 apart.

For example, we were using capacitors atop different types of metals when testing with the 1 wire Capacitive sensor build. We have also increased the size of the resistance in this model in hopes to catch more sensitive values. We were able to get changes in capacity, but unable to distinguish between pieces. It seems the readings from this project are too up and down to get any comfortable constants out of it.

I will have to try a magnetic approach, I'm guessing something like the DIY metal detector projects.

Thanks

nss5161:
The actual idea I have is to distinguish multiple game pieces on a grid aligned game board, where each game tile in the grid is recorded in a loop.

That's a very different thing! Next time please just give the actual idea, as seemingly minor differences can call for very different approaches.

Coins are something that have to be detected often, usually in vending machines and the like (or fancy piggy banks), and then while in motion, as they are sliding or rolling down to a storage box.

For these game pieces:

  • how many different pieces to be distinguished?
  • how big are the pieces?
  • how big are the grid squares?
  • how many squares in the grid?
  • how accurate the placement (location and orientation)?

Short wave RFID was an option to play around with, however I don't know how well this would work in a grid pattern with the game tiles a centimeter or 2 apart.

I assume you mean 13.5MHz RFID readers. I am not sure about this but I am not too hopeful because the readers will interfere with each other at those sorts of separation. When I worked in the RFID industry it was recommended that you didn't mount readers less than 3 feet apart.

I did design a system using 125KHz RFID readers, which maybe you would describe as a long wave reader. It was quite complex and tricky to adjust. The project write up is here. RFID Sequencer

Before we get bogged down again with missing information, how many different types of pieces do you want to detect? Two like red / green are a lot easier than many.

Yes, that was my fault, sorry for the confusion. I'm going to keep my day job don't worry.

As for the questions (wvmarle). I haven't finished the actual specs for the sizes yet, so at this point I would take any proof of concept and worry about minimizing later.

  • At least 4 game pieces
  • The game pieces can be any size smaller than the game tile
  • The grid squares (game tiles) are 2.5"X2.5"
  • Right now, I'm building only 4 game tiles. I have I/O extenders ordered and on the way, but I would love to prove the concept.
  • I would like to be able to first detect in the middle and later refine it so that if the game piece is at the edge of the tile it can still detect the player.

I hope this answers the questions. Let me know if you have anymore.

Thanks

Do you have to distinguish between all individual pieces, or just be able to tell "player A or player B" with an arbitrary number of pieces for each player?

Could a coil inside of a piece be picked up by a mini-theremin in the square? Can different coils (say dia and turns) be detected stronger at different theremin frequencies?

If the board can have a small hole in the middle of each square with an IR detector in it and each piece could blink its own IR led in the base, each piece could tell the board which one it is for lots of different pieces.

wvmarle - There will only be 4-5 pieces on in play at one time (one for each player). So you would need to determine each player individually. (if you are asking if there will be two teams of player pieces).

GoForSmoke - I would have to do more research into that concept, but i would assume each piece would need a power supply which I would like to avoid if possible. I'm sorry if I am making this more difficult through the process.