Laser Harp

Can we really call that a harp ?

What to do with 12 lasers, an Arduino, 4 planks and an afternoon ?

When I was in Association DTRE (ESIEA’s Robotic association), I sometime had just enough free time and materials to make an improvised small projet.

In the beautiful day of Wednesday the 12 of December 2018, ESIEA told us that one of our electronic discovery workshop would be replaced by another one. Our workshop was about making laser gates (or “alarm systems”) with a laser, a photoresistor, a buzzer and an Arduino, which was a nice and entertaining way to introduce electronics and microcontroller programming to beginners. I had written and organized those workshops for a full year, so I was left with my disappointment and a whole lot of lasers.

Okay fine let’s build something with those !

Technique concepts

My knowledge at the time was that there are two types of laser harp:

  • The infinite ray harp
  • The very finite ray harp (that’s complex)

The infinite rays are of the uttermost beautiful effect, but the detection of the contact with one of the harp “string” is pretty complex. Furthermore, it does not need a wooden frame, and what is a harp without a frame ?? For me, not much (or I’m just lazy).

The finite ray harps use a bar with photo sensible sensors to detect interactions, allowing a simpler production at the cost of reduced freedom of use. Depending on the available materials and my own will, I decided to go with the finite ray harp.

Most of the laser harp models I saw use only one laser on a rotating mirror, giving the impression of many strings. The final system is easier to modify, as one can change the number of strings with the push of a button. Using a fast and precise enough motor and a mirror strapped to it was not something I was going to try for the first try, but I’ll keep it in mind for later.

Physical realization

Well it’s not too bad, I only need to build a wooden frame (easy), with 12 lines holes (easy ?) on each side to pass the lasers and sensors.

A small trip to the mini drill press, and we see bitterly that making 12 inline holes is not THAT easy (sigh).

To avoid a massive energy consumption, the lasers are powered one by one with a demultiplexer, fast enough so the eye can see all the laser powered on at the same time. Likewise, the analog pins are a scarce resource, and a demultiplexer should also be use. The sensors are simply photoresistors, from the same laser gate project.

Our sound emitting device will be a nice speaker, scraped from an old alarm clock.

The all construction took a little bit more the two hours, soldering and hot glue included.

The code

I’m writing this post in 2021, the 2018 code is declared missing in the limbo. Only human memory persists !

As mentioned before, the laser and photoresistors are activated by pairs, one pair at a time. The sweeping speed is so high that we can not see any difference with always activated lasers, and we save the (high) energy cost of all the powered off laser.

I called my musician colleagues for advises, and they all told me to use a MIDI (for Musical Instrument Digital Interface). Of course I listen to them by making absolutely not that, and making a hard coded table of musical frequencies (Implementing MIDI is pretty complicated, and I already have a speaker with no need of interface, why bother ?). I could just associate each frequency of the table with a laser pin, and send the string frequency as a PWM signal to the speaker.

Well, Arduino cannot handle multiple PWM output at the same time, so the audio output can only produce one frequency. What is the problem ? Musical harmonics from simultaneous activated strings, polyphony, I could not do it. The least ear annoying solution (as I do not have a musically trained ear) was a simple linear interpolation of frequencies. Does the use of a MIDI would have prevented those problems ? Absolutely.

The result !

A photo of the prototype before the transition from breadboard to final electrical plate (Observe the precise lining of the holes !):

To see the performances of our most talented musician (on Facebook)

Once again, an extremely simple construction, which attracts curiosity, encourages manipulation and motivates to discover electronics. I could not ask for more.


See also