Back to Weekly Assignments

Week 12:Mechanical Design, Machine Design

Assignments

Design a machine that includes mechanism+actuation+automation+function+user interface Build the mechanical parts and operate it manually Document the group project and your individual contribution

Individual assignments:Hardware selection search and evaluation, why WIO Terminal, servo and RFID are chosen for the project.

Group Work Assignment Reflection

Hardware selection: rationale

For my machine design project — a vending machine that dispenses Seeed Studio XIAO boards via RFID authentication — I selected three core components: Wio Terminal, STS3215 serial-bus servo, and RFID-RC522. The following evaluation explains why each was chosen based on performance, integration effort, and educational goals.

Central Controller:Wio Terminal

The Wio Terminal serves as the brain of the vending machine. It provides a built-in 2.4" LCD screen for status display, Grove connectors for sensor hookup, programmable buttons, and WiFi/BLE for connectivity.

Finished module / enclosure overview

Official guide: Seeed Studio — Wio Terminal Getting Started

1. Wio Terminal — central controller & HMI

Selection rationale

  • All-in-one form factor — Integrates an ATSAMD51P19 (120 MHz ARM Cortex-M4), 2.0″ LCD (320×240), five-way joystick, buzzer, light sensor, and IR emitter. No need to assemble a separate display and input peripherals.
  • Built-in I2C & UART — Directly connects to the RFID-RC522 (I2C) and the serial-bus servo (UART / half-duplex RS485).
  • Real-time user feedback — The LCD mirrors every step (“Card detected”, “Checking credit…”, “Dispensing…”, “Take your XIAO”). This matches Fab Academy’s emphasis on clear human-machine interfaces.
  • Single-cable programming — USB-C powers the board and uploads code (Arduino IDE / PlatformIO), simplifying debugging for a fast-paced weekly assignment.
  • Familiar ecosystem — Large community, extensive libraries for RFID and serial servos, and Seeed’s official support reduces unknown variables.

Evaluation against alternatives

  • Raspberry Pi (overkill, slower boot, higher power consumption) → not suitable for a deterministic embedded vending machine.
  • Arduino Uno + separate LCD (more wiring, less integrated, no native I2C for multiple devices) → adds failure points.

Why Wio Terminal Conclusion:

  • Built-in screen eliminates the need for a separate display module
  • Two Grove ports(I2C and UART) allow direct connection to the RFID reader and servo bus
  • Compact form factor fits inside the vending machine case
  • Programmable buttons can serve as manual overrides

2. RFID-RC522 — contactless authentication

Selection rationale

  • Non-destructive user interaction — Tapping a card is faster and more reliable than buttons or a keypad for a vending machine.
  • Pre-programmed credit token — The machine verifies a TRUE payload stored on the card’s block 1. No network, no database, no external power for the card — purely local and deterministic.
  • I2C mode — Works directly with Wio Terminal’s I2C bus (pin 2 SDA, pin 3 SCL). Only four wires (VCC, GND, SDA, SCL) instead of the SPI version’s six wires, saving I/O for future expansions.
  • Low cost (~$5) — Fits the budget of a student project and can be replaced easily during destructive testing.
  • 13.56 MHz passive operation — Reading distance (2–5 cm) naturally aligns with a vending machine’s “tap here” area, preventing accidental triggers.

Evaluation against alternatives

  • Magnetic stripe reader (moving parts, wear, more complex decoding) → overkill.
  • NFC with smartphone (requires app development, pairing overhead) → exceeds scope.
  • Barcode scanner (line-of-sight required, printing cards needed) → less elegant for a “credit token” metaphor.

Conclusion: RFID provides a robust, low-power, contactless authentication method that aligns perfectly with the vending machine’s physical and logical requirements.

3. Moving parts:STS3215 Serial Bus Servo

The STS3215 servo is a serial bus servo that can be daisy-chained on a single communication line. This dramatically simplifies wiring — instead of one signal wire per servo, all servos share one serial bus controlled by the Wio Terminal.

Selection rationale

  • STS3215 Servo — Two servos share a single UART line (half-duplex, daisy-chain capable). Compared to standard PWM servos, which would need two separate PWM pins and offer no feedback.
  • Position feedback — The servo reports its current angle, current draw, and temperature. This allows the Wio Terminal to confirm that the gate fully opened (e.g., reached 90°) and fully closed (0°) before allowing the next transaction.
  • Adjustable speed & torque — Can slow down the gate motion to avoid jamming the XIAO board as it falls. Torque (3.5 kg·cm @ 7.4 V) is sufficient for a lightweight acrylic gate.
  • Repeatability — Serial protocol eliminates the jitter and drift common with analog PWM servos, ensuring the gate returns to the exact closed position every cycle.
  • Educational value — Introduces STS3215 servo programming (e.g., sending 8-byte packets: sync, ID, command, data). This aligns with Fab Academy’s goal of teaching modern industrial protocols, not just hobbyist PWM.

Evaluation against alternatives

  • Standard SG90 / MG995 (PWM, no feedback, prone to drift) → unreliable for unattended vending.
  • Stepper motor (needs driver, heavy, over-torque may crush the board) → mismatched to a low-inertia gate.
  • Solenoid (binary on/off, cannot control speed, loud) → poor user experience.

Conclusion: STS3215 offers control, feedback, and reliability beyond basic hobby servos, while still being affordable (~$12–15). It makes the vending machine behave like a professional prototype.

Summary — selection evaluation

Component Key feature Why chosen over alternative
Wio Terminal Integrated LCD + I2C + UART One board solves display, input, and communication. No wiring spaghetti.
RFID-RC522 I2C contactless token Local credit verification, simple tap gesture, 4-wire connection.
STS3215 servo Serial bus + position feedback Confirms gate open/close, single-cable daisy chain, adjustable speed.

Group assignment reflection: vending machine for XIAO boards

Our team designed, prototyped, and tested an end-to-end vending machine for Seeed Studio XIAO series development boards. The full pipeline:

Ideation — We observed that Fab Labs often store small dev boards in bins, leading to miscounts and lost inventory. A self-service vending machine with RFID credit tokens solves both access control and inventory tracking.

Planning

  • Mechanical: Laser-cut acrylic hopper columns (one per XIAO variant), a rotating gate actuated by the servo, and a slanted output chute.
  • Electronic: Wio Terminal (brain), RFID-RC522 (authenticator), two STS3215 servos (gate open/close).
  • Firmware: State machine — IDLE → CARD_DETECTED → VERIFY_TOKEN → (TRUE) → DISPENSE → RETURN_TO_IDLE, with LCD updates at each state.
  • Component selection (as justified above) — Each part was chosen to minimize wiring, maximize feedback, and ensure deterministic behavior.

Prototype testing

  • Test 1: RFID read success rate → 100% at 2 cm distance.
  • Test 2: Token verification → False cards (random UID, wrong payload) rejected; TRUE payload triggered servo motion.
  • Test 3: Gate actuation → Serial servo moved from 0° to 90° in 0.5 seconds, held for 1 s (board drops), returned to 0°. Position feedback confirmed full closure.
  • Test 4: End-to-end latency → < 1.5 seconds from card tap to board in chute.

Outcome — The machine successfully dispensed a XIAO RP2040 board on a valid RFID tap and ignored five invalid cards. The LCD showed “VERIFIED – DISPENSING” and “TAKE YOUR BOARD”. No mechanical jams occurred over 50 cycles.

Key learning from group work

  • Serial-bus servos are vastly easier to synchronize than PWM servos. We sent a single MOVE_SERVOS broadcast packet to open both gates simultaneously.
  • I2C bus with RFID requires correct pull-up resistors (we added 4.7 kΩ externally to Wio Terminal’s internal weak pull-ups).
  • Always debounce the RFID card presence — reading the same card multiple times in 100 ms caused duplicate dispensing in early tests. Fixed by adding a 2-second cooldown after a successful dispense.

Video

RFID+Wio
Servo + RFID + Wio Termina