Introduction: Easy and Cheap Laser Harp

Hello maker friends!

In this instructable we will tell you how to make an inexpensive laser harp using Arduino.

This project was for 'Creative Electronics', a Beng Electronics Engineering 4th year module at the University of Málaga, School of Telecommunication.

IMPORTANT: this project was based on Frameless Laser Harp, an instructable by the user Pushan Panda. Credits to him! We saw it and could not resist to make our own version. You can see that instructable here:

Step 1: Materials

  • Laser pointer. The more powerful, the better the harp will work. We used an inexpensive 1 mW model and it works alright.
  • Stepper motor. We used the model PM356-048, salvaged from an old printer. It is interesting that the steps are big enough so each step covers one of the strings. In our case, the steps were of 7.5 degrees (48 steps/rotation).
  • DC supply. For the motor. 12 V is usually what you need, but it depends on the motor.
  • ULN2003a. Motor driver. It is basically a set of Darlington transistors which will give the motor the current it needs.
  • LDR (Light Detecting Resistor).
  • A small mirror. 3x3 cm should be OK.
  • Breadboard.
  • Transistor. Any BJT is alright. We used the model 2N3904.
  • Resistors. 1kΩ and 20kΩ
  • Fimo. To attach the mirror to the motor.
  • Wires
  • Arduino UNO
  • Some kind of support for the system. This part is up to you. We used mecano pieces to assemble all together and keep the motor in its place. Any structure that you come up with would do the thing.

Step 2: Assembling It All Together

First, place the ULN2003a, the transistor and the resistors in the breadboard. Connect the motor and the Arduino ports as it is indicated in the fritzing image.

You will have to attach the mirror to the motor. We used fimo to make a piece that would fit into the motor's gearing, and hot-melt adhesive to stick the mirror to said piece.

The next step is an important one. You will have to make a structure able to hold the system, particularly the laser and the motor, as they have to be perfectly aligned. As it was said before, we used mecano to make the structure. The tires reduce the effect of the motor vibrations, and gives the harp a car-looking style. Cool, right?

You will need a power supply for the motor. We used an old one that we had at home.

Step 3: Arduino Code

This is the part where we spent most of the time. The program basically makes the motor go forwards 4 times and backwards another 4 times, lighting up the laser each time it stops, and turning it off when it is moving. This way it makes the effect of the 5 laser strings. Arduino sends messages through the serial port which should be received by a MIDI interface in the computer.

It also does some cool things, such as automatically positioning the mirror. You can download it and look through it if you like. It is commented at some points but it can be confusing (sorry!), so feel free to ask why we did one thing or another.

Step 4: Making It Sound

So we have our Arduino sending MIDI commands through the serial port to our computer. The next step is processing those commands. For that you will need:

Another option could be using a MIDI-enabled device, such a keyboard. But for that you will need a different hardware setup. It is very well explained in the project Pushan Panda's instructable, so check it out!


nick+k made it!(author)2016-11-24

please please please help my. how to adjust the width of the beams?

thank you

Efr%C3%A9n+ManuelG made it!(author)2016-09-25


Well, I will be getting my first arduino in a while, so I was wondering.
Is it possible to adapt this to run into a Digispark (attiny85)?
Apologies for my bad english (I'm spanish) and thank you for your reply!

nelgin made it!(author)2016-08-23

I am thinking of building this project but it seems a lot of people have had problems with the instructions possibly being incomplete or not being able to source the correct parts. Has anyone built this successfully as shown or can they maybe offer a circuit diagram that's a little easier to follow?

I'm also thinking of ordering the parts from since they seem to have most of the components. Since I'm mostly a novice with electric stuff, it'd be nice of someone who isn't such a neophyte could put together a parts list.

KevinL236 made it!(author)2016-08-17

how many notes can it make?

2freshwalwer made it!(author)2015-10-22

Can anyone tell me how to modify the code to use a 4 wire stepper motor?

MattW50 made it!(author)2015-10-14

Got all the wiring done, laser is on its way, just one problem... I have a 5 wire stepper motor that when plugged in, rumbles or "vibrates" but does not turn. It's a 5v, with wires from left to right: pink, yellow, red, blue, Orange. I've tried rearranging the wires with no difference. I'm assuming the pink is the common ground, if I'm using the terms correctly (I'm not advanced at these types of things)... Any help would be great.

MattW50 made it!(author)2015-10-15

Got it to turn very slowly, and now it only spins in one direction

isaac_engel made it!(author)2015-10-07

Hi there! Well, using a 7.5 degrees motor was really convenient because it produced a good result using one step for each beam of the harp. I guess that you could use smaller steps, but of course you should change the code a little bit. If you don't, the beams will end being too close to each other (which maybe isn't such a bad thing because you can fit in more strings!). Try this: in the code, wherever there is a "forward" or "backward" instruction (the ones that move the motor) add 3 more "forward" or "backward". That way, for each movement the motor will move 4 steps instead of 1, and as 7.5º / 1.8º ~= 4 it may work as a 7.5º motor would. I have not tried this so this is just a guess!

rjinvest123 made it!(author)2015-08-30

Looking at the circuit diagram, it appears to me that the 'collector' pin of 2N3904 transistor is NOT connected to anything. Is that correct?
If yes, then 'emitter' is connected to the laser, and 'base' to the ground.
If no, can you please describe in detail where each pin of transistor is connected to?
Finally, what is the purpose of the transistor?

funisfun8 made it!(author)2015-09-02

OK, so first off, I have NOT built this yet, and will probably be making my own design so I can learn about electronics in he process. However, I have been doing a lot of research over the last few days and I think I can help. I'm pretty sure the purpose of the transistor is to be an electrically controlled switch. Apply power and it stops resisting and lets power through which completes the circuit and turns on the laser. Leave it without power it has a high resistance and the circuit is incomplete and the laser is off. I think the one side of the transistor that is not connected is an error in the diagram. The picture after it of the breadboard setup shows ALL the pins of the transistor connected to something. I assume one is connected to power, another to ground, and the base connected to a pin on the Arduino Uno. Hope this helps!

isaac_engel made it!(author)2015-09-03

Yeah, that's exactly it! I could not have explained the purpose of the transistor better than that. The laser is connected to the 5V pin on arduino and to the collector of the transistor. The base is connected to a digital output pin on arduino through a resistor, and finally the emitter SHOULD be connected to ground, as funisfun8 pointed. So that black wire on the diagram should have been connected to the hole just on its right. Thanks for pointing it out, I missed that!

Leektronics made it!(author)2015-07-30

I am in the middle of constructing this but im having issues with the stepper motor and the beam is not separating any suggestions?

Toggle252 made it!(author)2015-06-06

Great Instructable,

Quick question. Is it possible to use a 4 or 5 wire stepper instead of the 6 you used? If so, what alterations would be necessary.


isaac_engel made it!(author)2015-06-07

Hi, I'm glad you liked it!

Quick answer: yes, it's possible. The only important thing is that the motor you use has steps big enough so the beams look good. Ours had 48 steps/rotation. As for the number of wires, every stepper motor will work in a similar way. You just need to know how yours does. Maybe this will throw some light:

Also, Arduino has a stepper library that may help. I would have used myself if I had known about it before. I'm sure they made it easy to use. Take a look:

I hope this helps!

Leektronics made it!(author)2015-07-30

I am in the middle of constructing this but im having issues with the stepper motor and the beam is not separating any suggestions?

Toggle252 made it!(author)2015-06-15

This is a big help thanks, those articles answer my questions perfectly.

I was also wondering, what is the purpose of wiring the laser into the circuit? Could you not have the laser stand alone and run off it's own power source? You would have to turn it on separately, but what is the purpose of connecting it to the circuit?

Thanks for the feedback.

Toggle252 made it!(author)2015-06-07

Wow, thanks for the reply. With regards to the 4 wire stepper, is it not possible to use as it does not have a common (ground) wire?

It seems like the smaller the steps the better?

One other question I have is, just curious, instead of using the ULN2003a, could you use 4 individual npn transistors in parallel instead?

Thanks again for the help

isaac_engel made it!(author)2015-06-12

I think it would be no problem to use a 4 wire stepper. Probably it is a bipolar one, so the setup should be kind of different. I found this example which uses a motor of that kind with Arduino:

Have in mind that the only thing you need to know is how to move the motor one step forward or backward. Once you got that, the rest of the system is the same. You only need to adapt the code a bit for your needs.

As for the size of steps, actually bigger should be better. The biggest we found was 7.5 degrees and the result looked good. If the steps are smaller, the laser beams would not be separated enough and may look like they is only one thicker beam.

isaac_engel made it!(author)2015-03-26

Stepper motors are kind of tricky. You have to tell them the exact steps you want them to move every time, and each move depends on the previous one. I have found (too late I guess!) that Arduino has a library for controlling them. Check it out:

We didn't know about its existence so we controlled the motor manually. The code is there if you want to look at it. For example, if the first move you make is [1,1,0,0], which would mean you set the 1st and 2nd pin to HIGH, and 3rd and 4th pins to LOW, the next move would be [0,1,1,0] and the next [0,0,1,1,]. Then to go backwards it would be again [0,1,1,0], [1,1,0,0], and it would have retured to the initial position. This is how our motor worked. There are others which may work better with hal-steps (varying only 1 input instead of 2 each time).

I hope this helps.

funisfun8 made it!(author)2015-03-06

Hey, I'm very interested in making this. But I am new when it comes to electronics, lasers, and Arduino. I do have some experience in programming however. How hard would it be to adapt this to use 8 beams instead of 5? Would I have to change anything about the hardware? Possibly use a stepper with more steps? And how would I go about adapting the software side? Thanks in advance for your reply.

isaac_engel made it!(author)2015-03-17

Hey! Making it 8 beams would be just matter of programming. The hardware is the same. The thing that stopped us to make more beans was the mirror, as it was too small (like 1 or 2 cm wide). If you have a mirror bigger than ours (maybe 3 or 4 cm, then you just have to change the code: define 3 more notes, 3 more status variables and add a 6more steps inside the code (3 forwards and 3 backwards). These would be the 6th step:

digitalWrite(LaserPin, HIGH);


if(analogRead(0) > threshold)


if(a+b+c+e+f+g+h+i== 0) {

if(f == 0) {

digitalWrite(13, HIGH);

noteOn(0x90, note6, 0x7F);


f = 1;



else if(analogRead(0) < threshold)


if(f >= 1) {

if(++f == 3) {

digitalWrite(13, LOW);

noteOn(0x90, note6, 0x00);

f = 0;




digitalWrite(LaserPin, LOW);


I hope this helps!

funisfun8 made it!(author)2015-03-17

Thanks for the reply, as I said I'm new to this so how hard would it be to hook up 2 foot pedals for changing the octave? Also, any notes on safety for a 5mW green laser?

isaac_engel made it!(author)2015-03-26

I don't think it would be difficult to add the pedals. Just connecting them to an analog input and check the signals in the program loop, or using interrupts.

As for the 5mW laser, the visual results would be much better for sure. I am almost sure it is not harmful for the skin, but it is for the eyes. You should use some kind of protecting glasses, or be really careful when using it.

ajinkyadixit made it!(author)2015-02-20

Also can you please guide me exactly how to use loopMIDI.....???? I am using FL studio as a MIDI signal processor.

isaac_engel made it!(author)2015-02-20

First you open loopMIDI, click the "+" button and it should create a new port.

Then you open HairlessMIDI-Serial. VERY IMPORTANT: in the program settingsset the baud rate to 9600 or whatever you wrote in your code, and leave the rest as it is. Then in "Serial port", select your input, which in my case shows as Arduino Uno. Then in "MIDI Out", select loopMIDI. If everything is set correctly, you should see green lights when your device is transmitting, and no errors should show in the console. Errors often happen because of not setting the baud rate properly.

Finaly in your software, you should select an instrument and set loopMIDI as input. I have never used FL studio, but in Ableton, which is the program I used, it shows as "MIDI From".

ajinkyadixit made it!(author)2015-03-03


I have almost done everything. Just one problem is there. When i start playing, the response is getting slow. Means music is generated quite late or sometimes misses. I have set same baudrate in both Arduino & hairless. After connection, i got no error in compiler window as well as i got two green dots flashing as per data communication. But sometimes the compiler shows error like "Serial Says..... Expected 2 or something bytes more...... " and at this time, no music is generated. I have implemented all this setup on a PCB, not on arduino directly. But there is no any problem in PCB as i tested sample program of MIDI, and it works fine. So what can be a reason of time lag...???

ajinkyadixit made it!(author)2015-02-20

Soooo.... Soooo.... Much of Thanks from me for clearing my doubt about sensor position. My setup is also around completion and i will put video & photo's very soon. What is did today is, i pressed slightly on shaft of stepper motor and applied a small pressure when it was moving and at that time the no beams increased to 8 beams. Moreover the shakyness of beams also removed and only accurate 8 beams like professional laser harp were created. I totally amazed. I will now change some parameters in code to achieve this effect of 8 beams and if succeeded, will update the code here..... :)

isaac_engel made it!(author)2015-02-20

Sounds great! Let me know if you make it work. And make a video, I want to see it!

ajinkyadixit made it!(author)2015-02-20

Wow...... Too great...... I am also making one... Can u please tell me where to mount the sensor...???

Also let me know what to do if i dont want to use the arduino board...??? Instead i will use barebones arduino. I think i will need FTDI breakout board.

isaac_engel made it!(author)2015-02-20

Hi there! I'm so glad you liked the project!

The idea is to put the sensor right next to the laser pointer. I did a drawing for you :)

We did not mention it above so thanks for asking it. Professional laser harps can be played with bare hands, but that is thanks to the powerful laser they use. In this case, you should wear a white glove or some kind of reflective material so the LDR can receive the laser beam back. A catadioptric works really well too.

I am not very familiar with barebones arduino, so I cannot help you much with that. You surely need something to connect with your computer's USB port, so that FTDI breakout board sounds like a solution!

MsSweetSatisfaction made it!(author)2015-02-15

Ooo it's looks so fun, like orchestral science fiction! Awesome job!

isaac_engel made it!(author)2015-02-15

Thank you so much! It's awesome to have such positive feedback :)

About This Instructable




More by isaac_engel:Easy and cheap Laser Harp
Add instructable to: