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

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: GPIO 22, 17.

  7. Set the Relay Active to HIGH.

  8. Hit Apply changes.

GPIO Reference

Coin / Relay Mapping

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.

Last updated