Graphics on Oscilloscopes using Audio CDs
In a course this semester I had the opportunity to use a full-analog oscilloscope (circa 1960). The glow of the phosphor, the smoothness, and the simplicity of the device enchanted me - its elegance unsurpassed by the newer feature-loaded digital monstrosities. Particularly of interest to me were the figures which may be created by putting the scope in XY-mode (where channels 1 and 2 control the x- and y-deflection of the cathode ray respectively). If sine waves are used the resulting patterns are called Lissajous figures, but more interesting figures are possible if specially crafted inputs are used. I made it my goal to display a flower pattern (the polar graph of sine wave harmonics) on the scope by some easy method.
I decided to write a program to generate stereo sound that the oscilloscope would translate into 2D graphics (when the left audio channel is run into the x channel and the right into the y). After three hours in the EE lab I came up with the following:
Here is what the result looks like (the pong imitiation is missing from the end of the video as I ran out of memory on my SD card... you will have to try it for yourself to see that!):


For detailed instructions on how to do this yourself check out my instructable on the subject (not written as of yet).
For those who want instant gratification all you have to do is download (and extract) the finished wav files and burn them to a CD. Then sacrifice a pair of headphones to make a cable to connect the headphones jack of a portable CD player to the scope.
Enjoy!
Stumble It!
I decided to write a program to generate stereo sound that the oscilloscope would translate into 2D graphics (when the left audio channel is run into the x channel and the right into the y). After three hours in the EE lab I came up with the following:
- flowergen.c, to enable the generation of sound to produce vector graphics with functions defined by the user. Currently it makes dancing flower shapes and a pong imitation.
- img.c, to convert greyscale png images into sound which will then be displayed on the scope, using a rastering technique.
- scope.c, to simulate an oscilloscope for testing when no scope is at hand.
Here is what the result looks like (the pong imitiation is missing from the end of the video as I ran out of memory on my SD card... you will have to try it for yourself to see that!):


For detailed instructions on how to do this yourself check out my instructable on the subject (not written as of yet).
For those who want instant gratification all you have to do is download (and extract) the finished wav files and burn them to a CD. Then sacrifice a pair of headphones to make a cable to connect the headphones jack of a portable CD player to the scope.
Enjoy!


1 Comments:
Very cool project. I been toying with the idea of building a scope clock using a PIC controller and a couple of 8 bit DACs. I must say that I never thought about just using my soundcard, there are two good 16bit DACs already biased and just sitting there ready to feed directly in. On my blog you mentioned ioctl(), I knew about this method, but it would require to code in C or more special Peal libs, thats why I chose to go with wave (no to mentions platform independent). Also very cool blog, as a programmer and network engineer I find your work very interesting. Shoot me some e-mail sometime.
Evan
www.ohmpie.com
Post a Comment
Subscribe to Post Comments [Atom]
<< Home