
# Lonely Binary Coin Acceptor

## Quick Start Guide

---

# Step 1: Connect Power and Wiring

## 1. Connect Power

Connect a USB Type-C power adapter to the Coin Acceptor Module.

### Requirements

* Minimum power: **5V 2A**
* Do **not** connect the module to a laptop USB port.
* Most laptop USB ports cannot provide enough current.

### Note

The module has a built-in power booster that converts **5V** from USB Type-C to **12V** for the coin acceptor.

If the power adapter cannot provide at least **2A**, the coin acceptor may:

* Fail to detect coins
* Randomly restart
* Work unreliably

---

## 2. Connect Coin Acceptor Wires

Connect the three wires from the coin acceptor to the module:

| Wire Color | Connection |
| ---------- | ---------- |
| Red        | 12V        |
| Black      | GND        |
| White      | COIN       |

---

## 3. Connect to Your MCU

Examples:

* Arduino
* ESP32
* Raspberry Pi Pico

### Voltage Selection

The module outputs **3.3V** by default.

For Arduino or other **5V MCUs**, change the voltage jumper on the bottom of the module.

### Connections

| Module Pin | MCU Pin          |
| ---------- | ---------------- |
| GND        | GND              |
| COIN       | GPIO / Input Pin |

### Important

When uploading code from your computer:

* Connect only **GND** and **COIN**
* Do **not** connect **VCC**

After your code is working:

1. Disconnect the USB cable from the computer.
2. Connect **VCC**.
3. The module can now power the MCU.

---

## 4. Set Coin Acceptor Switches

Set the switches on the coin acceptor:

| Setting      | Value              |
| ------------ | ------------------ |
| Output Mode  | NO (Normally Open) |
| Signal Width | Medium             |

---

# Step 2: Set Coin Types and Pulse Values

## Enter Setup Mode

Press and hold **+** and **-** together for 2 seconds.

The display will show:

```text
E
```

---

## Select Number of Coin Types

* Maximum: 6 coin types
* Use **+** to select the number
* Press **SET** to confirm

---

## Set Pulse Values

Assign a pulse value to each coin.

### Example

| Coin     | Display | Pulses |
| -------- | ------- | ------ |
| 5 cents  | P1      | 1      |
| 25 cents | P2      | 3      |
| 1 dollar | P3      | 5      |

Press **SET** after each value.

When finished, the display returns to:

```text
E
```

---

# Step 3: Train the Coin Acceptor

Training teaches the coin acceptor how to recognize each coin.

## Start Training

Press **SET**

Display:

```text
A
```

Press **SET** again.

Display:

```text
A1
```

---

## Train Coin 1

Insert exactly **15 coins** of the first type.

Example:

* 15 × 5-cent coins

Press **SET**.

---

## Train Coin 2

Display:

```text
A2
```

Insert exactly **15 coins** of the second type.

Example:

* 15 × 25-cent coins

Press **SET**.

---

## Train Coin 3

Display:

```text
A3
```

Insert exactly **15 coins** of the third type.

Example:

* 15 × 1-dollar coins

Press **SET**.

---

## Finished

The coin acceptor is now ready to use.

Insert some coins to test it.

---

# Signal Width Settings

The Signal Width switch controls how long each pulse lasts.

| Mode   | Pulse Width |
| ------ | ----------- |
| Fast   | 20ms        |
| Medium | 50ms        |
| Slow   | 100ms       |

### Recommended

Use **Medium** mode.

It provides the best balance between speed and reliability.

---

# Why Are Coins Missed When Inserting Quickly?

The coin acceptor sends pulses to the MCU to tell it which coin was inserted.

For example:

* Signal Width = Medium (50ms)
* 1 Dollar Coin = 20 Pulses

The module must send all 20 pulses before it can process the next coin.

20 pulses × 50ms = approximately **1 second**

During this time, the MCU is still receiving data from the first coin.

If another coin is inserted before the first signal is finished, the MCU may not correctly identify the second coin.

This is normal behavior.

---

## Example Transmission Time

| Pulses | Fast (20ms) | Medium (50ms) | Slow (100ms) |
| ------ | ----------- | ------------- | ------------ |
| 5      | 0.1 sec     | 0.25 sec      | 0.5 sec      |
| 20     | 0.4 sec     | 1.0 sec       | 2.0 sec      |
| 50     | 1.0 sec     | 2.5 sec       | 5.0 sec      |

---

## How to Accept Coins Faster

If users will insert coins quickly:

* Use lower pulse values
* Use Fast or Medium mode
* Avoid very high pulse counts

### Recommended Pulse Values

| Coin     | Pulses |
| -------- | ------ |
| 5 cents  | 1      |
| 25 cents | 3      |
| 1 dollar | 5      |

Lower pulse values allow coins to be processed much faster.

---

# Coin Pin and Counter Pin

## Coin Pin (White Wire)

Main output signal.

* Sends multiple pulses
* Pulse count represents the coin value
* Connect this pin to your MCU

Example:

| Coin     | Pulses |
| -------- | ------ |
| 5 cents  | 1      |
| 25 cents | 3      |
| 1 dollar | 5      |

---

## Counter Pin (Grey Wire)

Optional output.

* Sends one signal for every accepted coin
* Does not provide coin value information
* Can be left unconnected

---

# Power Requirements

## Coin Acceptor

* Input Voltage: 12V DC
* Current: 350mA

## Module Power Supply

* USB Type-C
* Minimum: 5V 2A

### Warning

A weak or low-quality power adapter may cause:

* Coin acceptor resets
* Missed coins
* Display flickering
* Unstable operation

For best results, use a reliable 5V 2A (or higher) USB power adapter.

---

# Troubleshooting

### Coin Acceptor Keeps Restarting

Possible causes:

* Power adapter cannot provide 2A
* Poor USB cable
* Loose wiring

Try a better power adapter and cable.

---

### Coins Are Not Detected Correctly

Check:

* Coin acceptor is trained correctly
* Output mode is set to NO
* Signal Width is set to Medium
* Coin wire is connected to the correct MCU pin

---

### Some Coins Are Missed

Possible causes:

* Pulse values are too high
* Coins are inserted too quickly

Solution:

* Reduce pulse values
* Use Fast or Medium mode
* Allow enough time between coins
