■odorici.sys

$ cat ~/work/magic-dice-game.md

project · mechatronics · 2025

Magic Dice Game

K-5 STEM kit teaching math and music

A dice-driven STEM kit that teaches arithmetic and musical pitch to K-5 students.

fig.01 · photograph
kind
project
course
ECE 3011 Junior Design, Georgia Tech
category
mechatronics
period
Jan 2025 - May 2025
status
completed
role
Display, UI and control flow; programming-electrical and electrical-mechanical coordinator
team
4 members

head -n 20 README

An interactive STEM kit for K-5 classrooms that teaches arithmetic and musical pitch through play, with game modes mapped to Georgia Milestone Standards.

A color-coded die is rolled into the box and the box reads it: a servo-driven wiper sweeps the die under a color sensor, the LCD shows the value and, in Math Mode, a random operation for the player to solve with the buttons. In Music Mode a melody plays twice, the second time with one note changed, and the player identifies the wrong note. The dice are coded by color and by shape so a color-blind child can still play. One hardware workaround: the ESP32-C6 could not drive the servo and the speaker PWM at the same time, so an Arduino Nano sweeps the servo when the ESP32 raises a handshake line. The hidden dice read is what keeps students watching. The arithmetic and the ear training are the lessons.

grep -n highlights

  1. 01Owned the display subsystem, the user interface design, and the overall code structure and control flow.
  2. 02Coordinated programming with electrical, and electrical with mechanical, on a four-person team.
  3. 03Wrote ESP32-C6 firmware in Arduino C++ with a menu-driven state flow across a UART LCD, color sensor, four polled buttons and a per-face sensor calibration mode.
  4. 04Solved a dual-PWM conflict by handing the servo sweep to an Arduino Nano triggered over a GPIO line from the ESP32.
  5. 05Designed two game modes against Georgia Milestone Standards: arithmetic on a dice roll, and identifying an altered note in a melody.

cat spec.toml

[mechanical]

  • -Laser-cut plywood enclosure with a felt-lined dice ramp and semi-circular settling area
  • -Wooden servo wiper arm pushes the die under a 3D-printed sensor holder
  • -Dice coded by color and by face shape for color-blind players

[electrical]

  • -Custom PCB as an ESP32 hat carrying the audio amplifier, with broken-out headers
  • -120 VAC to 5 VDC power delivery for the MCU and peripherals
  • -Arduino Nano co-processor sweeping the servo on a handshake from the ESP32-C6

[verification]

  • -Color-sensor accuracy: 92% against a >90% target
  • -Dice read time: 6-8 s against a <10 s target
  • -Draws 2 A at full load against a <5 A budget; 5 kg against a <10 kg target
  • -Bench-tested per subsystem, then end-to-end integration and repeated trials

ls ./media

fig.02The player side: speaker, LCD and the four buttons through the laser-cut panel.
fig.03The back panel, with the barrel jack for the 5 V supply.
fig.04Inside the enclosure: main PCB, color sensor and audio, wired up.
fig.05The servo wiper and the 3D-printed sensor holder over the settling area.
fig.06The custom PCB layout: ESP32-C6 hat with the audio amplifier and I/O broken out.
fig.07Top-level design: mechanical, electrical and software subsystems and how they connect.
■ 12 modules · 2 roles∿█