
FPGA-Controlled Vending Machine
A fully functional FPGA-based vending machine with custom housing, servo-driven dispensing, and a VHDL finite-state machine for coin handling and item selection.
Tools/Technologies:
VHDL • Xilinx Vivado • Nexys 7 FPGA • Digilent Servo Driver • Fusion 360 • 3D Printing • Digital Logic Design • Servo Control
Date: Fall 2023
Overview
This project involved designing and building a fully functional vending machine using an FPGA as the central controller. The system accepted real coin inputs (nickel, dime, quarter), tracked virtual credit, validated purchases, dispensed items via servo-driven augers, and returned change.
The core functionality was implemented using a custom VHDL finite-state machine, clock dividers, display drivers, and servo control logic.
A fully custom housing and internal mechanical structure was modeled and fabricated to securely mount the electronics, servos, and vending channels.
The project was completed as a small engineering team, with each member specializing in different subsystems.
My Role
- Designed all mechanical components, including the external enclosure, internal mounts, motor brackets, and structural framing using Fusion 360.
- Modeled every 3D-printed part (PLA, ABS, PLA-CF) and handled iteration, fit checks, and assembly alignment.
- Contributed to logic design, including FSM architecture, transition logic, and signal routing.
- Assisted in debugging the top-level VHDL integration, verifying module connections and clock behavior.
- Supported mechanical/electrical integration: servo alignment, wiring layout, LED placement, and overall packaging.
For more info on the physical design of this project visit the CAD Portfolio Page
Technical Challenges
- Mechanical tolerances in 3D-printed components required tuning servo brackets, auger spacing, and frame joints to prevent binding or motor stalls.
- Synchronizing multiple clock domains (1 Hz FSM, 500 Hz display refresh) without glitches or metastability.
- Implementing realistic coin-handling logic, including blocking simultaneous inputs, overflow-to-change conversion, and invalid purchase protection.
- Ensuring consistent servo motion using an external driver to avoid FPGA pin overcurrent and timing jitter.
Key Design Decisions
- Modularized VHDL architecture (FSM, clock divider, motor, display) to simplify testing and debugging.
- Used 2020 aluminum extrusion for a rigid, easily reconfigurable internal frame.
- Selected PLA for external panels and ABS for internal components for heat resistance and electrical insulation.
- Chose a servo-driven auger mechanism for simple, inexpensive, and reliable dispensing.
Results / Outcomes
- Delivered a working vending machine capable of accepting coins, validating selections, dispensing items, and returning change.
- Validated reliable operation of the FSM, display module, and servo drivers after iterative debugging.
- Mechanical design proved robust and adaptable during mid-project changes.
- Improved skills in digital logic design, mechanical modeling, hardware integration, and teamwork.