OD3D: a software oscilloscope for 3-dimensional visualization of signals

Project

OD3D stands for the french « Oscilloscope Digital 3 Dimensions » which means Digital 3D Oscilloscope. It was me and my partner’s 4th year university project. Simply put, it’s a completely functional computer based oscilloscope that works on three axes instead of two. This permits more complex visualization of waveforms, especially in the historical mode, where you can see what the signal looked like many samples ago. Any way, If you want to better understand what it does more than a classical oscilloscope, I urge you to look at the video above and the screenshots below.

It was developed under the course of a year mostly during our free time. Even if it did not ranked very well compared to other projects (try to match the bling factor of a motion-sensing automated gun-turret …), we had plans to continue its development until life took us somewhere else (and made us switch to Unix based OSes). Sadly, it sat on our hard drives for more than four years before we decided that it would be a shame to let so much work rot to obsolescence so we decided to release the whole source under a Creative Commons Attribution 3.0 license so someone can hopefully use it in another project or draw inspiration from it.

The goal of this project was to offer greater possibilities in signal visualization, build a complete, powerful and versatile software oscilloscope suite and more generally explore something new. Someone told us it could have interesting applications in conjunction with sonars (3D waterfall display) and we almost go it to act as a semiconductor curve tracer (Id vs Vds vs Vgs).

Short architectural descriptions

The whole project is actually made of two programs, the oscilloscope itself and the generic 3D engine.

We did not get as far as commenting the whole thing. In fact, there are almost no comments at all in the code but if you actually follow the logic and understand the pipeline architecture, you should have no problem figuring out how the oscilloscope part of it works. As for the 3D engine, I suggest you start with checking the demo that comes with it. Furthermore, it is not completely debugged, so you should expect it to crash pretty often.

 Oscilloscope

During the actual implementation of the oscilloscope, we tried to abstract things as much as possible in order to make the project extensible. For now, it can only use sound cards or a virtual signal generator as an input, but it would not be too hard to use a USB device (another thing we were working on) or some other custom solution. This also holds true for all the modules that sit in between the source input driver and the actual display (trigger and resolution filter), where the architecture enables you to easily build and integrate one of your own (like a spectrum analyzer or a data logger). The whole thing becomes an oscilloscope when you order and connect those modules in a specific manner: Input->Trigger->Display.

Many Inputs can connect to the same display or many displays can be connected to the same input. There are no limits on the number of channels or displays; you can go as far as your hardware resources will permit you. Back in 2008 when we presented it, we ran it on an Athlon 800 with 256MB of RAM and a GF2 MX400 to show that it was not very taxing on resources. If you want more technical information, go take a look at the specificities section.

3D engine

The 3D engine (named Motr3D) was developed as a standalone solution as opposed to being totally integrated in the oscilloscope, this means that it can be used for other stuff, like in the demo that comes in its executable folders, where we recreated a the solar system. As opposed to the oscilloscope, which is pretty functional, the 3D engine is very primitive and will not get you beyond displaying and moving polygons and basic shapes around. From the start, it was programmed to be as abstract from graphics API as possible (it uses Direct3D but it could be implemented with OpenGL), be fully object oriented and have a runtime architecture like a tree, where every 3D object (even the camera) is part of a tree and inherits from a common type. Even if the project consisted of an oscilloscope, the 3D engine is the part we are most proud of because it was both very challenging (80% of the programming time) and by far the most fun we had programming something. If you want more technical information, scroll down to the specificities section.

Specificities

Oscilloscope

  • Supports as many channels as your hardware will permit.
  • Supports as many displays as your hardware will permit.
  • Abstracted pipeline architecture for modularity.
  • Can work with any type of input, but only sound cards or a virtual signal generator are implemented.
  • Programmed in C# for the Microsoft .NET framework 2.0.
  • Has been tested on Windows 2000/XP/Vista.

3D engine

  • Fully object oriented in architecture.
  • Supports many primitives (cube, line, spheres, etc.)
  • Programmed in C# for the Microsoft .NET framework 2.0.
  • Works with Direct3D (managed) but can be made to work with OpenGL.
  • Has been tested on Windows 2000/XP/Vista.

Source: OD3D.zip

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

Screenshots

A milestone

Too bad I work alone and mostly at nighttime. Otherwise, I would have some people around to share the sheer joy that I am experiencing right now. For a lack of that, I’ll turn to the web. Just an hour ago, I completed a major milestone in my main project line. I am ecstatic as with work of this magnitude, the light at the end of the tunnel is always months away( and right after, you get into another tunnel…) Here is the writeup on the situation.

I have had a fascination with oscilloscopes for a very long time. While being incredibly useful (for those who are into electronics that is), they have a mysterious sense to them that still gets me after all those years of hanging out with complicated machinery. I remember clearly seeing rows and rows of them during my first university year, having only a very rough idea of what they were for but still knowing, judging by their numbers, that they must be very useful for every electronics bench to get its own. They are what epitomizes the knobs and dials (screen in this case) strange and obscure apparatus of the modern age.

So much so that I decided to program one from scratch for my final engineering project; I had very ambitious plans for it. The electronics would be managed by a Microchip PIC18F4550 – a USB microcontroller – and the application on the host PC would be programmed in C#. Its killer feature would be that its display would be 3D, giving the user one more dimension for visualizing, combining and probing waveforms. Turned out implementing the USB stack was a major bitch (should have used Microchip’s ready-made one…) so I decided to get signals through the sound card input. No big deal, the main application was agnostic as to where its data came from. Then, the 3D part was a huge headache too (80% of the code, a primitive but complete 3D engine), but I got trough it and in the end it worked well enough for a public showing. I will post all its code and some screen shots when I find the motivation too, but for reasons that will be developed upon at this time, I decided no to further its development. Simply put, I had discovered the world of Open Source and realized that platform-locking my project (DirectX, .NET) was not inline with my philosophy of getting good electronic tools in the hand of the masses.

This new one is implemented on an OS of mine (Elements, but beware, the post is very outdated) and thus completely web oriented and RESTful. The user interface is described in XHTML, SVG and JavaScript with all of it getting served along with the oscilloscope function by an ATMega328p with 32kB of static EEPROM storage. That’s a web server, TCP/IP stack, a file system and oscilloscope running on 32kB of Flash, 32kB of EEPROM and 2kB of RAM embarked on a 16 MHz chip! It had been a web server for quite a while, but tonight, I got it to behave like a usable oscilloscope. I am a happy man…