Get in touch

Home/Projects/Payment kiosk

Case study · In production · In development

A payment kiosk forbanknotes and coins

Paid entry through a turnstile or barrier, with no staff at a cash desk: the customer inserts money, the kiosk counts the credit and opens once the amount is reached. The Arduino version is installed at a client's site; the ESP32 version, with a graphic display and remote monitoring, is in development.

1 · 5 · 10 leibanknotes acceptedITL acceptor in pulse mode
10 · 50 banicoins accepted2-channel acceptor
30 sheartbeat sent over MQTTESP32 version
5 minuntil the credit resets when idleno-change version
The situation

Where we started

The need was simple: a paid entrance through a turnstile, with no cashier. The kiosk had to accept money, show how much had been paid and open by itself.

The fee differs from one location to another, so it is set in the configuration. The project grew over time: from an Arduino UNO board with a text display to an ESP32 version that reports every payment.

What we did

The solution

  • firmware that counts the acceptor pulses and adds up the credit;
  • a display showing in real time how much has been paid and how much is left;
  • automatic opening when the credit is sufficient, closing after a few seconds;
  • a no-change version, with credit kept for the next entry and a sensor that confirms the passage;
  • free entry with a token;
  • our own schematic and PCB in EasyEDA, with THT components.
How it works

From coin to open turnstile

The firmware keeps money in whole units (bani), not floating point, so no rounding errors appear.

Banknote or coininserted into the acceptor
Pulsescounted with a tolerance for each value
Credit on screenhow much has been paid and how much is left
Relayopens the turnstile for a few seconds
Reportingpayment and opening sent over MQTT (ESP32)

Arduino version In production

Installed at a client's site. Arduino UNO, text LCD, banknote and coin acceptors, relay.

  • configurable fee
  • takings report over serial
  • test commands that simulate banknotes and coins

ESP32 version In development

ESP32 with an animated graphic display and a link to a web monitoring platform.

  • a coin dropping into the slot, a credit bar, "turnstile open"
  • statistics screen: transactions, total, uptime
  • every payment and opening sent over MQTT
  • remote opening on command
  • automatic reconnection; also works without a network

The same base also accepts commands from a QR ticket reader or from a PC with card payment and receipt. Next comes the link to a fiscal module over the MDB protocol.

Problems solved

Small problems, fixed at the source

Weak signal from the acceptors

The pulses arrived at about 1.4 V, below the board's logic threshold. We removed the internal pull-up resistor and added an external 10 kΩ resistor to ground.

The small board's network

The network shield of the UNO version cannot do HTTPS, and the server redirected to HTTPS. We moved telemetry to MQTT, switched from interrupts to periodic polling, and used a fixed address instead of slow DHCP start-up.

Timing, memory and the relay

We fixed the timer counter overflow, reduced memory use on the UNO (which had reached ~88%) and used hardware to stop the bootloader from triggering the relay on restart.

Claude's role

What Claude did on the project

We develop the ESP32 version in numbered firmware versions, with targeted fixes in each work session with Claude. Hardware and software progress in parallel.

What Claude does

  • writes and fixes the code, in numbered versions
  • delivers the code as text, ready to upload to the board
  • works from written rules that keep the technical lessons from earlier sessions

What we do

  • mounting and wiring the acceptors and the relay
  • signal measurements and tests on the kiosk
  • the decisions and final verification

Test results on the kiosk lead to the next fix; no version goes into the field without a bench test.

Want cash payment at an entrance?

Tell us which turnstile or barrier you have and what money needs to be accepted. We start from the existing equipment.

Request an assessment →