Help with oscilloscope and multimeter readings for guitar signal

Thread Starter

rpschultz

Joined Nov 23, 2022
808
I've got a Tek 2213 reading a signal from an acoustic guitar. As I read it, the vertical scale is 0.1 Volts/div. When I strike the note it's roughly 2 divisions and then it decays away for about 1 division total for a few seconds. So to me, that's max +/- 100 mV, with +/- 50 mV for a few seconds, right?

When I use my Fluke 87 on AC mode, I don't think it catches the strike because it generally reads about 60-70 mV on the strike, and then hangs out in the 10-30 mV range. I wonder if it's just reading the + portion and not the whole range. It definitely seems to ready 1/2 of the Tek.

What am I missing?

Ultimately I'm trying to understand maximum voltages on a variety of guitar pickups. The input of an esp32 microcontroller is 0-3.1v with a maximum of 3.3v. The tuner circuit I'm designing will have some amount of fixed gain. I think I'll need to use a zener diode to clip the signal to protect the micro from overvoltage.
 

Ian0

Joined Aug 7, 2020
13,097
Your Fluke meter will read true RMS, you are probably looking at the peak value on the ‘scope.
A guitar waveform will have a high crestfactor, which is the ratio of peak to RMS.
Does the scope also tell you the rms value (on the “measure” display)?
 

Thread Starter

rpschultz

Joined Nov 23, 2022
808
OK so I measure the guitar pickup directly on the Oscope, 250 mV peak-peak.

Then I stick it through my circuit which has a gain of 50x. I should get 12.5v p-p, but I don't. I get about 3v p-p. I'm measuring at the TUNE junction. I have changed R3 to 2k to create a gain of 51 with pot all the way up.
Any ideas why?
Schematic.png
 

Ian0

Joined Aug 7, 2020
13,097
OK so I measure the guitar pickup directly on the Oscope, 250 mV peak-peak.

Then I stick it through my circuit which has a gain of 50x. I should get 12.5v p-p, but I don't. I get about 3v p-p. I'm measuring at the TUNE junction. I have changed R3 to 2k to create a gain of 51 with pot all the way up.
Any ideas why?
View attachment 329835
Depends on the frequency of your test signal. The "tune" filter cuts off a 723Hz at 6dB/octave
What do you get at pin1 of IC1?
[EDIT] 3V p/p is about right for an LM358 on a 5V supply.
 

Thread Starter

rpschultz

Joined Nov 23, 2022
808
Oh, so Vcc limits the output. Is Vcc the limit of the output on a LM358? That might be one way to limit the voltage into the microcontroller. I'm trying to figure out a way to prevent more than 3.3v on the micro. I'm thinking of using a 1N5225 zener to limit the output the 3v.
 

Thread Starter

rpschultz

Joined Nov 23, 2022
808
Looks like a voltage divider. Do the Vf of D1 and D2 need to add up to U2?

I wondered if a 1N5225 (3V) zener for D2 would work by itself, without D1.
 

Papabravo

Joined Feb 24, 2006
22,058
You can eliminate D2 from the diagram above if there is little to no chance that voltages will go below GROUND.

Remember that diodes will add capacitive load. This might be a problem for edges that are supposed to be fast or inputs to an A/D converter. Most chips have internal protection diodes and all you really need to do is limit the current, which you can do by using a large R from the diagram above.

As always, check the data sheets for specific limitations in both voltage and current.
 
The LM358 is hopeless for audio and nowhere near rail to rail, especially at 5V supply voltage. Why are R1 and R2 different values? Surely you want the peak to peak to swing equally between the 2.5V midpoint? Mayne power with 12V and attenuate the output with a resistive potential divider?
 

Thread Starter

rpschultz

Joined Nov 23, 2022
808
ESP32 ADC input range is 0-3.1v. So the middle of that is 1.55v, which is why I chose 100k and 220k, should stick it right in the middle.

Turns out, the LM358 has a common mode input voltage of Vcc - 2v. In this case that's 3v on a 7805 5V regulator.
1724351216180.png

Here's a video I made. As I turn up the guitar volume the voltage never goes above 3v (with 0.5v divisions). This pickup can output 1.2v max with volume all the way up. The circuit applies 50x gain. But the LM358 limits the output to 3v.

https://youtube.com/shorts/kTe-ALyEs5c?feature=share
 
Last edited:

Thread Starter

rpschultz

Joined Nov 23, 2022
808
What would the advantage of a rail to rail be in this situation? The fact that the LM358 isn’t rail to rail seems to be an advantage to voltage protect the microcontroller.
I’m not an EE, Maybe there’s a better way to do it.
 

Ian0

Joined Aug 7, 2020
13,097
You need a rail-to-rail op-amp, like @MrChips says, and you need to run it from the same power supply as the micro. That way it can get to the maximum input voltage possible for the A/D without exceeding the inputs. My favourite op-amps for that situation are Microchip's MCP6061, MCP6071, MCP6021 etc.
Bias the input with two equal value resistors to keep it as near the centre as possible
 

MrChips

Joined Oct 2, 2009
34,626
This might be a silly question. Why are you feeding a guitar signal into an MCU?

If your MCU can only accept 3.3 V analog input signal, there are ways to do this.

1) Use a rail-to-rail op amp and run it from 3.3 V power supply.
2) If the analog signal exceeds 3.3 V, use a resistor voltage divider to attenuate the input signal to 3.3 V.
 

Thread Starter

rpschultz

Joined Nov 23, 2022
808
This might be a silly question. Why are you feeding a guitar signal into an MCU?
My partner and I are designing a guitar tuner using ESP32. The pitch detection algorithm used is from the Q Lib from Cycfi - it is very good and possibly the best open sourced one available. The video below shows a comparison with a commercial tuner and does pretty well. The numbers represent cents (1/100th of a semitone), anything within +/- 1 or 2 cents is very good. We are still tweaking some of the filtering parameters. The schematic for the circuit used is in Post #4. Ultimately we'd like to offer a DIY tuner kit for hobbyists.

Github Repository

 
Top