Built for UBC ELEC 391, this robot plays the keyboard using three parallel fingers. Each finger combines a lead-screw and brushed DC motor for lateral positioning and a solenoid for key strikes.
Three AS5048A magnetic encoders are read over SPI with DMA at 10 kHz. A Simulink-designed PID controller and sensor filter run at 1 kHz on an STM32F407. Song logic is stored as timed note tables in firmware, mapping notes and octaves to linear key positions across the keyboard.
The system homes on limit switches, accepts start/home/stop commands over UART, and runs three independent song state machines in parallel. MATLAB scripts support system identification, loop shaping, and auto-generated embedded control code. Demo repertoire includes songs like Mama Mia and Happy Birthday.