Introduction: Arduino Coin Drop Mechanism
Not wanting to miss a chance to add an Arduino to something or make some extra change I made a simple Coin Drop PC interface to work with this coin mechanism I pulled from an Asteroids cabinet I converted to Mame.
It looks daunting with all those wires but its really simple.
Most of that wiring is lighting and tamper switches. There are two micro-switches that actually detect the coins. There are also two counters that keep track of how many coins have been collected. About 69,000 Quarters totaling over $17,000 have been through here.....
An Arduino Leonardo will make this PC compatible...
Step 1: Newer (Cheaper) Version Mechanism
I decided to just save the big one as a spare for my Techmo Cabinet Rebuild and build the Arduino controller with these generic quarter mech's. They will work nice in a DWjukebox project too. A quick change to the DWConfig file lets you use this to make a real "pay for play" jukebox.
You'll need a Leonardo for this code to work. I have some Digistump boards and was going to use one of them with Vusb but the Leonardo is more familiar to most people.
I used an Arduino Micro (Leonardo Compatible) and placed it right on the back of the coin drop mechanism. The mechanism has a micro switch that gets wired to digital input pin 10. I also added a 4.7K pullup resistor. Even though the Arduino offers internal pullups it better to have the extra insurance. Add a simple program to watch for the switch closure and send a keypress and it's done.
The Sketch provided above is for use with one coin drop. If you want to support a multiple coin drop mechanisms its not to hard to change....
The computer sees it as a USB keyboard and every time a quarter is dropped it sends the keycode for the insert key which, by default in DWJukebox, is the quarter signal.
The code is super simple. You can add an output pulse to work a mechanical counter or get creative with the extra processing power available in that Arduino controller.
Participated in the
Arduino All The Things! Contest