Free Trials

Download a free trial to find out which Altium software best suits your needs

How to Buy

Contact your local sales office to get started on improving your design environment


Download the latest in PCB design and EDA software

  • Altium Designer

    Complete Environment for Schematic + Layout

  • CircuitStudio

    Entry Level, Professional PCB Design Tool

  • CircuitMaker

    Community Based PCB Design Tool


    Agile PCB Design For Teams

  • Altium 365

    Connecting PCB Design to the Manufacturing Floor

  • Altium Concord Pro

    Complete Solution for Library Management

  • Octopart

    Extensive, Easy-to-Use Component Database

  • PDN Analyzer

    Natural and Effortless Power Distribution Network Analysis

  • See All Extensions

    World-Renowned Technology for Embedded Systems Development

  • Live Courses

    Learn best practices with instructional training available worldwide

  • On-Demand Courses

    Gain comprehensive knowledge without leaving your home or office

  • Altium 365 Viewer

    View & Share electronic designs in your browser

  • Altium Designer 20

    The most powerful, modern and easy-to-use PCB design tool for professional use


    Annual PCB Design Summit

    • Forum

      Where Altium users and enthusiasts can interact with each other

    • Blog

      Our blog about things that interest us and hopefully you too

    • Ideas

      Submit ideas and vote for new features you want in Altium tools

    • Bug Crunch

      Help make the software better by submitting bugs and voting on what's important

    • Wall

      A stream of events on AltiumLive you follow by participating in or subscribing to

    • Beta Program

      Information about participating in our Beta program and getting early access to Altium tools

    All Resources

    Explore the latest content from blog posts to social media and technical white papers gathered together for your convenience


    Take a look at what download options are available to best suit your needs

    How to Buy

    Contact your local sales office to get started improving your design environment

    • Documentation

      The documentation area is where you can find extensive, versioned information about our software online, for free.

    • Training & Events

      View the schedule and register for training events all around the world and online

    • Design Content

      Browse our vast library of free design content including components, templates and reference designs

    • Webinars

      Attend a live webinar online or get instant access to our on demand series of webinars

    • Support

      Get your questions answered with our variety of direct support and self-service options

    • Technical Papers

      Stay up to date with the latest technology and industry trends with our complete collection of technical white papers.

    • Video Library

      Quick and to-the-point video tutorials to get you started with Altium Designer

    Avoid Loose Signals With Successful Coin Acceptor Programs

    December 29, 2017

    Hand inserts coin into vending machine

    It’s been cold as an ice cube in an igloo lately, and the only thing that’s keeping my hands warm in the morning is my coffee. You know it won’t be a good day, though, when you’re getting a hot latte from a vending machine and the vending machine eats your coins. I end up with frozen hands and a caffeine headache by 10 am, or I end up having to reroute my whole morning just to run to another cafe.

    I understand that vending machines fail sometimes—especially after learning about how to design a coin acceptor interface. In electronics design, a coin acceptor can be tricky with the failure to accept coins being only one of the lesser problems. Recently, I ran into a problem where payment machines I was designing were found to be accepting coins from neighboring countries with different monetary values, and it was provoking consistent losses to the operation. Much like most design problems, careful attention and a strong knowledge of the layout operation can get you through to a satisfactory and efficient solution.

    Coin Acceptors: What Goes in and What Comes Out?

    Despite the popularity of cashless transaction, coin acceptors are still commonly used in certain applications such as parking and vending machines, arcade games, and your uncle’s favorite party tricks. Oftentimes, coin acceptors are simple plug-and-play devices which are easy to use. There is some method behind the magic for how they can count the various kinds of coins, though.

    Most coin acceptors are equipped with sensors to detect the differences in the size and metal composition. Some special coin acceptors use visual detection technology to identify notable characteristics on different coins and register them separately. Usually, these methods are sufficient in accurately identifying coins and sending out digital signals. Now, if only they could automatically tell if I wanted cream and sugar in my coffee or not.

    Gold coin about to enter coin slot with red button that contains the word pay
    While coin operators seem simple in concept, they have devastating effects if implemented incorrectly.

    Every Coin Has Two Sides

    There’s a whole process for when a coin acceptor validates a legitimate coin; it is up to the host controller to extract the coin value from the acceptor and ensure that the according value is assigned. By communicating with the coin acceptor via a proprietary protocol, or more simply put, detecting logic levels on a series of output pins, you can design for an easy-to-use and easy-to-understand coin acceptor. But with all solutions, there are limits to its usefulness.

    Using proprietary protocol offers minimal signal connections and the ability to connect to more than one coin or note acceptor simultaneously. Another method, one that I prefer when compared to the proprietary protocol, is detecting the changes in logic levels from the coin acceptor’s output pins. The simplicity of logic level detections means a less complicated code and the ability to source for replacement coin acceptors between various manufacturers. The tradeoff is that this places a greater responsibility on the host controller to decode the coin value accurately based on the logic signal pulses.

    Furthermore, additional processes may complicate your coin acceptor protocol. Most coin acceptors have an inhibit pin that disables the coin acceptor when it is inserted. In applications that use a coin acceptor, the microcontroller usually also manages other processes when it is not at the coin accepting stage. Inhibiting the coin acceptor is a prudent measure to prevent any coin insertion that goes undetected as the microcontroller is tending to other tasks.

    Stack of coins on top of paper with graphs and data
    Mess up the signal sampling and you’ll have a discrepancy in coin collection reports.

    PCB Design to Avoid Signal Interference

    If you are intrigued by my preference for decoding coin values through logic signal pulses, then you have to be careful to develop your firmware properly. If the firmware is not properly developed, it could result in missed detection or double detection. And since applications for coin acceptors directly involve monetary transactions, system bugs can lead to complicated issues with clients and customers alike.

    The critical part of registering the correct value lies in knowing the exact start and end of the signal pulse. In coin acceptors, this means knowing the exact pulse duration and ensure that the sampling task is executed at an interval of at least half the pulse duration. In actual applications, electrical interference may affect the pulse signals and proper software sampling and filtering technique are needed to ensure the valid pulse is captured. And for additional reading, the Nyquist theorem states that the frequency of the sampling must be at least twice the frequency of the sampled waveform.

    While it seems that the challenges of reading the right coin value reside in the arm of the firmware , protecting the coin pulse signals from electrical interference is also an important design factor. High speed or noisy signals should be routed away from the coin acceptor pulse signals. Setting up a keep out zone around the pulse signal traces with your PCB design software will eliminate electrical interference at PCB level.

    Consider using CircuitStudio® for smart PCB layout that can detect your potential design problems in advance and show you where interference resides. If you have more questions about specific application layouts, talk to the experts at Altium today and find out more.

    most recent articles

    Back to Home