If phones are smart then vending machines are brilliant. Vending machines have been reading money, making
Pre-digital vending machines used a magnetic head to read the ink on a dollar bill. They also identified coins by their diameter and thickness, as well as the number of ridges on their edges.
Newer machines analyze the chemical composition of coins and use optical scanning to identify bills. Some even use magnetic readers to process credit cards and others use digital cellular networks to let customers pay by smartphone.
A coin passes through two coils of copper wire with electric current running through them, which create a magnetic field. The vending machine identifies the coin based on how its chemical composition disturbs the field, as well as its size. The vending machine then confirms the type of coin by measuring how long it blocks the beams of light emitted by a pair of diodes and corresponding sensors. Electronic signals transmit the information to the vending machine's main circuit board so that the customer can continue their purchase.
Scanning dollar bills
Miniature digital cameras scan images of bills for patterns specific to each type of bill. A vending machine may also measure bills to confirm their size. Depending on the machine, security measures may include authenticating the bill by passing a small electric current through it or using an ultraviolet scanner to measure the glow emitted by its fluorescent ink. Some vending machines verify that bills are not counterfeit by using a magnetic reader to read their magnetic signatures and verify their denomination.
Accumulators count each deposited coin and compare the total to the selling price. Coin mechanisms dispense any change due through a coin return if a customer pays too much. Coins come from a changer bank, which is periodically replenished by a vending machine operator.