Guitar plugged into RTB 2004 Oscilloscope - frequency display questions - Page 1
Forum section: electronics / beginners

author: javadesigner
author_rank: Contributor
timestamp: March 21, 2021, 07:53:49 pm
content: I plugged my electric tuning into the R&S RTB2004 oscilloscope (via 1/4" into BNC cable).I'm playing just the low open A string for these experiments. This is tuned to 110 Hz (approx) in standard tuning.What I would like to see is:1) the frequency of whatever note I hit (in this case just the open A string - 110) in the frequency counter2) When playing a chord, then all the constituent notes of the chord (via FFT).This post is about case (1) and I'll make another post about myFFT experiment later.A guitar note has a basic frequency and then a bunch of harmonics on top. The harmonics are always less in amplitude than the base frequency.As a beginner, I assumed that if turn on frequency/cycle time, RTB2004 would somehow give me the right base frequency and ignore all the harmonics on top. As you can see from the first attached pic (labelled ONE.png), I get a wrong frequency displayed but the manual cursors do show the right frequency calculation.Qs 1): is there a way to tell the oscilloscope to zero in to a "base" frequency and ignore harmonics ?Secondly, why are there so many wildly fluctuating frequency calculations in the RTB2004 (don't know if this true for all scopes). The attached TWO.png shows a Trigger Level that is above all the harmonics but the frequency counter is showing 1.5 KHhz - about 15 times greater than the actual 110 Hz value. This value varies a lot further as I pluck the string. I also tried a trigger holdoff for a few seconds (after each pluck) but that did make anything more accurate.Qs 2): Why is this wildly off frequency mis-calculation happening ?This could perhaps be because the frequency counter display all the peaks and valleys regardless of the trigger level (as you can see from TWO.png, the trigger level should catch only 1 set of waves since it is set very high). Is there a way for me to get thefrequency of wave only above the trigger leveland ignore all the lower powered harmonics ?

author: exe
author_rank: Unknown
timestamp: March 21, 2021, 08:34:28 pm
content: Try plotting FFT, set the marker to the highest peak.

author: alsetalokin4017
author_rank: Super Contributor
timestamp: March 22, 2021, 12:55:36 am
content: Low pass filter?Either in the scope's software, or wired up as an input module between the guitar and scope.Another thought: I don't know if your scope's counter calculates the frequency based on the full data buffer or just what's on the screen, but in case it's the latter, you could try moving the trigger point off the screen to the left so that the whole screen is occupied by the signal of interest.

author: JohnnyMalaria
author_rank: Super Contributor
timestamp: March 22, 2021, 01:06:09 am
content: You're ignoring the effect that using a magnetic pick-up has on the signal and the fact that the string oscillates in two dimensions causing a figure-of-8 type profile. The use of a magnetic pick-up creates a lot of 2nd harmonic. In your case, ~200 Hz is perfectly reasonable. See this article:https://puhep1.princeton.edu//~mcdonald/examples/guitar.pdf

author: javadesigner
author_rank: Contributor
timestamp: March 22, 2021, 01:47:37 am
content: Quote from: JohnnyMalaria on March 22, 2021, 01:06:09 amThanks - did you see the 2nd screenshot and the frequency in that one ?

author: JohnnyMalaria
author_rank: Super Contributor
timestamp: March 22, 2021, 02:01:54 am
content: Quote from: javadesigner on March 22, 2021, 01:47:37 amMost of that signal is high frequency - perhaps 10 or so oscillations every division. That's of the order of 1kHz. The fundamental 100Hz is barely there. By that, I mean, it's nothing like a sinusoid of frequency 100Hz but rather short impulses at that frequency. Depending on how far from the bridge you pluck the string, you will get quite a range of high frequency information. And there's the coloring of the sound from the rest of the guitar.

author: javadesigner
author_rank: Contributor
timestamp: March 22, 2021, 02:57:04 am
content: So, as per my second question above - how do Igate/measure the area above the trigger threshold? Please see screenshot below.Please tell me theresomeway to do this in an advanced oscilloscope like the R&S RTB2004 ?

author: bgm370
author_rank: Contributor
timestamp: March 22, 2021, 04:55:33 am
content: See if this helpshttps://www.rohde-schwarz.com/webhelp/RTB_HTML_UserManual_en/Content/3674cbc34c4340fd.htm

author: javadesigner
author_rank: Contributor
timestamp: March 22, 2021, 05:47:07 am
content: Quote from: bgm370 on March 22, 2021, 04:55:33 amThanks for the suggestion - but not too useful. Setting this popup counter appliction to "trigger" briefly shows frequency under the trigger - and then the numbers disappear quickly - which is to say it is blank in single shot mode or after the acquisition is stopped.Something similar in the measurement area is what I'm looking for. Note, unlike this popup - data in the meaurements area does not disappear after acquisition is stopped!

author: alsetalokin4017
author_rank: Super Contributor
timestamp: March 22, 2021, 08:25:43 am
content: Quote

author: javadesigner
author_rank: Contributor
timestamp: March 22, 2021, 01:08:55 pm
content: Quote from: alsetalokin4017 on March 22, 2021, 08:25:43 amThanks, alsetalokin4017, the Math low/high filter is quite useful to know about!FYI, The vertical channel filter is just a 20 Mhz setting, that filters nothing in my use case (frequency range: 100 Hz - 3000 Hz).The Math filter is useful when an exact particular low pass frequency is already known. In my case, I don't know the pass through frequency - I'm using the oscilloscope to explore and find those in the first place! Also that pass through frequency changes all over the fretboard as well - across 3 octaves! It is not feasible to keep going into the low pass dialog and increasing that frequency little by little (say 10 times on average per note) and do that for 50 notes. (500 times total).What would be great is if the Math filter allowed a filter based onvoltage. For all the different frequencies I'm interested in,the voltage at that frequency is above a thresholdand anthing less than the threshold (ie higher harmonics, not as high in amplitude), I want to ignore. The frequency changes from 100 to 3000 Hz but threshold voltage (for all frequencies) is above 3mV - anything less than 3mV I want to ignore completely in all the metrics/calculations.This is closely tied to the trigger threshold. I've seen mention of a gate in some scopes where you can simply drag a line and it will only show metrics for above that line. This seems to be a very trivial (and useful) thing for a scope to do - any way to do that in R&S RTB2004?

author: CaptDon
author_rank: Super Contributor
timestamp: March 22, 2021, 01:38:27 pm
content: You will never get a stable useful frequency number. Even if you set just the crest of the fundamental above the trigger line the second crest could come a bit early or late depending on how the harmonics distort it and then you get an unstable number. A very good FFT display 'could possibly' show you the fundamental as well as the harmonics. You can't even begin to see how the waveshape of a guitar changes as the harmonics add and subtract from the fundamental. The best view in fact is not on a digital scope but on an older analog triggered sweep scope. The true waveform is simply so unstable. A better view of the frequency spectrum could be on a waterfall display like with the Freeware program called 'Spectrum' which plots using color the intensity of the frequency vs the actual numeric value of the frequency. You can set the frequency spread of interest also. Plug your guitar into the microphone input of your computer.

author: SilverSolder
author_rank: Super Contributor
timestamp: March 22, 2021, 02:07:30 pm
content: Another way to try this would be to record the guitar into Audacity, and perform the FFT in there - its display is optimized for audio frequencies and might give you some interesting information.For the scope - is it possible to use cursors to pick out the right part of the waveform, to get a good frequency calculation?

author: javadesigner
author_rank: Contributor
timestamp: March 22, 2021, 02:20:41 pm
content: Quote from: SilverSolder on March 22, 2021, 02:07:30 pmYeah possible and that's what I ended up doingAnd btw, the guitar input is just a learning excercise - to put in various signals into the oscilloscope and see what it is capable of. I'm sure there will be other types of signals in the future that I'll need to gate as well.Wanted the 'scope to do the work for me - I mean it is already calculating the frequency - why can't I tell it to calculate thefrequency of any waveforms that go above a voltage threshold (or above the trigger level)? That seems to be conceptually super simple, no ?

author: CaptDon
author_rank: Super Contributor
timestamp: March 22, 2021, 03:22:14 pm
content: It is doing that, but understand that it measures the time from your trigger point which let's say is set for the rising edge until it finds the next rising edge, and if the time between those points varies so will the frequency displayed. The scope measures time and converts it to frequency or 1/time. It may do better if you capture a single trace by using the 'single' command. If you measure a sine wave it should lock on with no problem. You would never be able to tune the guitar using a scope since a 110hz 'A' will probably display as any frequency between 105 and 115 hertz under the best of conditions. If you used an EBOW to excite the A string you could possibly get a stable 110hz measurable waveform but you just will never get the answers you want by plucking. The waveform is too unstable both in amplitude and harmonic content. One of my guitar tuners uses a Phase Locked Loop with a set range to track the fundamental and display it. It works very well and is very stable until the note fades away to nothing.

author: javadesigner
author_rank: Contributor
timestamp: March 22, 2021, 04:20:58 pm
content: Quote from: CaptDon on March 22, 2021, 03:22:14 pmHow is it capturing a frequency of wavesabove a certain voltage threshold (that I specify)? It is not doing that at all (and I'd like it to)..

author: Bud
author_rank: Super Contributor
timestamp: March 22, 2021, 05:05:41 pm
content: Waveform of a composite signal depends on phase relationships between the waveform components. I think what you are trying to achieve you should be doing in frequency domain and set threshold based on power spectrum. Not in time domain. Do not know if that particular scope has such capabilities. A crude way would probably be to switch to FFT view and adjust the baseline level so it cuts off anything below the set threshold. Then set up tracking markers if the scope has them.

author: SilverSolder
author_rank: Super Contributor
timestamp: March 22, 2021, 07:23:45 pm
content: Quote from: javadesigner on March 22, 2021, 02:20:41 pmYeah, my scope isn't good at complex waveforms either. I've never tried plugging my guitar into it, but now that you've started a trend, I'll have a go at some point and see what happens!

author: alsetalokin4017
author_rank: Super Contributor
timestamp: March 22, 2021, 08:11:23 pm
content: Quote from: javadesigner on March 22, 2021, 02:57:04 amI'm now wondering (now that I've tried it with my electric guitar) why is your input level so low? Maybe that has something to do with where and how your frequency counter is working. I connected my guitar directly to the scope input using a 1x patch cable, and made sure my channel input probe attenuation was set to 1x to match. Moved trigger point off screen to the left so I would have a full screen of the waveform of interest, and just plucked away. Scopeshot below shows the A string. I don't know why the hardware counter isn't showing a value, but the "measurement" which operates only on the screen buffer has no problem picking out the fundamental.You might also try different trigger modes and trigger filtering, if your scope has them available. But on the Rigol it just seems to work without any special tweaks.

author: SilverSolder
author_rank: Super Contributor
timestamp: March 22, 2021, 08:24:13 pm
content: I tried capturing the low E-string on a 54622D. Had to use a preamp on the guitar to get the levels up to something it could work with.It worked much better than expected, it didn't even get fooled by very difficult-looking waveforms - but only in single shot mode obviously.

author: CaptDon
author_rank: Super Contributor
timestamp: March 22, 2021, 08:27:04 pm
content: Did it set the vertical line cursors or did you?

author: alsetalokin4017
author_rank: Super Contributor
timestamp: March 22, 2021, 08:40:06 pm
content: FFT of the E string on the Rigol, no preamplification necessary. The guitar is an Ibanez AM73B, just normal passive humbucking pickups.

author: SilverSolder
author_rank: Super Contributor
timestamp: March 22, 2021, 08:47:13 pm
content: Quote from: CaptDon on March 22, 2021, 08:27:04 pmIt set it. The "quick measure" mode does the automatic measurement, and is kind enough to put cursors so you can see what it is thinking!

author: alsetalokin4017
author_rank: Super Contributor
timestamp: March 22, 2021, 09:02:27 pm
content: Rigol does that too!

author: javadesigner
author_rank: Contributor
timestamp: March 22, 2021, 09:24:01 pm
content: That's a great set of screenshots/experiments. Looks like your Rigols and Agilents are working just fine for this.I tried a few more times, single shot mode in every case. I also limited bandwidth to 20Mhz in one case, the rest are full bandwidth. This 'scope runs at 300 Mhz, so maybe it is just picking up more fluctuations. Anyway, could not lock onto the fundamental frequency in any of these attemps. The auto set for the cursor also chooses the 2 closest waveforms and shows a much higher frequency. The only way to get the right fundamental frequency is to use cursors - manually.These are stock single coil strat bridge pickup btw. No preamp - straight from guitar into 'scope - via 1/4" to bnc cable. This time I made sure volume was all the way up to get max signal.

author: JohnnyMalaria
author_rank: Super Contributor
timestamp: March 22, 2021, 09:38:48 pm
content: It would be interesting if you can put a microphone near the strings and look at the signal. It should look dramatically different than what's coming from the pickup. Also, it would be interesting to compare the different pickups.BTW, if you have a function generator, you could use the scope as a visual tuner. Set the generator to the target frequency and trigger the scope with it. When your string is close but not exactly in tune, its signal will appear to roll to the left or right. You could also use the XY mode and enjoy the watching how that changes as you tune the string.

author: ve7xen
author_rank: Super Contributor
timestamp: March 22, 2021, 09:59:24 pm
content: Many scopes do have a separate counter that measures the frequency of the trigger completely separate from the acquisition system. It seems that you're using the 'software' measurements for this, and might get better results from the counter with a carefully set trigger value.Not sure about this scope, but it would make sense for the Frequency measurement (based on acquisition data) to be based on either a frequency domain analysis or a count of zero crossings with DC elimintation. If it's measuring zero crossings that definitely seems like it would explain what you're seeing. Really an FFT is necessary to do what you want here, why don't you use that?

author: alsetalokin4017
author_rank: Super Contributor
timestamp: March 22, 2021, 10:51:30 pm
content: Quote from: javadesigner on March 22, 2021, 09:24:01 pmThere is something wrong somewhere. Your signal is only showing +/- 50 mV, unless I am badly misreading your scope display. Look at how strong our signals are. (mine and SilverSolder's). Your first scopeshots only show +/- 2 or 3 mV !

author: javadesigner
author_rank: Contributor
timestamp: March 23, 2021, 01:31:21 am
content: Quote from: alsetalokin4017 on March 22, 2021, 10:51:30 pmGreat catch about the earlier screenshots - they were lesser because my volume wasn't all the way upHowever, with the volume all the way up, +/- 50 mV is actually at the upper bound of the expected voltage. This is a single coil stock strat pickup - not a humbucker (which will be 2-3x hotter comparatively). Also, to be clear, my scope channel is not attenuated and running 1:1.See this article I found, for example:http://tomsguitarprojects.blogspot.com/2014/12/electric-guitar-output-voltage-levels.html"picking the open A string softly I got about 10mV, medium-hard 20mV and hard 30mV (which you'll find under 'A' in the table, above)"

author: alsetalokin4017
author_rank: Super Contributor
timestamp: March 23, 2021, 02:30:37 am
content: Thanks, I did not know that humbucking pickups were so much hotter than single-coil. Learn something every day around here!I still think there must be some way to get your scope to focus on the frequencies of interest. Do you have alternate triggers? For example the Rigol has a "pulse" trigger where one can set the width of a pulse or peak to trigger on.Or maybe you do need a preamp! Maybe with a stronger signal the scope will concentrate on the larger peaks and ignore the "noise" higher harmonics.

author: javadesigner
author_rank: Contributor
timestamp: March 23, 2021, 04:58:52 am
content: Quote from: alsetalokin4017 on March 23, 2021, 02:30:37 amHi - thanks again for the great suggestions!However (and being a n00b I'm probably wrong about this, but anyway here goes) - I don't think this is trigger type issue. The existing rising/falling slope trigger works great and in single shot mode already captures the waveform for the entire horizontal duration properly.I think the issue is what happensafterthe capture - there are a lot of harmonics which confuse the automated measurements.Some scopes apparently make is easy to ignore certain parts of the captured waveforms and measure an arbitrary part of the captured wave. One wouldthinkthe R&S RTB2004 would do the same but I guess one would be wrong (this is a $3-4K scope mind you).This review of another R&S scope on eevblog shows this gating feature (search for "gating"):https://www.eevblog.com/forum/testgear/rohde-schwarz-rtm3000-review/I also remember reading that the keysight InfiniiVision series (the lower end of which are same price as RTB2004) also do have the gating function for various measurements (among various other features).Edit: this is available on LeCroy scopes as well, from one of their manuals:The default starting positions of the measurement gate posts are 0 div and 10 div, which coincide with the left and right edges of the grid, and the First and Last points. Therefore, the measurement gates initially enclose the entire visible acquisition. By moving the measurement gates, you can focus the measurement on the section of the acquisition of greatest interest. For example, if you "gate" six rising edges of a waveform, calculations are performed only on the six pulses bounded by the gate posts.Anyone from R&S reading that can shed a light on this?

author: SilverSolder
author_rank: Super Contributor
timestamp: March 23, 2021, 02:20:17 pm
content: What happens if you capture less waves on the screen? - e.g. a little more than one cycle of the fundamental. Does it work then?

author: cheater
author_rank: Regular Contributor
timestamp: March 23, 2021, 03:40:18 pm
content: People have already mentioned that you're seeing a different frequency due to the oscilloscope expecting a sine wave like wave with a clearly defined cycle (or square or triangle etc), meanwhile you're putting in a very complex wave. If you'd like to see how pitch tracking can be done better, look at the schematics for the Korg MS-20 pitch tracking input, or for the Roland GR-30 guitar synth.