Introduction: Musical Note Detector
Amaze your friends and family with this project that detects the note played by an instrument. This project will display the approximate frequency as well as the musical note played on an electronic keyboard, piano app or any other instrument.
For this project, the analog output from the sound module detector is sent to the A0 analog input of the Arduino Uno. The analog signal is sampled and quantized (digitized). Autocorrelation, weighting and tuning code is used to find fundamental frequency using the first 3 periods. The approximate fundamental frequency is then compared to frequencies in octaves 3, 4, and 5 range to determine the closest musical note frequency. Finally the guessed note for the closest frequency is printed to the screen.
Note: This instructable only focuses on how to build the project. For more information about the details and design justifications, please visit this link: More Information
- (1) Arduino Uno (or Genuino Uno)
- (1) DEVMO Microphone Sensor High Sensitivity Sound Detection Module Compatible
- (1) Solderless Breadboard
- (1) USB-A to B Cable
- Jumper wires
- Musical source (piano, keyboard or paino app with speakers)
- (1) Computer or laptop
Step 1: Construct the Hardware for the Musical Note Detector
Using an Arduino Uno, connection wires, a solderless breadboard and a DEVMO Microphone Sensor High Sensitivity Sound Detection Module (or similar) construct the circuit shown in this image
Step 2: Program the Musical Note Detector
In the Arduino IDE, add the following code.
Step 3: Setup the Musical Note Detector
Connect the Arduino Uno to the PC with the code written or loaded in the Arduino IDE. Compile and upload the code to the Arduino. Place the circuit close to the music source. Note: In the introduction video, I use an app installed on tablet in conjunction with PC speakers as my music source. Hit the reset button on the Arduino Board and then play a note on the music source. After a few seconds, the Musical Note Detector will display the note played and its frequency.