loading

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: https://www.instructables.com/id/Frameless-Laser-Ha..

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!

<p>please please please help my. how to adjust the width of the beams?<br></p><p>thank you</p>
<p>Hello!</p><p>Well, I will be getting my first arduino in a while, so I was wondering.<br>Is it possible to adapt this to run into a Digispark (attiny85)?<br>Apologies for my bad english (I'm spanish) and thank you for your reply!</p>
<p>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? </p><p><br>I'm also thinking of ordering the parts from https://www.jameco.com 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.</p>
<p>how many notes can it make?</p>
Can anyone tell me how to modify the code to use a 4 wire stepper motor?
<p>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 &quot;vibrates&quot; 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. </p>
Got it to turn very slowly, and now it only spins in one direction
<p>Looking at the circuit diagram, it appears to me that the 'collector' pin of 2N3904 transistor is NOT connected to anything. Is that correct? <br>If yes, then 'emitter' is connected to the laser, and 'base' to the ground.<br>If no, can you please describe in detail where each pin of transistor is connected to?<br>Finally, what is the purpose of the transistor?</p>
<p>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!</p>
<p>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!</p>
<p>I am in the middle of constructing this but im having issues with the stepper motor and the beam is not separating any suggestions?</p>
<p>Great Instructable, </p><p>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.</p><p>Thanks!!! </p>
<p>Hi, I'm glad you liked it!</p><p>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:</p><p><a href="http://www.solarbotics.net/library/pieces/parts_mech_steppers.html" rel="nofollow">http://www.solarbotics.net/library/pieces/parts_me...</a></p><p>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:</p><p><a href="http://www.arduino.cc/en/Reference/Stepper" rel="nofollow">http://www.arduino.cc/en/Reference/Stepper</a></p><p>I hope this helps!</p>
<p>I am in the middle of constructing this but im having issues with the stepper motor and the beam is not separating any suggestions?</p>
<p>This is a big help thanks, those articles answer my questions perfectly.</p><p>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?</p><p>Thanks for the feedback.</p>
<p>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? </p><p>It seems like the smaller the steps the better?</p><p>One other question I have is, just curious, instead of using the ULN2003a, could you use 4 individual npn transistors in parallel instead? </p><p>Thanks again for the help</p>
<p>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:</p><p><a href="http://www.arduino.cc/en/Tutorial/MotorKnob" rel="nofollow">http://www.arduino.cc/en/Tutorial/MotorKnob</a></p><p>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.</p><p>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.</p>
<p>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.</p>
<p>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:</p><p>digitalWrite(LaserPin, HIGH); </p><p> delay(delaylaser);</p><p> if(analogRead(0) &gt; threshold)</p><p> {</p><p> if(a+b+c+e+f+g+h+i== 0) {</p><p> if(f == 0) {</p><p> digitalWrite(13, HIGH); </p><p> noteOn(0x90, note6, 0x7F); </p><p> } </p><p>f = 1;</p><p> } </p><p> }</p><p> else if(analogRead(0) &lt; threshold) </p><p> { </p><p> if(f &gt;= 1) {</p><p> if(++f == 3) {</p><p> digitalWrite(13, LOW); </p><p> noteOn(0x90, note6, 0x00); </p><p>f = 0;</p><p> }</p><p> } </p><p> }</p><p> digitalWrite(LaserPin, LOW); </p><p> forward();</p><p>I hope this helps!</p>
<p>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?</p>
<p>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.</p><p>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.</p>
<p>Also can you please guide me exactly how to use loopMIDI.....???? I am using FL studio as a MIDI signal processor.</p>
<p>First you open loopMIDI, click the &quot;+&quot; button and it should create a new port.</p><p>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 &quot;Serial port&quot;, select your input, which in my case shows as Arduino Uno. Then in &quot;MIDI Out&quot;, 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.</p><p>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 &quot;MIDI From&quot;.</p>
<p>hi..... <br></p><p>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 &amp; 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 &quot;<em>Serial Says..... Expected 2 or something bytes more...... </em>&quot; 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...???</p>
<p>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 &amp; 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..... :) </p>
<p>Sounds great! Let me know if you make it work. And make a video, I want to see it! </p>
<p>Wow...... Too great...... I am also making one... Can u please tell me where to mount the sensor...???</p><p>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.</p>
<p>Hi there! I'm so glad you liked the project!</p><p>The idea is to put the sensor right next to the laser pointer. I did a drawing for you :)</p><p>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.</p><p>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!</p>
<p>Ooo it's looks so fun, like orchestral science fiction! Awesome job!</p>
Thank you so much! It's awesome to have such positive feedback :)

About This Instructable

12,876views

61favorites

License:

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