Handling LapTop Waveforms

Introduction: Handling LapTop Waveforms

About: Have 30+ years of experiences as a Mixed Signal IC Design Engineer.

Display it in terms of volts and amps

Step 1: LapTop Resources

Laptops typically contain the resources to power up a circuit and monitor waveforms.
Many free applications can display the waveforms like an oscilloscope.
The X/Y plot feature can display waveforms like curve tracers.

But curve tracers plots are much more useful,
if they are related to meaningful units like volts and amps. 

Step 2: How to Translate

Translation to meaningful units requires some free open source software.
One application can capture the waveforms.
The other application can handle gain and offset  to display the waveform properly.
But some calibration of the internal laptop hardware is also required.

Step 3: The Audio Hardware

Laptops will at best have a stereo audio input which can capture audio frequency signals.
The coupling appears to be AC with the low frequency 3dB point being around 20Hz.

This input is not intended to handle signals in the voltage magnitude.
Putting a 1meg series resistor in series with the audio inputs increase the input range. 
A 1Meg Resistor appears to allow a MacBook Pro to handle about +/-8volts.

Most Quad  RRIO op amps are able to swing pretty close to both rails.
One can almost eyeball the input range.

Step 4: Capture With Audacity

Open source software like Audacity can capture waveforms to a magnitude of +/- one.
What a digital +/- one value  means in terms of input voltage may not be standard.
But calibrating the input of a laptop can be done to some precision.

Step 5: Capture and Trim a Waveform

One can capture and trim waveforms very well.
But viewing the magnitude to any precision could use some improvement.

Step 6: Save the Captured Waveform

The captured waveform can be exported.
Another free open source software can get a more precise look at the waveform.
For this example, a rail to rail 5Volt output waveform has been captured.

Step 7: SciLab Adjusts Offset and Gain

This software provides a little bit better way to handle the waveforms.

Most important, the program can all be run off of text , which will be included.

Text can be copied and pasted into a command window to do all the work.  

Step 8: Know Your Path

Hopefully one knows how to find a path to a file.
On a MacBookPro, simply drag and drop a file into a terminal window. 

Step 9: Using Scilab

After installing Scilab, download the "with1meg.wav" file below. Find its path.
The file should be named "with1meg.wav".

Copy and paste the text below into a text editor and correct the file path.
It should be possible to copy this text from any pdf file or a web page.

Now copy  and paste the path corrected text lines into the scilab window .

path='/Users/donsauer/Downloads/with1meg'     // <=====correct the file path
plot2d( snd(1,:))
plot2d( snd(2,:) )

Step 10: Find Your Gain


Copy and paste the text above to find actual waveform values.
The output swings from - 0.3205261 to 0.3147583

So if +/- Vcc/2 represents +/-31.5% of full scale.
Then +/- full scale is 157% of VCC,
or 7.87 if VCC is 5.00 volts.
The actual value for your laptop may vary.

In the case of the curve tracer circuit, some further hardware calibrations are needed. Adding 1mA to the ICS node produces a change of 1.2 volts in this circuit.
The gain for voltage is really 7.78.
The gain for current for this circuit is then .0066.

Step 11: Translate a NPN Curve

Download the following captured NPN curve into a known path.
Correct the file name if necessary to "npn.wav".

Correct the path to the text below before pasting it into a scilab  window.
The following will gain scale and offset shift captured waveforms.
It will to produce a NPN graph in terms of voltages and currents.

Since all signals are AC coupled,.
Offsets have been be added to the plots to bring the origin close to zero.

path='/Users/donsauer/Downloads/npn.wav'      // <======correct your file path
plot2d( 7.78*snd(1,1:n-5)+2.6, 0.0066*snd(2,1:n-5) +.8e-3 ) //add gain offset

Step 12: Translate a PNP Curve

Repeat the same process for the PNP curve  as for the previous npn .

For PNPs, the gain scales can be inverted to resemble an NPN.

============Copy_Paste_into_Scilab========================path='/Users/donsauer/Downloads/pnp.wav' // change to your file path
plot2d( -7.78*snd(1,1:n-5)+2,-0.0066*snd(2,1:n-5) +1.65e-3 ) //add gain offset

Step 13: Translate a NMOS Curve

A MacSpice simulation for the NMOS in the cd4007 is included with the nmos.wav

This simulations was compared to the silicon on the same laptop both at the same time. 

path='/Users/donsauer/Downloads/nmos.wav'   // <====change to your file path
plot2d( 7.78*snd(1,1:n-5)+2.6, 0.0066*snd(2,1:n-5) +.49e-3 ) //add gain offset

Step 14: Translate a PMOS Curve

A MacSpice simulation for the PMOS in the cd4007 is included with the pmos.wav
This simulations was compared to the silicon on the same laptop both at the same time. 

path='/Users/donsauer/Downloads/pmos.wav'             // <===change to your file path
plot2d( -7.78*snd(1,1:n-5)+2.1,-0.0066*snd(2,1:n-5) +0.55e-3 )   //add gain offset

Step 15: Other Curve Tracer Uses

Having the PorN lead connected by clip leads instead of a switch was a blessing.
If another voltage reference can be constructed which is half supply,
and if can sink and source current,
then connecting the PorN port to that port allows full +/- curve  tracing.

This might come in handy measuring nonlinear resistors.

The sweeping voltage is a clipping triangle wave. 
 Capacitance is display almost as a square.
Piezo Electric transducers used as speakers appear to look like capacitors. 

Step 16: Measure LEDS

One would expect different LEDs to have different V/I curves.
The IR LED appears to have the lowest voltage and the UV the highest.

Step 17: Investigate Photo Devices

Things like photo resistors are fun to play with.
The MacCRO X application can display the effect of light real time.

The photo resistor is an open in the dark.

Step 18: Measure IC Start UP

One can see how an IC starts up by looking at the supply current.

For instance, the LM6144 has a bandgap which start up at a diode and sat voltage.
The bandgap is designed to turn on everything such that everything is functional,
but in an extremely current limited mode.
This has been called graceful death.
It allows an Op Amp to power down without going crazy.

In the reverse direction, an IC is just a diode.
This circuit appears to want some series resistance when measuring diodes. 

Be the First to Share


    • Anything Goes Contest

      Anything Goes Contest



    12 years ago on Introduction

    WOW! this is DEEP! Somehow I think, one day I might be needing this, tinkering with some gadget... If I only could understand what it is all about... Perhaps some introduction: Wave forms? what do I want to know? Why? Possible appliations? References?


    Reply 12 years ago on Introduction

    I am trying not to make it so one needs an EE degree to understand things. Scilab and audacity appears to provide a way to do the most amount of work with the least amount of effort. Hopefully the downloading of a waveform and copying and pasting of text into scilab works will for everyone. Once everything works, it is easier to explain what is being done and why.