Inspiration
All of our team members are musicians, and two of us play drums, so naturally rhythmic accuracy is important for our continued progression as musicians. We have toyed with this idea in the past, and we figured there was no better time to dive into this project.
What it does
Our project allows users to play set rhythms on a drum at a tempo they choose, and it will tell the user if their rhythms are early, in time, or late. The tempo is output audibly and visually.
How we built it
We started by attaching a piezo vibration sensor to the resonant head of a snare drum. This input is then sent to the base of an NPN transistor, so when the piezo sensor reads high enough, it will turn the transistor on, and send 5V to a digital pin on an Arduino. This signal is also sent through an LM358 with a 10x gain that feeds an indicator led that will tell visually display the beats played. The Arduino calculates the timing for the metronome and sends signals to a piezoelectric sensor and an led, to audibly and visually. We are measuring timing between when the metronome occurs and when the user plays on the drum and between each note played by the user to determine if they are starting with the metronome, and if their notes are consistent. These results are then displayed to a serial monitor.
Challenges we ran into
Timing. Our project is using a software pseudo-timer based on the millis() function in the Arduino IDE to calculate a metronome signal from built-in parameters. We ran into problems trying to anticipate when a user's input should occur for it to happen on a downbeat due to the delay of our system. Overcoming this problem took a large amount of our time, but after using extra software timers, we were able to solve this.
Accomplishments that we're proud of
We are proud of two things. First is the circuit we built almost on accident to convert the piezo sensor output to digital. Second is the ability to sync the metronome timing to what the user is playing to make the results accurate.
What we learned
We learned how hard clock timing is, and how hard programming real-time systems is when you need a hard deadline.
What's next for Practice Buddy
The biggest next step for this is to be able to program complex sequences of rhythms to allow a user to practice their timing for longer sequences of rhythms and compositions.
Built With
- c
- lm358
- piezo
Log in or sign up for Devpost to join the conversation.