Smart Vending Machine Retrofit

Smart Vending Machine Retrofit & Keypress Automation

 

Transform legacy vending machines into connected, touchscreen-driven retail kiosks using Executive bus emulation, modern MDB payment systems, and automated matrix keypress simulation

.
 

Overview

This configuration provides a complete modernization package for traditional vending machines, eliminating outdated coin slots, worn physical keypads, and obsolete coin mechs without replacing the core vending machine controller (VMC).

By mounting the compact panel PC enclosure directly onto the machine chassis or an adjacent kiosk pedestal, the system acts as an intelligent transaction master. It connects directly to the machine's native Executive (EXE) interface for credit and vend settlement, drives an independent MDB bus for modern payment hardware, and bridges a 10-relay matrix switcher to the machine's keyboard harness to simulate physical keypress selections automatically.

1. Executive Protocol Integration (EXECREDIT & EXEVENDAPP)

The GalaxyVend controller interfaces directly with the vending machine's internal Executive serial communication trunk, operating as an external payment master:

  • Simulated Credit Injection (EXECREDIT): Upon payment authorization, the host instructs the firmware to inject exact credit down to the machine via EXECREDIT(A,B,C,D), configuring scaled monetary values, multiplier factors, decimal formatting, and "No Change" indicators.
  • Deterministic Vend Authorization (EXEVENDAPP): The system initiates and guards the physical dispense cycle using EXEVENDAPP(timeout). Built-in watchdog timers monitor the mechanical delivery line to prevent credit forfeiture during drop jams.
  • Asynchronous Dispense Confirmation: The firmware listens directly to Executive status streams, capturing EXEVENDSUCCESS(X) when the machine completes a drop or EXEVENDFAIL(X) if a spiral or elevator fault occurs.
  • Machine Health Monitoring: Continuously queries machine readiness (EXEVMCACTIVE?), distinguishing instantly between operational status (EXEVMCACTIVE(1)) and out-of-order or service lockouts (EXEVMCACTIVE(0)).

2. Automated Matrix Keypress Simulator (KEYPRESS1 to KEYPRESS4)

Customers browse and purchase products directly on the high-definition touchscreen interface—the system translates their digital choice into physical machine keystrokes in real time:

  • Non-Invasive Keyboard Bridging: An integrated 10-relay switcher taps into the machine’s physical keypad ribbon cable, bridging column and row matrix pins without altering internal factory logic boards.
  • Multi-Digit Macro Execution: Automated routines simulate complex selection codes with millisecond precision:

    • KEYPRESS1(a1,a2,a3,a4): Bridges two matrix pins to enter single-button selections.
    • KEYPRESS2(a1..a7): Sequenced two-stroke macro for standard two-digit spiral codes (e.g., selection "24").
    • KEYPRESS3 & KEYPRESS4: Extended multi-step sequences for 3- and 4-digit product addresses on high-capacity spiral and locker machines.
  • Timing & Anti-Bounce Rules: Enforces minimum physical hold durations (minimum 500 ms) and configurable inter-stroke pauses to ensure the legacy machine's keyboard scanner registers each digit accurately.
  • Hardware Execution Confirmation: The module delivers real-time asynchronous tracking from stroke initiation (KEYPRESSSTART) through total relay release (KEYPRESSFINISHOK) before signaling the Executive vend cycle to proceed.

3. Unified MDB Payment Architecture

Retrofitting older machines often stalls because legacy controllers lack support for modern cashless readers. This terminal bypasses legacy limitations by hosting an independent MDB master bus:

  • Contactless EMV & Mobile Payments: Dual cashless channels (CSLS1 / CSLS2) support debit/credit cards, Apple Pay, Google Pay, and closed-loop campus/workplace cards.
  • Banknote Validation & Recyclers: Full MDB bill validator control supporting escrow staging (BILLESCROW), optical validation, non-volatile stacking counters, and multi-denomination note recyclers.
  • Multi-Tube Coin Changers: High-precision coin acceptance, tube inventory auditing (COINTBSTATUS?), and alternative payout change execution (COINAP).
  • RFID Staff & Loyalty Scanning: Front-panel RFID reader handles closed-loop corporate cards, customer balance checking, and instant balance revaluing.

4. Interactive Touchscreen Catalog & Cloud Telemetry

The front-facing panel PC replaces static product labels with an interactive digital storefront powered by reactive HTMX and B4J:

  • Rich Visual Storefront: Displays high-resolution product photography, detailed multilingual descriptions (EN, RO, DE, FR, IT, ES, BG), dietary/allergen badges, and real-time stock levels.
  • Scriptable Lua Workflow Engine: Complete transaction logic is handled via embedded Lua scripts (execute_stage). Operators can customize multi-item basket discounts, promotional pricing windows, or sequential dual-machine vends from a single terminal.
  • Fiscal Auditing & Real-Time Sync: Every transaction logs detailed audit records (CASHSALE, CARDSALE, amount_cents, selection_number) to local databases and streams telemetry via secure WebSockets to central ERP or route-management platforms.
  • Autonomous Maintenance Mode: Service technicians can toggle local maintenance modes directly at the machine to restock spirals, test motor rotations, and recalibrate sensors without disrupting database integrity.

Technical Specifications

  • Vending Bus Interface: Executive (EXE) Serial Protocol (Standard and Price-Holding modes).
  • Peripheral Bus Interface: MDB 4.2 multi-drop bus supporting Bill Validators, Coin Changers, and dual Cashless Readers.
  • Keypad Actuation: 10-channel low-resistance relay matrix simulator; minimum 500 ms hold pulse, programmable inter-key pause.
  • Host Interface: High-speed USB serial (115,200 baud, 8-N-1) or local/cloud MQTT communication.
  • Power Input: 12V / 24V DC industrial rail powered by internal switching supplies or tapped directly from machine power lines.
  • Chassis Construction: Impact-resistant, ventilated ABS housing designed for flush door mounting or side-pod attachment.

Key Applications

  • Legacy Snack & Cold Drink Retrofits: Equip reliable, mechanical spiral machines with touchscreens and card readers at a fraction of the cost of new equipment.
  • Multi-Machine Micro-Markets: Cluster multiple older vending machines around a single touchscreen terminal, centralizing payment and automating selection via keypress simulation.
  • Corporate Canteens & Closed-Loop Plants: Integrate employee RFID badges with legacy coffee and snack machines, supporting meal allowances and payroll deduction.
  • Specialty Automated Dispensing: Retrofit spiral machines to vend industrial PPE, workshop tooling, or medical consumables with strict user authentication and audit logging.