Your project may be free-as-in-speech, but that doesn't mean it has to be free-as-in-beer. This handy coin validator/acceptor module is just like the ones you've seen in arcades. This model has the cool ability to accept up to 4 different coins! For example, you can program it for 4 different US coins, or European, or Japanese OR you can have it accept 4 coins from different countries - say a Chinese Yuan, Japanese Yen, American Quarter and European Euro. First you'll have to program it with what coins you want it to accept. Any coin from 15mm to 29mm in diameter can be used. Each coin is assigned a number of pulses, so for example, a nickel should be 1 pulse, a dime, 2 pulses, a quarter 5 pulses and a half dollar 10 pulses. When a valid coin is inserted, the output line will pulse for 20-60ms (configurable). The acceptor looks for diameter, thickness, dropping speed, etc to determine if a coin is valid.
Comes with the acceptor itself, mounting hardware, and a cable for power/signal. The coin falls through, you choose how and where to store them.
To program the validator, go through the instruction sheet - you'll need about 20 of each coin to help program the acceptor. After programming, connect a 10K (1K to 100K is fine) pullup resistor from the white wire to your microcontroller's VCC line (for Arduino, this is a +5V). Insert different coins, and verify that the coin line pulses high for about 40 milliseconds the right number of times.