Skip to content
If this is your first visit, please click here to learn about shipping and delivery.
If this is your first visit, please touch here to learn about shipping and delivery.
Six-coin-type programmable coin acceptor

Read a Coin Acceptor Reliably: Pulse Bursts, Credit Mapping and Fault Tests

A coin acceptor produces information about a coin; your project must turn that information into a dependable credit transaction. Counting a pulse correctly is only the first step. Two coins arriving close together, a controller restart or an unexpected output voltage can expose weaknesses that a single successful demonstration never shows.

This guide develops a bench test for pulse-output acceptors. PMD Way's six-coin-type acceptor is an example: its listing describes programmable coin recognition and a variable number of output pulses. Compare the available coin acceptors against your required coins, installation and documented interface before choosing the controller circuit.

Separate recognition, signalling and credit

These are three different jobs. The acceptor decides whether a physical coin matches a programmed type. Its output reports that decision using a configured signal. Your application interprets that signal and changes an account, timer or game state.

Write a small configuration record containing the recognised coin types, their pulse assignments and their credit values. Do not assume that two pulses always mean two dollars. A token could produce two pulses and buy one game. Keeping recognition codes separate from monetary values makes later pricing changes easier to review.

Use integer units for credit, such as cents or whole game tokens. Define the maximum accumulated credit and the behaviour when that limit is reached. This avoids an otherwise valid pulse sequence overflowing a small counter or silently creating an unusable balance.

Verify the output before connecting a GPIO pin

The example listing specifies a 12 V DC, 400 mA supply requirement. That describes the acceptor supply, not a microcontroller-compatible signal level. The public description does not establish the output circuit, connector pinout, idle voltage or required pull-up. Obtain those details for the supplied revision before wiring.

Manufacturer documentation illustrates why this matters. The Microcoin QL technical bulletin describes open-collector coin outputs and several alternative accumulator output arrangements. Those specifications belong to the QL, not the PMD Way example. An acceptor's appearance or supply voltage cannot identify its output behaviour.

With the controller disconnected, verify the documented supply polarity and connector numbering. Use suitable test equipment to observe the signal relative to its specified reference. An open-collector output may require a correctly chosen pull-up to reveal a waveform; do not add one until its permitted voltage and current are known. A driven higher-voltage signal needs an appropriately designed interface rather than a direct GPIO connection.

Record the resulting controller-side high and low levels, active edge and idle state. Check that the interface remains within the controller's limits when either device is powered off. Keep acceptor power wiring and signal wiring identifiable so maintenance cannot swap them.

Measure a complete pulse burst

Capture several accepted examples of each coin. Measure pulse width, spacing within a burst and the quiet interval after the last pulse. Repeat with consecutive insertions and with the shortest insertion interval the mechanism permits.

A recognition-time figure is not a pulse-width specification. Likewise, a long pause observed during one casual test is not proof that every coin will be separated by that pause. Use the supplied operating instructions and measured worst cases together.

Create a table with coin identity, expected count, observed count range and timing range. Include worn and clean examples of legitimate coins when training and testing, following the manufacturer's procedure. Keep training samples separate from the later evaluation set so the test represents more than recognition of the same handful of pieces.

Choose the end-of-burst rule carefully

A timeout decoder closes a burst when no new pulse has arrived for a chosen interval. That interval must exceed the largest legitimate within-burst gap, with margin, while remaining short enough to separate valid consecutive transactions. If these ranges overlap, a simple timeout cannot reliably distinguish the transactions. Change the acceptor configuration, use a documented inhibit mechanism or choose a different interface.

For an illustrative bench signal, suppose within-burst gaps remain below 60 ms and independent bursts are guaranteed to be separated by at least 300 ms. A 150 ms timeout might be a candidate for testing. These numbers are an example, not settings for the listed acceptor. The guarantee matters more than the attractive round timeout value.

Keep pulse capture separate from transaction processing

On a microcontroller, capture only the necessary edge information promptly, then process completed bursts in the main application. The Arduino attachInterrupt reference explains board-dependent interrupt pins, trigger modes and interrupt-service-routine restrictions. Select one appropriate edge per pulse; counting both edges doubles the apparent value.

Keep an interrupt routine short. Shared state needs the appropriate volatile declaration and safe access for the processor; volatile alone does not make a multi-byte read atomic. Do display updates, logging and credit decisions outside that routine.

A useful decoder has idle, collecting and fault states. It starts collecting on a valid edge, updates the count and last-edge time, then validates the completed burst. Unknown counts, excessive burst duration or impossible timing go to a diagnostic path. They should not be rounded to the nearest valuable coin.

Commit each accepted transaction once

After validation, create one transaction containing the decoded coin type and credit change. The display, game logic and event log should consume that same decision rather than each independently counting pulses. This prevents a display refresh or reconnect from adding the value again.

Consider what happens if power fails between receiving a coin and delivering a service. A pulse-only output may provide no way to ask the acceptor to replay its last event. Decide whether the prototype needs durable credit storage, a service log or an operator reconciliation procedure. Do not describe a volatile counter as reliable accounting.

Where a documented inhibit input exists, use it when the application cannot accept payment, including during startup and faults. Its voltage and polarity require verification just like the credit output. Without an inhibit facility, make the machine's unavailable state obvious and prevent normal use until it is ready.

Run a fault-focused acceptance test

  • Insert each intended coin repeatedly and compare physical totals, decoded transactions and displayed credit.
  • Try rejected objects allowed by the test procedure and check that no credit appears.
  • Insert different valid coins consecutively and look for merged or split bursts.
  • Restart the controller while the acceptor remains powered, then reverse the order.
  • Disconnect and reconnect the signal while idle, checking for phantom credit.
  • Exercise the game or dispenser heavily while inserting coins to expose missed input servicing.

Keep raw timing samples alongside the final results. If a later firmware change produces occasional incorrect credit, those records help distinguish an electrical problem, a decoder regression and a configuration change. A successful design can explain every accepted transaction and has a defined response when it cannot.

Previous article Battery Power for Arduino Projects: Voltage Range, Runtime and Regulator Heat