element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum How would I program a coin acceptor?(raspberry pi)
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 10 replies
  • Subscribers 667 subscribers
  • Views 7021 views
  • Users 0 members are here
  • raspberry
  • pi
  • coin
  • slot
  • arcade
  • raspberry_pi
  • acceptor
  • cabinet
Related

How would I program a coin acceptor?(raspberry pi)

barney_bear2002
barney_bear2002 over 10 years ago

I want to make a raspberry pi arcade cabinet but I don't know how you would have it to only allow the user to place their game of choice when they have paid, and to let them play more than once if they pay more than necessary

  • Sign in to reply
  • Cancel
  • Robert Peter Oakes
    0 Robert Peter Oakes over 10 years ago

    The requirements for identifying coins is a complex one, involving mechanics and elecro magnetics among others

     

    Size of the coin (Thickness and diameter)

    weight of the coin

    Magnetic properties of the coin (Dont forget the double metal 1pound in the UK or the toonee in Canada) are complicated as is general shape

    imageimage

     

    so before you can even get to the software there are a lot of hardware / mechanical issues to deal with

     

    I would suggest getting an old vending or game machine coin slot and adapting that (Assuming it has a readable protocol or is purely mechanical with contact outputs denoting the identified coin) but this will limit your acceptable coins

     

    you could go modern and issue an RFID tag to players where they can "Charge up" the tag and play within it. but this will require a link to the "Cash Register" so to speak

     

    google "Coint Tester" for more info if needed

     

    Peter

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Jan Cumps
    0 Jan Cumps over 10 years ago

    I can confirm what Robert Peter Oakes says. I've laid my hands on a genuine mechanical coin validator, and that's a very complex apparatus. It even evolves validating drop down velocity of the coins.

    The unit I reviewed didn't use any electrical properties to validate the coins. It was all based on size, weight, and how it behaved in the drop down path.

     

    I've done a short blog on the subject of drink dispensers:

    Repairing a Vendo V-80 cola dispencer of the 1950s

     

    And here are some videos that I made on bypassing a defect coin detection system image and on fixing a soft drink dispenser:

    I used video recorder internals to detect that something went through the coin path.

     

    You don't have permission to edit metadata of this video.
    Edit media
    x
    image
    Upload Preview
    image

     

    You don't have permission to edit metadata of this video.
    Edit media
    x
    image
    Upload Preview
    image

     

    You don't have permission to edit metadata of this video.
    Edit media
    x
    image
    Upload Preview
    image

     

    You don't have permission to edit metadata of this video.
    Edit media
    x
    image
    Upload Preview
    image

     

     

    I can't say that my story has a happy ending. I did this modification for a friend who had bought this cola dispenser for his partner. They separated not long after.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • clem57
    0 clem57 over 10 years ago

    For games selection, have an lcd that has a button. When you hit the button, the selection of games advances to next one, until one you want is shown.

    Clem

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • barney_bear2002
    0 barney_bear2002 over 10 years ago in reply to Jan Cumps

    Ok, so do not all coin acceptors have electrical outputs like the ones you can find on adafruit.com?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Jan Cumps
    0 Jan Cumps over 10 years ago in reply to barney_bear2002

    The adafruit multicoin one will give pulses based on the coin that's inserted. You'll have to count them and keep track on how many coins of what value have been inserted.

    You would consume (part of that) credit when the user plays a game.

    Game over when credit is exhausted.

     

    adafruit have a link on how to configure the coin acceptor:

    http://www.adafruit.com/datasheets/CHmulticoin.jpg

    and the product pages shows a github link to an Arduino implementation. You could look at that to see how they've solved it.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • barney_bear2002
    0 barney_bear2002 over 10 years ago in reply to Jan Cumps

    Thank you

    almost there, how would I use this in parallel as something like Pimame?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • mcb1
    0 mcb1 over 10 years ago in reply to Robert Peter Oakes

    For many of the gaming machines they provide a sample coin and electronically match the incoming against it.

    Some countries make coins with very close characterisitics, while others have much looser tolerances.

     

    The output was a simple Yes/No and gave a pulse for an acceptance.

     

    Mark

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • balearicdynamics
    0 balearicdynamics over 10 years ago

    I have developed a complex prototype for the coin accepting and programming, interfacing micro controllers on vending machines (including games machines). There are two different approaches: a complex coin acceptor that includes a simple yet ancient electronic based on a sort of high voltage serial protocol that is the MDB protocol and a simple mechanism that just accept the coin, identify it and do something, like starting a timer, that is the most frequently options.

     

    About the more complex option take a look to this prototype I have created in 2014 https://youtu.be/fp5EP46eRMs

     

    About the simplest way, that it is what I suggest instead, there are two options, as far as what is my experience. I bought some of these coin acceptors from China for very few $ (between 15 and 25 depending on the model), and if you need I can give you the contact or import for you at not overcharge. The first version I tried was the most complete as shown in the image below:

    imageimage

    It is simple to program and almost easy to use, but I have discarded it for custom applications: it is too much a "finished product". The better use for this device is in Hotels for pay-per-use washers with a relatively wide set of time programming options.

    Then I bought the following, that is more interesting, can fit in any customisation and has the advantage of a more understandable electronics (the producer got me a good support).

    image

    This second one (see the image above) has the advantage that the coin size and programming is very easy and is done independently by the control logic;. On the top right of the mechanical coin acceptor you see a sort of plastic clip with a coin. That's all: you put the desired coin there and the machine accepts only these coins image

    The logic instead has a 4 characters 7-segments display for the user sire and a small board withe a programmable set of buttons: can be programmed on time or on infinite time for state changes. So, I have already explored the possibility to connect a micro controller board in parallel to the three programming buttons, the output signals and the activation relay to hack and get any signal that is needed to reprogram automatically the board "on the run".

     

    Enrico

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 9 years ago

    Guys, can you please help me? I have the same problem as Tony Forbes and none of the answers above really solve it.

     

    I have a working coin acceptor thing (3 of them actually, but one fits where I want it better so I'd prefer to use that if possible) from an old pub gambling machine like Peter Oakes suggested getting.

     

    My problem is that I have no idea how to physically connect it to my raspberry pi and absolutely no idea how to program it to work with the games.

     

    I have got some ROMs where there are 'credits' built in (arcade versions of games basically), but atm I just press 1 or 5 to add credits. How do I make it so that adding coins in the coin slot works with the ROM and is the only to add credits? The fact that you can use the keyboard atm shouldn't be a problem since I'm building an arcade machine and I don't plan on attaching a keyboard (except when modifying it).

     

    I'm really stuck on this at the moment, so any help would be greatly appreciated.

     

    Thanks in advance.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Robert Peter Oakes
    0 Robert Peter Oakes over 9 years ago in reply to Former Member

    This is a purly speculative answer but...

     

    1. For the PI, you can react to a GPIO pin and inject a character (5, or 1) into the keyboard stream, i'm sure there are plenty of examples on how to do this. and it would be easy to test and simply adding a switch with pull up (Pull Up can be programmed) to the gpio would be enough to test

     

    For the coin acceptor, it depends on what it outputs when a coin is accepted and if it is a pulse output you can feed it through an opto isolator to the GPIO pin used in the above test (Switch) and away you go. If it is from an old vending machine I doubt it will be 3V3 compatible, therefor the need for the opto isolator

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube