Many people don’t even know that there were 3d rushes before the one that’s currently fading. In a previous one, some ten years ago, I bought a very expensive ASUS graphics card with shutter glasses. It was really cool for gaming with the 21 inch CRT, but nothing compared to the graphics of today’s games. I still have the glasses, and I wondered many tmes, if I could use them with current equipment. There have been pages on that topic for a long time, but only now I found a page that has all the details to get me interested enough. It features a preload library with which you can hook into the process of switching the image. It has different color schemes as well as sequential for shutter glasses. It uses the V-Sync of the VGA connector to trigger the glasses. But VGA is not so common these days. Luckily, the preload lib is opensource. That allowed me to modify it so as to communicate to an Arduino or orher micro controller through USB FTDI.
The first step was the hardware. I never knew what voltage I have to feed the glasses. Apparently they work with 5 volts, but somewhere I read that everything up to 20 volts should be fine. The more voltage, the better they block the light. I’ll use 12V for the moment. I searched through my drawer for some Op-Amps that I could use for this project. I found a TL094 which must have been there for 15 years, and two LM393N comparators which I ordered in excess for the WeatherStation project. For the prototype I’ll use an Arduino with a proto-breadboard. I can still use something smaller later on. I tried all the op amps without success at first. Then I found out that they don’t work if I reverse the inverted and non inverted inputs of two separate units of the same chip. But that’s exactly what I have to do… Luckily I had two comparators of which I use only one unit each now. I wrote a simple Arduino Sketch that does nothing but toggling a digital output pin at 10 Hz so that it is clearly visible how the shutter glasses switch back and forth. The next sketch was one that looks for ‘l’ and ‘r’ on the serial input and toggles the shutter glasses accordingly.
Next step was modifying the stereowrap preload library to output the command to toggle the glasses to a serial port. For this I created a fork on github. I wanted to have my changes under version control during development. If the original author accepts all the changes when I’m done, I can still delete my repository again. I almost never write pure C code, and while it looks similar to C++, some concepts are quite different. We C++ programmers often whine about bad habits of C programmers, but let’s not get into this. With some arcane functions, a global variable and a hardcoded port name, it was no big deal to get the modification into the source.
The shutter glasses flicker at about the right frequency when running glxgears, but I get no 3D effect. I don’t know yet why. Could be one of the following reasons:
- The monitor is just too slow at 60Hz
- Need more voltage to dim darker
- Too much latency in the serial link or arduino
Anyhow, here are some additional things that I want to improve:
- Use an FTDI chip directly, and either an AtTiny or no microcontroller at all, if I can abuse the RTS line.
- Solder the circuit to a stripboard. No need for a PCB so far.
- Use a step up voltage converter, to power the whole thing from USB. At the moment I need a separate 12V source.
- Find out what needs to be done at the application side to produce the stereo images. Would be cool to use it with a CAD prototype.
- See if I can add a poti to the uC to send a value back for adjusting the disparity.