Is this a viable alternative to a spectrum analyzer? - Page 1
Forum section: electronics / general

author: silicon_ghost
author_rank: Contributor
timestamp: February 18, 2013, 11:16:55 pm
content: After watching Dave's videos on using a spectrum analyzer with tracking generator and then "poor man's spectrum analyzer using a scope and signal generator", it got me wondering. I don't really need high frequency nor real-time. I want to characterize op-amp circuits generally below 100 MHz and definitely want closer to DC than the typical 9 kHz lower limit of most spectrum analyzers.Can I simply control both a Rigol DG4162 (160 MHz sig gen) and a Rigol DS4024 (200 MHz o-scope) with a computer and simply feed pure sine waves into my circuit under test and query the scope (again via the computer) for RMS amplitude and phase? Run this all in a loop and then generate a mag/phase bode plot.I have access to LabVIEW since I have a license from my employer. This seems like a way for me to solve the frequency limits of a spectrum analyzer since I don't need GHz performance nor real-time display updates. Down the road I could see picking up a 3 GHz analyzer if my hobby drifts in that direction.I don't own either of those two pieces of equipment but had already planned on buying the Rigol DG4160 to go with my existing Rigol DS1102E.

author: olsenn
author_rank: Frequent Contributor
timestamp: February 19, 2013, 12:03:14 am
content: Spectrum Analyzers aren't typically used (and aren't made) for low frequency, large signal analysis. Most electronics operating at high frequencies (greater than 100MHz) are wireless; for this reason, spectrum analyzers are designed to show extremely small signals (<100dbm) and cannot be safely used for signals greater than 20-30 dbm of power. If you need to test radio transmitters then a good SA is a very useful tool.If you just need to check the sub 100MHz cutoff frequencies of some filters etc. then your proposed method will work fine. The update rate will be very low, so don't expect to see quickly changing signals, and the frequency graph of most oscilloscopes (including the Rigol's) are not very linear, so don't expect much in the way of amplitude accuracy.I have no idea what the specs of it are (I imagine they're crappy) but you may be interested in the RF explorer boards sold by Seed Studio. They aren't exactly lab grade tools, but they're cheap and may be all you need (save for not displaying low frequencies).Hope this helps

author: amspire
author_rank: Super Contributor
timestamp: February 19, 2013, 12:42:54 am
content: If you are after gain and phase, an oscilloscope will be fine. It is easy to check the scope for gain and phase differences by connecting the two probes together and attach to the generator and the match is often very good. You can measure any error, and use that to correct the results later. You probably could to get excellent results with something like the Rigol 1102E as you are interested in relative measurements rather then absolute measurements. With the equivalent sampling mode, you can get great phase resolution with a fairly cheap scope.You could do the whole automated programming-Labview thing, but unless you are testing hundreds of circuits, it is usually easier just reading the measurements from the scope, and typing them into a spreadsheet. When you do hands on testing, rather then automated testing, you see things that the automated test misses. Things like bursts of instability or waveform distortion.If you really want to automate it though, go for it.

author: silicon_ghost
author_rank: Contributor
timestamp: February 19, 2013, 04:20:46 am
content: Quote from: amspire on February 19, 2013, 12:42:54 amI understand your point. My day job is analysis of (and writing the code necessary to analyze) time domain data and low frequency signals, under 100 kHz but usually less than 250 Hz. I'm used to collecting highly over-sampled data and then having the leisure to slice and dice the data. A pity my personal budget does not accommodate the same for my hobby.As a rough guess I should be able to test at least 1 discrete freq every 5 seconds based on some automation I've done with Agilent sig gens and arbitrary DACs at work. In the work project, because we were able to save all the sampled data at full speed, I took a shortcut. I used a LabVIEW math routine that could build an arbitrary waveform that contained tones spaced 1 Hz apart spanning from 1 Hz to 1 kHz and randomly phased in such a way as to ensure no clipping and minimal distortion. It proved a quick way to determine the magnitude vs. frequency response of our system including all analog and digital filters. A DSO may have a fast sample rate but it is blind too much of the time for that trick to work.One thing I like about the DS40XX series is the waveform intensity display which can make it far easier to spot instability or waveform distortion. My intent was to watch the o-scope during the acquisition phase. In fact, I saw that the API for the scope allows me to capture the bitmaps. I may actually grab screenshots at the same time. Scanning through them rapidly lets me use my brainpower to spot anomalies instead of writing numbers down.I already keep notes on the circuits I design and the test conditions/measurements I take. Years of being anal retentive about metrology at work comes in handy at home.

author: robrenz
author_rank: Super Contributor
timestamp: February 19, 2013, 01:20:29 pm
content: How about aDynamic signal analyzerthey start at DC and generaly go to 100kHz

author: silicon_ghost
author_rank: Contributor
timestamp: February 19, 2013, 04:15:56 pm
content: Quote from: robrenz on February 19, 2013, 01:20:29 pmThanks for the link. When I looked at DSA devices they seemed to get expensive awfully quick. The example you linked was 3,000 USD to get to 100 kHz. Am I missing something?Sent from my Nexus 10 using Tapatalk HD

author: free_electron
author_rank: Super Contributor
timestamp: February 19, 2013, 04:35:20 pm
content: forget the DSA's. those are invariably all old clunkers that don't have the latest FFT algorithms. ( they are ALL fft machines )Get a real generator that makes a pure sinewave and is under fractional divider control but NOT a DDS.you can get a 3325A or 3325B for as low as 150$ on ebay.these machines use real sine oscillators and have a fractional divider for the control loop.A DDS is essentially a fractional divider ( fracdiv is a logic block that can make a fraction of a reference frequency like 1.23456789MHz from a 10Mhz master) that then steps through a wavetable ( the sinewave is stored in lookup table) and spits the result to a DAC and post filters it.the 3325 works differently. the have a VCO ( actually a current contolled oscillator... ) the fracdiv generates a pulsepattern that is integrated ( kind like PWM but it is irregular ) and converted into a steering current. a pll-like system locks the VCO.the fracdiv has its own adder/subtractor on board.when you program a sweep in an arb generator the processor needs to recalculate the frequencies as fast as he can an send them to the DDS block. there are noticable 'steps' in this process.the fracdiv system doesn't have these steps. as there is an integration step between the fracdiv and the VCO the steps are gone.the sinewave is also cleaner. less jitter.if you have a 2 channel scope :- trigger output of the sweepgen to trigger in and set scope to 'eternal trigger'- output of the gen to device under test.- set the sweepgen to a 1 second sweeptime ( or slower )- set the scope 10x faster. so 100mS per division. 10 divisions times 100mS gives you 1 second from left to right.now the machines are lockstepped in time.probe on hte input and probe on the output of the device under test. apply math function of the scope and you have a gain/frequncy plotnow, advanced sweepers like the 3325 have marker outputs. you essentially type in a number on the sweeper. when the fractdiv passes that number it toggles a single io pin from low to high ( it clears it when the sweep restarts.)if you connect this to another channel of the scope you can see this 'edge' as a frequency cursor. so you can select frequency on the sweeper and that edge on the scope will follow.if you only have a 2 channel scope this is still do-able.connect 'marker out' to channel 2make a single sweep first with the channel 1 probe at the input of device under test -> store sweep to memorymove probe from in to out of the device under test.tell scope to do math between memory1 and channel 1 ( this gets rid of output voltage fluctuation of the generator )play at will..if you have a 3 or 4 channel scope you can connect all at once.if you then throw a nice diff probe in the mix... and you still do the probe on input ->store , probe on output you even eliminate any gain problems in your testsetup.i still use a 3325b for this purpose. we had an hp DSA but the tube died ( screen is an old scope tube that plots vectors... and they are unobtainium ) we also have a Stanford research machine.. same story. picture tube is EOL ... )gimme a scope with a chunk of memory so i can sample fast at slow scanspeed and a pure sinewave sweeper and i'm good.

author: M0BSW
author_rank: Frequent Contributor
timestamp: February 19, 2013, 04:55:55 pm
content: poor man spectrum analyser, is there such a thing, never seen that video, I thought they were toys for rich men

author: Jon Chandler
author_rank: Frequent Contributor
timestamp: February 19, 2013, 05:04:31 pm
content: Quote from: free_electron on February 19, 2013, 04:35:20 pmMe thinks free_electron has a lot of opinions and not a lot of experience to back them up....

author: ddavidebor
author_rank: Super Contributor
timestamp: February 19, 2013, 07:55:18 pm
content: I have never heard about "latest" fft algorithm.I think the latest is in 90's and the difference is rarely the precision. Usually it's is the speed.In fact, labview has a lot of fft function. Signal analisys module is absolutely a massive and ultra-tech group of agorithms.

author: free_electron
author_rank: Super Contributor
timestamp: February 19, 2013, 08:11:13 pm
content: Quote from: Jon Chandler on February 19, 2013, 05:04:31 pmCare to prove me wrong ?HP3561 , HP3562 , 3563 , Hp35660, Hp35665 are all old clunkers.Stanford's SR780 and SR785 are old clunkers as well. they were designed 20 years ago and they still sell em. You can still get them new. But there is no developnent on them and they are full of obsolete parts. We fried the source drive last year. an LM68xx opamp that is now pure unobtainium. I vaguely remember seeing a mostek transputer chip in there or was it a motorola 56k dsp... good luck finding that. so yeah, you can classify that too as an old clunker.The above are all FFT machines with software that is 15 to 20 years old... I have several of those machines in my lab. The 3562 uses a bit slice based custom processor to do the FFT's as its little 6802 cpu would melt down trying to do that.The latest one they did was the one with the amber plasma display in it ( forgot the model number ) and that too is 15 years ago. you may still be able to order that one ( they list it as 'call for availability...) and it ain't going to be at hobby prices.My remark is aimed at the hobby / small lab that would buy a used DSA on ebay as those are within their budget... and 90% of the 35xx series on ebay have their tubes at end of life...There may be some esoteric brands out there that still make these things , that i don't know.

author: free_electron
author_rank: Super Contributor
timestamp: February 19, 2013, 08:21:34 pm
content: Quote from: ddavidebor on February 19, 2013, 07:55:18 pmWhat i mean with that statement is that the algorithms , windowing options and other processing options have evolved over time. there are now signal processing and generation techniques (both software and hardware) that were not available when these machines were built. As these machines have long been discontinued they will never get this new stuff.Measuring this low in the spectrum is pretty hard because you deal with long measuring times. Any kind of 'wobble' in your oscillator (sideband noise in technical terms) and it goes to snot...And if you are fishing for impulse or spurious events. And that is what a DSA does. We use em to characterize mechanical systems ( not me. colleagues of me)Of course you can use the DSA as a bode plotter and then it doesn't matter at all. But i wouldn't spend 800 to 1000$ on used 'old clunker' with 30 year old firmware , and a nearly dead display, if i can do bode plots equally fine using a good LF sweeper.Actually for that low frequent stuff you may want to get a vector voltmeter (if these go that low ...). and sweep those in sync. i'll happily give you both amplitude and phase at the same time. although my guts says those will be pricey as well.. and also pretty old.messing around in the low end of the spectrum is just as hard, if not harder, then messing around in the Ghz domain.

author: lewis
author_rank: Frequent Contributor
timestamp: February 19, 2013, 08:30:26 pm
content: Quote from: olsenn on February 19, 2013, 12:03:14 amThe HP3585A is a spectrum analyser operating from 20Hz to 40MHz. It's an absolutely fantastic bit of gear, weighing in at about 50kg. I use mine for audio frequency work, and you can get them pretty cheap. It has a tracking generator too, and selectable 50R, 75R and, crucially, 1M input impedance. It's a real old clunker, but after 30 years its ovenised crystal reference is still bang on.

author: ddavidebor
author_rank: Super Contributor
timestamp: February 19, 2013, 08:32:34 pm
content: @free_electron i agree with you, but between 30y and 15 there's a lot of difference.

author: free_electron
author_rank: Super Contributor
timestamp: February 19, 2013, 09:38:43 pm
content: Quote from: lewis on February 19, 2013, 08:30:26 pmThat is about the only option you have (try to get a 'B' version). I used that machine extensively when developing POTS (plain old telephone system) chipsets. that was the go-to machine. But also .. an old clunker...Analysers these days start at 9KHz and move up. There are exceptions like the 4395 network analysers but those are mega-expensive even used on ebay.

author: dfnr2
author_rank: Regular Contributor
timestamp: February 19, 2013, 09:57:44 pm
content: Quote from: silicon_ghost on February 18, 2013, 11:16:55 pm"Characterize" is a very broad term. Exactly what will you be trying to observe about your circuits? From what you describe, it appears that a spectrum analyzer is NOT what you want anyway, given that it's a scalar device. It sounds like you want to use a scope to do scope stuff, but would be interested in automating it. You can use a scope to generate a bode plot. However, if you automate this, you can count on very slow scans, because you will have code that adjusts the attenuation on the scope to keep the signal in range, use the setting to plot the point. Your software will also have to extract the phase. If you do this by hand, you will probably be much faster, since the AI between your ears will be able to sweep the frequency and adjust the scope settings until you see you need to measure another point.Audio analyzers (as far as I know--I don't have one) can be useful if you are interested in scalar freq response, distortion, noise, etc.; but that's hardly general purpose, and not what you seem to indicate.Dynamic signal analyzers (ignoring the point made about repairability of older units) can make bode plots, and are most often used for control system design, such as characterizing and stabilizing rotating or vibrating mechanical systems; but can be used in general electrical control/feedback design. These are expensive and most likely overkill for, say, filter characterization. You won't ever have to wonder if you need one. If you know enough to need one, you will know enough to know that you do.

author: silicon_ghost
author_rank: Contributor
timestamp: February 20, 2013, 02:02:26 am
content: Quote from: free_electron on February 19, 2013, 04:35:20 pmQuote from: free_electron on February 19, 2013, 04:35:20 pmWow, this is exactly the info I was looking for. It seems the HP 3325B also has RS 232 and GPIB if I choose to automate any of my tests beyond a front-panel sweep.I'm quite familiar with FFTs, PSDs, and FRFs. My code at work has to deal with that quite often.Quote from: dfnr2 on February 19, 2013, 09:57:44 pmIn an ideal world I could collect the raw time data at a fast rate (over a long enough time) and save that on the computer. I would then apply necessary windowing functions and generate FRF plots of the time data. A DSA to me looks like a hardware FRF but the cost seems to climb rapidly with bandwidth.My rather limited understanding of digital storage scopes seems to imply that the scope is blind to the signal for rather long stretches of time. That is fine for repeating signals but fails at a continuous acquire like I'm used to for high speed ADCs.I'm now wondering if the 140M point memory of the Rigol DS4024 can be filled as one continuous block in time. I don't know enough to know how to phrase the question, lol. In normal high speed ADC systems, I would know that I have enough storage for N points and my sample rate dictated the longest contiguous waveform I could acquire. How does that apply to DSOs if I'm one-shotting the trigger?

author: dfnr2
author_rank: Regular Contributor
timestamp: February 20, 2013, 07:12:08 am
content: Quote from: silicon_ghost on February 20, 2013, 02:02:26 amI think it's best to start with what you are trying to characterize, rather than how, just to make sure you're focusing on the right area.Yes, DSO's have a dead time, as do analog scopes. It's a huge percentage for a fast sweep, and a tiny percentage for a slow sweep. This matters for some things, and doesn't matter for others; usually not an issue for 99% of applications.Depending on what you're doing, you may want to figure out if dynamic range of the scope is sufficient.