Using Rigol DS1052E for spectrum analysis - Page 1
Forum section: electronics / general

author: dexter2048
author_rank: Newbie
timestamp: June 03, 2012, 10:22:26 pm
content: 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 athttp://meteleskublesku.cz/wfm_view/(freeware :o)

author: typeglob
author_rank: Contributor
timestamp: June 04, 2012, 02:00:52 am
content: Thanks for this, it looks interesting.Edit: I toyed around with it a bit and this goes into the toolbox

author: MikeK
author_rank: Super Contributor
timestamp: June 04, 2012, 02:13:28 am
content: Very nice!

author: typeglob
author_rank: Contributor
timestamp: June 04, 2012, 03:02:47 pm
content: 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.pngI 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.

author: chrome
author_rank: Regular Contributor
timestamp: June 04, 2012, 03:36:31 pm
content: 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.

author: Lightages
author_rank: Unknown
timestamp: June 04, 2012, 06:52:19 pm
content: Thank you for your work.

author: chrome
author_rank: Regular Contributor
timestamp: June 04, 2012, 08:57:49 pm
content: Any chance on it being/going open source?

author: gtsili
author_rank: Contributor
timestamp: June 04, 2012, 09:40:34 pm
content: Quote from: chrome on June 04, 2012, 08:57:49 pm+1.

author: typeglob
author_rank: Contributor
timestamp: June 04, 2012, 09:50:20 pm
content: Quote from: chrome on June 04, 2012, 03:36:31 pmyeah, 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.

author: Kozmyk
author_rank: Regular Contributor
timestamp: June 05, 2012, 12:25:54 am
content: 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.

author: amspire
author_rank: Super Contributor
timestamp: June 05, 2012, 02:06:59 am
content: I tried the viewer and I really love it. A really neat and clear plot. Thank you dexter2048.Richard.

author: siliconmix
author_rank: Frequent Contributor
timestamp: June 05, 2012, 05:56:49 am
content: thankyou and welcome to this blog you very clever person.i am envious of your programming skills .

author: saturation
author_rank: Super Contributor
timestamp: June 05, 2012, 10:17:25 am
content: KUDOS! Fantastic work, you've made a huge dent in the functionality of the 1052e! Your software should be mandatory for all Rigol owners.

author: dorcky
author_rank: Newbie
timestamp: June 05, 2012, 04:28:16 pm
content: This is not work on Windows XP?WHY?

author: chrome
author_rank: Regular Contributor
timestamp: June 05, 2012, 04:39:08 pm
content: Quote from: dorcky on June 05, 2012, 04:28:16 pmQuote

author: dorcky
author_rank: Newbie
timestamp: June 05, 2012, 04:41:39 pm
content: I saw that, but I still use Wingows XP

author: chrome
author_rank: Regular Contributor
timestamp: June 05, 2012, 04:51:26 pm
content: that makes no sense

author: dexter2048
author_rank: Newbie
timestamp: June 05, 2012, 11:18:58 pm
content: 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)

author: gtsili
author_rank: Contributor
timestamp: June 06, 2012, 05:26:13 am
content: Quote from: dexter2048 on June 05, 2012, 11:18:58 pmFair 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.

author: BravoV
author_rank: Super Contributor
timestamp: June 06, 2012, 05:33:12 am
content: Quote from: dexter2048 on June 05, 2012, 11:18:58 pm1st, 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.

author: amspire
author_rank: Super Contributor
timestamp: June 06, 2012, 06:22:17 am
content: 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.

author: bingo600
author_rank: Super Contributor
timestamp: June 06, 2012, 05:54:53 pm
content: I would love to try it out.I have a DS1052E & a DS1102E , and 3 WinXP machines + 2 Ubuntu Machines.No Win7/Bingo

author: typeglob
author_rank: Contributor
timestamp: June 07, 2012, 01:56:10 am
content: Quote from: BravoV on June 06, 2012, 05:33:12 amYup. 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.

author: dexter2048
author_rank: Newbie
timestamp: June 08, 2012, 11:25:41 am
content: 2gtsili: my wfm file parser is here: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.

author: gtsili
author_rank: Contributor
timestamp: June 08, 2012, 12:07:46 pm
content: 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:yes = True; nay = False;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.Quote from: dexter2048 on June 08, 2012, 11:25:41 am

author: doctormord
author_rank: Regular Contributor
timestamp: August 07, 2012, 03:24:06 pm
content: Kudos! Great application.Cheers doctormord

author: KD0CAC John
author_rank: Frequent Contributor
timestamp: August 07, 2012, 05:06:08 pm
content: 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 ?

author: T4P
author_rank: Super Contributor
timestamp: August 07, 2012, 06:05:09 pm
content: Quote from: KD0CAC John on August 07, 2012, 05:06:08 pmIt's the same scope

author: mabl
author_rank: Regular Contributor
timestamp: March 25, 2013, 10:17:30 am
content: Quote from: dexter2048 on June 08, 2012, 11:25:41 amHi 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?

author: eeeinside
author_rank: Newbie
timestamp: March 25, 2013, 04:36:26 pm
content: awesome...

author: SLJ
author_rank: Frequent Contributor
timestamp: March 25, 2013, 04:56:23 pm
content: Downloaded the .wmf viewer and it works nicely for my DS1102E files on Windows 7.Thank you!

author: NewestRigolUser
author_rank: Contributor
timestamp: June 16, 2018, 10:08:54 pm
content: 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

author: NewestRigolUser
author_rank: Contributor
timestamp: June 16, 2018, 10:23:59 pm
content: Just found PyDSA. Looks like it's a nice tool for this purposehttp://rheslip.blogspot.com/2015/09/software-spectrum-analyzer-for-rigol_18.html