Want to make an arcade game or vending machine? Maybe you want to charge customers to use your awesome invention - but how? Look no further! Coin acceptors have become inexpensive enough for anyone to purchase, so this tutorial is designed to show you how to connect one to your Propeller-powered BlocklyProp project.
(1) - Coin Acceptor (this project specifically uses this one from Amazon [1])
If you choose a different coin acceptor, you may need to make modifications to the instructions. Consult your device's manual.
(1) - 12 VDC power supply (#750-00003) [2]
(1) - 10 k-Ohm resistor (brown-black-orange) (part of #751-00011) [3]
3-pin cable:
(1) - 3-pin cable (#800-00160) [4] OR
Propeller development board:
(1) - Propeller Activity Board or Activity Board WX (#32912) [6] OR
(1) - Propeller FLiP (#32123) [7] plus:
(1) - 3-pin breadboard header (#451-00303) [8]
misc male/male jumper wires (#800-00016) [9]
Note: The header, breadboard, wires and FLiP can be purchased separately or you can get them (and more) together in the Propeller FLiP Try-it Kit (#32023) [10].
Misc coins to program the coin acceptor with (20 of each type of coin is best)
NOTE: The 12V supply can be connected to the (→5-9VIN pin) on the FLiP - however be aware that because the input voltage is above 9 volts, if the FLiP module’s power connections are shorted, the FLiP will get VERY HOT.
Connections differ depending on the Propeller board you choose to work with. The first set of instructions are for the Activity Board or Activity Board WX. The second set of instructions are for the Propeller FLiP on a breadboard.
REMEMBER: The 12V supply can be connected to the (→5-9VIN pin) on the FLiP - however be aware that because the input voltage is above 9 volts, if the FLiP module’s power connections are shorted, the FLiP will get VERY HOT.
The coin acceptor connects to the Propeller very similarly to a pushbutton switch:
The coin acceptor “tells” the Propeller what type of coin was inserted by closing the circuit a specific number of times. Because these are basically pulses, the Propeller can simply wait for the circuit to close, and then count how many pulses it receives.
The following program will work for a coin acceptor that has been set up to send 5 pulses for a US quarter ($0.25), 4 pulses for a US dime ($0.10), and 3 pulses for a US nickel ($0.05):
When you insert a coin into the coin acceptor, it will display the value for that coin:
Links
[1] http://www.amazon.com/gp/product/B01M7XZBUR
[2] https://www.parallax.com/product/750-00003
[3] https://www.parallax.com/product/751-00011
[4] https://www.parallax.com/product/800-00160
[5] https://www.parallax.com/product/800-00062
[6] https://www.parallax.com/product/32912
[7] https://www.parallax.com/product/32123
[8] https://www.parallax.com/product/451-00303
[9] https://www.parallax.com/product/800-00016
[10] https://www.parallax.com/product/32023