Jan 2021 - May 2021
The inspiration for this project came from the humming sounds my Ender 3D printer made during its operation. I wondered, could you make music with these stepper motors?
At the same time, I was taking a university course in Digital Systems.
The system plays MIDI files using two stepper motors whose speed varies according the note being played. The speed changes the motor's resonant frequency, producing different tones.
Multiple Tracks - Two separate MIDI tracks can be played simultaneously
Song Selection - Can use switches to toggle between multiple songs to be played. Selected song is shown on a 7-segment display.
Song Replay - The current song can be replayed with a button, or automatically when the song ends
Playtime Display - Song time shown on a 7-segment display, shown in minutes and seconds
Digilent FPGA Board
NEMA-17 motors mounted on cardboard for acoustic purposes
Block Diagram for FPGA
The core hardware includes:
Digilent FPGA Board - This is the FPGA board that is configured for the digital design, including a fully-pipelined MIPS-based processor, stepper motor driver circuits (a state machine), clock dividers, and song memory.
NEMA-17 Stepper Motor - Typical off-the-shelf NEMA-17 stepper motors (4 wire).
Digilent PMOD Motor Driver PCB - Connects to the PMOD GPIO pins from the FPGA board, and has connectors to for external power supply to supply additional power to motor peripherals.
Stepper Motor Driver State Machine
We wrote custom assembly code that runs on the MIPS processor, designed/written in Verilog and implemented in the FPGA. We used branching instructions to “slow down” incrementing of line numbers to the correct speed for song.
Sample Assembly Code
Coming soon!