Hacking the Rigol DS1052E Oscilloscope With Linux

210,868

108

45

Published

Introduction: Hacking the Rigol DS1052E Oscilloscope With Linux

About: Just a dude who reads a lot of Instructables.

I was in the market for an oscilloscope, but I didn't want to spend much.  I found out about Rigol and their line of $300-400 scopes, and was getting ready to buy one.  Then I found a post on how to make your DS1052E, which costs about $400 into a DS1102E, which costs about $700 with a simple firmware modification!  I bought the scope right after, and I received it in the mail today.  It's pretty nice by default, but doubling the bandwidth is always a plus.

The DS1052E has a 50Mhz maximum frequency, but it has exactly the same hardware (as far as the reverse-engineering folks can tell) as the DS1102E, which has a 100Mhz maximum.  This guide will show you how to make the switch very easily using Linux.  You can do it in Windows too, but it's a bit more involved, and Linux makes it really really easy.

I've attached the Rigol user guide for both units, in case you don't have one.

WARNING: It's entirely likely that this completely voids your warranty.  Make sure you know what you're doing - you can brick your scope if you screw anything up.

Step 1: Spec Comparison

Here are the specs of the 2 scope models.  Our test to see if we've succeeded is by looking at the Time Base Range minimum setting - the DS1052E has a 5ns/div setting, where the DS1102E has a 2ns/div setting - a much more accurate view for sure!

Step 2: Get Linux Running

The first step is to get Linux going if you don't already have it.  I use Ubuntu 10.10 as my desktop OS, so I was able to skip this step.  If you don't want to continue running Linux, and just want to get this scope flashed, you can download the Ubuntu LiveCD, burn it, and boot from it.  

Step 3: Change the Language If Necessary

My Rigol booted up into Chinese the first time, and it took me a while to figure out where the menu was to change it to English.  Press the Utility button, then press the second to last menu button over and over until you get to English, then push the Menu On/Off button to go back.

Step 4: Find Your Firmware Version

You can find the System Info menu item in the same Utility menu as before, just on the last page.

As you can see in the picture, I've got firmware 02.05.00.00 HardVersion 58. You can get all these details by going into the System Info dialog, pressing CH1 twice, then CH2 twice, then MATH once.  Just be very careful once you do that sequence - apparently you can screw stuff up if you press anything other than RUN/STOP at this point.

Step 5: Prepare the Software

I used this extremely good forum writeup as a guide for the process.  As more firmware versions come out, the post will be updated, and this instructable might not.  Therefore, in this step, you need to click the link above, and find something resembling the following:

DS1052_to_DS1102.zip

This file contains a collection of different firmwares.  At this point, for my original firmware, I needed the following parts:

02.02.SP2_patched_to_02.05.01.02
02.04.SP1_original

The first one has a hex-edited version of firmware 02.02.SP2 that makes a 02.05 Rigol think it's an upgrade when it's really a downgrade.  You need to downgrade to 02.02.SP2 to enable the modifications we're going to make.  Refer to the forum post for more instructions if you have a different firmware than I have.

I simply put the first firmware on a USB key (02.02.SP2_patched_to_02.05.01.02) in the root.  The key was formatted with FAT16.  Then, I safely ejected the key, put it back in the computer, mounted it, and ran the following:
md5sum DS1000EUpdate.RGL
I compared this to the .md5 file that was also in the directory from the zip file.  They matched.

If they don't match, DO NOT CONTINUE.  YOU WILL PROBABLY BRICK YOUR SCOPE.

Step 6: Load the 02.02 Firmware Onto the Scope

  1. Put the key in the scope
  2. It will prompt you to update.  Do it
  3. Once it's complete, it says "Updata successed,please restart", the best message ever.
  4. Push the power button on the top
  5. Unplug the USB key
  6. Push the power button again to turn it on.  You should see the new version in the splash screen.

Step 7: Execute USB Commands

Now that we're running the old firmware, we can do the traditional hack to change this scope.

I found this post really handy for this step.  Hook up the USB cable to the back of the unit.  Any generic USB cable will do - there's nothing special about it.  I used one from my Arduino :).  Once you have the device connected, make sure using dmesg:

[159486.820070] usb 4-2: new full speed USB device using ohci_hcd and address 11
[159487.214647] usbcore: registered new interface driver usbtmc

If you don't see that, try a different Linux (a newer kernel perhaps?) or check your connections a few times.  I'm using Ubuntu 10.10, and it worked perfectly the first time.  Now, we just need to get our commands straight.  The first command sets the model number.  You should probably leave this line as-is:
echo ":INFO:MODEL DS1102E" | sudo tee /dev/usbtmc0
This second line is where you have some wiggle room. Apparently, the firmware cares what your serial number is, so you have to make it a valid DS1102E serial number. The following was taken from the cited blog post above, and he states it was found in an eBay auction. Your original serial number is on the back sticker on the case in case you ever want to change it back.
echo ":INFO:SERIAL DS1EB11305432" | sudo tee /dev/usbtmc0
There.  That's all you need to do with your computer.  At this point, the scope had locked up on me, so I just unplugged it from the USB and rebooted it.  Then, I went into the System Info and checked the model and serial numbers.  See the picture.

Step 8: Flash an Actual DS1102E Firmware

Now that we've gone through all that pain, we have to do one last flash of a working DS1102E firmware to finish the job.  Do it exactly the same as step 4, except this time use the firmware specified in the forum post for your model.  I used 02.04.SP1, which was included with the zip file.  The process is literally exactly the same as step 4, so you can just follow that.

Step 9:

Once the update completes and you've restarted the unit, take a look at the System Info.  You should see DS1102E, the serial number you punched in, and firmware 02.04.SP1.  

Step 10: Test It!

Now, let's see if the scope can measure down to 2ns increments!  

Step 11: Update: Acquired My First Images!

Below you can see my test waveform from the probe compensation terminals.  I've also enabled Delayed Scan mode to get both zoomed and full waveforms on the screen.  It's a cool effect.

Step 12: Update: Testing (Not Mine)

There was some discussion in the comments that I didn't have enough testing in here.  That's mainly because I don't have a function generator (yet), and I had other results to look at.  There's some true scope enthusiasts who've confirmed this mod works by using a function generator and looking at the maximum analog bandwidth and rise times.  Going through the eevblog forum post gets some good results.  This is a sampling:

Here's an analysis using a sine wave of the analog bandwidth.

Rigol DS1102E 100MHz 1GS/S
Start:100kHz End:117MHz
Notes:Used 16X average. Real Time. Equivalent seems to extend bandwidth. I still have to research the difference between the two.

Rigol DS1052E 50MHz 1GS/S (This is the modded scope)
Start:100kHz End:123MHz
Notes:Used 16X average. Real Time. Equivalent seems to extend bandwidth.
Yes really slightly better then the real DS1102E I went back and forth several times.
Here's it against a 200Mhz Tek and an unmodified unit. Notice how much the waveform looks like the Tek image?
Here's someone measuring a 109Mhz signal with a modified unit.  Looks great!

Share

Recommendations

  • Clocks Contest

    Clocks Contest
  • Make it Move Contest

    Make it Move Contest
  • Oil Contest

    Oil Contest
user

We have a be nice policy.
Please be positive and constructive.

Tips

Questions

45 Comments

Yeah, I know I'm a bit to late to the party. I used most - but not all - of your guide to "updata" my DS1052E. Worked like a charm. Thanks a bunch.

1 reply

Where did you find the files? It looks like Fileshare and the other site are down.

Thanks,

Denis

My SW version is 00.02.05 SP1.

Is it possible to upgrade it to 100MHz with no issues..?

Thanks in advance!

Does this mod/upgrade still work with the newer versions of the scope? I'm in the market to upgrade my cheap usb scope :) I was lookign at the Rigol DS1102E then stumbled across this thread :) May be worth saving the 100$ if its still working with newer firmware

I changed the fan to a cheap 80cm (Banggood).

I think I used an 18 ohm resistor in series.

Very quiet and cool. Also attached an adhesive heatsink to the 7905 regulator.

Also from Banggood. Very simple mods after you get the case open :-)

1 reply

Awesome! Glad people are taking this even further than I did. Keep up the good work!

It's so tempting to snag one of these, but I got spoiled by the 4 channel scopes at work, and I do a lot of 3 phase and sequential signal stuff... I am using a Tektronix T932 35 MHz dual channel analog scope... That's older than I am.

I REALLY want to upgrade, but I think I have to force myself to save for 4 channels. Now if Rigol has a 4 channel like this! XD

That message was a thing of TRUE BEAUTY! I LOLed, HARD!!! XD

Translated to engrish:

The communicated is the positive beautiful product.Laughter strong.

太厉害了...

I have firmware 00.04.01.00.02 with HW version 58. Is it still possible to hack the scope?

1 reply

Analog bandwidth is NOT "maximum frequency".

Nice job man, thats a great mod, definitely worth the time.

How do you like that unit in general? Does the quality feel lacking or is it sufficiently well made? I'd like to hear your thoughts on the device.

5 replies

Having used Agilents a bit in College (I'm CS by trade, not EE, but I had a couple EE classes), this probably doesn't quite compare, but it's still a bargain at $300. The unit is pretty heavy (maybe 8 lbs?), knobs are well-made, it's responsive, I like the button layout, the menus are fine. But I haven't tested it thoroughly - it's my first scope, and I'm a EE novice, but there's a pretty large community that seems to like this scope. I wish I could give you a more detailed response :).

I really like that it's so low-profile - it's not deep like most of the scopes I've seen. It's about the size of a small shoebox. I think it's a great scope for a beginner, but if one had more stringent requirements, they should look elsewhere and spend more.

Thanks for reading!

"The unit is pretty heavy"

lol wut? It's light compared to my old analog scope! For something like this, lighter is better.

I have the Rigol scope at home and another similarly-priced Chinese scope at work (JingCe), and the Rigol is much better. Better build quality, memory size, and firmware.

I have the same scope, but I wouldn't upgrade until I finally get to the >50MHz level with my hacking.

Overall its a very nice scope. Big, glowing buttons, easy to navigate interface, and long list of features.

One problem: I'm coming from using university-level HP Analog oscilloscopes, so I was a bit spoiled with the near instant Auto-Scale times. The Rigol takes about 2-3 seconds to lock onto a signal, which once again wasn't a deal-breaker for me, just something I missed when switching from analog to DSO.

I suggest playing with it first if it is within your budget. Like many other tools, you get what you pay for. I wish I had ~10k to buy an HP/Agilent, but I don't so I had to go for this.

My 2 cents.

Yeah I noticed the AUTO is a little slow, but at this point, I really don't mind. I agree with SuperSonik 100%.

Quote "This guide will show you how to make the switch very easily using Linux. You can do it in Windows too, but it's a bit more involved, and Linux makes it really really easy."

Linux always makes things easier :)  And free too.