Mechanical Design, Machine Design

Here is the link to our group assignment: Week 12 Group Assignment — XIAO Vending Machine.
Our team designed and built a prototype vending machine that dispenses Seeed Studio XIAO development boards. A user taps an RFID card on the reader; the Wio Terminal checks the credit token and, if valid, drives two STS3215 serial-bus servos to open the column gate and release one board into the output chute.

My role in this project: idea generation, appearance design, servo programming & testing.
The sections below document my individual contribution for the group-assignment checklist.

Idea Generation

I took part in the early brainstorming sessions where we discussed what kind of machine would be useful in a makerspace. We wanted something practical, not just a demo.
I showed them the video of a example vending machine prototype:

The whole structure was too big, we decided to make a smaller one, a XIAO board vending machine — makers often need a dev board quickly, and a self-service dispenser could reduce waiting for staff help.
Together with the team, we defined the core requirements that guided the rest of the project:

  • Easy to use — tap-and-go interaction with an RFID card
  • Affordable — reuse makerspace parts and keep the BOM low
  • Durable — structure that survives repeated dispensing cycles
  • Compact — small enough for a desk or counter
  • Eye-catching — transparent case so users can see the products inside

From this we agreed on the end-to-end flow: card authentication → payment/credit check → servo gate → single-board dispense, with status shown on the Wio Terminal LCD. This concept became the baseline for mechanical layout, component choice, and firmware design.
More photos and the full team brainstorm are documented on the group assignment page (Idea Generation).

Appearance Design

I helped shape the look and physical layout of the machine so it would be clear, compact, and suitable for a makerspace.
We chose a column-based warehouse: XIAO boards stack vertically and drop out from the bottom when the gate opens. This keeps the footprint small and makes restocking straightforward.
appearance design
For the enclosure I pushed for a combination of:

  • Transparent acrylic panels — users can see remaining stock and the dispensing action
  • Transparent 3D-printed structural parts — modular joints and servo mounts
  • Metal columns — rigid support from the product column down to the output chute

I also considered how the machine should read from the outside: the RFID reader and Wio Terminal screen need to be visible and reachable, while wiring and servos stay inside the case. The transparent shell supports the “eye-catching” requirement from ideation and makes debugging easier during assembly.
The 3D-printed servo arm connects the STS3215 horn to the gate; I checked that the arm stroke matches the column latch so only one board is released per cycle. Manual push tests were done before connecting electronics to validate clearance and motion path.
See the Planning and Design and Servo + Warehouse Column sections on the group page for assembly photos and structure details.

Servo Program & Testing

I focused on the STS3215 serial-bus servos that control the dispensing gate. Two servos are daisy-chained on one UART line, which keeps wiring simple inside the enclosure.
My testing work included:

  • Assigning unique IDs (1 and 2) to each servo using the STS3215_change_id sketch
  • Verifying basic motion with the demo and multi-servo test sketches in code_servo
  • Tuning gate positions: HOME at 1024 and TRIGGER at 0, with timed forward/return delays so one XIAO drops reliably
  • Running SyncWritePosEx so both servos move together during dispense
  • Integrating servo motion with the Wio Terminal after RFID read succeeds (card block 4 contains the TRUE token)

In the final firmware, a successful RFID match runs two full dispense cycles (HOME → TRIGGER → HOME) to improve reliability. I tested this on the bench first, then inside the assembled case, and confirmed that the LCD status matches what the servos are doing.
The integrated test sketch and final vending firmware are in the group repository: vending_machine_final_code.
Demo videos and the full workflow (Button A init → card tap → dispense) are on the Final System Demonstration section of the group assignment.

Summary

For this group project I contributed at three stages: helping define the XIAO vending concept and requirements, shaping the transparent column-based enclosure, and bringing the STS3215 gate motion from standalone tests into the working RFID-triggered dispense loop. Other teammates handled RFID writer setup, Wio Terminal integration, mechanical fabrication, and final assembly — the full story is on the group assignment page.