← Course overview
Week 12 of 12 · Finale

Frame, Calibration & Showcase

Put it all on one frame, recalibrate for real, and show what you built.

~6 hrs Build + demo

Concept Calibration is a process, not a one-off fix

Anything that changes the machine's physical geometry — a screw retightened, a part reprinted slightly differently, the sensor now sitting a few millimetres further from a Skittle than it did on the bench — can shift a homing offset or the numbers the classifier expects to see. That's not a sign of a bad design; it's just what happens when a system moves from a loose bench rig to a rigid final frame, and it's why calibration is treated here as a repeatable last step rather than a one-time setting.

Kit What you need this week

  • Frame material of your choice
  • Every subsystem built across the previous 11 weeks
  • A mixed bag of Skittles for the final trial

Build Step by step

Step 1

Plan the layout

Before cutting or bolting anything, sketch where each subsystem physically sits relative to the others, and how cables will route between them.

Step 2

Build the frame

Assemble your chosen frame (aluminium extrusion, plywood, or anything else rigid enough to hold alignment) and mount every subsystem, leaving screws slightly loose until final alignment is checked.

Step 3

Recheck homing

Re-verify both motors' homing once everything is rigidly mounted — offsets set on a loose bench rig often shift slightly once the frame is tightened down.

Step 4

Recalibrate the sensor

Re-scan a few known Skittles in their final mounted position and compare against your Week 8 centroids. If the readings have shifted meaningfully from the sensor's new position/distance, recollect a small amount of data and retrain.

Step 5

Run a full batch-sort trial

Pour a fresh mixed bag of Skittles through the hopper and launch 1 - Sort All from the LCD menu. Watch the state machine transition from indexing to sensing, steering, and discharging.

Step 6

Benchmark Sorting Throughput & Cycle Latency

Real systems engineers evaluate not just accuracy, but throughput velocity. Run the data science telemetry analyzer:

python3 batch_analytics.py

Time a full 55-candy retail bag ($45\text{g}$) with a stopwatch. Each candy takes approximately 1.45 seconds ($T_{\text{cycle}}$), delivering a sustained sorting rate of $\approx 42\text{ Skittles / minute}$:

Subsystem StageOperationLatency
1. Wheel IndexingRotate pocket $60^\circ$ into shroud320 ms
2. Opto SettleDamping vibration & NeoPixel illumination250 ms
3. AS7341 Acquisition8-channel optical integration180 ms
4. Chute SteeringRotate slide to target bucket ($0^\circ\dots180^\circ$)400 ms
5. Gravity DischargeEjection & slide descent300 ms
TOTAL CYCLEOne Skittle sorted end-to-end~1.45 s (42 cpm)
Speed vs. Accuracy Trade-Off: Discuss in your presentation why pushing steppers beyond 50 candies/min introduces mechanical inertia vibration and skips steps, making 40–42 candies/min the sweet spot for 99%+ sorting accuracy.
Step 7

Fix the single biggest issue

Pick whichever failure type is most common from your telemetry log, fix that one thing (e.g. slight chute friction or lighting shroud reflection), and retest.

Step 8

Write the retrospective & confusion matrix

Review the generated $5\times5$ confusion matrix from batch_analytics.py. Cover: what works, what doesn't yet, one specific failure and how you fixed it in your Engineering Log, and your final accuracy score.

Step 9

Rehearse, then demo

Run the whole thing once, start to finish, the day before if possible — it catches most surprises before they happen in front of an audience.

Make it yours
  • Measure throughput (Skittles sorted per minute) alongside accuracy — a slower, more reliable machine and a faster, less reliable one are both legitimate engineering trade-offs worth discussing in the demo.

If it breaks Troubleshooting

Accuracy drops right after frame assemblyExpected, not a failure — recalibrate as in step 4.
A screw keeps loosening during a sessionUse thread-lock, or a slightly larger screw, and note it as a fix for a future version.
Demo-day nervesA full rehearsal the day before is the single most effective fix for this.
This week's checkpointLive demo: the assembled machine sorts a mixed batch of Skittles into the correct buckets, backed by a short retrospective covering one real failure, its fix, and anything built differently from the reference machine.
Next week: Nothing — this is the final week. Well done.