Why We Built This
A client came to us — an **IoT product development company** — needing a vending solution for high-value, oddly-shaped items. Think electronics components, artisanal tools, or curated subscription boxes. Standard vending machines couldn't handle mixed product sizes. And the payment integration? A nightmare of proprietary protocols and locked-down firmware.
We wanted something that:
- Works with modern payment systems (NFC, credit cards, mobile wallets)
- Lets you reconfigure locker sizes without rewiring
- Reports inventory and door status in real time
- Doesn't require a PhD in embedded systems to maintain
So we spec'd out a system around a Raspberry Pi 4 (4GB), a Nayax VPOS Touch, and a bank of solenoid-driven locker doors. Total BOM cost? Around $180 per 12-locker unit, not including the terminal.
Features
Payment agnostic. The Nayax VPOS handles Visa, Mastercard, Amex, Apple Pay, Google Pay, and even WeChat Pay. We talk to it over a simple serial UART connection — no proprietary SDK lock-in.
Modular locker architecture. Each locker door has a magnetic reed switch for status sensing and a 12V solenoid for release. We used a MCP23017 I/O expander over I2C to control 16 solenoids from a single Pi. Need more lockers? Add another expander.
Real-time dashboard. The Pi runs a Node-RED instance that publishes door status, transaction logs, and inventory levels over MQTT. We feed this into a Grafana dashboard hosted on a $5/month VPS. You can see exactly which locker is empty, which one just dispensed, and how much revenue came in today.
Fail-safe operation. If the Pi crashes mid-transaction, the Nayax terminal still records the payment. We log all events to a local SQLite database and sync to the cloud when the connection returns. No lost revenue.
Himanshu Dada