Mechatronic Drum Set
This mechatronic drum set was designed and built as a part of a greater automated band for the final project of “Advanced Mechatronic Reactive Spaces”.
The goal was to create a musical ensemble that could play any MIDI format song, provided it was written for a standard rock band. This band included an acoustic drum set, electric piano, electric guitar, and bass guitar.
This MIDI song would be broadcasted in real-time to each of the instruments and performed by the ensemble live. Despite the decentralized control of the instruments, all parts of the ensemble had to be able to play in synchrony.
The MIDI file is fed into central computer which interprets the each note’s timing, duration, key, and velocity (see loudness) and divides the song by instrument. Each instrument’s part is then broadcasted via a 2.4 GHz WIFI signal on its own designated channel.
A dedicated MIDI signal receiving micro-controller receives this drum set signal which is then relayed via serial communication to a master ESP32 micro-controller, which along with two other ESP’s control the actuation of all nine sub-instruments which make up the drum set. The drum set consists of a floor tom, low tom, low-mid tom, bass drum, snare drum, ride cymbal, crash cymbal, cowbell, and hi-hat.
The master ESP reads the MIDI signal, further divides it, and sends it to the relevant micro-controller. The master ESP operates the pedal and stick of the Hi-hat, while the “drums” ESP controls the bass drum, floor tom, low tom, and low-mid tom, and the “cymbals” ESP controls the crash cymbal, ride cymbal, snare drum, and cowbell.
Each of these instruments are actuated by pulsing a 12V DC motor at corresponding inputs to rotate a drumstick and strike the correct instrument, with exception of the hi-hat pedal which is actuated by a 24V DC motor which pulls a tether connected to the pedal. Each of the drumsticks are spring-loaded to quickly reset each drum to prepare for a rapid subsequent note within 0.075 seconds.
The ESPs control their respective instruments by modulating the pulse width of signals sent from their output pins. These signals are first shifted up from the ESP’s 3.3V logic to 5V logic by a level shifter before being sent to the gate of a IRF630 MOSFET. This MOSFET controls the current flow between a 12 V power supply and motor at the drain and ground at the source (for the hi-hat pedal motor, the drain has a 24V power supply instead). This allows ESP to control the duty cycle of the motor and thus control the speed/loudness of the drum sticks hitting the various instruments. A custom PCB was developed to compactly package the necessary electronics of all nine instruments using this method of motor control.
In order to achieve synchrony with the rest of the ensemble, the drum set needs to play each note with a high degree of timing accuracy. The physically-actuated nature of this mechatronic drum set means that the time needed for the drumsticks to strike the drum (the “hit delay”) must be modeled for each instrument. Furthermore, since the velocity/loudness of the instrument is determined by the speed of the hit, these models needs to also scale with velocity.
Data-driven models were constructed to model the hit delay of each note depending on the specific instrument and loudness prior to actuation. These models allow the drum set to start swinging the drum stick prior to the intended hit, allowing to note the land on time accurately within 5 ms.