Complete Project: Remote switch for Rigol Oscilloscope - Page 1
Forum section: electronics / projects

author: johnmx
author_rank: Frequent Contributor
timestamp: December 23, 2011, 11:04:58 pm
content: 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 handySo 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?

author: Simon
author_rank: Unknown
timestamp: December 23, 2011, 11:06:27 pm
content: can't you clip the probes on first then press the button ?

author: johnmx
author_rank: Frequent Contributor
timestamp: December 23, 2011, 11:14:54 pm
content: 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.

author: clonecrp
author_rank: Regular Contributor
timestamp: December 23, 2011, 11:36:35 pm
content: GREAT IDEA ! ...Been waiting for this idea ... thought I was the only one with the problemNow all we need is an EE..Doug

author: PeterG
author_rank: Frequent Contributor
timestamp: December 24, 2011, 12:09:48 am
content: I have looked at this idea, it can be done. I like the footswitch ideaI 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

author: Psi
author_rank: Super Contributor
timestamp: December 24, 2011, 03:14:46 am
content: 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.

author: PeterG
author_rank: Frequent Contributor
timestamp: December 24, 2011, 03:36:59 am
content: Rigol have a PDF explaining there full command set for both Serial and USB.Regardshttp://www.digitalscopes.net/pdf/DS1000%20Programming%20Manual%20(English).pdf

author: firewalker
author_rank: Super Contributor
timestamp: December 24, 2011, 07:45:47 am
content: 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.

author: Simon
author_rank: Unknown
timestamp: December 24, 2011, 09:26:35 am
content: 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

author: Bored@Work
author_rank: Super Contributor
timestamp: December 24, 2011, 10:19:03 am
content: 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.

author: Simon
author_rank: Unknown
timestamp: December 24, 2011, 10:24:14 am
content: Quote from: BoredAtWork on December 24, 2011, 10:19:03 amah yes at least one student in the class would think of that one and have some fun

author: Berni
author_rank: Super Contributor
timestamp: December 27, 2011, 10:03:47 am
content: 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.

author: Bored@Work
author_rank: Super Contributor
timestamp: December 27, 2011, 12:56:29 pm
content: Quote from: Berni on December 27, 2011, 10:03:47 amLook 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.

author: Berni
author_rank: Super Contributor
timestamp: December 27, 2011, 01:39:59 pm
content: 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

author: Bored@Work
author_rank: Super Contributor
timestamp: December 27, 2011, 04:15:34 pm
content: 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.

author: johnmx
author_rank: Frequent Contributor
timestamp: December 28, 2011, 05:23:49 pm
content: 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.

author: johnmx
author_rank: Frequent Contributor
timestamp: January 01, 2012, 03:07:46 pm
content: 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 keyboardPlastic boxBatteryPedal connector and RS232 connectorSwitches and an LEDMicrocontroller and RS232 driver/receiverAs 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.

author: johnmx
author_rank: Frequent Contributor
timestamp: January 28, 2012, 05:03:50 pm
content: 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.

author: Lightages
author_rank: Unknown
timestamp: January 28, 2012, 06:15:55 pm
content: Thanks for the cool work!

author: vk6zgo
author_rank: Super Contributor
timestamp: January 29, 2012, 07:09:13 am
content: 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

author: JuKu
author_rank: Frequent Contributor
timestamp: January 29, 2012, 07:24:31 am
content: 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...

author: Mint.
author_rank: Frequent Contributor
timestamp: January 29, 2012, 09:13:22 am
content: Quote from: JuKu on January 29, 2012, 07:24:31 amI 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.