PDA

View Full Version : [Contest Entry] Frameless Laser Harp with microcontroller



shobley
02-12-2008, 01:59 PM
LASER HARP - Driven by Arduino
Stephen Hobley - February 2008

INTRODUCTION:

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.



http://www.youtube.com/watch?v=sLVXmsbVwUs

...and a couple of pictures...


http://www.stephenhobley.com/WEB_BEST_MG_8701.jpg


http://www.stephenhobley.com/Harp_break.jpg




PROBLEMS:
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.SOLUTIONS:

LASER CONTROL:

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.

REFLECTION SENSOR:

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.


http://www.stephenhobley.com/Beam_det.jpg

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.

MIDI:

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.

OPERATING PRINCIPLE:

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.


http://www.laserharp.org/images/articles/diagram_page.gif

PUTTING IT ALL TOGETHER:


http://www.stephenhobley.com/build/Insidethebox.jpg

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.


http://www.stephenhobley.com/build/ColorCoded.jpg



http://www.youtube.com/watch?v=P2f55BbWQlg

PARTS:

Laser - Ebay (magicmerlin)
Galvanometer - Ebay (lasershowparts)
Arduino - available from Trossen Robotics
TAOS Sensors (#12) - www.mouser.com (http://www.mouser.com)
TLV5618 DAC, SSM2412 Line driver both from www.digikey.com (http://www.digikey.com)

More info: www.stephenhobley.com/build (http://www.stephenhobley.com/build)

UPDATE:

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... :veryhappy:

Dave
02-12-2008, 02:20 PM
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.
...
It uses an Atmel MPU to control the laser on a timer interrupt, beams bounce of your hands and are detected by a light sensor on the floor, that triggers MIDI output on a pin interrupt.

Wow, Steve. That is awesome. I love weird musical interfaces, especially ones involving lasers. Now you gotta get yourself a pair of big reflective sunglasses like Jarre wears.

So, is this one laser pulsing at a rotating mirror? What are you using for the light sensor?



http://www.youtube.com/watch?v=sLVXmsbVwUs

(anyone know how the 'YOUTUBE' button works? I can't seem to get it to work)


http://forums.trossenrobotics.com/faq.php?faq=trfaq#faq_youtubetag

Use the video ID. It's what comes after ?v= in the URL.


http://www.youtube.com/watch?v=sLVXmsbVwUs

CaptKill4Fun
02-12-2008, 02:48 PM
:cool: Hi,

That's pretty cool ... and I want to build one too ...
... are you posting the basic plans and code soon?

shobley
02-12-2008, 03:01 PM
Thanks!

<snip>

(Moved to top of thread...)

Eventually I'll be posting the construction details on my website

Alex
02-12-2008, 03:04 PM
more cowbell! I mean more videos:) That is way freakin cool!!

thanks for the submission Steve

Matt
02-12-2008, 03:06 PM
Wow, great project. I heard that those TAOS sensors were discontinued and that they were just going to sell out the remaining batch. I've always wanted Phidgets to make a board using those. I don't know how big the market would be for them, but they would be cool. You can make laser harps and M&M sorters!

shobley
02-12-2008, 11:34 PM
Discontinued...?

Nooooooooooooooooooooooooooooooo!!
:eek:

It took me *ages* to find something that worked.

Actually I think some of them are discontinued but I used the '12' series. Hopefully they'll be around for some time yet.

I just uploaded a slightly longer video - and actually managed to make it to the end of Rendezvous Part II without goofing up!


http://www.youtube.com/watch?v=hCgMsrSaYwY

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.

Steve

Alex
02-13-2008, 09:04 AM
WOW!:eek:

That is so damn cool Steve! Arduino huh? Man, I see those used everywhere lately! I need to start learning more about them.

shobley
02-13-2008, 09:42 AM
<snip>
(Moved to top of thread...)

shobley
02-13-2008, 10:41 AM
<snip>
(Moved to top of thread...)

Dave
02-13-2008, 05:10 PM
I really appreciate the detailed description, as I'm sure everyone else does. That's a beautiful machine you've built. I'm especially impressed by all the precise timing involved. That must have required some very efficient coding.

It's funny that you used the Arduino, because I was just doing some research last week on how to build a MIDI controller around that board. I'm more interested in sliders, knobs, and triggers, though; not something quite as ambitious as this :). Anyhow, good work!

shobley
02-14-2008, 09:33 AM
I got mentioned on the makezine.com blog yesterday, and I've had 12 emails and 2 phone calls asking about it. :)

So I got off my butt and put together a site about building it - I'll be posting schematics and code their as soon as I can.

www.stephenhobley.com/build (http://www.stephenhobley.com/build)

Steve

jdolecki
02-17-2008, 10:52 AM
Does it play a note when the beam is broken?

Does it vary the pitch based on hand position in the beam?

shobley
02-17-2008, 05:58 PM
It plays note on/note off when your hand scatters and reflects the light of a beam within the field of view of the sensor on the floor - so you don't have to break the beam completely to make it play.

The amount of reflected light is also measured and this can be applied to pitch bend or to filter sweep, or any other MIDI continuous controller message. So by moving your hand along the beam you can modulate the sound.

At the moment this is a non linear relationship, and needs some more work, and I will be improving on the original design in the coming weeks.

shobley
02-21-2008, 09:55 AM
A local arts paper (NUVO) came by yesterday to talk to me about the harp and some of the other instruments I've been working on.

We got some better pictures...

(That's me suckin' in the gut, and lookin' enigmatic :veryhappy:)

jdolecki
02-21-2008, 12:18 PM
You should take it to your local DORKBOT meeting.


http://dorkbot.org/

CaptKill4Fun
02-22-2008, 12:44 AM
:cool: Hi,

Now that's braggin' rights! Great job ... nice sharp pic's for your scrapbook.

Maybe you can do an article go with the pics ...

shobley
03-27-2008, 08:33 PM
This made for some fun listening at about 13:30...

http://www.sonicstate.com/news/shownews.cfm?newsid=6376 (http://www.sonicstate.com/news/shownews.cfm?newsid=6376)

Matt
03-31-2008, 03:59 PM
They already stole your idea!!!!! Bastards.

http://www.sharperimage.com/us/en/catalog/product/sku__BZ100

http://www.sharperimage.com/all/en/images/products/bz100_pip.jpg

LinuxGuy
04-08-2008, 01:51 AM
Wow, great project. I heard that those TAOS sensors were discontinued and that they were just going to sell out the remaining batch. I've always wanted Phidgets to make a board using those. I don't know how big the market would be for them, but they would be cool. You can make laser harps and M&M sorters!
Have you seen this Color Light Sensor (http://www.sparkfun.com/commerce/product_info.php?products_id=8618) ?? It looks really cool and the output is all digital. :happy: I plan to get one of the breakout boards (http://www.sparkfun.com/commerce/product_info.php?products_id=8663).

8-Dale

Dave
04-23-2008, 02:33 PM
They already stole your idea!!!!! Bastards.

http://www.sharperimage.com/us/en/catalog/product/sku__BZ100

http://www.sharperimage.com/all/en/images/products/bz100_pip.jpg

And then... They went under (http://www.reuters.com/article/hotStocksNews/idUSWEN401220080220?pageNumber=1&virtualBrandChannel=10010).


Have you seen this Color Light Sensor (http://www.sparkfun.com/commerce/product_info.php?products_id=8618) ?? It looks really cool and the output is all digital. :happy: I plan to get one of the breakout boards (http://www.sparkfun.com/commerce/product_info.php?products_id=8663).
Alex and I were geeking out over those a few days ago. We'll probably be adding them to our catalog at some point. In the meantime, give SparkFun your business because they're awesome.

LinuxGuy
04-23-2008, 03:50 PM
And then... They went under (http://www.reuters.com/article/hotStocksNews/idUSWEN401220080220?pageNumber=1&virtualBrandChannel=10010).

Alex and I were geeking out over those a few days ago. We'll probably be adding them to our catalog at some point. In the meantime, give SparkFun your business because they're awesome.
Spark Fun is EVIL, I tell you! They stock and may WAY too many cool things! My wallet screams every time I look at that website and you don't even want to know how big my shopping cart there is.

I could probably do just as much damage with a TR shopping cart, maybe more. Lemme see.. LEGO Mindstorns NXT kit, Phidgets Interface Kit 8/8/8 (need something to test cross compiled Phidgets libraries with, blue LCD), an SRV-1 (Open Source robot platform), a full Stinger kit, Bioloid Comprehensive Kit, Serializer (just to tinker and experiment with), Complete Trossen1 with 3 decks (I'd have to add a bunch of SES holes to it). I don't even WANT to know the total on all that and I am sure I can easily find more I want.

8-Dale

4mem8
04-25-2008, 07:29 PM
Oh, I need some more spare cash, goodies ,goodies ,goodies.

Adrenalynn
05-05-2008, 10:24 AM
[cross-reference] I posted a note in the Maker Faire thread regarding seeing this awesome instrument in person. http://forums.trossenrobotics.com/showthread.php?t=1745