Wednesday, August 25, 2010

USE PC AS CRO

Introduction
Most people will not have access to a electronics laboratory or be able to afford an oscilloscope, so here is an alternative. Winscope is a software application that will use your sound card to sample input waveforms and display results. The Oscilloscope allows you to study any signal in real time, measure frequencies, study realtime signal spectra and plot Lissajous patterns. In addition, winscope also has a storage facility and has a powerful FFT (fast fourier transform) routine, which enables winscope to act as a spectrum analyzer.

There are some drawbacks however with winscope, mainly:
- non-calibrated amplitude level (difficult to use as digital multimeter)
- relatively low bandwidth (20 Hz - 20 kHz)
- possibility of damage of a PC when connecting to an unknown signal source. (See Warnings).
General Information
Winscope 2.51 is designed by Konstantin Zeldovich and he has graciously distributed it as freeware. It was wrote for windows 95 but works happily on windows XP (and there Win Me and 2000), but tried it on windows Vista or Windows 7.
Specifications
Dual trace digital storage oscilloscope with realtime spectrum analyzer and correlometer.
Buffer length: 52 ms
Bandwidth: 20 Hz - 20 kHz max
Input level: about 2 VAC, limited by sound card capabilities
Display refresh: ca. 6 fps
Data export: disk file or Windows clipboard, text format

Safety measures when using Oscilloscope
Being software, Winoscope itself cannot damage your hardware, but it is very easy to burn out at least your sound card when trying to investigate some signal with unknown amplitude and DC offset. So, you must always be extremely careful when establishing an electrical connection between your computer and external equipment. It may be a good practice to use first a conventional multimeter or oscilloscope to find out whether signal levels are acceptable for your sound card.
It is safe to connect to any audio/video equipment using standard line-in jacks and cables. You may consider using an old tape recorder, amplifier or turntable as a buffer device between your sound card and non-standard signal source. This can save your computer in case of a poorly grounded, unstable singal source, as well as allow you to control signal level manually before it reaches the sound card. To avoid personal injury, always follow the usual safety rules when working with electric circuits.

Getting Started with Winscope
After downloading winscope, which comes as a .ZIP file unzip it and read the help file that is distributed with the program. To start, first make sure your sound cards microphone input is selected for recording. Click on the first triangle ("play") button and speak into your pc microphone. You should now see a speech waveform displayed on winscope. If no waveform appears increase the volume slider on the microphone input.
You can also record from the line input, but the signal source must be about 50mV RMS. If no waveform is seen increase the line input slider. To freeze plots, click Hold ("pause") button. Below is a screenshot of Winscope displaying a 600Hz sine waveform:-


The input to winscope depends on your sound cards connectors, but most have 3.5mm stereo sockets. I made a lead using a 3.5mm stereo jack plug and screened audio cable, (low capacitance cable is best) connected to crocodile clips. If you have a computer with built in microphone, then you can also use the microphone to directly display a wave form of your voice.
One of the nice features about Winscope is the FFT button. A spectrum analyzer costs even more than an oscilloscope, but with winscope and your computer you can improvise. A spectrum analysis of the above sine wave produced the following result:


The input samples are either in 5ms or 50ms which are good for audio frequencies. A later version of this program may be available, but this version is user friendly and a worthwhile addition to anyone's collection of test equipment.

Probes for Mic and Line Input
The line and mic inputs for your sound card are stereo and have left and right inputs. In dual trace the left channel will be the X trace and right channel Y trace on winscope. The maximum input amplitude should never be higher than 10mV for a Mic input and 2Volt for the line input. Some resistive probes can be made as shown below.


In all cases it is advisable to check with a high impedance multimeter set to the highest range on both DC and AC volts that the circuit under test has the same ground potential as your sound card. Just use a meter as shown above and measure between circuit ground and sound card ground, the reading should always be zero.

Winscope Controls
Meter button
Clicking the Meter button toggles Meter mode on and off. In Meter mode, you can measure time and level of a waveform simply by clicking left and right mouse buttons on the Oscilloscope display. Left button click sets cursor 1 and right click sets cursor 2. When both cursors are set, the difference between the cursors’ positions is shown in the right three parts of the status bar. For convenience, the reciprocal value of time/frequency difference is shown in the 1/dt (1/dF) status window. This allows, for example, to quickly measure the frequency of a wave by clicking left and right buttons on the successive maximums and looking at 1/dt value. Note: ADC levels are integer; the decimal parts you see are interpolated values.
Spectrum Analyzer (FFT)
The spectrometer is activated by clicking the FFT button or appropriate menu command. It displays the amplitude spectrum of signal in Y1 channel as Y1 channel and optionally the phase curve as Y2 channel. Use YT Single Trace mode to display only amplitude spectrum or YT Dual Trace to display both amplitude and phase curves. The phase is defined by phi = atan2( Im(F),Re(F) ), -pi
Store button (S)
Clicking the Store button turns storage mode on. In this mode, Oscilloscope works like a storage oscilloscope, when every trace plotted remains on the screen. Storage mode can be used either in ON LINE or HOLD modes. To clear the screen, click the Store button once more. In storage mode you can not, however, recall the waveform recorded previously and record it in the file, because only the display picture is stored and not the raw data. This allows to use storage mode for any desired period of time without worrying of overflow errors.

0 comments:

Post a Comment

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More