Operator & installer reference

Paylee Device
Operator Guide

Everything you need to install, commission, and maintain Paylee devices in the field — from first boot to firmware updates.

Firmware v1.0.0 · Hardware v1.2 · ESP32-C6
01 — Hardware

Device overview

The Paylee device is a compact PCB that mounts inside any coin-operated pool table. It runs on an ESP32-C6 microcontroller with WiFi, connects to your venue network, and reports every transaction to the cloud.

ℹ️
Hardware version 1.2

This guide covers hardware v1.2 (Vending Device 1.2). Earlier hardware revisions (1.0, 1.1) share the same commissioning and operation steps but differ in some connector positions. Refer to the PCB silkscreen for your board version.

Key components

ComponentDescriptionNotes
ESP32-C6Main microcontroller — 4MB flash, WiFi 2.4GHzDoes not support 5GHz networks
LP5813 RGB DriverI²C RGB LED driver — powers the player queue indicator LEDAddr 0x58–0x5B
FM25CL16B FRAM2KB non-volatile memory — stores dispense log across power cyclesUp to 511 dispense records
ADXL345Accelerometer — tamper/tilt detectionTriggers alert to dashboard on motion
Motor driverControls ball-dispense mechanism with current-sense stall detection5s safety timeout
Coin switchDetects physical coin insertion via interruptActive low, IO05
Battery monitor12V SLA battery voltage sense via ADC divider64-sample average per wake
02 — Pin Assignments

GPIO reference

All GPIO assignments for the ESP32-C6. Do not alter these connections — the firmware expects the exact mapping below.

Analog inputs
IO02VbattSnsBattery voltage ADC — 75/375 divider from 12V
IO03MtrIsnsMotor current sense — 0V=0A, 2.7V=5A
Digital inputs (interrupts)
IO04LastBallLast-ball switch — active low, 1s debounce
IO05CoinSwitchCoin insertion — active low interrupt
IO18AccelINT1ADXL345 motion interrupt — active low
IO20MtrPosMotor home position — active low falling edge
IO23OperateBtnUser dispense button — active low, wake source
I²C bus
IO06I2C SDAExternal pull-ups fitted — disable software pull-ups
IO07I2C SCL400kHz. LP5813, FRAM, ADXL345 on bus
Motor & LED outputs
IO19MtrDiagMotor driver enable + current sense enable
IO21MtrDrvMotor drive output — high to run
IO22RGBEnablePowers the LP5813 RGB driver IC

RJ45 external connector pinout

PinColourSignalDescription
1Orange/WhiteOperateBtnDispense button — connect to NO momentary switch, GND other side
2OrangeCoinSwitchCoin mechanism switch — active low on coin detect
3Green/WhiteLastBallLast-ball switch — active low when ball leaves dispense chute
4Blue12V+Regulated 12V supply from battery or mains adapter
5Blue/White12V+12V supply (parallel with pin 4)
6GreenMtrDrv OutMotor drive line to existing ball dispense mechanism
7Brown/WhiteGNDGround reference
8BrownGNDGround (parallel with pin 7)
03 — I²C Peripherals

On-board devices

Three I²C devices share the 400kHz bus on IO06/IO07. All have external pull-ups — do not enable software pull-ups in firmware.

DeviceAddressFunctionNotes
LP5813CDRRR0x58–0x5BRGB LED driver — player queue colour indicatorCommon anode: OUT0=Anode, OUT1=Green, OUT2=Red, OUT3=Blue. Low-current mode, Vout >4V for blue LED.
FM25CL16B0x50–0x572KB FRAM — non-volatile dispense logStores last 4 bytes of 511 dispense UUIDs. Survives power loss. No wear-levelling needed.
ADXL3450x1DAccelerometer — tilt and tamper detectionMotion interrupt on INT1 (IO18). Triggers critical alert to dashboard on tilt event.
04 — Installation

Installing the device

The Paylee PCB mounts inside the table's existing electronics bay. It connects to the existing coin mechanism and motor driver via the RJ45 connector.

⚠️
Disconnect power before installation

Ensure the pool table is disconnected from mains power and the 12V battery is disconnected before handling the PCB or making any wiring connections.

01

Mount the PCB

Secure the Paylee PCB in the table's electronics bay using the four M3 mounting holes. Ensure adequate clearance from metal surfaces — use the included nylon standoffs.

02

Connect the RJ45 cable

Route the RJ45 cable from the PCB connector to the table's coin mechanism and motor driver. Match the pinout in Section 02 above. Secure with the cable clip provided.

03

Connect the RGB LED

Mount the RGB LED in the provided bezel hole on the table's exterior. Connect the 4-pin JST connector to the RGB header on the PCB (labelled RGB OUT).

04

Connect the battery

Connect the 12V SLA battery using the supplied Anderson connector. Polarity is marked on the PCB — red (+), black (−). The battery should measure 12.4–12.8V before connecting.

05

Power on & verify

Apply mains power. The RGB LED will show a slow white breathe pattern for 3–5 seconds during boot, then enter commissioning mode (steady blue pulse) if this is a first boot. Proceed to Commissioning.

05 — Commissioning

First-time WiFi setup

New devices must be connected to the venue's WiFi network before they can report transactions. This is done via a captive portal on the device's own temporary WiFi network.

ℹ️
Re-entering commissioning mode

To re-commission an existing device (e.g. after a venue WiFi change), hold the OperateBtn for 5 seconds during boot. The LED will switch to steady blue pulse confirming commissioning mode is active.

01

Connect to the device's WiFi

On your phone or laptop, look for a WiFi network named VendingDevice-XXXXXX (last 6 chars of the device MAC). Connect using password: Setup123!

02

Open the captive portal

Your device should auto-redirect to the setup page. If not, open a browser and navigate to http://192.168.4.1

03

Enter WiFi credentials

Select your venue's 2.4GHz WiFi network from the list and enter the password. Optionally set a static IP if your network requires it. Note: 5GHz networks are not supported.

04

Set the API URL (if non-default)

The default API endpoint is pre-configured. Only change this if you're running a self-hosted Paylee instance. Leave blank to use the default.

05

Save & wait for reboot

Tap Save. The device reboots, joins the venue WiFi, and performs its first check-in. The RGB LED will turn off (no pending games) within 15 seconds if connection was successful.

06

Register the device in the dashboard

Log in to your Paylee operator dashboard, go to Devices → Add device, and enter the MAC address printed on the PCB label. Assign it to the correct venue and give it a name (e.g. "Table 1").

✅
Commissioning complete

Once the device appears as "Online" in your dashboard with a recent last-seen timestamp, commissioning is complete. The device is now ready to accept payments.

06 — LED Reference

What the colours mean

The RGB LED on the table exterior communicates device state to both players and staff. This is the complete reference for every LED pattern.

Player-facing states

Breathing (player colour)

A pending game is in the queue. The device is in sleep mode between check-ins. Colour matches the player's assigned queue colour.

Idle / sleeping

Solid (player colour)

This player's turn is now active. The dispense button is live — pressing it will release the balls. Colour matches the player's assigned queue colour.

Button is live

Fast pulse — white

A coin was just inserted. Device is processing the payment and dispensing immediately. Also shown while a card payment check-in is in progress.

Processing

Off

No pending games in the queue. The device is sleeping and will wake on the next check-in interval or when a payment is made.

No games queued

Staff & maintenance states

Slow breathe — white

OTA firmware update in progress. Do not disconnect power. The device will reboot automatically when complete. Takes 30–90 seconds.

Updating firmware

Slow pulse — blue

Device is in commissioning / setup mode. Connect to its WiFi network to configure. See Section 05 — Commissioning.

Awaiting setup

Fast pulse — player colour

LastBall switch warning: the dispense timeout is about to expire (5 seconds remaining). The balls will be marked as uncollected if the switch isn't triggered.

Timeout warning
07 — Normal Operation

Wake sources & behaviour

The device uses light sleep between events to conserve battery. It wakes automatically in response to these sources.

Wake sourceTriggerWhat happens
OperateBtnPlayer presses the dispense buttonIf a game is queued: LED shows solid colour → motor runs → balls dispense. If no game queued: checks in with server first, dispenses if a game appears.
CoinSwitchCoin inserted into slotLED pulses white → motor dispenses immediately → POST to cloud. No UUID returned — coin dispenses are fire-and-forget.
RTC TimerPeriodic timer (60s on-peak, 15 min off-peak)Posts check-in to cloud, receives updated game queue and sleep interval. No dispense occurs.
AccelTamperADXL345 detects motion/tiltClears interrupt, sends tamper fault to dashboard (critical alert). Does not affect game queue.
LastBallBall exits dispense chute (if enabled)Only active during an open dispense. Confirms consumption. Sent to cloud as consumed event.
💡
On-peak vs off-peak intervals

Check-in frequency is controlled by the server based on your venue's configured hours. On-peak (e.g. 08:00–20:00): every 60 seconds. Off-peak: every 15 minutes. This balances responsiveness with battery life.

08 — Battery & Charging

Battery guide

The device runs from a 12V sealed lead-acid (SLA) battery. At ~200μA sleep current, a 7Ah battery provides months of standby life.

Example: Battery at 72% 12.3V
11.6V — 0% 12.1V — 50% 12.6V — 100%
Charging

Voltage >12.8V. Shown as 100% + charging icon in dashboard. Mains power connected.

Low battery

Below 20%. Dashboard sends email alert to venue and operator. Recharge soon.

Critical

Below ~10% (11.7V). Device may stop checking in. Recharge immediately.

Charging procedure

01

Connect mains power

Plug the table's mains supply into a working outlet. The onboard charging circuit maintains the SLA battery automatically — no separate charger needed.

02

Monitor in dashboard

Battery percentage and charging status update every check-in cycle. When charging, the dashboard shows "Charging" next to the battery percentage.

03

Verify full charge

A full charge reads >12.8V (shown as 100% + charging). Typical charge time from flat is 12–16 hours on a 7Ah SLA battery.

⚡
Battery replacement

Replace the SLA battery every 3–4 years or if it can no longer hold charge. Use a 12V 7Ah sealed lead-acid battery (same footprint as standard alarm batteries). Dispose of old batteries at an approved recycling point.

09 — Dispense Flow

How a game is dispensed

Understanding the dispense sequence helps diagnose problems. Here's what happens from button press to balls dropping.

// Player presses OperateBtn
Wake from light sleep (~10ms)
    │
    ├── Queue in RAM has entries?
    │       │
    │       ├── YES → Show solid colour on RGB LED
    │       │         Run motor (watch MtrIsns for stall)
    │       │         Log UUID tail to FRAM
    │       │         POST /device/checkin/dispensed
    │       │         10s button lockout starts
    │       │         │
    │       │         └── product_ready enabled?
    │       │                 ├── YES → Wait for LastBall (1s debounce)
    │       │                 │         ├── Triggered → POST /consumed
    │       │                 │         └── Timeout   → POST /timeout
    │       │                 └── NO  → Hold colour → sleep
    │       │
    │       └── NO  → Pulse white LED
    │                 POST /device/checkin/
    │                 │
    │                 ├── Game in response → Dispense immediately
    │                 └── No game          → LED off → sleep
10 — Firmware Updates

Over-the-air updates

Firmware updates are pushed remotely from the operator dashboard. No physical access to the device is required.

When an update is available, the operator dashboard sends an ota_url field in the next check-in response. The device will:

  • Show a slow white breathe pattern on the LED (do not power off)
  • Download the firmware binary over HTTPS
  • Verify and flash to the alternate OTA partition (1.75MB slot)
  • Reboot into the new firmware automatically
  • Resume normal operation — check-in interval unchanged
⚡
Do not power off during an update

If power is lost mid-update, the device will revert to the previous firmware slot and retry on next connection. However, repeated interrupted updates can corrupt the OTA state — avoid interrupting if possible.

Update status and firmware version for each device are visible in the operator dashboard under Devices → Firmware.

11 — Troubleshooting

Common issues

Work through these before raising a support ticket. Most issues are WiFi or wiring related.

Device not appearing in dashboard / never goes online
  • Confirm the device has been registered in the dashboard with the correct MAC address (printed on PCB label)
  • Re-commission the device: hold OperateBtn 5s at boot, reconnect to VendingDevice-XXXXXX WiFi
  • Verify the venue WiFi is 2.4GHz — ESP32-C6 does not support 5GHz networks
  • Check WiFi signal strength at the table location — weak signal causes connection failures
  • If using static IP, verify the address is in the correct subnet and not conflicting
Coin inserted but LED doesn't respond and balls don't drop
  • Check the CoinSwitch wiring at the RJ45 connector — pins 2 and 7 (GND)
  • Verify the coin mechanism switch is closing correctly — use a multimeter in continuity mode across pins 2 and 7 of the RJ45 while inserting a coin
  • Check that the device is online in the dashboard (last seen within last 15 minutes)
  • Confirm the device is not marked as inactive in the dashboard
Motor runs but balls don't drop / motor stall alert
  • Check for physical obstruction in the ball dispense chute — clear any jammed balls
  • Verify MtrDrv wiring at the RJ45 connector (pin 6) and GND (pin 7 or 8)
  • Check motor current sense wiring (IO03 / MtrIsns) — incorrect calibration can cause false stall detection
  • The motor has a 5-second safety timeout and a 3A stall threshold — if consistently triggering, the mechanism may need lubrication
  • Dashboard will show a dispense_fault alert — resolve the mechanical issue then clear the alert
Dispense fault alert in dashboard
  • A motor stall or mechanical fault was detected — check the dispense chute for obstructions
  • A critical fault alert has been sent to dashboard — check Devices → Alerts
  • First dispense fault: game is re-queued and retried once automatically
  • Second consecutive fault on same game: game is marked permanent fault, players should be refunded manually via dashboard
Tilt / tamper alert in dashboard — table was not tampered
  • ADXL345 sensitivity may be too high for the installation environment — vibration from adjacent machinery can trigger it
  • Check that the PCB is secured firmly with all 4 standoffs — loose mounting causes vibration-induced false triggers
  • Resolve the alert in the dashboard — it will not repeat until another motion event is detected
  • Persistent false alerts: contact support for accelerometer sensitivity adjustment via OTA config update
Battery draining faster than expected
  • Verify mains power is connected and the charging circuit is working — check dashboard for charging status
  • High check-in frequency (on-peak mode) uses more power — verify on-peak hours are configured correctly in the venue settings
  • WiFi connection failures cause repeated retry loops which drain battery quickly — check for network issues
  • RGBEnable signal should not be latched on during sleep — if LED is always on, this indicates a firmware or wiring issue
  • Battery may be end-of-life (3–4 years typical) — replace with 12V 7Ah SLA
Card payment accepted but no game queued on device
  • Card payments go through Stripe/Square → cloud → device on next check-in (up to 60s delay on-peak)
  • Verify the webhook is configured correctly in Stripe/Square dashboard pointing to /api/tokens/webhook
  • Check dashboard Transactions to confirm the payment was received by the cloud
  • If payment appears in dashboard but no game on device: check device is online and check-in interval is reasonable
Quick Reference

At a glance

TaskAction
First-time WiFi setupConnect to VendingDevice-XXXXXX WiFi → http://192.168.4.1
Re-commission deviceHold OperateBtn 5 seconds during boot
Check battery %Dashboard → Devices → select device → Battery column
Push firmware updateDashboard → Devices → Firmware → select version → Push update
Set free game periodDashboard → Venues → select venue → Free game period
Add staff dispensesDashboard → Venues → Staff dispenses → set daily limit
Clear a fault alertDashboard → Devices → Alerts → Mark resolved
Export revenue reportDashboard → Reports → select date range → Export CSV
Default commissioning passwordsetup1234
Check-in interval (on-peak)60 seconds (configurable per venue)
Check-in interval (off-peak)15 minutes (configurable per venue)
Motor stall threshold>3A for >100ms
Dispense button lockout10 seconds after dispense (prevents double-press)
Dispense reservation window5 minutes — expired if device doesn't check in