Multi-Channel Timed Service Hub (relays)

Multi-Channel Timed Service Hub & Relay Expansion Controller

Autonomous multi-circuit time activation with MDB cash/card payments, hardware relay expansion, and live per-product countdown displays.

Overview

This configuration turns the terminal into a centralized, multi-appliance utility manager capable of driving up to 10 independent electrical circuits through dedicated hardware relay expansion modules.

Designed for multi-bay car washes, commercial laundromats, sports court lighting, and campground utility pedestals, the terminal combines full MDB payment acceptance with deterministic hardware timing. While the GalaxyVend micro-controller independently executes high-current relay switching and countdowns, the front-panel PC renders a live catalog interface featuring dynamic, per-product countdown clocks that update on the main screen in real time.

1. Multi-Relay Hardware Actuation (RELAY Command)

Timed switching is managed by dedicated hardware drivers rather than operating-system background loops, ensuring fail-safe execution:

  • Up to 10 Independent Relay Channels: Connects dedicated expansion boards to drive up to 10 heavy-duty output relays (or external contactors) across multiple service points.
  • Simultaneous Multi-Pin Triggering: Using the parameterized opcode RELAY(A1,A2,A3,A4,A5), the system can energize up to 4 distinct relay channels concurrently for a precise duration window ($A5$ in seconds), allowing combined pump, chemical dosing valve, and lighting controls in a single profile.
  • Hardware-Enforced Precision: Relay hold times are processed autonomously at the MCU firmware level. The controller acknowledges receipt instantly (RELAYOK) and dispatches an asynchronous RELAYOFF event the exact millisecond the countdown reaches zero.
  • Parameter Safety Validation: Built-in validation filters check relay addresses (channels 1–10), reject duplicate pin allocations within the same command vector, and enforce strictly positive durations before dispatching pulses to physical lines.

2. Live Per-Product Countdown Display on Main Screen

The kiosk front-end interface provides real-time status visibility across all attached equipment directly on the home grid:

  • Individual Grid Timers: When a product or service is purchased, the terminal transitions the channel into an active running state and immediately returns to the main catalog.
  • Visual MM:SS Countdown Badges: The product card on the main screen dynamically replaces its purchase and detail buttons with an animated clock badge displaying the remaining time formatted as MM:SS.
  • Channel-Busy Purchase Protection: While an individual channel's timer is counting down (ActiveRelayTimers), the purchase button remains locked and disabled, preventing accidental double-billing or overlapping activations on that machine.
  • Reactive HTMX Auto-Recovery: The panel PC constantly polls runtime status; the exact moment a channel's timer elapses, the countdown clears and the standard "Buy" button is automatically restored on the grid without requiring a page reload.

3. Comprehensive MDB Cash & Card Acceptance

Eliminate tokens and dedicated cashiers by centralizing automated payment across multiple appliances:

  • Contactless & EMV Card Payments: Instant card taps via dual MDB cashless readers (CSLS1VNDREQ / CSLS2VNDREQ) supporting credit/debit cards, Apple Pay, and Google Pay.
  • Banknote Validation & Recyclers: Banknote ingestion using MDB bill validators with escrow holding, tamper-lockout sensors, and optional change payout via note recyclers.
  • Coin Changers & Cash Change Return: Multi-tube coin changer integration computes inserted credit, accepts multiple coin denominations, and dispenses physical change (COINAP) up to configurable maximum limits.
  • Top-Up & Time Extension: Customers can insert cash or select a top-up option to extend active runtimes, with dynamic variable parsing calculating price-due thresholds automatically.

4. Dynamic Lua Workflows & Centralized Telemetry

Every service channel's pricing, timing, and operational parameters can be tailored via the built-in administration suite:

  • Lua-Scripted Product Logic: Define multi-tier pricing, progressive runtimes, promotional hours, and execution stages using embedded Lua scripts (execute_stage).
  • Multi-Appliance Bundling: Program single selections that sequence different relays—such as initiating a 10-minute washer cycle followed by an automatic chemical dispenser pulse.
  • Fiscal Auditing & Sales Logging: All activations, run durations, and payment types (CASHSALE, CARDSALE) are committed locally to database ledgers and streamed via WebSockets to remote management dashboards.
  • Multilingual UI Support: Touchscreen prompts, button labels, and operational messages adapt seamlessly across 7 built-in languages (EN, RO, DE, FR, IT, ES, BG).

Key Applications

  • Multi-Bay Self-Service Car Washes: Centralize cash/card payments at a single terminal to activate individual wash bays, vacuum stations, and tire inflators with independent time tracking.
  • Commercial Laundromat Hubs: Replace coin slides on banks of washers and dryers by triggering machine cycles through isolated relay channels.
  • Sports Facilities & Court Lighting: Automated pay-per-hour lighting control for tennis, squash, and padel courts, with live court availability shown on the main screen.
  • Campgrounds, RV Parks & Marinas: Timed distribution of shore power pedestals, freshwater pumps, and private shower facilities.
  • Shared Workshops & Industrial Facilities: Controlled activation of air compressors, dust extraction units, and pay-per-use machinery.