How does coin recognition in vending machines work?
For human beings, recognizing if a coin is real is pretty easy. We can look at the coin, weigh it in our hand, feel the temperature, listen to it hit the floor, etc. If someone handed you a coin replica made of plastic, you would immediately know it is fake even if it looked authentic to your eyes. If someone handed you a blank steel slug, it would obviously be “not a coin” because it wouldn’t look like a coin at all.
What we take for granted as humans is not so easy for a vending machine. A vending machine needs a relatively inexpensive way to detect if a coin is real.
If you look at vending machine you can understand how the simplest possible vending machine recognizes coins. It uses the simplest possible coin detector. All that it looks at is the diameter of the coin.
In something like a soda machine, there is usually a more sophisticated recognition system that usually depends on: A) diameter, and B) magnetic fields.