-
Screenshot: Software Interface
Webcam Oscilloscope Software
"Webcam Oscilloscope" is a software package that uses a webcam connected to a PC to capture video and images from analog oscilloscopes. The video and image file feed can then be analysed using on-screen cursors for typical Digital Storage Oscilloscope (DSO) functionality.
The software has the following capabilities:
- Utilise any webcam connected to a PC to capture video/images for DSO type analysis
- Store captured video/images from an analog oscilloscope to hard drive (as .avi or .jpg) - annotated with user selected calculated waveform data
- Provides voltage and timebase controls for two channels
- On-screen cursors for delta-time, delta-voltage (auto calculation of frequency)
- Calculation of duty cycle, phase difference and rise time of waveforms on captured images
- Calculation of capacitor and inductor value from captured waveforms using a frequency generator with the DUT
The software is provided as a .zip archive. The software works with Windows OS (tested with Windows XP, Windows 7 & 10).
A demonstration and instruction video is available on this YouTube link.
Files for the webcam 3D printed mount (.stl and the Fusion360 design) 3D Print Files Zip Archive Download
Operation Manual - Table of Contents
Installation Instructions
The software is provided as a .zip archive. Begin by extracting the .zip archive to a seperate folder.
Within the folder to which the .zip archive was extracted, double-click the "setup.exe" file to start the installation. Note, if the Webcam Oscilloscope software has been previously installed, use the "Programs and Features" item within the Windows OS Control Panel to uninstall any previous versions before re-installing the software.
The following dialog window will be displayed. Click "Install" to continue the installation process.
The installation will now proceed with no further input required (should only take less than a couple of minutes), after which the Webcam Oscilloscope application will automatically start. The application is available for subsequent running from the Windows Start Menu within the "Fads To Obsessions" folder.
The Webcam Oscilloscope application upon start-up will display the "About Webcam" dialog if the software is unregistered, and display a water-mark.
To register the software, email the serial number listed in the "About Webcam" dialog to admins@fadstoobsessions.com, upon which a registration number will be provided by return email.
Un-Installing
The software is "light" and does not affect the registry and or create settings folders.
The software is easily removed by using the "Programs and Features" item within the Windows OS Control Panel to uninstall.
General Operating Instructions
Webcam Mounting
Necessarily, a suitable webcam is assumed to be connected to the PC running the Webcam Oscilloscope software and has been aligned to the physical analog oscilloscope screen. For optimum results, the physical webcam should be positioned such that the physical analog oscilloscope screen occupies the full viewing angle of the webcam.
The method for placing the physical webcam in front of the physical analog oscilloscope screen is at the discretion and ingenuity of the user (considering the myriad models and makes of oscillocope and webcams). The following photograph shows one method (enabling three degrees of freedom in positioning the webcam) utilising a 3D printed mount (the .stl files are available from the author).
Running the Software
The application is available from within the Windows Start Menu at the "Fads To Obsessions" folder, click the "Webcam Oscilloscope" item to run the program.
The Webcam Oscilloscope application upon start-up will display the "About Webcam" dialog if the software is unregistered. To register the software, email the serial number listed in the "About Webcam" dialog to admins@fadstoobsessions.com, upon which a registration number will be provided by return email.
Mouse-over the following image to display an expanded annotated version.
The software obviously has no ability to automatically ascertain the state of the analog oscillocope time-base and voltage scale settings. Therefore, upon each start-up of the software, it is essential that the software voltage scale for channel A and B, as well as the time scale are set to the corresponding values being used on the physical analog oscilloscope.
Also, the software will require "calibration" of the on-screen cursors using a captured image of the physical analog oscilloscope graticule/screen (click the "Capture Image" button). This will enable the software to calculate pixel values to voltage and time measurements, corresponding to the current voltage/time scale settings and captured image resolution.
Calibrating the On-screen Cursors
Click the "Capture Image" button (or press the SPACE BAR on the keyboard) to display an image of the physical analog oscilloscope graticule/screen on the captured waveform monitor (large image on the right hand side of the software interface).
If the Channel A horizontal and vertical cursors are not displayed, ensure the "Cursors Channel A" Checkbox is ticked.
With the mouse, click and hold one of the Channel A screen cursors (green vertical and blue horizontal lines) and then move the cursor to align with the appropriate line of the graticule of the analog oscilloscope image. When the cursor is aligned to a graticule line, release the mouse. The keyboard arrow keys can be used to more precisely position an on-screen cursor after it has been selected with the mouse.
The green vertical and blue horizontal lines (the on-screen cursors) should be aligned to the graticule lines the same number of horizontal and vertical divisons selected in the "Calibrate Screen Cursors" horizontal and vertical divisions numeric selection boxes (by default this is a single division). Once the on-screen cursors have been aligned against the graticule lines within the displayed image, click the "Calibrate" button.
The software will now be able to calculate voltage and time from caputured images.
-
Screenshot: Calibrating Cursors
Using "On-screen" Cursors to Analyse Waveforms
In order to analyse a waveform in terms of voltage, period or frequency, etc the waveform needs to be captured from the webcam live feed by clicking the "Capture Image" button (or pressing the SPACEBAR on the keyboard). The captured image will be displayed in the "Analyse Image Window" of the software interface (see the "Running Software" Section for an annotated screenshot of the interface).
The various cursors (vertical cursors for time/period/frequency, and horizontal cursors for voltage) are displayed by clicking the appropriate checkbox controls in the "Screen Cursor Controls" portion of the inteface. The cursors are distingished by color with a legend automatically annotated on the waveform in the Analyse Image Window. Double-clicking on a screen cursor displays a color selection dialog box, enabling the color of cursors to be selected by the user. Double-clicking on any portion of the waveform in the Analyse Image Window other than a screen cursor enables selection of the color for the annotated text.
To move a screen cursor, using the mouse, click and hold on the desired cursor and then move the mouse to position the cursor as desired. After releasing the mouse, the cursor can be more precisely moved by using the keyboard arrow keys ([LEFT] and [RIGHT] for vertical cursors and [UP] and [DOWN] for horizontal cursors).
Upon releasing a screen cursor after being moved, the appropriate calculation (frequency, voltage diff, etc) is automatically performed with the results displayed in the Screen Cursor Controls Section, annotated on the Analyse Image Window and or displayed in the appropriate portion of the Measurement Modes Section.
-
Screenshot: Basic Measurements
The width of the lines representing the screen cursors can be set via the "Prefs." tab in the Measurement Modes Section. The "Dynamic Cursor" function enables cursors to be automatically set to a line width of "1" while being moved (to enable the most precise placement), and then reverting to the user set line width when released by the mouse (to more clearly display on the waveform for viewing and or saving to file).
Calc. Duty Cycle, Rise Time and Phase Diff.
The Measurement Modes Section (bottom right hand section of the software interface) provides a number of Tabs which in turn enable various specialised functions and calculations. The various functions utilise the screen cursors in various combinations, to provide the indicated functionality.
Determine Duty Cycle
With a captured image displayed in the "Analyse Image Window" of the software interface, align the Channel A vertical cursors (default orange color - see following screenshot) to encompass one complete period of the waveform.
If the second time vertical cursors are not displayed (default red color), click the "Second Time Cursors" checkbox. Align the second time vertical cursors to span the "high" portion of the waveform.
Click the "Duty Cycle" Tab in the Measurement Modes Section. Click the "Calc Duty Cycle" checkbox.
The duty cycle will now be automatically calculated whenever the cursors are used to define the period and pulse width. The frequency of the waveform is displayed in Channel A.
-
Screenshot: Determine Duty Cycle
Measure Rise Time
With a captured image displayed in the "Analyse Image Window" of the software interface, align the Channel A horizontal cursors (default blue color - see following screenshot) to span the peak-to-peak voltage of the waveform.
Click the "Rise Time" Tab in the Measurement Modes Section. Click the "Measure Rise Time" checkbox.
Click the "Calc 10%, 90% Levels" Button. The calculated 10% and 90% voltage levels, of the peak-to-peak voltage represented by the Channel A horizontal cursors, will be displayed (default light blue dashed lines).
Align the Channel A vertical cursors (default orange color) to mark the intersection of the 10% and 90% voltage levels with the waveform.
Click the "Calc Rise Time" Button and the transistion (rise) time will be calculated and displayed.
Optionally, the oscilloscope rise time parameter can be entered to enable calculation of the "real" transistion time (taking into account the response time of the oscilloscope).
-
Screenshot: Measure Rise Time
Determine Phase Difference
With a captured image displayed in the "Analyse Image Window" of the software interface, align the Channel A vertical cursors (default orange color - see following screenshot) to encompass one complete period of the waveform of the primary signal.
If the second time vertical cursors are not displayed (default red color), click the "Second Time Cursors" checkbox. Align the second time vertical cursors to the same point on each of the waveforms (convenient location is the crossing point with the horizontal time axis graticule, or the peak of each waveform).
Click the "Phase Diff" Tab in the Measurement Modes Section. Click the "Calc Phase Diff (deg)" checkbox.
The phase difference will now be automatically calculated whenever the cursors are used to define the period and crossing points. The frequency of the waveform is displayed in Channel A.
-
Screenshot: Determine Phase Difference
Determining Capacitor Value
The capacitance is measured using a RC series circuit in conjunction with a square-wave input, with the voltage across the capacitor versus time measured with an oscilloscope.
In order to achieve the typical profile of a charging capacitor (see following screenshot) required by the measurement, the user will require experimenting with the series resistance value and the applied square-wave frequency. The example shown in the screen shot was achieved with a 600 ohm series resistor (the output impedance of the signal generator used) and a ~100Hz square-wave (the capacitor DUT was a nominal 1uF).
With a captured image displayed in the "Analyse Image Window" of the software interface, align the Channel A horizontal cursors (default blue color - see following screenshot) to encompass the peak-to-peak voltage of the waveform.
Click the "Capacitor" Tab in the Measurement Modes Section. Click the "Measure Capacitor" checkbox.
Click the "Calc 63.2% V rise" Button. The calculated 63.2% voltage level, of the peak-to-peak voltage represented by the Channel A horizontal cursors, will be displayed (default light blue dashed line).
Align the Channel A vertical cursors (default orange color) to mark the intersection of the start of the rising portion and the intersection of the 63.2% voltage level of the waveform.
Click the "Calc Capacitance" Button and the capacitance will be calculated and displayed.
-
Screenshot: Determining Capacitor Value
Determining Inductor Value
The inductance is measured using a LC parallel circuit in conjunction with a square-wave input, the square-wave frequency adjusted to the LC tank resonant frequency, with the voltage across the inductor versus time measured with an oscilloscope.
In order to achieve the LC tank resonant waveform (see following screenshot) required by the measurement, the use will require experimenting with the value of the parallel capacitor and the applied square-wave frequency. The example shown in the screen shot was achieved with 0.1uF capacitor and a ~3kHz square wave (the inductor DUT was a nominal 0.25mH).
With a captured image displayed in the "Analyse Image Window" of the software interface, align the Channel A vertical cursors (default orange color - see following screenshot) to encompass a single period of the waveform (convenient if the waveform is aligned symmetric across the voltage scale).
Click the "Inductor" Tab in the Measurement Modes Section. Click the "Measure Inductor" checkbox.
Click the "Calc Inductance" Button and the inductance will be calculated and displayed.
-
Screenshot: Determining Inductor Value
Miscellaneous Functions
Saving Images
Capture waveforms can be saved to file on the hard drive (as .jpg files). Click the "Image" Tab in the Measurement Modes Section.
If the "raw" image is to be saved to file without annotations (screen cursor and results of measurements) ensure the "Include Annotations" checkbox is not checked.
Click the "Save Image" Button and a standard save file dialog box will be displayed. Select the file name and location to save the file in the normal manner.
If annotations are to be stored with the image ensure the "Include Annotations" checkbox is checked. Individual screen cursors and the associated measurements can be enabled/disabled as desired. The "caption" text box in the "Image" Tab provides a means to include a line of text the will be included as a footer on the saved image.
Saving Videos
A video file (as a .avi file) of the webcam feed can be saved to file on the hard drive.
Click the "Start Recording" Button in the "Oscilloscope Controls" Section and the feed from the webcam will begin to be stored to disk. When recording is to cease, click the "Stop Recording" Button.
Upon stopping recording, and a standard save file dialog box will be displayed. Select the file name and location to save the file in the normal manner.
Only Logged-In Members can add comments