Introduction: 13 Note MIDI Laser Harp

Picture of 13 Note MIDI Laser Harp

The laser harp is an electronic instrument that is played by blocking laser beams. Several laser beams are produced, and a note is played when one of the beams is blocked by the player, similar to plucking a stick on a real harp. The device must therefore produce a laser beam for each note and also have a sensor for determining when a beam is blocked.

I constructed a MIDI laser harp controlled with an Arduino for Spectra, an optics group at Washington University in Saint Louis. This instructable goes over the commercial parts used, design of electronics, mounting parts that were 3D printed, and the frame. This project is also listed on my website with other projects

Step 1: Overview and Generating Laser Strings

Picture of Overview and Generating Laser Strings

This laser harp has thirteen strings. To generate these strings, a laser beam is moved to thirteen different position (for thirteen different strings/notes) by moving a mirror galvanometer. The mirror galvanometer, or galvo for short, is a mirror that can quickly move to different positions depending on a control voltage that is sent to it. At the end of each laser beam is a photoresistor that is used to detect if a beam is blocked (labeled P0 - P12 in the schematic and shown as black points in the graph). When this is detected, a note is played. I also needed the laser beam to be turned off when moving positions so that it appeared as though there were thirteen distinct positions and not a continuous sheet of light.

Shown here is a schematic of all the electronics used in the project. To generate the signals used to move the galvo, I used an Arduino microcontroller. I needed an analog output that was fast enough to move the galvo (and laser beam) so that it appeared like there were really thirteen different beams and not a single beam being moved to different positions. The analog output of the Arudino is PWM and isn't fast enough, so I constructed a 4-bit R2R digital to analog converter (DAC). The digital output of pins 8-11 of the Arduino incremented thirteen times (for the thirteen positions), and the DAC generated an analog voltage ranging from 0 to 4V. The galvo I bought on ebay had a control voltage of +/-10V, so I had to build amplifiers to adjust signal for that range of voltages. The signal was initially amplified with inverted amplifier (G = 2.5) and ran through a differential amplifier to get an analog voltage from around -7 to 7 volts for the galvo. I didn't utilize the entire range of the galvo due to limited gain from the amplifiers I used.

The laser diode was synchronized with the galvo using TTL pulses generated by the Arduino. It was ON when positioned at a photoresistor, and then turned OFF when moving to the next note.

Step 2: Detecting When a Note Is Played

Picture of Detecting When a Note Is Played

The thirteen beams were directed to thirteen different photoresistors (resistors that change resistance depending on how much light hits them). They are labeled as P0 - P13 in the schematic. These photoresistors enable you to convert changes in light to changes in voltage that can be measured. For setting up the photoresistors, here is good tutorial. When the beam is blocked, the resistance of the photoresistor changes because the laser light is no longer hitting the photoresistor. The change in voltage is then sent to the Arduino. Because the Arduino only has 6 analog input channels, I had to use a 4 bit multiplexer controlled by the same four digital signals that controlled the galvo. The output of the multiplexer was then directed to a single analog input channel on the Arduino (see schematic). The photoresistors were covered with old plaster film canister so that the light was diffused when hitting the sensor. This way the laser harp didn't have to be so perfectly aligned.

Step 3: Generating MIDI Signals

Picture of Generating MIDI Signals

The Arduino software has a terrific MIDI signal library created by Francois Best, so it wasn't tough to convert the output from the photoresistors to a MIDI signal. The output of the 4 bit multiplexer was connected to one of the analog input channels of the Arduino. The program checks if a beam is being blocked (by checking for a voltage change read by the analog input channel), and then creates the MIDI signal (note and velocity) depending on which beam was detected to be blocked. To fetch the code for creating these signals download the Francois Best MIDI library and check out the link above. You also need to get a MIDI jack and connect it as shown in the schematic. Check here for more info on connecting the jack, but I really suggest the MIDI library I have listed above.

This laser harp is really a MIDI controller (i.e. it does not have its own sound engine). You can select whatever type of MIDI signal you desire. I chose to select middle C to the C one octave higher in frequency. Another MIDI instrument or reader (I used by Macbook Pro and Garageband) must then be used to actually create audio signals that could be played through speakers.

Step 4: Building Laser Harp Frame

Picture of Building Laser Harp Frame

Because the beams needed to be separated enough so that only one was blocked at a time, I had to design a frame that enabled the beams to travel a long distance. Several mirrors were used to have the beams reflect at two positions as shown in the pictures above. The laser harp turned out being so big that it was designed to be taken apart. The assembly consists of three parts that can be folded with several hinges and held in place with 18 bolts that can be tightened by hand. Shown here are all three parts of the harp.

The electronics were secured in a wooden box with the galvo mounted at the top. The beams travel downward and reflect off the first mirror. This part is then attached using 4x1 wooden beams that slide into place and are bolted. These beams then attach to the part of the frame that directs the beams upward towards the photoresistors. Finally, two beams are attached using foldable hinges that hold up all thirteen photoresistors. A cable consisting of the signals needed for the multiplexer is also connected. Check out the video that is included to see the full assembly of the laser harp

Step 5: 3D Printing Mounts

Picture of 3D Printing Mounts

I had to mount several components: laser diode, the Arduino, galvo, mirrors, and photoresistors. Using Autocad, I designed these parts and 3D printed them at work. Here are a few examples of the parts. The most crucial part of building these mounts was ensuring that the laser was well aligned with the galvo. If these parts were not secure and well aligned, then the beams would not hit the photoresistors accurately.

Step 6: Software

The program for controlling the laser harp was written in Arduino programming environment. You could program the harp to direct the beam to any position at any speed. A laser show? Yes, definitely possible. Controlling the type of MIDI signal created is also possible. Here is some example code to get started:


int TTL_laser = 2; // digital output for laser

int notes[] = {60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72}; // notes to play for midi signal

int sensePin = 5;

double volCut = 100; // cutoff for playing a note if beam is being blocked (1024 max - photoresistor is not blocked)

int pauseOn = 2500;

int pauseOff = 1000;

int pauseMidi = 4000;

int pauseReturnOn = 100;

int pauseReturnOff = 200;


void setup() { // put your setup code here, to run once: DDRB = 255;

pinMode(TTL_laser, OUTPUT); MIDI.begin(MIDI_CHANNEL_OFF);


void loop() { // put your main code here, to run repeatedly: //

/// NOTE #0 PORTB = B00000000;

digitalWrite(TTL_laser, LOW); delayMicroseconds(pauseOff);

digitalWrite(TTL_laser, HIGH); delayMicroseconds(pauseOn);

int valC0 = analogRead(sensePin); // reading from photodiode

if (valC0 < volCut) {

MIDI.sendNoteOn(notes[0], 100, 1); delayMicroseconds(pauseMidi);

// kill note MIDI.sendNoteOff(notes[0], 100, 1);


/// NOTE #0 END


IslombekK (author)2017-02-01

Wow! Great work! Inspiring!

I'm trying to create a framed laser harp like the one you made. I am implementing 5 sections of laser harp with 5 Arduino boards, all connected together and each section has 7 lasers. I would like to implement Arduinos as MIDI devices and then have all of them connect to a common Raspberry Pi module (maybe?) which runs a MIDI interface program... Do you think that would work?

Thanks :)

jrbums (author)IslombekK2017-02-02

Thanks for your note!

I have a couple thoughts for your project. You have 5 sections with 7 lasers, totaling 35 positions. You don't have to worry about sending a control signal to galvos because you are using separate lasers. However, it may be easier to multiplex the output of the photoresistors into a single Arduino instead of using five Arudinos. I would set up two 18 channel multiplexers and read in the signals from the photoresistors using two pins on the Arduino. Step 8 in my other instructable explains how to handle multiplexing in this way.

I think that using a Pi for a MIDI interface is a great idea. I haven't tried using the MIDI interface on Pi myself though. Do you want to have a single or multiple MIDI outputs for your laser harp?

IslombekK (author)jrbums2017-02-12

Thanks for your reply! Using one Arduino for photoresistors is a great idea! However, my team didn't want to change the proposed design :/ Yes, I would like to have multiple notes be played at the same time.... And I'm using photodiodes to detect the beam being broken. What's funny is that our professor doesn't understand what MIDI is and doesn't understand that Arduino has a library and can send messages to Raspberry Pi to produce sounds. Is there any way you could draw a simple block diagram explaining the sound generation for using Arduino as a MIDI controller? Thank you! :)

jrbums made it! (author)IslombekK2017-02-15

MIDI stands for musical instrument digital interface. It is a digital signal that needs to be decoded to produce an analog audio signal. In the program that decodes the MIDI signal, you can select the instrument sound and other parameters. The analog signal is then run through speakers or headphones that vibrate to produce the sound you hear. The digital signal includes information about the velocity of the note and what note is to be played. Other electronic instruments produce their own analog audio signals that can be run directly to a speaker. Attached is a basic picture of plugging in a MIDI instrument like your laser harp.

There are lots of resources on MIDI signal: schematics, digital signal breakdown, pros and cons, etc. Here is link to a nice instructable on it:

Best of luck on the harp!

headslant (author)2016-05-17


Adrian N. (author)2016-05-01

Jean Michel Jarre will envy you! Good awesome work!

jrbums (author)Adrian N.2016-05-02

Haha, the laser harp master. No way!

basementmaker (author)2016-05-02

Looks great

jrbums (author)basementmaker2016-05-02

Thanks for checking it out!

DIY Hacks and How Tos (author)2016-04-30

Awesome Laser Harp!

About This Instructable




Bio: Projects in light, music, and electronics. Find them all on my site:
More by jrbums:Tablet Weaving Loom Using a Wooden StoolLED Eclipse With Touch Sensors and MIDISelecting the Right Sensor for Arduino Projects
Add instructable to: