Measuring frequency attenuation

Started by Sleipnir, September 18, 2014, 09:09:57 PM

Previous topic - Next topic

Sleipnir

Howdy,

I am not sure if this is the proper section to post my questions in as they do not relate directly to a DIY pedal build, so please let me know if I should choose a different area.

In the past I have paid little attention to what happens to the guitar signal as it goes through cables, patch cords and pedals. I know many claim you lose high end with excessive cables due to capacitance. Since I play at home only as a hobby, I haven't traditionally used very long cables. Anyway, I do now have a bunch of (12!) true bypass pedals connected together, so the total length of cabling and number of jacks/switches has crept up, and the other day when I did an A/B test of the guitar straight into the amp vs. going through two cables and all the pedals (all bypassed) and patch cords, I noticed that there indeed was a difference. The sound was clearer going right into the amp, which I assume means some high frequency attenuation is indeed happening even with all the pedals connected in true bypass mode. I did a second A/B test where I hooked up all the pedals into the loop of a loop pedal, so that when bypassed, the guitar signal only went through the loop pedal in bypass mode. Since I could then essentially do a blind A/B test, I confirmed that I was not just imagining things. I should note that I do have a switchable buffer on one pedal and using it does help. However, I figured I would take this as an opportunity to use my oscilloscope for the first time and measure what I was hearing. Or so I thought.

My approach was to use two setups. In setup #1, I connected a signal generator to the one end of an 8ft guitar cable and also connected channel 1 of the oscilloscope at the same location. The other end was plugged into my Super Reverb which was on and connected to a dummy load. I connected channel 2 of the oscilloscope to the cable right at the input jack of the amp. Thus, I could measure the signal before going into the cable and right before entering the amp and compare the two.

In setup #2 I connected a signal generator to the one end of a 7ft guitar cable along with channel 1 of the scope. The other end was plugged into the first pedal. The same 8ft cable used in setup #1 was then connected to the last pedal and into the amp, and again I connected channel 2 of the scope at the input jack of the amp. Thus, I could measure the signal before going into all the cables and pedals, and compare it to the signal right at the input of the amp.

For each of the two setups, I took measurements from both channels at frequencies of 100Hz, 500Hz, 1KHz, 1.5KHz...and at 0.5KHz intervals up to 10KHz. I was expecting that the voltage readings (RMS) on channel 2 (at amp) would be lower than on channel 1 (at signal generator) for each set of frequencies in both setups, but that the delta between the voltages on the two channels would be higher in setup #2 than in setup #1, at least at higher frequencies. This would validate that I was hearing attenuation at high frequencies with all pedals connected (setup #2) since the sound is slightly duller. I can control my scope (Rigol DS1102E) from my laptop, so I saved all the measurements into Excel files.

I calculated the differences between the channel 1 and channel 2 voltage (RMS) readings for setup #1 for each set of frequencies and then did the same for setup #2. I then divided the voltage difference by the channel 1 reading for each frequency to calculate a percentage decrease across the frequency range for each setup. The results appear to be the exact opposite of what I was expecting to see:



As you can see in the chart, the measured voltage at the input of the amp was lower relative to the voltage at the signal generator in setup #1 as compared to the voltage differences between the same locations in setup #2. Wouldn't that suggest that there is LESS attenuation in setup #2 with all the pedals connected? That does not seem to make sense to me. Since the same 8ft guitar cable was used in both setups, that can be ruled out as causing a problem. However, I am wondering about a couple of things:

1) Is my approach a sound one? I am still learning about electronics, so I did what I thought made sense to me, and I realize that my logic here might not be proper

2) My signal generator has an output impedance of 600 Ohms. I realize this will be different than the output impedance of a guitar. Is this an issue? Could this be the reason for the seemingly strange results?

I know this was a looong post, but I do hope some of you read through it and could provide some guidance and insight!

Thanks!


amptramp

The typical guitar has an output impedance of about 8000 ohms in series with 4 henries of inductance going into a cable of several hundred pF.  But if the gain control on the guitar is set to less than full volume, the resistive part of the impedance can go up substantially.  If you can switch bridge, neck and mid inputs, this complicates matters further.  600 ohms can drive most cables with little loss.  There is a reason some people build boosters (gain > 1) and buffers (gain ~ 1) with low output impedance right into the guitar.  The losses in percent of signal that you have shown are optimistic for the typical load resistance since there is an effect from the input impedance of the amplifier and the effects that are switched on.

It is possible to get the schematic of the guitar and determine the amount of resistance and inductance and simulate the effect of volume and tone control pots on the guitar and the effect of the input impedance of the various effects and the amp in SPICE to determine what the actual response would be predicted to be.

PRR

Lot of words.

{EDIT} That Tramp types faster than me.

Your approach *seems* valid.

One refinement that may be necessary--- if you come out of a strong signal generator, it will over-power any cable capacitance. The reality is that your guitar has a large and non-simple output impedance, and won't drive heavy loads well. At a minimum, I would want to try with 5K to 50K of resistance between signal generator and cable. 50K into 40 feet of cable should show a clear 2.8KHz roll-off (70% output, 30% loss, 3dB down, at 2.8KHz; 45% output 7dB down at 5.6KHz).

The midband loss 5K-7K, with less loss above, DOES seem quite odd.

How repeatable is the setup? If you try A then B then B then break for tea and try A again, do you get the same results each time? Connectors have variable loss depending how you insert them versus the tarnish on the contacts.

Your presentation is non-traditional. While 6% off looks large on your paycheck or grocery bill, a 6% voltage loss is very nearly inaudible.

In audio we "usually" plot Loss as going down. And "usually" scale it in dB, so that each line on the graph is a near-equal change to the ear. Likewise we often scale Frequency in Octaves, because 5KHz really is a very high tone which should fall near the right side of the graph. (However linear frequency is often done, and easier.)

I read this as 0.1dB down 100Hz-1KHz, 0.2dB down 1KHz-7KHz, 0.33dB down 7KHz-10KHz.

We "can" hear half-dB changes but it is elusive.

I'd say the 0.1dB variation from 100Hz-7KHz (a wide guitar band) is uttlerly inaudible.

A long chain of slightly tarnished jacks/plugs *will* "mess up" audio because each tarnished contact adds a small amount of intermodulation distortion, and multiple such small intermods will intermodulate each other to put a "haze" over the whole audio band.


Excel formula for computing dB from voltage:


B2..B5 are just to check my math with dBs which I know. B7..B10 show typical to significant voltage loss for small audio interconnects. Format for one digit after the decimal point... numbers like -1.234567dB are pointless and confusing, -1.2dB is ample and easy to read/compare.
  • SUPPORTER

Sleipnir

Thanks to both of you for your responses, I really appreciate it

Although I realize it won't be the same as a guitar pickup, I will do some retesting using the approach suggested by PRR. I don't have any 50k resistors lying around, but I tried two 100Ks in parallel but got a bit of a noisy/unstable signal. I found a 22k resistor that seemed to give a cleaner signal, so I will use that between the red lead of the signal generator and the tip of the guitar cable. Just out of curiosity, with nothing connected to the signal generator other than the resistor and the scope, should I not see a difference in the resulting signal when measured before vs. after the resistor? The signal seemed identical to me.

I also noticed that the two channels of my scope measured slightly different voltages (~41mV vs 42mV) at the same location, but when I swapped the probe jacks from one input to the other at the scope, everything looked good. I don't know how to explain that, but it makes me lose further confidence in my previous test results.




PRR

> .....see a difference in the resulting signal when measured before vs. after the resistor? The signal seemed identical to me.

Do math.

NOTHING loading the 22K except cable and 'scope.

We need to know the 'scope input impedance. I will assume 1Meg (1,000K). 10Meg is also possible.

First the simple DC case.

22K loaded with 1meg maths-out as 1000K/(22K+1000K) which is 0.978 or 2% loss. This could be hard to see.

The cable can be approximated as 30pFd per foot. Assume 8 feet: 240pFd. It is useful to know the formula for capacitive reactance. Look it up.... it is ingrained in my calculator finger and I don't think I can type it. 240pFd will be 22K impedance at 30,158Hz. Because of phase-shift, the loss will really be -3dB (0.707) at 30KHz. To a good approximation, -1dB (0.9) an octave down, 15KHz. So in the audio band, 8 feet of cable on a 22K source is "nearly no loss".
  • SUPPORTER

Sleipnir

Thanks PRR.

I think I am starting to get it better now - I spent some time going back to my basic electronics book and reading your posts a few times

Capacitive reactance Xc = 1/(2*pi*f*C). The resistor and cable capacitance form an RC low pass filter, total impedance is Z = SQRT(R^2 + Xc^2)

Assuming 25ft of cable and patch cords at 30pF/ft --> C = 750pF.

The cutoff frequency where Xc = R --> fc = 1/(2*pi*C*R) which results in a 3dB loss.

With R=50k, fc=4,244Hz
With R=22k, fc=9,646Hz
With R=10k, fc=21,221Hz

For any given frequency, the loss can be calculated:

Attenuation = 20log(Xc/Z)

For f=1,000 with R=22k, attenuation ~0.05dB (not audible)
For f=5,000 with R=22k, attenuation ~1dB (possibly audible?)
For f=9,646 with R=22k, attenuation ~3dB (same as cutoff frequency calculated above and should be audible, although the frequency is a bit high?)

For f=1,000 with R=50k, attenuation ~0.23dB (not audible)
For f=5,000 with R=50k, attenuation ~3.78dB (should be audible?)

What's becoming obvious is how dependent the attenuation I can expect to find depends on the R value and not just the frequency. Since the R value in turn is supposed to help get the signal generator to more closely represent the guitar output impedance, and since the guitar's impedance varies with frequency, selecting a single R value and calculating and/or measuring attenuation over several frequencies might not make sense?

Assuming the output impedance of the guitar does vary between 5k-50k, I guess to improve the test further, measurements should be made across a frequency range several times, each time a different R value? I am not saying I will do that given how long that might take me, and this might turn thus into a theoretical exercise, but am I right in concluding this?

Thoughts?

ashcat_lt

Why not just use the pickup?  You should be able to get reasonable results by running series through the jack in the guitar, but if you had a spare pickup laying around, or wanted to take the guitar apart, it would be about as close as you can get to the real thing.

PRR

> selecting a single R value and calculating and/or measuring attenuation over several frequencies might not make sense?

True, especially since a guitar pickup is inductive which puts a third slant on things.

But picking a non-Zero (or more than 600r) source resistance will alert you to loading effects. If you find a droop,

> With R=50k, fc=4,244Hz
> With R=22k, fc=9,646Hz
> With R=10k, fc=21,221Hz


AND with R=600r, fc=353 KHz.

And with 8 feet or 100 feet cable you will get different numbers.

Using an *approximate* right ballpark source impedance, you are less likely to fall into an ideal assumption which may not happen in a real world.

However if you put a good buffer AT the guitar, then you really are at the ~~600r condition and can expect any non-stadium cable to be negligible loss over the guitar band.

You want to distinguish three cases: "doesn't matter", "hurts significantly", and "may or may not be suitable, more thought needed".

Say a TL072 opamp with 220 ohm resistor between opamp and cable. Output is about 230 Ohms and this can drive over 1,000 feet cable to 20KHz. No further thought about frequency response is needed. (There will be some resistance loss, but the guy at the far end of the 1/4 mile cord can turn-up a half notch and cover that.) (There is likely to be some hum and buzz pickup, which may need further thought.) (You may not need 1,000 feet, or be real fussy if you do find yourself in the SuperDome, so it really does not matter.)

As Ashcat says, you can run signal *through* the guitar for an "exact" simulation. Main problem is that you tend to get excess noise (much hum, perhaps buzz). Other obvious problems are that you may run the guitar at many different Vol knob settings, and you may have many guitars, not identical.

That's why you want to be open to yes, no, and maybe answers, then work to change the Maybes to Yeses.
  • SUPPORTER

Sleipnir

In order to make the test easier and perhaps more consistent, I hooked up a true bypass loop pedal. Basically, the signal generator goes into the loop pedal. The output goes into an 8ft cable that goes to the amp. In bypass mode of the loop pedal, this thus simulates plugging the guitar into an 8ft cable right into the amp. In the loop are all of the effects including a 7ft cable with typically would go from the last effect into the amp. Thus, when the loop is on, I have the 8ft and 7ft cables as well as all of the patch cords and pedals included. With the tap of a switch, I can go between signal right into amp or through all effects. This eliminates the need to move probes around and thus hopefully would add some level of consistency when measuring.

I started off by connecting a 50k resistor between the red (positive) lead of the signal generator and the positive of the input to the loop pedal (I soldered up a cable with a jack in one end to plug into the pedal and bare leads in the other end to make the connections as sound as possible). Here are some screen shots:

Channel 1 connected at the input of the loop pedal (i.e. after the 50k resistor). Channel 2 is connected right at the input of the amp - EFFECTS LOOP IS OFF


Channel 1 connected at the input of the loop pedal (i.e. after the 50k resistor). Channel 2 is connected right at the input of the amp - EFFECTS LOOP IS ON


Looking at Ch2, there appears to be 20*log(22.9/34.9) = -3.7dB loss at this ~3KHz frequency when comparing the Vrms from the two screenshots.

What makes no sense to me though is why is there attenuation at the input of the loop pedal when I turn the loop switch on? As you can see, the Ch1 readings are pretty much the same as Ch2?

If I connect Ch1 between the signal generator and the 50k resistor, I get the following results:

Channel 1 connected BEFORE the 50k resistor. Channel 2 is connected right at the input of the amp - EFFECTS LOOP IS OFF


Channel 1 connected BEFORE the 50k resistor. Channel 2 is connected right at the input of the amp - EFFECTS LOOP IS ON


As you can see here, the Ch1 signal is largely unaffected as to whether the effects loop is on or off. I expected to see this with Ch1 connected after the 50k resistor, so i am confused. I am using 10x probes, so they should not be affecting the circuit, should they?

Regarding testing the setup going through an actual pickup, that is something I had not even thought of an sounds interesting. From what PPR said, it might not give clean results, but I might see what it looks like nonetheless. Is the theory that by sending the AC signal from the generator through the coil wire, there will be fluctuations in the magnetic field and thus there would be inductive reactance in addition to the resistance of the coil (i.e, as opposed to having vibrating strings cause the fluctuations in the magnetic field thereby creating the AC signal)?

Thanks again for all of your responses

slacker

That's what you'd expect to see, as a very simple model the cable looks like a capacitor between signal and ground, this makes an RC low pass filter with the 50k resistor. When the effects loop is off the 7 foot cable looks like it doesn't add enough capacitance to have any effect so measuring before or after the cable makes no difference. With the effects loop on the extra cables and connections must add enough capacitance that they attenuate at the frequency you're looking at.

Sleipnir

Thanks Slacker,

I guess you're saying then that you get the same capacitance value no matter what end of the cable you measure at, and the only difference would be the negligible resistance of the cables themselves? I was thinking that the capacitance would be higher at the end of all the cables and thus would see the attenuation only at the end, but that probably does not makes sense?

Perhaps for this setup, there is no benefit to using both channels of the scope since I can measure the voltage at the amp input with the effects loop on and off and compare the two.


Sleipnir

I measured the attenuation using both 10k and 50k resistors between the signal generator and the input to the loop pedal (see prior posts for details of setup). I figured I'd share the results in case anyone is interested. With an impedance of only 10k, the attenuation when comparing direct to amp (8ft cable) vs. via 12 true bypass pedals, patch cords and 7ft + 8ft cables is probably not audible as it does not even get to -3dB by 10KHz. However, with higher impedances, as the 50k graph suggests, attenuation might indeed be audible at higher frequencies. I know I can hear a difference between the two setups (i.e. direct to amp vs. via bypassed pedals), which is why I wanted to see if I could measure it in the first place and learn something in the process (which I indeed have).




Probably time to put this thread to bed now....

Hatredman

Not at all. We should start to talk about White Noise Generators and Spectrum Analysers.
Kirk Hammet invented the Burst Box.

PRR

> you get the same capacitance value no matter what end of the cable you measure at

For practical purpose, yes. (Get into Miles of cable and there's a little more to it.)

The capacitance is in every inch and mm of the cable. The inch nearest the test-point is 2.5pFd. The inch at the far end is 2.5pFd in series with cable resistance which for 8 ft guitar cord is maybe 0.4 Ohms, negligible. All the other inches show 2.5pFd in series with even less Ohms. So yes, it is 240pFd anywhere you look at it.

Strained analogy. A water pipe is pumped to 40psi. It is way-large (low resistance) for the few outlets it feeds. The water pressure will measure 40psi anywhere along the pipe.
  • SUPPORTER