> For the complete documentation index, see [llms.txt](https://docs.pikonek.com/pikonek/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pikonek.com/pikonek/guides/how-to-build-pikonek-wifi-vendo-with-coin-acceptor.md).

# How to build pikonek wifi vendo with coin acceptor

This guide will show you how to set up the coinslot on your raspberry pi.

### Requirements

* Raspberry Pi 4 or 3B+ with 16GB SD Card
* Universal Coin Acceptor
* 12V and 5V power supply
* USB-to-Ethernet Adapter
* Wifi router is set to Access Point Mode
* UTP Cables
* 330 ohms resistors(optional)
* 10K ohms resistors

### Diagram

![Figure 1. Raspberry Pi Wifi Vendo](/files/DsbOkQZhaxgQO7aYtt3L)

### Configure pikonek to use the coin acceptor

To configure pikonek to use the coin acceptor, follow these steps:

#### GPIO Settings

1. Set your coin acceptor to **NO**(Normally open) and **FAST** setting.
2. Go to **Services** > **Coin** **Slot** > **Coin** **Slot** **GPIO** **Settings**.
3. Provide the input PIN which is the coin(white wire). Note: Please use GPIO.BCM for mapping GPIO PIN. Please see the BCM reference image.
4. In the diagram above the input pin(coin) is set to **GPIO 2**.

   For coin pins, the following are supported. Please use **GPIO:**\
   **GPIO 2, 3.**
5. Check the **Enable Coin Slot Relay**. Coin Slot Relay is used to prevent users from crediting coins if they forget to click the Insert Coin button. Note: This is optional.
6. Provide the GPIO output PIN. In the diagram above the output pin is set to **GPIO 17**. GPIO that are working for this is the following:\
   &#x20;**GPIO 22, 17.**
7. Set the **Relay Active** to **HIGH**.
8. Hit **Apply** **changes**.

**GPIO Reference**

<figure><img src="/files/ow6cfgaI7FCwJOI2caTG" alt=""><figcaption></figcaption></figure>

#### Coin / Relay Mapping

<figure><img src="/files/4THMEFCZeHhhhiuu8Qge" alt=""><figcaption></figcaption></figure>

#### Coin Settings

1. Under **Coin** **Settings**, click the Add button.
2. To add a new coin, provide the following fields:

   1. **Currency** - Input your currency
   2. **Pulse** - Number of pulses for this currency
   3. **Time** - Equivalent time for this currency(1 minute or 1 hour)
   4. **Unit** - Specify the unit

#### Captive Portal Settings

1. Go to **Services** > **Captive** **Portal** > **General**
2. Under **Authentication**, check **Coinslot** to enable inserting a coin to authenticate to the internet.
3. Hit **Save**.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pikonek.com/pikonek/guides/how-to-build-pikonek-wifi-vendo-with-coin-acceptor.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
