Since forever I have always wanted my own Oscilloscope. The problem is all the good ones are really really REALLY expensive. Plus they are generally large beastly bulky boxes.
Background: A while back I bought a lighting dimmer pack on eBay. It has 4 channels that are controlled by a protocol known as DMX-512. DMX is a lighting standard used primarily in theatrical grade lighting systems. It is also used for moving lights, lights with colors, rotating lithos, and smoke machines. Basically it can control up to 512 devices using 8-bits of data per device. i.e. 0 to 255. In my dimmer’s case it has 4 channels and the values of 0 to 255 represent brightness of each channel. I’d like to use it to control the lights in my room via my AMX system.
Here’s the problem, AMX don’t speak DMX. DMX is a RS-485 communication. Using info about DMX I found online, I tried programming a PIC microcontroller to talk DMX along with a RS-485 transceiver chip, but it didn’t work too well. My results were always off the wall and crazy random stuff would happen. I needed to see what the data I was sending looked like. I needed a DSO (Digital Storage Oscilloscope).
I searched for days looking for the right one. You know what? All the cheap ones suck and all the good ones cost at least $800. There are a LOT of DSO’s on eBay from sellers in China. DO NOT buy those things. They are horrible and I hear the software is lacking basic features all other DSO’s have. Finally I found a rather nice one from a company called USB Instruments. They make a couple DSO’s, the Stingray and the Swordfish. I believe that Grant on Mythbusters has a Stingray that I’ve seen him using before. I bought the Swordfish. It is a pen-like design with one input and 5MHz of bandwidth. Plenty for my needs. Of course being that it is USB, the interface is all software. But it’s quite fast. I am impressed with the speed. The other big advantage is I can log data over a period of time and then go back and analyze it. You can’t do that with a normal o-scope.
Now that I could see the actual 1’s and 0’s flying out of my PIC16F628 chip, I was able to successfully write a simple program that can speak DMX! It’s working real well too. Now I just have to fix it up to take serial commands from my AMX system and then translate them to DMX. This means that I could have the lights in my room turn off at certain times of the day, ramp up and down slowly for a cool effect, and even turn on in the morning when my alarm clock goes off.
Here’s the PicBasic Pro file and the hex file in case anybody out there wants to see them.
DMX.bas
DMX.HEX