Author Topic: Complete Project: Remote switch for Rigol Oscilloscope  (Read 12799 times)

0 Members and 1 Guest are viewing this topic.

Offline johnmxTopic starter

  • Frequent Contributor
  • **
  • Posts: 285
  • Country: pt
Complete Project: Remote switch for Rigol Oscilloscope
« on: December 23, 2011, 11:04:58 pm »
Sometimes when taking single acquisitions I have to hold both oscilloscope tips on the PCB with both hands and there is no free hand to press the Rigol’s Run button. That’s when the nose gets handy  ;D

So I came across with a project idea: a remote switch for the Rigol oscilloscope, preferably a footswitch.

Did any of you ever build such switch?

My idea is to put a small microcontroller in the footswitch to control the Rigol through RS232. It just needs to send the RUN command every time the switch is pressed.

What do you think about the idea?
« Last Edit: January 28, 2012, 05:13:05 pm by johnmx »
Best regards,
johnmx
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 18901
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Remote switch for Rigol Oscilloscope
« Reply #1 on: December 23, 2011, 11:06:27 pm »
can't you clip the probes on first then press the button ?
 

Offline johnmxTopic starter

  • Frequent Contributor
  • **
  • Posts: 285
  • Country: pt
Re: Remote switch for Rigol Oscilloscope
« Reply #2 on: December 23, 2011, 11:14:54 pm »
Usually I want to see the signals in the pads of small SMD components or PCB traces and it's impossible to clip the tip without soldering small pieces of wires.
Best regards,
johnmx
 

Offline clonecrp

  • Regular Contributor
  • *
  • Posts: 52
    • http://theclonestore.com
Re: Remote switch for Rigol Oscilloscope
« Reply #3 on: December 23, 2011, 11:36:35 pm »
GREAT IDEA ! ...
 
Been waiting for this idea ... thought I was the only one with the problem  ???

Now all we need is an EE.. ;)

Doug
 

Offline PeterG

  • Frequent Contributor
  • **
  • Posts: 843
  • Country: au
Re: Remote switch for Rigol Oscilloscope
« Reply #4 on: December 24, 2011, 12:09:48 am »
I have looked at this idea, it can be done. I like the footswitch idea :D
I was thinking of setting up a few push buttons mounted on a shelf with each button pre programmed with a setup for the scope.

Regards
Testing one two three...
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 12665
  • Country: nz
Re: Remote switch for Rigol Oscilloscope
« Reply #5 on: December 24, 2011, 03:14:46 am »
I'm not sure if the Rigol serial protocol is open. But even if its not you should be able to figure out the command by listening to the serial port and pressing the run/stop button on the official rigol remote control app.
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline PeterG

  • Frequent Contributor
  • **
  • Posts: 843
  • Country: au
Re: Remote switch for Rigol Oscilloscope
« Reply #6 on: December 24, 2011, 03:36:59 am »
Rigol have a PDF explaining there full command set for both Serial and USB.

Regards

http://www.digitalscopes.net/pdf/DS1000%20Programming%20Manual%20(English).pdf
« Last Edit: December 24, 2011, 03:54:07 am by PeterG »
Testing one two three...
 

Offline firewalker

  • Super Contributor
  • ***
  • Posts: 2481
  • Country: gr
Re: Remote switch for Rigol Oscilloscope
« Reply #7 on: December 24, 2011, 07:45:47 am »
Nice one! It could be even be triggered by sound. Like a whistle!

Like some old key rings that would answer back in a whistle (in order to locate it).

Alexander.
Become a realist, stay a dreamer.

 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 18901
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Remote switch for Rigol Oscilloscope
« Reply #8 on: December 24, 2011, 09:26:35 am »
I had though that "one day" I'd like to recreate the whole rigol control panel, particularly as the time base control is already playing up, shortcuts and the like could be added
 

Offline Bored@Work

  • Super Contributor
  • ***
  • Posts: 3932
  • Country: 00
Re: Remote switch for Rigol Oscilloscope
« Reply #9 on: December 24, 2011, 10:19:03 am »
Years ago I made one for an Agilent oscilloscope at work. The oscilloscope was connected via GPIB to a PC, and a foot switch connected to the parallel printer port of the PC. The rest were a few lines of BASIC code.

One thing I came across when doing some teaching was an oscilloscope rigged with a IR remote control. A simple micro controller was driving the RS232 interface of the oscilloscope and had an IR receiver.  The remote was a cheap universal remote control, probably set to RC5. One could stand everywhere in the class and remote operate the oscilloscope. This was before the times of TvBeGones.
I delete PMs unread. If you have something to say, say it in public.
For all else: Profile->[Modify Profile]Buddies/Ignore List->Edit Ignore List
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 18901
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Remote switch for Rigol Oscilloscope
« Reply #10 on: December 24, 2011, 10:24:14 am »
This was before the times of TvBeGones.

ah yes at least one student in the class would think of that one and have some fun
 

Offline Berni

  • Super Contributor
  • ***
  • Posts: 5391
  • Country: si
Re: Remote switch for Rigol Oscilloscope
« Reply #11 on: December 27, 2011, 10:03:47 am »
I never tought of this idea, but now i want a foot pedal for the single shot button on my scope. Problem is tho that my scope doesn't have RS232 and all the other connection methods it has likely need a PC(Especially USB)

Ah well i guess setting the trigger hold off to 1 second while in run will remain the method of choice for some time.
 

Offline Bored@Work

  • Super Contributor
  • ***
  • Posts: 3932
  • Country: 00
Re: Remote switch for Rigol Oscilloscope
« Reply #12 on: December 27, 2011, 12:56:29 pm »
I never tought of this idea, but now i want a foot pedal for the single shot button on my scope. Problem is tho that my scope doesn't have RS232 and all the other connection methods it has likely need a PC(Especially USB)

Look for micro controllers with USB OTG or host capability. And if you are lucky your oscilloscope uses a protocol for which you already get a host library for the micro controller.
I delete PMs unread. If you have something to say, say it in public.
For all else: Profile->[Modify Profile]Buddies/Ignore List->Edit Ignore List
 

Offline Berni

  • Super Contributor
  • ***
  • Posts: 5391
  • Country: si
Re: Remote switch for Rigol Oscilloscope
« Reply #13 on: December 27, 2011, 01:39:59 pm »
Yes well its possible but since i had to use some software from Agilent to get USB working im assuming its not something standard, the ethernet port does use LXI and it has a web interface so that looks the most promising for a MCU.

But still its too much work to get that working in my opinion for just saving me from pressing a button. They should patch the firmware on this thing so i could use the external trigger BNC on the back for the foot pedal
 

Offline Bored@Work

  • Super Contributor
  • ***
  • Posts: 3932
  • Country: 00
Re: Remote switch for Rigol Oscilloscope
« Reply #14 on: December 27, 2011, 04:15:34 pm »
Agilent usually uses standard protocols like USBTMC with SCPI commands on top. You would have to give Agilent support a call to find out what they use.

For windows they then have an I/O library implementing all sorts of protocols and driver interfaces. But that shouldn't be needed for a foot switch.
I delete PMs unread. If you have something to say, say it in public.
For all else: Profile->[Modify Profile]Buddies/Ignore List->Edit Ignore List
 

Offline johnmxTopic starter

  • Frequent Contributor
  • **
  • Posts: 285
  • Country: pt
Re: Remote switch for Rigol Oscilloscope
« Reply #15 on: December 28, 2011, 05:23:49 pm »
Right now the control is done via PC using a serial terminal through RS232 connection.

Does anyone know what is the wait time between two consecutive commands?
Since there is no flow control this is very important. Without a dead time the oscilloscope only responds to the last command.
Best regards,
johnmx
 

Offline johnmxTopic starter

  • Frequent Contributor
  • **
  • Posts: 285
  • Country: pt
Re: Remote switch for Rigol Oscilloscope
« Reply #16 on: January 01, 2012, 03:07:46 pm »
It’s time to make my first project of the year.
So I manage to gather all necessary components:
  • Footswitch: It’s cheaper to make a homemade one, but I preferred to buy one. This one from M-AUDIO costs 20€. It’s very short and the quality is very good. Also I can use it in my midi keyboard :)
  • Plastic box
  • Battery
  • Pedal connector and RS232 connector
  • Switches and an LED
  • Microcontroller and RS232 driver/receiver
As suggested by user PeterG I will put 3 switches in the case, one will do the same as the footswitch, and the other 2 will set the oscilloscope configuration.

The buttons will work as follows:
  • Footswitch and 1st button: Sends the following commands ‘:KEY:RUN’,’ :BEEP:ACTion’ and ‘:KEY:FORCe’. This will emulate the RUN/STOP button of the Rigol. The beep command gives us a feedback about the button press. Finally the remote session is closed.
  • 2nd and 3rd button: A long press reads the current oscilloscope configuration and saves it in the internal EEPROM. A soft press sets the saved configuration.
The LED will blink on every press and it could blink differently in low battery condition.
I will use the PIC16F88 because it’s nanoWatt Technology and it has an UART and internal EEPROM.

I will post everything about this project including schematic and firmware.
Any suggestions will be much appreciated.
Best regards,
johnmx
 

Offline johnmxTopic starter

  • Frequent Contributor
  • **
  • Posts: 285
  • Country: pt
Re: Remote switch for Rigol Oscilloscope
« Reply #17 on: January 28, 2012, 05:03:50 pm »
The first part of the project is done. The hardware part is finished but the firmware is not completed.
The current firmware version uses only the footswitch and the first front panel switch to emulate the RUN/STOP button. The other couple of buttons don’t do anything yet.

The switches behave as follows:
-   Footswitch: Trigger on press.
-   Front switches: Trigger on release with double function depending if the pressing time is higher or lower than 5s.

As you may notice there is no power button in the circuit. The design makes use of the PIC’s ultra-low sleep power which is lower than 50nA. The total power consumption in sleep mode is 2.3uA mostly because of the linear regulator MCP1701. The 9V battery should last for several years.
The UART baud rate is configured at compile time and this sets the microcontroller oscillator frequency. E.g. for 9600bps -> Fosc= 500kHz.

Every time a button is pressed the PIC wakes-up and goes into sleep mode several times (using the watchdog timer) during the key debounce check. If there is a valid button press then it runs several tasks at the same time: blink the green LED, start an ADC acquisition and send the oscilloscope command. After this, it checks the battery voltage and it blinks the red LED (two color LED!) if the voltage is bellow a defined threshold.

If you want the code request it via PM.
Best regards,
johnmx
 

Offline Lightages

  • Supporter
  • ****
  • Posts: 4325
  • Country: ca
  • Canadian po
Re: Complete Project: Remote switch for Rigol Oscilloscope
« Reply #18 on: January 28, 2012, 06:15:55 pm »
Thanks for the cool work!
 

Offline vk6zgo

  • Super Contributor
  • ***
  • Posts: 8109
  • Country: au
Re: Complete Project: Remote switch for Rigol Oscilloscope
« Reply #19 on: January 29, 2012, 07:09:13 am »
Is the "Run" button on the Rigol a real switch,or a virtual one?
If it is real,maybe it sends a loop,open,or some hard wired data signal to the rest of the 'scope's innards.
If it does,possibly the switch function itself could be duplicated & extended,without getting into the control system firmware.

I don't have a Rigol so I don't know if this is possible,plus I am an analog/hardware person,but several times over the years,in various jobs we have solved similar problems by this rather clunky & inelegant method.

VK6ZGO
 

Offline JuKu

  • Frequent Contributor
  • **
  • Posts: 566
  • Country: fi
    • LitePlacer - The Low Cost DIY Pick and Place Machine
Re: Complete Project: Remote switch for Rigol Oscilloscope
« Reply #20 on: January 29, 2012, 07:24:31 am »
If you don't care about resell value of your scope, the easiest way might be open up the scope and put a small jack in parallel with the run switch. Then, run a wire and mount a small switch at the probe. Easy, fast and works. But not as hi-tech, no microprocessors involved and not nearly as fun to do, so the simple idea might not be attractive to hobbyists...
http://www.liteplacer.com - The Low Cost DIY Pick and Place Machine
 

Offline Mint.

  • Frequent Contributor
  • **
  • Posts: 523
  • Country: au
  • Account is inactive now. Thanks everybody!
    • Personal Blog, Mint Electronics.
Re: Complete Project: Remote switch for Rigol Oscilloscope
« Reply #21 on: January 29, 2012, 09:13:22 am »
If you don't care about resell value of your scope, the easiest way might be open up the scope and put a small jack in parallel with the run switch. Then, run a wire and mount a small switch at the probe. Easy, fast and works. But not as hi-tech, no microprocessors involved and not nearly as fun to do, so the simple idea might not be attractive to hobbyists...

I have done something similar to a computer mouse. What I wanted to have is a click spammer button, don't ask me why. I used a 555 timer and connected the output pin of the 555 to a push button, then I connected the other end of the button to the place where the button of the left mouse click was going to the controller. So then it just sends a PWM to the micro controller of the mouse and it just registers it as a normal mouse click. :D
Personal Blog (Not Active Anymore), Mint Electronics:
http://mintelectronics.wordpress.com/
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->