Muhammad Sufian

Home/Work/MarketVend vending platform

Cloud · Firmware

MarketVend vending platform

From the board on the machine to the payout in the owner's bank account, on one stack.

  • DA16200
  • AWS IoT
  • Stripe Connect
  • Next.js
MarketVend vending platform

The problem

Three hard problems sat behind a simple spec. The machine had to live in the field on 4 AA cells, so the Wi-Fi side could not stay awake. The customer experience had to be one QR scan and one tap in Stripe Checkout with the slot opening while the customer is still standing there. And the money had to flow as a marketplace: the platform takes its cut and the rest routes to the machine owner's account without the platform's servers ever seeing card data.

What I did

The machine firmware is custom C on the DA16200 with the application, TLS, MQTT and the slot drive all on one MCU, because every extra chip on the rail is current the cells do not have.

Four changes got the power path to target: a retention memory backed wake counter that survives deep sleep, cold boot gating on banner and init logs, removing the SDK's DPM timer call that was firing every second regardless of the requested period, and a 10 second listen interval set in the DPM NVRAM so AWS IoT presence holds while the sleep gap stretches.

On the cloud side the QR scan opens a Stripe Checkout session, the success webhook drops a command into DynamoDB with a 24 hour TTL and publishes to the machine's MQTT topic, and status comes back on the topic the dashboard watches. Every checkout carries transfer data routing funds to the owner's connected account with the platform fee on top. The Next.js console gives owners machine status, command history, slot configuration and inline Stripe onboarding.

Decisions that shaped it

  • DA16200 alone, no application MCU. Its deep power mode hits a battery life an ESP32 cannot on 4 AA cells.
  • Wake schedule in the DPM NVRAM, not in code. The right cadence should not need a flash to change.
  • Marketplace through Stripe Connect. The moment card data touches a server we own, the platform inherits PCI scope.
  • IoT endpoint cached per Lambda warm cycle instead of a describe call on every publish.

Result

Phase 1 on the bench with the power path holding the design target on 4 AA cells, continuing to the first deployed machines.

All 19 projects, with files.

Boards, firmware, RF and IoT backends. Every one has a case study and the design files on GitHub.

See all workGitHub