SmashPad

By Trenton Rochelle, Tien Tien, Christopher Lin

Overview

Our project will mimic a MIDI Drum Kit that will respond to a drum hit and output a sound chosen by the user. The kit will consist of 4 drum pads that sit on top of piezo force sensors connected to GPIO input pins of the microcontroller which reads the ADC from the sensors. Upon reading a “drum hit”, the LPC4088 will output one of the many preset sounds stored on the phone. The user has the ability to set the output sound of each drum pad. This is done through the combination of an LCD screen and a joystick+button. The user will use the joystick to first select which drum pad to program, then select the sound that is associated with the specific drum pad. The LCD screen will display a graphic that shows which drum pad is being selected, along with a sound list for the user to choose from when programming a sound.

Update: 3/17/2019

Project is now finished. We realized that animating the drum pads on the LCD screen was causing latency issues in the main drum pad thread. This essentially stopped us from playing multiple pads at once. After disabling the animation functionality, the pads became much more responsive and we're able to pay multiple sounds at once.

Update: 3/16/2019

Upon pad hit, the LPC4088 would send a duplicate character. I.e., it would send "aa" instead of "a". After experimenting with the ADC read loop we reworked the way we would trigger a drum pad hit. The idle loop will constantly check if the voltage of each drum pad is above a threshold. If it is, play the sound once, and set boolean logic that will stop any more event triggers until the drum pad voltage goes below a certain voltage.

Update: 3/14/2019

The UART-Speaker connection is fully operational. The LPC4088 will output a character (a-t) through UART to an android phone which is running a serial reading app. The app is preloaded with 20 sounds, and upon receiving a valid character, the app will play the sound corresponding to that character. If two pads are hit at once, the LPC4088 will send a string with both characters and the app will parse the string and play both sounds accordingly. Since the peripheral is a phone, we can also directly attach speakers to the phone to better enhance the sound output.

Update: 3/11/2019

We now have the ADC working with 4 channels that are constantly polled. The piezo sensors have a short voltage spike which is advantageous to us because now we can now treat a pad hit as a single discrete action instead of multiple discrete actions within one pad hit. We implemented the pads into the state machine so that we can trigger an event for each pad hit. For pure aesthetic reasons, a pad hit triggers an animation on the LCD screen which,for lack of a better phrase, is pretty cool.

Update: 3/7/2019

We have changed our project slightly so that there will be a physical link between the board and a phone so we can use the phone's speaker and memory system. We did this because reading sound files from USB, playing sound with I2S, and using multithreading to play multiple sounds at the same time, would be a whole project in its own and due to time crunch, we cannot proceed with that method.

At this point, we have the LCD fully working along with QP nano which allows us to have structured code with state machines. Additionally, the joystick is functional so that we can interact with the LCD. The Pad Selection menu is now fully functional with the caveat of only working standalone, but now a selected Pad can be selected for sound customization.

References: https://www.instructables.com/id/MIDI-Arduino-Drums/