EEVblog Electronics Community Forum

General => General Technical Chat => Topic started by: dexter2048 on June 03, 2012, 10:22:26 pm

Title: Using Rigol DS1052E for spectrum analysis
Post by: dexter2048 on June 03, 2012, 10:22:26 pm
I tried to use the FFT feature of DS1052E, but I could not convince the damn thing to show what I needed to see. Finally I decided to invest some time and write a wfm file viewer with FFT spectrum analysis.

The results are surprisingly nice, especially with sampling rates upto 500MHz, where DS1052E allows to store 1M samples. With a piece of wire inserted instead of probe (first picture) I sampled and stored the inducted waveform. The second picture shows FM band of the resulting spectrum :o) The noise floor and number of "visible" FM stations is really nice for an 8-bit ADC!

I made the viewer accessible for everyone at http://meteleskublesku.cz/wfm_view/ (http://meteleskublesku.cz/wfm_view/) (freeware :o)
Title: Re: Using Rigol DS1052E for spectrum analysis
Post by: typeglob on June 04, 2012, 02:00:52 am
Thanks for this, it looks interesting.

Edit: I toyed around with it a bit and this goes into the toolbox  :)
Title: Re: Using Rigol DS1052E for spectrum analysis
Post by: MikeK on June 04, 2012, 02:13:28 am
Very nice!
Title: Re: Using Rigol DS1052E for spectrum analysis
Post by: typeglob on June 04, 2012, 03:02:47 pm
I did some more testing. I probed the +5V output of the power regulator on my Arduino Mega (ATmega 2560, 16 MHz clock). Using the FFT function on the Rigol itself I don't see anything, but with your program I do.

(http://img404.imageshack.us/img404/521/arduino2560.th.png)
http://img404.imageshack.us/img404/521/arduino2560.png (http://img404.imageshack.us/img404/521/arduino2560.png)

I see a peak at 32 MHz, with harmonics at 64, 96, etc and some kind of 'echo' (not the right term) at 16 and 48 MHz (peaks have roughly the same level). This was while powered from USB, but when powered from a seperate DC supply I got pretty much the same thing.

It surprises me I get a peak at 32 MHz, not 16 MHz. As far as I know the ATmega doesn't internally double its clock or something like that. The ATmega may have been running some code that has a fast PWM configured (been experimenting with DDS), but as far as I know that PWM runs at a maximum of 16 MHz (= system clock), not 32.

Anyway, the result intrigues me; your software definately can extract more from the data than the FFT function on the Rigol itself.

Edit: hmm, if I would look at a 16 MHz square wave, I would only get odd-numbered harmonics, which might explain why I see a peak at 32, 64 and 96 but not at 48, 80, etc. However, there is something there at 48 MHz; after that things disappear a bit in the general noise.
Title: Re: Using Rigol DS1052E for spectrum analysis
Post by: chrome on June 04, 2012, 03:36:31 pm
Wow this thing is nice, would nice if you could add "labels" where you click on a point and it either adds a legend for it or adds a label near the point.
Title: Re: Using Rigol DS1052E for spectrum analysis
Post by: Lightages on June 04, 2012, 06:52:19 pm
Thank you for your work.
Title: Re: Using Rigol DS1052E for spectrum analysis
Post by: chrome on June 04, 2012, 08:57:49 pm
Any chance on it being/going open source?
Title: Re: Using Rigol DS1052E for spectrum analysis
Post by: gtsili on June 04, 2012, 09:40:34 pm
Any chance on it being/going open source?

+1.
Title: Re: Using Rigol DS1052E for spectrum analysis
Post by: typeglob on June 04, 2012, 09:50:20 pm
would nice if you could add "labels" where you click on a point and it either adds a legend for it or adds a label near the point.
yeah, that's also what I was missing a bit. It has an 'annotation' function, but you can just use it to show a single point, not do something like this.
Title: Re: Using Rigol DS1052E for spectrum analysis
Post by: Kozmyk on June 05, 2012, 12:25:54 am
This is excellent work.
Thank you for sharing it with us.

I've just grabbed it for now.
I'll have a go with it after the holidays.  ;)
Title: Re: Using Rigol DS1052E for spectrum analysis
Post by: amspire on June 05, 2012, 02:06:59 am
I tried the viewer and I really love it. A really neat and clear plot. Thank you dexter2048.

Richard.
Title: Re: Using Rigol DS1052E for spectrum analysis
Post by: siliconmix on June 05, 2012, 05:56:49 am
thankyou and welcome to this blog you very clever person.i am envious of your programming skills .
Title: Re: Using Rigol DS1052E for spectrum analysis
Post by: saturation on June 05, 2012, 10:17:25 am
KUDOS! Fantastic work, you've made a huge dent in the functionality of the 1052e!  Your software should be mandatory for all Rigol owners.
Title: Re: Using Rigol DS1052E for spectrum analysis
Post by: dorcky on June 05, 2012, 04:28:16 pm
This is not work on Windows XP?  :-[ WHY? :'(
Title: Re: Using Rigol DS1052E for spectrum analysis
Post by: chrome on June 05, 2012, 04:39:08 pm
This is not work on Windows XP?  :-[ WHY? :'(

Quote
Requirements:
  Basic knowledge of windowed FFT spectrum analysis
  Any version of Windows that supports Direct2D API (Server 2008, Vista, 7, ...)
Title: Re: Using Rigol DS1052E for spectrum analysis
Post by: dorcky on June 05, 2012, 04:41:39 pm
I saw that, but I still use Wingows XP  ;D
Title: Re: Using Rigol DS1052E for spectrum analysis
Post by: chrome on June 05, 2012, 04:51:26 pm
that makes no sense
Title: Re: Using Rigol DS1052E for spectrum analysis
Post by: dexter2048 on June 05, 2012, 11:18:58 pm
Thanks everyone for the great replies!

2typeglob: I think you get the peak at 32MHz, because the chip draws current twice per clock. Part of the inner circuitry is triggered by rising edge of the clock and the other part by the falling edge.

"labels" where you click on a point: You're right. In fact, I have a "Fixed annotation points" item in my todo list, but I won't be developing the program any further in the near future. 

open source: Not really. Making Delphi chart components has been my minor hobby for quite some years and I'm planning to get some green for it in the future :o)

WinXP: No, it doesn't run on XP, since XP don't have the Direct2D API. And I read on Microsoft's web something like "Don't even bother trying to copy d2d1.dll from another version of Windows". They just want us to buy their product again and again every two years.
By the way, I find it interesting that 3D hardware-accelerated drawing (DirectX) has been around for decades, but 2D came only very recently. One might even get the impression, that there's more fans of 3D FPS games, than those interested in technical charts :o)
           

Title: Re: Using Rigol DS1052E for spectrum analysis
Post by: gtsili on June 06, 2012, 05:26:13 am

open source: Not really. Making Delphi chart components has been my minor hobby for quite some years and I'm planning to get some green for it in the future :o)
           

Fair enough. I was looking around for the specifications of the .wfm file format and as it turns out, it is both proprietary and also there is no compatibility even between scopes of the same manufacturer. I have not found a .wfm reader (with source) that works with Rigol, so I was wondering if you can at least release as source the parser part of your program or at least provide us with any documentation and pointers you have on how to parse the file.
Title: Re: Using Rigol DS1052E for spectrum analysis
Post by: BravoV on June 06, 2012, 05:33:12 am
<snip>...... I'm planning to get some green for it in the future :o)

1st, thanks for the freestuff, about getting some green, its perfectly fine and I don't have any problem to shell out some, please don't stop on the to do list.

Believe there are many potential customers around here in this forum alone. ;)

PS : Infact this forum it self is the good place to start judging from the popularity of DS1052E.
Title: Re: Using Rigol DS1052E for spectrum analysis
Post by: amspire on June 06, 2012, 06:22:17 am
The FFT graph from this utility is so good, that I am wondering about using the DS1050E as a simple spectrum analyzer with the help of a vco, mixer and some kind of wideband receiver module, like a 2.4GHz WiFi module. The WiFi channel bandwidths are 20MHz ("g") and 40MHz ("n").

So a mixer with a 1.4 to 2.4GHz VCO going into the WiFi receiver module, then to the Rigol - something like that. The Rigol then captures the result and the data is used in the FFT viewer.

Any RF guys with ideas?

Richard.
Title: Re: Using Rigol DS1052E for spectrum analysis
Post by: bingo600 on June 06, 2012, 05:54:53 pm
I would love to try it out.
I have a DS1052E & a DS1102E , and 3 WinXP machines + 2 Ubuntu Machines.

No Win7   :-[

/Bingo
Title: Re: Using Rigol DS1052E for spectrum analysis
Post by: typeglob on June 07, 2012, 01:56:10 am
1st, thanks for the freestuff, about getting some green, its perfectly fine and I don't have any problem to shell out some, please don't stop on the to do list.

Believe there are many potential customers around here in this forum alone. ;)
Yup. Depending on the features and the price, I would buy it. However, with a commercial product I do think you need to support it (fix bugs, mainly) for at least 6-12 months. Assuming you come out with a single version and don't add any new features, 6-12 months should be enough to iron out all the bugs and get it rock stable.
Title: Re: Using Rigol DS1052E for spectrum analysis
Post by: dexter2048 on June 08, 2012, 11:25:41 am
2gtsili: my wfm file parser is here: http://meteleskublesku.cz/wfm_view/file_wfm.zip (http://meteleskublesku.cz/wfm_view/file_wfm.zip). I had no reference when writing it, all is just rev-engineered. Anyway, I think that Rigol's wfm format is a bit messy.

2typeglob: I don't plan to sell the wfm viewer. It's free. But I don't want to release the full source, because I want to sell the Delphi chart component used within.
Title: Re: Using Rigol DS1052E for spectrum analysis
Post by: gtsili on June 08, 2012, 12:07:46 pm
Wow, I am both impressed about taking the time to rev-eng Rigol's messy wfm format and the high quality of your source code. Thumps up!!!

I also found this in your source code:
Code: [Select]
yes = True; nay = False; ;D Awesome, I like it.

Thank you for open sourcing the parser, hopefully whoever makes use of it will give you credit. I certainly will if I put my lazy ass down and do something with it. :P

2gtsili: my wfm file parser is here: http://meteleskublesku.cz/wfm_view/file_wfm.zip (http://meteleskublesku.cz/wfm_view/file_wfm.zip). I had no reference when writing it, all is just rev-engineered. Anyway, I think that Rigol's wfm format is a bit messy.
Title: Re: Using Rigol DS1052E for spectrum analysis
Post by: doctormord on August 07, 2012, 03:24:06 pm
Kudos! Great application.  :o :-*

Cheers doctormord
Title: Re: Using Rigol DS1052E for spectrum analysis
Post by: KD0CAC John on August 07, 2012, 05:06:08 pm
I need a Spec. analyzer , this may work for some stuff until I can afford a real one , GREAT / Thanks .
I have a DS 1102E , would like to know if this could work or does there need to be some changes ?
Title: Re: Using Rigol DS1052E for spectrum analysis
Post by: T4P on August 07, 2012, 06:05:09 pm
I need a Spec. analyzer , this may work for some stuff until I can afford a real one , GREAT / Thanks .
I have a DS 1102E , would like to know if this could work or does there need to be some changes ?

It's the same scope
Title: Re: Using Rigol DS1052E for spectrum analysis
Post by: mabl on March 25, 2013, 10:17:30 am
2gtsili: my wfm file parser is here: http://meteleskublesku.cz/wfm_view/file_wfm.zip (http://meteleskublesku.cz/wfm_view/file_wfm.zip). I had no reference when writing it, all is just rev-engineered. Anyway, I think that Rigol's wfm format is a bit messy.

Hi dexter2048,
Hi all,

I used your code to implement a parser in Python. I think it is the most feature complete open source parser out there yet.

One question though: Have you found a difference between D and M variants of scale,shift ect?
Title: Re: Using Rigol DS1052E for spectrum analysis
Post by: eeeinside on March 25, 2013, 04:36:26 pm
 :-+ awesome...
Title: Re: Using Rigol DS1052E for spectrum analysis
Post by: SLJ on March 25, 2013, 04:56:23 pm
Downloaded the .wmf viewer and it works nicely for my DS1102E files on Windows 7.
Thank you!
Title: Re: Using Rigol DS1052E for spectrum analysis
Post by: NewestRigolUser on June 16, 2018, 10:08:54 pm
Looks interesting. I'm new to Rigol scopes so I'm not sure how to use this tool.

I've just been playing around with FFT on my DS1054. The usability isn't nice. Cannot see which frequencies peak (it's more a round about by frequency/devider). So might this tool run on Windows 10?
And du I have to export my scope's data on USB and transfer it into this tool? Or does it modify my scope?
I've read users auf running own tools on the scope. But I don't wanna break mine ;)
Title: Re: Using Rigol DS1052E for spectrum analysis
Post by: NewestRigolUser on June 16, 2018, 10:23:59 pm
Just found PyDSA. Looks like it's a nice tool for this purpose ;)
http://rheslip.blogspot.com/2015/09/software-spectrum-analyzer-for-rigol_18.html (http://rheslip.blogspot.com/2015/09/software-spectrum-analyzer-for-rigol_18.html)