EEVblog #396 - Bode Plotting on Your Osciloscope - Page 1
Forum section: electronics / general

author: EEVblog
author_rank: Unknown
timestamp: December 08, 2012, 08:00:33 am
content: Dave.

author: Bored@Work
author_rank: Super Contributor
timestamp: December 08, 2012, 08:37:27 am
content: Us old farts used to throw in a germanium diode and a small cap to get the amplitude. And faster sweep so the CRT showed something at all (or longer camera exposure to capture the amplitude on photo).

author: KedasProbe
author_rank: Frequent Contributor
timestamp: December 08, 2012, 10:35:15 am
content: With the formula feature you could probably make the vertical axis a dB scale.And you could probably use it also to make a curve to add a cursor that shows you the frequency (mainly for log).Dave, want to try that?

author: EEVblog
author_rank: Unknown
timestamp: December 08, 2012, 10:49:07 am
content: Quote from: KedasProbe on December 08, 2012, 10:35:15 amYeah, maybe. Not all scopes have that sort of capability though.Like Tek scopes have an envelope detect mode that could be useful here.Might do a follow-up video with various things.Dave.

author: Pentium100
author_rank: Frequent Contributor
timestamp: December 08, 2012, 11:02:42 am
content: This is how you are supposed to align the IF transformers of a radio. Connect a sweep oscillator to the input, scope to the output and adjust the cores until the output looks like it is supposed to (bandpass) and is centered on the stated frequency (this mostly applies to FM tuners, as for AM you would only want the peak response, instead of a flat response over 200kHz range).

author: marmad
author_rank: Super Contributor
timestamp: December 08, 2012, 12:04:10 pm
content: Very nice, Dave - a great tip. It seems so obvious once you point it out - like all good ideas

author: JuiceKing
author_rank: Regular Contributor
timestamp: December 08, 2012, 12:39:22 pm
content: I like it!Thanks Dave for this and so many fascinating videos!As it happens, I was doing just this same experiment last weekend: making a bode plot to measure frequency response of an 30+ year-old Nakamichi cassette recorder. (It was out of spec over the full audio range, but amazingly good up to 10Khz. TDH measured < 1%, too!)I ran into a problem, though. The deck has 3 heads--one for erase, one for record and one for playback. The tape is pulled across the three in that order, so when you record, the input signal is recorded to freshly erased tape and is immediately available for real-time monitoring. Very neat.But, there's a small delay between these actions because the tape travels across them at a rate of 1 7/8 inches/sec. This caused me some grief: the playback head was picking up up the sweep, alright, but it was delayed from the signal generator sync by the time it takes for the tape to move from the record head to the playback head.I could find no way to adjust my analog oscilloscope to compensate for this, so I had bode plots that "wrapped" around the screen and looked pretty lame.Any ideas of how--with a plain-old function general/sweep and plain-old analog scope--to get the nice end-to-end bode plot in a situation like this, where the filter introduces significant delay between the input and output?And, while I'm at it, let me ask you if you have any ideas of how to measure wow and flutter with simple instruments like this. There I was totally stumped! (And this is where the old tape deck probably has the most trouble, in fact.) That would be a very interesting topic for another video. (Forgive me if you already did this years ago and I missed it!)Thanks again for the cool tutorial, Dave!- Ken

author: SeanB
author_rank: Super Contributor
timestamp: December 08, 2012, 02:34:13 pm
content: Voltage offset in the x lead, a single AA cell and a 1k pot to give a variable floating supply. Adjust to give the right offset to compensate for the delay. Centre frequency then adjust the pot to make it hit the centre line. As to the wow and flutter do the same and increase the X gain a lot and look at the sidebands generated ( intensity gives a rough binning.

author: nixxon
author_rank: Frequent Contributor
timestamp: December 08, 2012, 03:28:38 pm
content: Nice. With a CRO you would have to increase the horizontal sweep speed to get an image of the whole frequency span simultaneously. Reminds me of w2aew's video from May 19:http://youtu.be/-A_DxsxPdeI

author: krivx
author_rank: Frequent Contributor
timestamp: December 08, 2012, 05:46:17 pm
content: This seems like it's only have of a Bode plot - you have no information on phase shift. Could you hook up a phase detector between your sweep and filter output and make a phase vs frequency plot?

author: jahonen
author_rank: Super Contributor
timestamp: December 08, 2012, 06:01:52 pm
content: I must comment on using a soundcard. For Windows there is a software called ARTA, which makes nice bode-plots, if one can accept the frequency range limitation. It can also use a two channel input mode where it compensates the imperfections of the driving amplifier, so that input signal is also measured and taken as an reference, so imperfections resulting from that are essentially calibrated out.But if a 192 kHz soundcard is used, then one can measure up to 80 kHz or so with quite nice dynamic range. Some analog loopback distortion results using a MOTU ultralite mk3:THDIMD.I used it to plot a loop gain of a power supply feedback loop with a small level matching and input protection circuitry. If one uses high quality sound card, the result can be quite acceptable. The dynamic range was hugely better than what I got using an oscilloscope.Here are two measurements from a power supply (data plotted with Maple) using that soundcard method (using my work PC integrated soundcard, using 48 kHz sampling):Regards,Janne

author: DarkPrince
author_rank: Regular Contributor
timestamp: December 08, 2012, 07:59:42 pm
content: I stated it in the YouTube comments but eh. When I got my waveform generator (SDG1020) one of the things I tested right away was a make-shift system like this. The sync-out of my function generator is different than Daves though, unfortunately. It generates a tiny pulse (like 1V for 1nS) right at the start of the sweep and that is it. Hard to trigger on it with a Rigol scope sometimes (better leads could help). Anyway this video gave me a couple other ideas plus I didn't try switching the function generator to logrithmic so I need to test that. Would have been perfect in our class (signal analysis using op-amps and various filter configurations).Just thinking out loud, but for someone's comment about detecting phase angle. Couldn't you just take two channels, one before and one after the filter, and subtract them. Granted you need to normalize both inputs so their amplitude is equal... an op-amp on one of the inputs or something. Granted the noise would probably make it unusable. Just thinking out loud.

author: IanB
author_rank: Super Contributor
timestamp: December 08, 2012, 08:25:07 pm
content: I like how it's described as a "poor man's Bode plot".With a $1300 sig gen and a $12,000 scope you certainly will be poor after getting so equipped

author: free_electron
author_rank: Super Contributor
timestamp: December 08, 2012, 10:01:21 pm
content: That’s why some advanced signal generators actually have marker outputs. My Agilent 3325 can sweep from 0hz to 22MHz and generate up tot 40vpp it has several outputs you connect to a scope.There is a sweep start output that you connect to the trigger input of the scope. this makes sure the scope runs in sync with the sweep. there is a marker output that you connect to channel two of the scope. this is a 5 volts pp signal and you put the scope at 0.5 volts/div vertical and set the trace in such a way you only see the vertical portion of that pulse.The generator is programmed to swepp and by pressing the ‘Marker’ button on the generator , whenever the internal sweep counter crosses the marker value the immediate fruquency is latched in the generator.in essense where that vertical line of channel 2 is , is whatever frequency is dispayed on the function generator. the generator changes its display to show you what frequency corresponds to the marker. as the sweep is a pure digital affair the frequency indication is absolute.this not only allows yo to bode pots but it also allows you to have a marke ron the screen an know the exact frequency the generator is at. so you could find the -3db point ( point where only 70.7% of the amplitude is left ) by hitting the marker left/right buttons an reading the amplitude on the scope. once found you look at the generator and you know the frequency.these older synthesizers were built especially to do this kind of stuff as spectrum analysers invariably do not have the dynamic range required and DSA’s are bloody expensive. I have another synthesized source that is very ‘pure’ as in no harmonics and has differential output capability including floating above ground.The 3325 does is not an ARB but a real sine oscillator steered by a DDS circuit driving a pll. So it has excellent linearity at its output.We frequently use it to find the resonance point of the voice coil for example. This is a tuned LC network but as the resonance point changes depending on the position of the arm you need to measure it at multiple positions to model it.To do the active filters in the positional servo control loop of the harddisk we have a few of those Stanford SRS756 DSA machines.

author: marmad
author_rank: Super Contributor
timestamp: December 08, 2012, 10:06:35 pm
content: Quote from: IanB on December 08, 2012, 08:25:07 pmWell, if it makes you feel any better, here it isalmostreplicated with a $100 signal generator and an $840 scopeMy plot isn't adjusted correctly for the screen size in this shot (and I was out of 2.2nF caps so I used 2x 1nF for the low-pass linear test) but you get the idea.

author: Unknown
author_rank: Unknown
timestamp: December 08, 2012, 10:17:16 pm
content: i have to try it... Unfortunately i don't have much time right now....

author: jancumps
author_rank: Unknown
timestamp: December 08, 2012, 11:47:50 pm
content: 50€ generator and 60€ scope:(and free camera)

author: Fraser
author_rank: Super Contributor
timestamp: December 08, 2012, 11:49:52 pm
content: Velleman Electronics introduced me to this set-up rather than my more usual use of a Wobbulator (sweep gen + voltage detector) or mega expensive Spectrum Analyser + Tracking Gen.Wobbulators have been around for donkies years. they work by using a sweep generator to produce the required frequency sweep at constant amplitude and also output a voltage ramp to drive an internal or external oscilloscope X axis. The output of the DUT is fed to a quality zero bias diode detector or even just a simple Germanium diode detector. the output of the detector drives the Y axis of the oscilloscope. These days you can knock up a modular VCO and ramp generator very cheaply and create a basic RF Wobbulator for a few dollars. Audio wobbulators can also be made but a PC sound card can do it so simply that there isn't a great deal of point.I bought one of Velleman's PC driven oscilloscopes that used the parallel port for the control input. In the manual it stated that if you bought the Velleman PC controlled function generator, they could share the parallel port control and also perform bode plots. I already had the function generator and sure enough, the PC driven oscilloscope and function generator worked very well for frequency response plotting within the capabilities of the equipment. I recently bought Vellemans combined oscilloscope and function generator that runs off a USB port and that can do Bode plots as well. It cost me only GBP30 in new condition because the seller couldn't get it to work under Win 7 ! Velleman kit can be cheap on the used market, especially the kit that uses parallel port control..... set it up with a cheaply available old laptop like my Dell Inspiron PII-333MHz 3200 and you are in businessDon't even think about using USB to Parallel port leads on one of these.... it definitely will not work. Most PCMCIA (PC Card) Parallel ports do work though.I have been using a Wavetek 1002 wobbulator for years when setting up IF filters and amplifier responses. Spectrum Analysers with a TG option are my preffered tool these days though.Fraser

author: w2aew
author_rank: Super Contributor
timestamp: December 09, 2012, 01:08:50 am
content: Quote from: Pentium100 on December 08, 2012, 11:02:42 amI did a video on this a few months ago...https://www.youtube.com/#/watch?v=-A_DxsxPdeI

author: Rick
author_rank: Frequent Contributor
timestamp: December 09, 2012, 02:41:43 am
content: Quote from: jahonen on December 08, 2012, 06:01:52 pmDave did not elaborate on the sound card method. Dave's method seems straightforward after explanation (I may have even seen it in my past life). Could you explain it a bit how you do it with a sound card? There is something I miss there.

author: T4P
author_rank: Super Contributor
timestamp: December 09, 2012, 04:17:43 am
content: Try visual analyzer. great program

author: free_electron
author_rank: Super Contributor
timestamp: December 09, 2012, 06:05:48 am
content: Make a real detector circuit using some opamps. That gets rid of the diode drop. Bab pease had a nice active rectifier using opamps that didn t use an external diode. He used two mosfets and some comparators to make ideal diodes. Forgot the appnote. ...

author: EEVblog
author_rank: Unknown
timestamp: December 09, 2012, 06:25:49 am
content: Quote from: jancumps on December 08, 2012, 11:47:50 pmThere is s prize for whoever gets it working with string and two tin cans!Dave.

author: Wytnucls
author_rank: Super Contributor
timestamp: December 09, 2012, 08:32:10 am
content: Not quite strings and cans, but I'm working on it!Rigol DS1052E and DG1022

author: whatchitfoool
author_rank: Contributor
timestamp: December 09, 2012, 09:26:16 am
content: For those that care, it isn't pronounced "bow-ed".As a concrete reference, The wiki article of the man has the name as "boh-de" or "boh-dah"This caused a heated debate a while back in one of my university classes. We ended up getting an email response from one of his children saying neither of those pronunciations are quite right. Hendrik had some french heritage as well as dutch, but the name never took on any of it on in america; it was trimmed and mangled over the years. "bow-day" is probably the correct way to say it, but "boh-dah" followed by "boh-de" is close enough for the family.The e is supposed to have the è (Bodè) going on. It is almost never done, but i have seen it like that in a book or 2.The class wasted a ridiculous amount of time on this...

author: PA4TIM
author_rank: Super Contributor
timestamp: December 09, 2012, 10:54:46 am
content: The most important thing you do not have this way is a logarithmic vertical axis.A filter repons looks very impressive in Volts but mist times yoy want it in dB. A -40 dB response is not extreme but lineair you will ave teouble seeing details over -10 dBSecond problem is insertion loss. You must scale the screen without the filter, not on the peak of the filter. ( or you use the cursors or the DSO and know the amplitude of the generator.

author: EEVblog
author_rank: Unknown
timestamp: December 09, 2012, 11:51:49 am
content: Quote from: whatchitfoool on December 09, 2012, 09:26:16 amIf you are talking about the guy himself, sure, have a fuss over it. But when you are referring to the engineering term itself, I think it's perfectly acceptable to say it the way your particular culture has evolved to say it in it's language.I was taught "bow-ed" as I say it in the video, and for me that's the Australian pronunciation of it. I've been saying it that way for more than 20 years, and it's obviously been around at least a generation before that. And that is also how most of my colleagues over the years have pronounced it too.I learnt it before the internet and communications revolution, and before you could easily hear countless other people from around the world say it in Youtube videos. So it's only natural that the pronunciation of it will evolve in different directions. That's how language works, it's a living creature.So I don't think anyone can come along and say that a particular cultures (or even sub groups within cultures) pronunciation is wrong. If that's how it's evolved, that's how it's evolved, it's not wrong, just different. Learn to live with itThere are many people saying I'm flat out wrong. Bullshit. They are just anal retentive's quoting wiki as if it's the stone tablets, and haven't heard the aussie version before. They need to get out moreDave.

author: chicthomson
author_rank: Newbie
timestamp: December 09, 2012, 12:21:14 pm
content: I remember having similar grief over the pronunciation of Swiss Mathematician Leonhard Euler's surname, and I have a cobber mate who pronounces warez as Wah-ress. Makes it sound like a second rate western shootem up game!

author: Fraser
author_rank: Super Contributor
timestamp: December 09, 2012, 12:44:33 pm
content: Isn't human communication about understanding what another person is meaning. I personally never try to correct someones pronunciation of a word...the Americans have many words that they say differently to me but that is the joy of international communication. If I don't understand a pronunciation I just ask for clarification of what was meant.Now as for soldering being pronounced soddering in the USA..... I have no idea why, but I do know what is meant by it.Fraser

author: SeanB
author_rank: Super Contributor
timestamp: December 09, 2012, 12:53:55 pm
content: I have a tough enough time with how people pronounce my first name, let alone worrying over correct pronunciation.........

author: Omicron
author_rank: Regular Contributor
timestamp: December 09, 2012, 12:55:48 pm
content: Quote from: EEVblog on December 09, 2012, 11:51:49 amThat can be a slippery slope though. I can perfectly imagine some versions having evolved so far away from the original that it becomes difficult to understand one another. How does a Chinese person pronounce it? Or a Japanese person? I remember a particular occasion where I was on the phone with a Japanese guy to resolve some support issue with a piece of medical equipment. And although he was speaking english and it was actually quite good, it was still difficult to understand him at times because even though the terminology he used was perfectly familiar, his pronunciation of some familiar engineering terms was just "off" enough to throw me off kilter (my native language is Dutch). Love it or hate it but we live in a globalised world these days and clear communication is more important than ever...

author: notsob
author_rank: Frequent Contributor
timestamp: December 09, 2012, 01:27:57 pm
content: AND for those monty pythonites out therethroatwarblermangroveis pronouncedluxuryyacht

author: Rick
author_rank: Frequent Contributor
timestamp: December 09, 2012, 01:31:39 pm
content: Quote from: T4P on December 09, 2012, 04:17:43 amOk now I see. Thanks.

author: JuiceKing
author_rank: Regular Contributor
timestamp: December 09, 2012, 02:25:36 pm
content: Quote from: JuiceKing on December 08, 2012, 12:39:22 pmI tried the experiment again, but this time I added an outboard pulse generator to introduce a delay equal to the time it takes for the tape to move from the record head to the playback head. It turns out that the delay is 27msec for this particular tape deck, and dialing that in gives a nice edge-to-edge Bode plot.Interestingly, the tape deck (a Nakamichi 680ZX) has rising response with frequency for low (-20dB) signal levels and falling response for high signal (0dB) levels. It's flattest overall at around -10dB. White noise on the FFT on my Rigol scope shows this same trend. That means that low-level ambient sounds get emphasized even when the overall impression of tonal balance seems natural. Could this be the secret of the legendary "Nakamichi sound"? The deck is supposed to be within +/- 3dB from 20-22,000Hz at -20dB, so I don't think this is what it's supposed to be doing. But despite these problems on the bench, the deck sounds very good in the stereo.Still not sure how to quantify wow and flutter.- Ken

author: jancumps
author_rank: Unknown
timestamp: December 09, 2012, 04:16:08 pm
content: Quote from: JuiceKing on December 09, 2012, 02:25:36 pmKen, can you show the plot?

author: JuiceKing
author_rank: Regular Contributor
timestamp: December 09, 2012, 05:51:57 pm
content: Quote from: jancumps on December 09, 2012, 04:16:08 pmSure. It's hard to get a good plot off the analog oscilloscope so I set it up again with the DSO. The speed and display resolution of the analog scope make for a much nicer plot, but you can see the same thing with the DSO and it's much easier to get a snapshot image to share. Here the sweep is linear, so the midpoint on the screen is about 10khz. In each I adjusted the vertical gain so that the maximum response is just below the top of the screen.

author: jancumps
author_rank: Unknown
timestamp: December 09, 2012, 06:02:03 pm
content: I was first thinking that this was the dolby NR kicking in. But if you measure on the output, the dolby impact should be zeroed out.

author: JuiceKing
author_rank: Regular Contributor
timestamp: December 09, 2012, 06:07:23 pm
content: Quote from: jancumps on December 09, 2012, 06:02:03 pmYes, that's true. I tried with with Dolby in and out and it didn't make much difference.Turning the tape type or bias the the wrong settings made matters worse, so this is about the best it can do with a cleaning, de-magnitizing and adjustment of user controls. I have the service manual and it's very detailed. But to make adjustments inside you need unobtainium Nakamichi reference tapes, so I'm not mucking with it.

author: Slothie
author_rank: Regular Contributor
timestamp: December 09, 2012, 07:41:34 pm
content: My 1976 Tex 7806 scope (that I love) and bought for £30 (thats $48 US, $45 AU for all you furriners) has a X voltage output on the back, as I imagine many others do. A few years back I used it with the VCO from my synth to plot the response of some filters I was playing with. Of course, being a computer nerd rather than an EE I didn't know it was a bode plot but at the time I didn't care!! The output had a highish voltage range so I used an attenuator & opamp to ajust the offset, but youd have to check out your own CRO manual to adjust to suit your VCO.If your CR 'scope has that output its not hard to knock up a cheap VCO, and even some cheap signal generators have a CV input, so you might not actually need to spend a lot of cash provided youre not too fussed about calibration & such.

author: jancumps
author_rank: Unknown
timestamp: December 09, 2012, 09:23:52 pm
content: Quote from: JuiceKing on December 09, 2012, 06:07:23 pmThis is my take at a Luxman K-112, using a type1 cassette.Frequency from 28Hz to somewhere close to 20KHz.Since my generator doesn't have sync out (yet - hacking planned), I used external triggering 50Hz, and adjusted the sweep frequency to somewhat lock in with that trigger. The image slowly scrolled over the x-axis.Took the picture when the sweep start was at the left.Yellow marker added to represent how the graph looks in reality.

author: jancumps
author_rank: Unknown
timestamp: December 09, 2012, 09:48:04 pm
content: A bit unrelated,but still fun:Transistor curve plotting on te scope.

author: nadona
author_rank: Regular Contributor
timestamp: December 10, 2012, 02:46:21 am
content: IanB:"I like how it's described as a "poor man's Bode plot".With a $1300 sig gen and a $12,000 scope you certainly will be poor after getting so equipped" +

author: vk6zgo
author_rank: Super Contributor
timestamp: December 10, 2012, 10:03:58 am
content: Quote from: Slothie on December 09, 2012, 07:41:34 pm*It seems that with the modern ability to generate more realistic plots,the difference has blurred to non-existence!

author: vvanders
author_rank: Regular Contributor
timestamp: December 11, 2012, 01:11:43 am
content: It's a shame the Agilent DSOX series doesn't include a sweep with their wavegen then you could get the whole thing in a single instrument. I wonder if there's enough ARB points to generate a decent sweep manually.

author: Hypernova
author_rank: Unknown
timestamp: December 11, 2012, 08:20:07 am
content: Quote from: vvanders on December 11, 2012, 01:11:43 amYou are behind the curve buddy, The new FW released last month has added the sweep function, AM/FM/FSK all the ones you need. No need for a trigger cable too since sweep from modulation is part of the trigger options.

author: free_electron
author_rank: Super Contributor
timestamp: December 11, 2012, 02:48:26 pm
content: Agilent: lightyears ahead of the curve...

author: vvanders
author_rank: Regular Contributor
timestamp: December 12, 2012, 01:42:25 am
content: That's odd, don't see the trigger on my DSOX-3014A w/ 2.20 firmware unless you're talking about using the rise/fall trigger. Even then the modulation only goes to a limit of 20kHz.Nevermind, found it on the source setting of the edge trigger, sweet

author: EEVblog
author_rank: Unknown
timestamp: December 12, 2012, 11:51:44 am
content: Quote from: Hypernova on December 11, 2012, 08:20:07 amSomeone was thinking!Dave.

author: baljemmett
author_rank: Unknown
timestamp: December 12, 2012, 04:24:16 pm
content: Quote from: vvanders on December 12, 2012, 01:42:25 amNope, the modulation goes to a limit of your selected wavegen output frequency. At least, it did last night when I installed the latest firmware on my 2000-series to have a play...Edit: whoops, sorry, you're right -- I was thinking of the FM deviation -- the frequency of the modulating waveform does indeed top out at 20kHz.

author: geekysuavo
author_rank: Contributor
timestamp: January 14, 2013, 02:45:32 am
content: OK, this is a little late on the draw, but here goes...With just the DSO2XWAVEGEN you can make Bode plots using a Linux system via USB TMC control. Granted, the dynamic range is limited, but it's better than hand-dialing every frequency and typing the results into a spreadsheet!Video here:Code here:http://geekysuavo.github.io/usbtmc-bode~ Brad.

author: thefatmoop
author_rank: Contributor
timestamp: August 17, 2013, 05:21:32 am
content: took me a while to get to this. If you have an arduino sitting around you can do the same with a 5$ dds module off ebayhttp://reibot.org/2013/08/16/bode/

author: st
author_rank: Contributor
timestamp: November 20, 2014, 08:36:07 pm
content: If they were ahead of the curve, they would have an option that properly did the bode plot including phase. Now, years later, they have pretty much missed the curve and hit the tree, since I still do not see that feature.The comments about the low dynamic range operate under the assumption that attenuation must stay constant and you have only 8 bit to work with. That is not the case.Check out the Analog Discovery. It does a very impressive (stepped) Bode plot, including phase, with fantastic dynamic range. You can use one channel as a reference to normalize the other.STQuote from: free_electron on December 11, 2012, 02:48:26 pm

author: Don.Milne
author_rank: Newbie
timestamp: October 05, 2015, 06:19:29 pm
content: Dave:Is it possible to get a 'Bode-Like' Display on an Oscilloscope in the 'Frequency Domain', using an oscilloscope with a 'FFT' Math Function capability?. This would allow measurement of frequencies with respect to dB levels, as in similar plots on log-log or semi-log graphs.

author: SteveLy
author_rank: Regular Contributor
timestamp: October 06, 2015, 08:03:15 am
content: @Don.Milne: You need a white noise source going into your filter and the output of the filter to the scope for FFT analysis. Power spectrum will show frequency response as square magnitude vs frequency. (But you won't get phase info using white noise.)