coin acceptor/Why there is a module in the box/01. A 12 V machine and a 3.3 V pin
Why there is a module in the box · 01 of 11

A 12 V machine and a 3.3 V pin

The coin acceptor is a 12 V machine, and the wire it signals on swings the whole 12 V. A microcontroller input pin is built for 3.3 V or 5 V. The little board in the box exists to stand between those two numbers.

The acceptor is a machine, not a sensor

Inside the black plastic there is a coil, a motor-driven flap and a small computer with a two-digit display. It weighs a coin, measures its diameter and its metal, and if it matches something it has been taught, it lets it through and pulses an output wire. All of that runs on 12 V.

It came out of arcade cabinets and vending machines, where 12 V is what is already in the enclosure. It has no idea that microcontrollers exist.

The pulse is the right shape and the wrong size

The COIN wire carries exactly the information you want: a short burst of pulses, and the number of them says which coin went in. The trouble is the voltage it says it at.

The acceptor's pulse, and the module's
ESP32-S3 · 3.3 V logic
Your board
Acceptor output
12 V
This board's pins
3.3 V
Over by
8.7 V
The pulse is the right shape and the wrong size. The acceptor is a 12 V machine and its COIN wire swings the whole 12 V. A 3.3 V input pin is not built for that, and there is no setting anywhere that makes it safe. The module takes the 12 V pulse in on one side and puts the same pulse out on the other at 3.3 V — same count, same width, so your sketch counts exactly what the acceptor sent.

An input pin on an ESP32 is rated to about 3.6 V. Put 12 V on it and current flows into the chip's supply through a protection diode that exists to shrug off static, not to carry a signal. Sometimes the pin dies. More often it half dies, and the board keeps working well enough that you go looking for the bug in your sketch.

What the module does, in one sentence

It takes 5 V in over USB-C, makes the 12 V the acceptor needs, and hands your microcontroller the same pulses at 3.3 V or 5 V.

That is three jobs, and skipping the module means solving all three yourself: a separate 12 V supply, a level shifter on the signal, and a shared ground between them. The board in the box is about the size of a postage stamp and does all of it from one cable.

Which of the two voltages

The module leaves the factory set to 3.3 V, which is what an ESP32, an ESP32-S3, an ESP32-C3 or a Pico wants. An Arduino UNO wants 5 V, and there is a selector on the back of the module for it. That is the one setting to check before wiring anything, and wire it in this order covers where it is and what happens if you get it wrong.

When it does not work

Can I skip the module and wire the acceptor straight to my ESP32?

No. The acceptor's COIN wire idles at 12 V and a 3.3 V input pin is rated for about 3.6 V at the absolute most. Current goes into the chip through a protection diode that was never meant to carry it, and the damage is often partial rather than total, so the board keeps half working and you spend an evening blaming your code.

Could I just use a resistor divider instead?

A divider would get the voltage down, but it would not give you the acceptor's 12 V supply, and that is the other half of what the module does. One USB-C cable in, 12 V out to the acceptor, logic-level pulses out to your board. A divider solves a third of the problem.

My acceptor's wires are red, black, white and grey. Which is the signal?

White is COIN, the pulse train that says which coin. Grey is COUNTER, one pulse per accepted coin. Red is the 12 V supply and black is ground. All four go to the module's COIN ACCEPTOR header, which is printed in the same order as the acceptor's own socket.

Does the module change the number of pulses?

No, and that is the point of it. Same count, same width, same timing — only the voltage changes. Whatever you program into the acceptor is what your sketch counts.

Where this goes next

The two boards, the harness, the screws, and the two headers you will be reading all week.

What is in the box

Edit this page — content/books/coin-acceptor/a-12v-machine-and-a-33v-pin.mdx

Community

Questions about this product

See what other owners have asked, and read their solutions.

Ask a question ↗

Arcade Coin Acceptor Module Kit, USB-C Powered

Loading discussions…

Discuss this article

Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.

Browse Modules and blocks on the forum