I had this nice step motor lying around and searched for a funny way to use it. Then I came across the idea of using a stepper as rotary encoder, a nice idea explained in detail on several sites:
Since I wanted to make this experiment as simple as possible, I thought about using my soundcard as input device. I came up with this really simple circuit:
In short, it just limits the voltage to the soundcard to about +-0.7 Volts. The resistor values shouldn't be critical.
Some pics of the pretty crappy mc-guyverish construction as well as screenshots of the waveforms while turning the knob:
One of the soundfiles I recorded to study the signal: stepper.wav
This algorithm is implemented in the example python application, see below.
It basically goes like this:
Now that the basic idea was working, I needed a practical application to use it.
If you want to try this out, read below..
The Greasemonkey script _should_ add a custom menu to Firefox (allows setting of the host/port where the server part runs), but it doesn't..
UPDATE: With Greasemonkey 0.8.20091209.4 on Firefox 3.6 (Ubuntu 9.10) the menu DOES appear, it seems that MY Greasemonkey setup was broken. (Thanks for the feedback, David!)
This software is far from being perfect, any fixes/additions are welcome.
Comments, suggestions, additions? Drop me a line: srehm AT lavabit.com - English or German please.