Most vending machines use coins as a payment method. Detecting coins is tricky. A potential problem is fraud. A coin may be actual money or a custom coin. Using custom coins, users can defraud the system.
A sample of coins used in European countries can be seen here:
In this section, we'll explore two methods to detect coins. The first method is to detect by weight. The second method is to detect coins using optical sensors such as cameras. We'll explore these methods in the next section.