Voice over laser

So now that I have the laser, I might as well try fun stuff out with it. Like modulating the beam. I know hams have experimented with long-range laser communication, so maybe it could even work.

So I built a poor girl's beam modulator. It is, in essence, a sophisticated optical apparatus which I call a "Laser". It consists of a piezo buzzer stolen from a defunct fire alarm, a piece of a makeup mirror I broke, and lots of Blu-Tack, among other things. The piezo buzzer is directly connected to my laptop's audio Line Out, so I can make it buzz arbitrary signals. The piezo makes the mirror vibrate, which causes deviations in the beam's direction. Kind of like a DMD, except not digital nor micro.

[Image: A mess of wires and components attached to a mint tin using blu-tack. A laser module is pointing at a piezzo buzzer at an acute angle. A piece of mirror is glued onto the piezo buzzer. The laser and piezzo buzzer are connected to wires that lead out of the picture.]

The receiver side is situated a short distance away. It is just a simple wide-spectrum photodiode. It connects to another sound card's Line In. When the beam deviates a little, it won't directly hit the diode any more, and this causes the diode voltage to fluctuate. This should allow us to send information over the channel.

[Image: A photodiode attached to a cassette case using blu-tack. A piece of paper is attached to the base of the diode, and a line of red laser light is visible on the paper, also hitting the diode.]

I found a piece of audio with a folk tune in the beginning followed by a lady reading out numbers. I applied a suppressed-carrier single-sideband modulation at 6 kHz, so as to avoid the hum caused by lighting in the room. It's painfully trivial using SoX and Perl, by the way:

open(S,"sox salakalastaja.wav -t .raw -e signed -|");
open(U,"|sox -b 16 -c 1 -e signed -t .raw -r 44100 ".
       "- ssb.wav sinc 6000 -n 4096");
 
while(not eof(S)) {
  read(S,$a,2);
  print U pack("s",unpack("s",$a) *
          cos(($n++ * 2 * 3.141592653589793 * 6000) / 44100);
}
 
close(U);
close(S);

I still need to make some amplifiers. The piezo could take a lot more voltage, but line level only goes so far. Also, the unamplified output of the photodiode is very weak at -90 dB, so we're almost hitting the 16-bit quantization floor. Here's a sine wave being transmitted over the laser:

[Image: Spectral power plot of three signals with no frequency scale. The blue signal has a single peak scaled as 0 dB. The red signal has a -90 dB peak at the same frequency. The green signal only has background noise. Noise floor in all three is at -120 dB.]

However, audio from initial crude testing is actually pretty intelligible. In the beginning, you can hear the 50 Hz buzz caused by flickering lamps, and then me tuning the heterodyne to 6.000 kHz. The noise mostly comes from 16-bit quantization/dithering.

The laser-equipped Lego train

In a previous post I was not very happy with the results of my opto-acoustic capture of the miniature gramophone record, so today I thought I'd try to illuminate the record surface more evenly.

Of course, the straightforward solution is to build a circular LEGO® railroad track around the record and have a laser-hauled train run around the track, illuminating the record surface with coherent light at a constant tangential angle, while a camera captures the image at long exposure.

[Image: A LEGO train engine chassis on a curved LEGO track, with a little laser pointer attached to it using blu-tack and cable ties. The laser is emitting red light.]

This time I didn't want to go through the trouble of positioning the high-resolution camera and only got this:

[Image: A vinyl record illuminated very unevenly with laser beams projected radially, towards the center.]

I learned that Lego is not very good for laser work in general; specifically the trains don't run very smoothly, as you can see in the above pic. Updates with audio will follow, anyway. In the meantime, here's a video.

Bonus points if you can hear what's happening in the background.

Update: I didn't post an audio update, because the audio was useless. And the whole laser thing was a dead end anyway. Instead, I edited the high-res photo I took earlier, removing the extreme shadows using Gimp's Dodge/Burn tool. Then changed my Perl code a bit so that it actually stays on track; the record turned out to contain two interleaved tracks. The result is this:

Now I can put the robot back together and close this case.

Update 7/2017: The saga continues in Gramophone audio from photograph, revisited.

Case modding, the polish way

If you're still using CD-Rs like me, and you store them in cardless "slim" jewel cases, you've probably noticed that text written on the spine is pretty invisible:

[Image: CD jewel cases with text labels hand-written on the backs but mostly invisible because of the lack of contrast between the black ink and the black plastic showing through the transparent case.]

But fortunately there's always that bright-colored nail polish you never actually use.

[Image: The above jewel case backs being painted on the inside with a pink glitter nail polish called 'Maybelline New York Mini Colorama 03 Tutti Frutti'.]

Text appears! It's magic!

[Image: All the jewel cases painted, with the text clearly showing against the now pink glittery background.

The Atomic-Powered Robot

[Image: A black toy robot standing next to a My Little Pony. The robot has golden ears and arms, a speaker on its chest, and a big round button on top of its head. On its belly, it has a symbol referring to nuclear power. Text around the robot says OMNI, 024-2931:1524, and 2 MODEL-B.]

This is my mechanical baby, Tommy. He's an atomic-powered [sic] robot that can talk and walk around the room. Born in 1984, he's been with me since the early 1990s, but for the last ten years he's been quite ill and not able to talk.

Today I finally fixed him. While doing that, I decided to do a full autopsy for the sake of science, as I've found his vocal cords especially intriguing. So please observe: Tommy's internals. (As with all medical imagery, it's not for the faint of heart.)

Tommy's belly is dominated by a pink-colored contraption that looks like it has a speaker on the front. The pink device gives Tommy his ability to utter the words "I am the atomic powered robot. Please give my best wishes to everybody!" and also make the sound of a laser gun. Below the sound player is the walking motor, which is quite simple and I'm not going to concentrate on it.

[Image: The robot opened up. A bunch of wires go from inside its head down to where its feet are, where some gears can also be seen. In the middle, a big pink box with a speaker in the front.]

Removing the cover of the pink device, we see a large funnel-shaped object that looks a bit like a speaker. It has a tense plastic membrane, like a drumhead.

[Image: Inside the pink box, a peculiar speaker with a translucent membrane.]

Now it gets really interesting. The speaker is resting on a tiny gramophone arm, which is playing a little vinyl record! There's even a simple electro-mechanical end-of-disc detection and arm-return mechanism. The vibrations of the needle are mechanically transferred to the speaker membrane; there's no electric amplification of any kind.

[Image: Still inside the speaker box, a slit reveals a little vinyl record underneath. A gramophone arm and needle are resting on it. Towards the end of the disc, there's a switch that seems to close an electronic circuit when the arm moves far enough.]

Could a gramophone record get any cuter?

[Image: Close-up of the disc being held in the author's hand, removed from the box. The disc is small enough to fit on the palm.]

And here's Tommy sending you his best wishes.

UPDATE: Okay, yeah, he's cute and all. But take another look at the above photo of the record. Don't you think it contains a lot of information about the recording? Perhaps you could even extract the audio from a good enough photograph. Just a silly thought.

Well, let's get to it.

First I'll need a good quality picture of the record's surface. My roommate lended me her expensive camera for this purpose. To get the rough surface evenly exposed, I used an exposure time of 10 seconds with an aperture of f/32. I circled a lamp around the record for 10 seconds and got this cool image.

[Image: A high-resolution photograph taken tangentially towards the record. Grooves are clearly visible as darker lines, and even the recorded signal can be seen as oscillations in the grooves. The end of the record seems to be silent.]

I'll hint the positions of the groove at every turn and then let Perl interpolate a smooth spiral:

[Image: Screenshot of Inkscape with the above image loaded and markers drawn on the spiral groove wherever it crosses the pi radians mark. Next to it, a computer-generated spiral with similar spacings.]

I'm going to read the record along the spiral at 360 RPM and just convert the pixel brightness at every point of the groove into PCM amplitude. This will probably result in something audible, although quite noisy. There appears to be two interleaved grooves: one for the speech, one for the laser sound. The groove gets randomly selected when the robot's head button is pressed, depending on where the needle happens to land. So I made a stereo sound file.

It's very noisy indeed and there's a lot of crosstalk, but something can be heard in the background. After edge detection on the image and some noise removal on the audio:

Update: Further studying of the record and better sound samples in "The laser-equipped Lego train".