Question: how coin operated machines work?
Answer: When you put a coin in the slot, the vending machine uses light sensors to get a feel for the size and electromagnetic sensors to measure the type of metal. When the coin sensor is working, the machine knows the difference between three quarters and three nickels.