LASER HARP - Driven by Arduino
Stephen Hobley - February 2008
When I was 15, I saw Jean-Michel Jarre play the laser harp during the Rendezvous Houston concert. I thought it was the coolest thing I'd ever seen. I knew one day I would build my own, and it would open, close and work without a frame, just like his.
Essentially it's a 'virtual' playing surface. Each beam is one note, breaking a beam sounds the note, and releasing it silences it. You can modulate the sound by moving your hand along the beam (although this still needs some final tweaking)
It's only taken about 22 years, but I finally got the bugs out of the sensor last week.
...and a couple of pictures...
- The first problem was that we needed something to produce a +/- 10v p-to-p staircase waveform to drive the galvanometer mirror at approximately 600Hz.
- The second problem was to create a detector that would reject both ambient light and anything outside of the 532nm frequency of the laser light. The detector would have to operate over a long range (6ft +) and be stable enough to operate under stage lighting.
- Finally a serial port (MIDI) output routine was required to sound the notes.
Basically an Arduino connects to a 12-bit DAC chip (TLV5618) using the SPI 3 wire interface. It sends numbers on a timer interrupt to the DAC to specify where the beams are, 0, 455, 900, etc... all the way up to 4095 for 10 beams.
It holds each position for about 500uS (half a millisecond) and switches laser blanking on (or is that "off"?) for this time.
When it reaches the end it brings the mirror back to the start position.
The output of the DAC chip is 0-5V - this is then converted to -5v / +5v using a TL082 Opamp chip from Radio shack.
Finally it's passed through a Balanced Line Driver chip to give the full (-/+ 10v ptp) differential signal required by the mirror (laser galvanometer) amplifier.
The reflection sensor is wired into pin 2 of the Arduino, on it's hardware interrupt line - so when this is triggered the Arduino stops processing for a uS or two to record the beam pulse in an array. This routine has to be very short. I noticed some double pulses on the output from the beam sensor, so I added a 555 timer in astable (monostable?) mode. This is triggered by the first falling edge of the sensor and outputs a solid single pulse.
It uses TAOS (#12) light to voltage sensors, that are wired into a two opamp differentiator circuit that rejects ambient light (so the circuit only sees flashing laser pulses, anything that is on all the time is rejected). The opamps are tuned to the approx frequency of the flashing laser light. This was the hardest part of the project, and for a long time I did not think I could get it to work (and that maybe JMJ's harp was a fake).
Then by accident I wired one Opamp to +5v not ground, and forgot to wire the other one to ground, and as if by magic the sensor started to "see" the pulses being reflected off the far wall of the dining room.
The standI built a small stand for the sensor and have this attached to the harp via a 6' cable. The harp also has footswitch control. In this way the harp can be below the stage (like Jarre) and the sensor and control next to the player. You can get larger beam spread this way, as the laser mirror is limited to 40 degree range.
Here's a picture - 3 TAOS cells, with 532 notch filters - the pot on the stand is to adjust the sensitivity (although it seems to range from incredibly sensitive, to insanely sensitive). The 450mw laser is too bright for the sensor, the smoke sometimes sets notes off. Originally it had a 250mw laser - which works very well, but not so visible.
It went through many revisions - I tried a whole bunch of cds cells and photodiodes, but ended up using the Texas Instruments TAOS light to voltage convertors. There are a couple of tricks being used to increase sensitivity, so that ambient light is rejected.
Finally a MIDI output routine is running on the main thread of execution and processes any MIDI messages to be sent out of the TX pin of the Arduino. Optionally the amount of reflected light is also read by one of the ADC pins and this is scaled and transmitted as MIDI continuous controller data. It can be mapped to any controller number. So sliding your hand down the beam can 'bend' notes, or sweep the filter etc... This is not 100% reliable (or musical ) so I tend to turn that off.
There's also an LCD status panel on the top that is also serviced by this thread.
This diagram, from my friend Manuel Schultz's Laser Harp site shows how it works - the only difference is that I have the sensor in front of the player, rather than below.
PUTTING IT ALL TOGETHER:
BLUE SECTION - Laser and PSU, 450mw 532nm laser with TTL blanking
RED SECTION - Galvanometer, Amplifier and PSU
GREEN SECTION - Arduino, DAC, Line Driver and Return sensor
It used to have 2 lasers - one red, one green as I wanted the beams to change color when played, but I couldn't find a red laser to match the 450mw green. Mine was only 250mw.
Laser - Ebay (magicmerlin)
Galvanometer - Ebay (lasershowparts)
Arduino - available from Trossen Robotics
TAOS Sensors (#12) - www.mouser.com
TLV5618 DAC, SSM2412 Line driver both from www.digikey.com
More info: www.stephenhobley.com/build
I just discovered tonight that if you remove the IR filter on a WiiMote and replace it with a 532nm notch filter the hardware blob tracking can be used to track my hand positions while playing the harp. (I finally got my tri-wing screwdriver in the mail)
This is so cool, and it solves all the non-linearity issues I was having using reflected light level - so I'll be updating the harp to use the WiiMote tracking ASAP.
It's probably not fast enough to completely replace the trigger sensor, but it'll work for pitch-bending etc...