Saturday, November 15, 2008
Friday, November 14, 2008
Polarizing Optoacustic Mixer
To mix two audio signals using amplitude modulated lasers as the transmition medium and a polarizing filter for the selection of the mixing ratio.
Concept:
Two low-cost red laser pointers which normally use 3VDC power supplies are modified with an audio tranformer so that for each laser the supply voltage varies about 3VDC proportionally to an audio signal. The flucuating supply voltages result in fluctuating beam brightnesses. The beams are made colinear with a 50/50 beamsplitter and the lasers are rotated along their beam axes such that the polarization of the light due to either laser in the colinear beam is orthagonalized. The beam then passes through a hand-held polarizing filter which selectes out a linear combination of the orthagonal polarizations and so also a linear combination of the audio signals those polarizations encode. The beam post-polarizer is then incident on a (passive) phototranstor attached to a high-gain (741-based) pre-amp and a boom-box, so that the mixed audio signal may be heard in real-time.
Photos:
an annotated beam's-eye view
(note Steve's Cell-Detecting Helical Antenna of Death in back left)
Steve hand-mixing some beats
a top-view of the transmitter in the dark
a beam's-eye view in the dark
(You have to imagine the otherworldly blend of Moondog and eurotrance emanating from the boom-box.)
(Raj, Langley, Merck, Englehardt, Steve)
Friday, October 24, 2008
Rithmomachia
A few years ago, after reading about it in Pappas' Magic of Mathematics, I built a board and pieces for an ancient game similar to Chess, called Rithmomachia, the Philosopher's Game, or Zahlenkampfspiel. Recently I brought the board out of mothballs. Here are some photos from todays game:
the white pyramid approaches
(Kevin left, me right)
we both have a bit of a headache now
For a quick guide I wrote up this document. It is useful while playing with new players.
For more info, Googling at random is not terribly effective, due to how obscure the game is, and how much misinformation is out there. Here are some reliable sources imo:
- The Yahoo! Group for Rithmomachia - There is an active discussion of the game taking place here and Stephen has translated several old texts on the game, which are available for download (thanks!).
- The Magic of Mathematics - This is where I first came across the game, and from what reference I built my set. You can search inside the book on Amazon.
- Wikipedia (German)
- Wikipedia (English) - very little information. Some day I will get around to a major re-write of this article, perhaps based on the well written German version.
At some point I will implement a PC version of the game, probably in C using old-school terminal graphics and i/o, that way it can be run on my ancient 386 laptop!
Sunday, February 10, 2008
Penny Opto-recognition Software
The video is quite self-explanatory:
For the bandwidth-impaired, here are some photos of the system in action:
The pennyfix.c file is the one demonstrated here.
The camhacks.c file is an improvement of the peep-hole camera software. More on that in an upcoming post.
Tuesday, January 01, 2008
rtrafmon - Remote Traffic Monitoring without remote software
rtrafmon may be downloaded here
Here is screencap of typicall usage (showing VNC traffic to another machine):

Just so it is totally clear what is going on here, let me explain: There are three different machines, A, B, and X. B connects to A over VNC. X then uses rtrafmon with A as its target. X sees the plot above showing the amount of VNC traffic from A to B.
From the README file:
WARNING: this tool is in an alpha stage and so may crash, lag your machine, lag your network, or piss off network administrators. Use it at your own risk.
What is rtrafmon?
rtrafmon is a tool for monitoring a remote host's network traffic without any software on the remote end. The tool displays packets per second and latency of the remote host on a scrolling plot. The packet rate is a green or red bar graph and the latency is shown with a white line graph superimposed on the packet rate graph.
What is required on the remote side?
The remote host must be reachable on some TCP port (open or closed), and it's TCP/IP stack must use incremental IPIDs (This is true of Windows systems, but not of most UNIX varieties).
Put simply, an unfirewalled (or partially-unfirewalled) Windows machine.
How does rtrafmon work?
This tool works by sending unsolicited TCP packets to a remote host and gathering information from the responding packets. The packets sent to the remote host have their SYN flag set indicating that we intend to establish a connection on the specified port. If the port is open, the host *must* respond with a SYN-ACK packet. All required information is gathered from the IPID and round-trip-time fields of these SYN-ACK packets. Since the IPID field is incremented once for every outgoing packet, we can tell how many packets were sent by the remote host in between the sending of SYN probes.
Local requirements:
- Linux box with root access
- the hping3 network tool (try "apt-get install hping3" on Debian or Ubuntu)
- SDL development libraries ("apt-get install libSDL-dev")
- a C compiler ("apt-get install build-essential")
Building:
To build rtrafmon, just type "make" in this directory.
Using:
rtrafmon works by parsing the output of the hping tool. So a typical usage would be as follows (run as root):
hping3 -i u100000 -S -p 22 216.4.223.98 | ./rtrafmon
This means: send a SYN packet on port 22 to 216.4.223.98 every 100000 microseconds (10 times per second), and send the responces to rtrafmon. The resulting traffic analysis will be displayed in a window.
NOTE: the scroll rate (and thus the resolution of the monitoring) may be changed by decreasing the interval (hping's -i option). But beware, probing too fast can cause undesirable effects on both the local and remote host. Sending SYN packets too fast can confound some TCP/IP stacks (called SYN-flooding) and results in a Denial of Service.
NAT
Multiple machines behind a single NAT-box (which have their own privite IPs within a LAN) can be monitored (even simultaniously), so long as there is at least one port forwarded through the firewall to each machine. Hping can help you work out the firewall rules (ask Google for more).
Tuesday, December 11, 2007
Hack Keyboard into Magic Wand Clock
To do this I used a propeller microcontroller (from Parallax) and a few basic tools. All the required circuitry to interface with the LEDs and control the wand movement was already on the clock's PCB, I just had to run wires from the propeller to the bases of the LED-controlling transistors and run a line from the wand-detector so that I could sync. After about an hour of playing with Spin code (the unique high-level language for the propeller) I managed to get a stable field of pixels out of the hacked clock:
Then it just took a few more hours to design an 8x4 pixel font on graph paper, enter the hex into a massive table, and program text scrolling into the propeller chip. Adding keyboard support was a no brainer, since the propeller works - just import the keyboard Spin object! Here is the result:
You may download and use my code if you wish, from here (you want the .spin files).
This project was quite entertaining! Now the clock sits in my room and acts as a free-for-all message board for anyone who walks in - they just type on the attached keyboard and their message is added to the scroll!
After using the propeller with this project I would very highly recommend anyone with an interest in microcontrollers (or electronics in general) check it out! It is very powerful, well designed, and most importantly, the hobbiest/hacker community surrounding it is extraordinary!
Other POV links of note:
* U.S. Government hack of a similar clock (uses real-time linux distro)
* Spoke POV (for bicycles)
* MAKE magazine's POV toy (easy)
* POV analog and digital clocks (lots of photos)
* High Resolution POV (impressive)
Friday, December 07, 2007
Software Scope Emulator with Slow Phosphor
Here are examples of various types of files piped into the new scope simulator:
Videos:
and from the audio used in the last post:

