Author: donaldmvenus

Design Changes For Guitar

Our group met again yesterday (as you can likely see from the video and images posted recently) and we finally were able to test our circuit using the guitar!

It should be noted that we were able to test our circuit design last week and verified that its actual behavior was very similar to the theoretical behavior we saw on multisim. A few pictures were posted earlier from this day, but to sum things up: We built our circuit, hooked it up to a function generator in the circuits lab room and hooked the output up to a speaker in order to see how we did.

One very important alteration to our circuit was the addition of another amplifier after the filter. Originally, we connected our speaker directly to the output of the filter, but this completely ruined the desired intent of the circuit. The output voltage essentially would never change in this configuration. We decided to try adding another amplifier (with a theoretical gain of 2) after the filter and connected the speaker to its output. This solved our issue successfully.

Our circuit actually seemed to work quite well in our testing. Using the oscilloscope, we determined our peak output occurred right around 110Hz as desired and our 3dB frequencies occurred around ~120Hz and ~105Hz. This was very similar to the theoretical bode plots we generated through multisim. Hooking it up to the speaker, we found that for a decent volume at 110Hz, the output became nearly inaudible at ~90Hz and ~130Hz. Since this two closest notes are at ~82.41Hz and 146.83Hz, we figured our circuit had accomplished the desired goal of isolating our single note. After testing with the guitar, however, we soon discovered this was not the case. Although this picture was included before, here is our setup from that day of testing:20170420_200056

Now, back to our meeting from yesterday. Yesterday we were able to test our circuit with an electric guitar to see if our filter worked as well for the frequency output of the string compared to a nice clean sine wave from the function generator. Our first problem was figuring out how to use the 4 pin jack we had purchased. The part came with no documentation whatsoever so it required a process of experimentation to determine which pin needed to be connected to ground and which pin was the output from the guitar. After trying all possible combinations, we were able to determine this. If anyone else is ever using a fender 4 pin guitar jack, the output is pin 2 and ground should be connected to pin 1.

After resolving this issue, we found that the output voltage from the guitar was way to small to be fed directly into our filter (we were getting no measurable output), we resolved this by adding an amplifier at the beginning of the circuit to amplify the signal enough to feed into the filter. After some experimentation, we settled on an amplifier with a theoretical gain of 3. This is accomplished by having an R2 that is ~2x that of R1 based on the figure below. We used R2 = 2.2k Ohms and R1 = 1k Ohms.

noninverting opamp

We then fed the output of this circuit into our filter and were able to get an audible output through the speaker! The only issue we had now was that essentially every string would play through the speaker. Confused, we tried using the analog discovery and found again that only right around 110Hz was audible as expected. Upon switching back to the guitar, again every string played through the speaker (although the higher strings were definitely quieter than the lower strings). We examined the signal being input from the guitar and found that it hardly resembled a sine wave at all. Due to this, our group concluded that our filter design although it works for clean sine waves, is quite ineffective for isolating the different strings of a guitar (due to the shape of the input waveform).

We may try implementing a 2nd order filter to see if it helps at our next meeting.

Lastly, here is what may be our final circuit design:

design-final

Advertisements

Theoretical Performance

The circuit design laid out in the previous post was designed on multisim and bode plots were generated in order to determine the performance of the circuit and see if it would suit the needs of our project.

The design is again shown below in the proper layout for testing. The measurement tool at the top of the design is a bode plotter which is built into multisim.

CircuitFirst

After running the bode plotter tool for this design the following plots were generated. The first plot is a phase plot while the second plot is the magnitude plot.

BodeFirstPhaseBodeFirst

As can be seen from the magnitude plot, the peak gain occurs just around 110Hz as desired for the note A. The 3dB points for the magnitude occurred at roughly 105Hz and 115Hz. Since the next two notes (E and D) occur at roughly 82Hz and 147Hz respectively, our circuit should theoretically be able to isolate our desired note to a good extent. The gain at both 82Hz and 147Hz was about 4dB while the gain at 110Hz was 20dB. The quality factor for the circuit is therefore 11.

After performing this analysis, a similar analysis was run on a second order filter of the same design. This involved essentially copying the first filter and feeding the output of the first into the input of the second. This circuit is shown below:

CircuitSecond

The bode plotter was then used to measure the new output. The phase plot and magnitude plots are both shown below:

BodeSecondPhaseBodeSecond

As can be seen in the magnitude graph, the peak appears much steeper than the first graph, as expected. However, upon further examination, it seems that a second order circuit of this type may not be as beneficial as anticipated. While the peak now has a gain of 40dB and the 3dB frequencies occurred at around 106 and 113Hz, the gain at the frequencies for the adjacent notes of E and D was now about 9dB. While this level of amplification is small compared to our desired frequency, it may make it harder to isolate the note we want. The quality factor for this circuit was 15.71 which is definitely greater than the quality factor of the first order filter.

Despite the slight increase in quality, Our team believes the single filter design will be sufficient for the purpose of this project. However, if necessary, this second order design will be revisited.

Preliminary Design

The note that we were assigned to filter was the note A with a frequency of 110 Hz. Therefore, our designed filter had to accept only this note and not the notes E (82.41 Hz) and D (146.83Hz). In addition, our filter likely needed to allow a little leeway around the 110Hz mark since the given guitar would likely not be perfectly in tune.

Initially, some research was conducted in order to find a more efficient band pass filter design than the basic two stage RC one explored in lab (EE 222). We found the following article provided from Texas Instruments that proved very helpful: http://www.ti.com/lit/an/sloa093/sloa093.pdf.

From this document, the following narrow band pass filter was designed for a frequency of 110Hz. The steps for the design are laid out clearly in the document linked above. Experimentation with this circuit would be necessary in order to determine if it fit our purpose and if it performed better than the two stage RC filter explored in lab. It is also possible that the filter would need to be repeated in order to get a good enough final filter quality for our purpose (excluding the adjacent notes).

To summarize the design process, the frequency of our calculations was set to 110 Hz. The capacitor values were then set to a common value such that the resistor values (which were tied directly to these values) would be reasonable given the resistors we currently had. This was accomplished with capacitors of 47nF each, making the largest resistor ~600k ohms. The final designed circuit is below.

Screenshot 2017-04-10 at 8.10.13 PM