Skip to content

grafmar/scope-footswitch-trigger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scope Footswitch Trigger Application icon

GitHub Release GitHub License made-with-python made-with-arduino

Scope Footswitch Trigger enables hands-free control of an oscilloscope using a dual footswitch connected through an Arduino Nano.

The Arduino detects short and long presses on two foot pedals and sends events via USB (Serial) to a PC. A Python application running in the background receives these events and remotely controls the oscilloscope over LAN using SCPI commands.

This setup is ideal for lab environments where both hands are occupied — for example during probing, debugging hardware, or EMC measurements.

🧪 Usage

Device overview

  • Connect the dual footswitch to the PC via USB.
  • Connect the oscilloscope to the network and optain its IP address (via Utility → I/O on the Keysight/Agilent oscilloscope).
    • Activate VX11 on LeCroy oscilloscopes
  • Start OsciFootswitch.exe (or python OsciFootswitch.py).
  • Enter the oscilloscope’s IP address and click <Connect>.
  • Use the "Identify Oscilloscope" checkbox to display a text box on the oscilloscope screen to verify the correct device.
  • Select the correct serial port of the footswitch (identifier "USB-Serial CH340") and click <Open>.

→ The footswitch is ready.

🎯 Features

  • Detects short and long presses for both pedals individually and if both are pressed at the same time
  • Remote oscilloscope control via LAN
  • Trigger control:
    • RUN / START
    • STOP
    • SINGLE (Single Shot)
  • Toggle between:
    • Normal Trigger Mode
    • Auto Trigger Mode
  • Capture and store:
    • Screenshot
    • Oscilloscope setup

⚙️ How It Works

  1. The Arduino monitors two input pins connected to a dual footswitch.
  2. Short and long presses are detected directly on the Arduino.
  3. Events are sent via USB Serial (e.g. B1S, B1L, B2S, B2L, BBS, BBL).
  4. The Python application:
  • Opens the configured serial port
  • Connects to the oscilloscope via IP (LAN)
  • Maps footswitch events to SCPI commands
  1. The oscilloscope executes the corresponding trigger or screenshot command.

🤖 Hardware

A dual footswitch is connected to an Arduino Nano. The left switch connects to D3 and the right switch to D4 of the Arduino nano. The switches connect to GND.

That's all allready for the Hardware. The Arduino is powered and connected to a PC through its USB connector.

The Arduino code footswitch.ino debounces the switch events, detects short and long presses and sends the according evnet string through USB-serial.

👨‍💻 Software

The PC Application is compiled from a python script. If you want to adapt the code, you have to install several python packages, which are listed in src/pc_app/requirement.txt. You can apply them by:

pip install -r requirements.txt

To compile the python to a windows-EXE file including all the necessary libraries you can simply execute the batch file:

.\src\build_scripts\build.bat

→ The EXE will be available at .\src\build_scripts\dist\OsciFootswitch\OsciFootswitch.exe

🏗️ SW-Architecture

GUI

The GUI has the configuration part on the top, than a part that explains the footswitch function mapping. Afterward the screenshot section and on the bottom the log.

On connection with the oscilloscopes IP the common SCPI/VISA identifier command *IDN? is used to identify the manufacturer and type of the oscilloscope. Depending on that identifier string the corresponding implementation for that oscilloscope is used. If the brand was not recognized the Keysight/Agilent implementation is used.

When the serial port of the footswitch is configured, the incomming events on the serial port are mapped to the corresponding oscilloscope functions and the SCPI/VISA commands are sent to the oscilloscope.

When a screenshot is captured, also a setup file is stored with the same basename. This setup file can than be reapplied to the scope later if needed.

📻 Supported Oscilloscopes

  • ✅ Keysight/Agilent 2000 X-Series (DSOX2004A)
  • ✅ Keysight/Agilent 3000 X-Series (MSOX3054A)
  • ✅ Keysight/Agilent 4000 X-series (MSOX4024A)
  • ✅ Keysight/Agilent 6000 X-series (DSOX6004A)
  • ✅ Keysight/Agilent 7000 Series (MSO7054A)
  • ✅ LeCroy Waverunner 6100
  • ✅ LeCroy Waverunner 44XI
  • ❓ Hameg/R&S HMO3000 Series (HMO3524)

SCPI/VISA Documentations:

🚀 Advantages and Example Use Cases

  • Hands-free operation → Trigger single acquisition while holding probes
  • Quickly toggle between Auto and Normal trigger during debugging
  • Capture a screenshot including instrument setup without touching the scope
  • Improve workflow in production test environments
  • Minimal hardware cost
  • Works in background
  • No modification of oscillososcope required
  • Fully scriptable and extendable

About

scope-footswitch-trigger connects a dual footswitch via Arduino Nano to a PC and remotely controls an oscilloscope (Start/Stop, Single Shot, Trigger Mode switching, Screenshot capture) using a Python application over LAN.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors