After our meeting yesterday, I took the circuit home and changed one of the resistors to give us a larger gain. Previously, the circuit would only amplify our ~50mV signal to ~250mV (all of these values are peak to peak). We wanted our signal to have an amplified value less than (but close to) 5V. I was able to achieve a 2.5V signal, which the code seemed to be able to read without any issues. Here is our final circuit schematic:
And here is a picture of our final circuit
When we met today, we tested our circuit once again with the guitar and got the correct notes! It works! We spent the rest of our meeting working on our final instructable. Here is a video of the tuner in action.
Since our group has elected to use an audio jack as our input signal for our circuit instead of the microphone with built in amplifying circuit, we have had to revise the circuit schematic we will use. Here is our revised circuit schematic. In this schematic, the audio signal is put through an Op Amp to amplify the signal to 5V peak to peak, then a DC offset circuit so that the signal is centered around 2.5V instead of 0V.
Today our group took the code found in this instructable and amended it such that it would print the name of the note to our LCD screen instead of LEDs, and also removed the bits of code that told you if the note was too sharp or too flat. When we first tested this code with the input coming from the microphone, but it seemed like the code was not able to get a frequency from this input.
We tried again using the Analog Discovery WaveForms sine wave generator as the input, thinking that the code was having trouble with the amount of noise in the microphone. The code was able to discern a note from the generated sine wave, showing to us that it worked, but we needed a different audio input. Our group has decided to purchase a guitar jack so that we plug in the electric guitar straight into our circuit for minimal noise. We plan to meet again this Wednesday to see if the guitar jack will work.
Here is the code we used at today’s meeting:
We plan to further condense the code between now and the next meeting.
For our guitar tuner, our group elected to utilize an Elegoo Uno, an LCD screen, and a microphone amplifier with adjustable gain. The circuit diagram for our guitar tuner can be seen below.
The microphone we purchased has an Op Amp built in that we can manually adjust the gain to. The microphone will take in the sound played by a guitar, then output a voltage signal that the Elegoo reads and then associates with a fundamental frequency. After associating this signal with a fundamental frequency, the Elegoo associates the frequency with a string and outputs the name of the string on the LCD screen. Below is a picture of our circuit hooked up.