Face-Locked Chocolate Box

Face-Locked Chocolate Box

A unique open-source project commissioned to promote the Arduino UNO Q dual-processor board, featuring a 3D-printed, face-locked chocolate box that uses computer vision to grant access only to authorized individuals.

A unique open-source project commissioned to promote the Arduino UNO Q dual-processor board, featuring a 3D-printed, face-locked chocolate box that uses computer vision to grant access only to authorized individuals.

Project Type

Interactive Hardware & Embedded Systems

Interactive Hardware & Embedded Systems

Key Skills

Parametric CAD Design, Embedded Programming (C++ & Python), Rapid Prototyping, Edge AI & Machine Learning, Mechanical Engineering

Parametric CAD Design, Embedded Programming (C++ & Python), Rapid Prototyping, Edge AI & Machine Learning, Mechanical Engineering

Primary Tools

Autodesk Fusion 360, Arduino App Lab, Edge Impulse, FDM 3D printing, Arduino UNO Q, ArduCam IMX219 USB Camera Module

Autodesk Fusion 360, Arduino App Lab, Edge Impulse, FDM 3D printing, Arduino UNO Q, ArduCam IMX219 USB Camera Module

Project Overview

Commissioned by Arduino to showcase the capabilities of their new UNO Q board, this project is a playful interactive hardware demonstrator built around a face-locked chocolate box. Designed as a light-hearted pushback against technology's tendency to isolate, the build leverages the UNO Q's dual-processor architecture to run a local ML model and interface directly with physical hardware.

When a user presses the illuminated button, the Linux MPU executes a custom Python script using an Edge Impulse object detection model to scan their face, accumulating confidence scores to distinguish between a generic "face" and the "authorized person". If access is granted, it signals the Arduino MCU to actuate the servo and lift the lid open, accompanied by a success melody. Complete documentation and build files are available on the Arduino Project Hub.

Commissioned by Arduino to showcase the capabilities of their new UNO Q board, this project is a playful interactive hardware demonstrator built around a face-locked chocolate box. Designed as a light-hearted pushback against technology's tendency to isolate, the build leverages the UNO Q's dual-processor architecture to run a local ML model and interface directly with physical hardware.

When a user presses the illuminated button, the Linux MPU executes a custom Python script using an Edge Impulse object detection model to scan their face, accumulating confidence scores to distinguish between a generic "face" and the "authorized person". If access is granted, it signals the Arduino MCU to actuate the servo and lift the lid open, accompanied by a success melody. Complete documentation and build files are available on the Arduino Project Hub.

The Challenges

  • Designing for Open-Source Reproducibility: Because Arduino intended to release this as a tutorial for their maker community, the design could not rely on overly complex mechanisms or obscure parts. It had to be highly reliable but accessible enough for another person to build.

  • Aggressive Turnaround Timeline: The complete project; from initial concept and CAD through hardware integration, code development, and final physical validation, had to be delivered within a few weeks to meet a Valentine's Day release deadline.

  • Unpredictable AI Datasets: Since end-users would be training their own Edge Impulse models to control the box, there was a high likelihood of suboptimal datasets. The system needed a way to remain accurate and avoid false positives and negatives despite potentially weak user-generated training data.

  • Commissioned Product Aesthetic: As a piece of branded Arduino content intended to stand on its own as a desirable, giftable object, the build had to read as a finished product and not just a prototype. Achieving a clean, polished appearance using 3D-printed components and off-the-shelf electronics, without specialist manufacturing or surface finishing, was a core design challenge in its own right.

  • Designing for Open-Source Reproducibility: Because Arduino intended to release this as a tutorial for their maker community, the design could not rely on overly complex mechanisms or obscure parts. It had to be highly reliable but accessible enough for another person to build.

  • Aggressive Turnaround Timeline: The complete project; from initial concept and CAD through hardware integration, code development, and final physical validation, had to be delivered within a few weeks to meet a Valentine's Day release deadline.

  • Unpredictable AI Datasets: Since end-users would be training their own Edge Impulse models to control the box, there was a high likelihood of suboptimal datasets. The system needed a way to remain accurate and avoid false positives and negatives despite potentially weak user-generated training data.

  • Commissioned Product Aesthetic: As a piece of branded Arduino content intended to stand on its own as a desirable, giftable object, the build had to read as a finished product and not just a prototype. Achieving a clean, polished appearance using 3D-printed components and off-the-shelf electronics, without specialist manufacturing or surface finishing, was a core design challenge in its own right.

Solution and Process

Accessible Mechanical Engineering: To ensure the build was foolproof for the community, the 3D-printed enclosure was optimised for easy printing without complex supports. The servo-driven lid relies on a straightforward, reliable linkage system, and the chassis is designed for easy board access, simplifying maintenance and future upgrades.

Agile Fabrication & Validation: Meeting the tight deadline required a focused, streamlined approach to the design, code, and build process. By locking in the hardware footprint early, CAD modelling, 3D printing, and software integration could be developed in parallel, resulting in a fully validated prototype in just a few weeks.

Robust Scoring Logic: To compensate for potentially weak machine learning models trained by end-users, the code was engineered to evaluate video frames over a fixed two-second collection window. Rather than relying on a single frame, the system accumulates and compares confidence scores over time. This smoothing technique effectively filters out momentary false readings, significantly increasing the accuracy of the final access decision.

Design-Led Engineering: The heart-shaped enclosure was styled as a genuine chocolate box, with all electronics and wiring fully concealed within the chassis. A custom UV printed graphic was designed for the front face (though it can easily be applied as a vinyl decal as well), and hardware elements such as the camera lens and illuminated button were treated as intentional design features rather than exposed components. The result is a build that photographs and presents as a finished product, not just a prototype.

Accessible Mechanical Engineering: To ensure the build was foolproof for the community, the 3D-printed enclosure was optimised for easy printing without complex supports. The servo-driven lid relies on a straightforward, reliable linkage system, and the chassis is designed for easy board access, simplifying maintenance and future upgrades.

Agile Fabrication & Validation: Meeting the tight deadline required a focused, streamlined approach to the design, code, and build process. By locking in the hardware footprint early, CAD modelling, 3D printing, and software integration could be developed in parallel, resulting in a fully validated prototype in just a few weeks.

Robust Scoring Logic: To compensate for potentially weak machine learning models trained by end-users, the code was engineered to evaluate video frames over a fixed two-second collection window. Rather than relying on a single frame, the system accumulates and compares confidence scores over time. This smoothing technique effectively filters out momentary false readings, significantly increasing the accuracy of the final access decision.

Design-Led Engineering: The heart-shaped enclosure was styled as a genuine chocolate box, with all electronics and wiring fully concealed within the chassis. A custom UV printed graphic was designed for the front face (though it can easily be applied as a vinyl decal as well), and hardware elements such as the camera lens and illuminated button were treated as intentional design features rather than exposed components. The result is a build that photographs and presents as a finished product, not just a prototype.