Upright Laser Harp

52,144

482

82

Introduction: Upright Laser Harp

About: Projects in light, music, and electronics. Find them all on my site: www.jbumstead.com

Laser harps are musical devices with laser beam "strings." When the beam is blocked, a note is played by the instrument. Usually laser harps have the beams travel vertically in the shape of a fan or vertical lines.

In this project, I built a laser harp with stacked laser beams that propagate horizontally. The beams reflect off mirrors to form square shaped beam paths. With this design, the lasers land on "frets," which makes it much simpler to block notes with a single finger. Instead of a MIDI output like my previous laser harp, this device has built-in MIDI player so the output is an audio signal. This means the device does not have to be connected to a computer or MIDI player (e.g. keyboard) to play sound. Both built-in speakers and audio output jack are available for playing music.

In this instructable, I will go over the construction and how to play the instrument.

Supplies:

See below.

Step 1: Supply List

Supplies:

Tools:

  • Laser cutter
  • Soldering iron
  • 3D printer
  • Wire cutters
  • Allen wrenches
  • Small hammer

Step 2: System Overview

The upright laser harp consists of 12 lasers and photoresistors arranged in six layers. Two mirrors per layer reflect the laser beams to the photoresistors. In the figure, the red arrow indicates how the laser is reflected to the photoresistor and the corresponding pins the laser and photoresistor is connected to. The pins are scrambled up due to the way the wiring feeds down the tower to the Arduino Mega. The lasers can be triggered on and off using digital pins, and the voltage drop across the photoresistors is measured using analog input pins. When the laser is blocked, the resistance of the photoresistor increases and the voltage output drops.

The instrument produces audio output using the incredible Adafruit Music Maker shield. I was so happy to discover this shield, because I can now easily produce audio signals from the device without connecting a MIDI player. Check the link for all the info on how to set up this shield. The shield is run in MIDI mode with the audio output being run to audio jack and speakers. A latched pushbutton turns the speakers on and off. Here is a link to the chip (VS1053b) at the heart of the music maker shield. Page 33 has all the instruments.

The volume of the device is controlled using a potentiometer connected to the Arduino Mega. The output is read and software updates the volume of the MIDI signal. Finally, the device can also switch between different MIDI instruments. A rotary switch is read and the output is used to update the instrument. I chose to have 16 preloaded instrument selections on the device. The number of instruments is not limited by the Arduino and music shield. There are over 100 options for instruments on the VS1053 chip. I think there is probably enough memory on the mega to store all those instrument codes if you wanted. The selected instrument is displayed on a wheel with 16 spokes. The wheel is turned using a stepper motor, which is controlled with 4 digital pins.

Step 3: Chassis Design and Cutting

The system was designed in Fusion 360 and is constructed out of plywood and plexiglass. The methodology for designing and building the device was different from my previous projects. I focused on building subassemblies that functioned in isolation and then were added to the overall assembly. For example, the instrument wheel and kinematic laser mount took a lot of time to design and troubleshoot in isolation before adding to the completed assembly.

The parts were lasercut and assembled using alignment tabs, bolts, and super glue.

Note: The tolerances on the parts are not perfect, so you may have to trouble shoot or shave down parts so they fit.

Step 4: Mirror Assembly

The upright laser harp consists of twelve mirror assemblies and each assembly consists of five parts. Two brackets slide into the square mount and a 1" x 1" mirror snaps into place. To prevent the mirror from sliding out of the mount, two C-shaped joints slide in over the mirror. No glue is required for this assembly.

Step 5: Kinematic Laser Mount Assembly

The laser mount was the most difficult assembly to test and design. I wanted to be able to steer the laser for alignment with the photoresistors. In my previous laser harp, the lasers would get misaligned when I moved the device and there was no good way to finely adjust the lasers. Kinematic mounts are crucial components for optical systems, so I looked at existing devices for inspiration. All these devices use springs to apply adjustable force at specific locations in the device. My goal was to build low-cost kinematic mounts, which meant replacing the metal springs with other materials. In my search, I also came across these LEGO-based kinematic mounts.

My first designs placed the mirrors on kinematic mounts with rubberbands. This worked pretty well, but the mounts were bulky and difficult to put together. I started to think of ways to make wood spring-like so I could avoid the springs and rubber bands. The final design consists of wooden arms with slits in them that made them flexible.

The mount consists of nine parts. First the rear body is put together with glue and four nuts placed inside. This part holds the screws that push the part holding the laser. Two parts holding the laser are glued together with the holes facing the screw. Finally, the three "spring" arms connect the front part and the part holding the laser. The laser is placed into the device later.

The process for holding the entire assembly together is described in the next step.

Step 6: Photodetector Mount

To detect the blocked laser beam, I decided to use photoresistors. I debated using faster components, but after watching this great Backyard Amusement video, I realized that photoresistors would work fine given my requirements.

Even with the kinematic laser mounts, I knew that I wanted to add diffusers to make sure light fully illuminated the photoresistors. I used old 35mm film canisters cut to fit in a small mount, a trick I learned from my first laser harp.

A photoresistor is pushed into the photoresistor "wall," and two cables are connected to the photoresistor (one goes to 5V and the other goes to an analog input). I then cut a small piece of diffusive plastic from a camera film canister. The plastic then slides into wooden mounts and is placed into a cross-shaped part. It looks like a little lantern. The body is pressed into the photoresistor wall. Finally, the photoresistor wall is used to connect the kinematic laser mount assembly.

Step 7: Top Assembly (Layers 1-2)

The top two sheets of the laser harp don’t hold any lasers. First, the corner brackets are pressed into Layer 2. The orientation of the brackets matters because of how they fit into Layer 3 in the harp. Layer 1 is then pressed into the top of the brackets. Four square pieces of wood are glued onto the top of Layer 1. This assembly is set aside before attaching to Layer 3.

Step 8: Laser Layer Assembly (Layers 3-9)

These layers hold together the laser, photoresistor walls, and mirror assemblies. All the layers are the same except for layer 3, which has additional holes for mounting the top assembly. For each row, the laser/photoresistor and mirror positions alternate, as shown in the schematic. I pressed in the laser/photoresistor modules and mirrors into the layers using a hammer. Some of the tolerances were off, so I had to shave down the tabs on the mounts so they fit into each layer.

At each layer, the lasers and photoresistor wires are threaded down through holes to the next layer. The ground of each laser is connected and the 5V from the photoresistors are connected together. I also labeled the wires so I knew how to connect them in the electronics box at the bottom of the device.

When all the laser, photoresistor walls, and mirror assemblies are mounted into the layers, long arm connectors slide into the layers to hold everything together.

Step 9: Base Assembly (Layers 10-15)

The next step is to start assembling the base. Layers 10-15 were designed to form a converging tunnel in the middle of the device when seen from the top. I pressed the two sides of the electronics box into these layers to hold them in place. Layer 14 and 15 are glued together and Layer 14 has no tabs to be be pressed into the walls of the electronics box. The front and rear wall of the electronics box are not initially pressed into the layers.

The wires from the lasers and photoresistors are then pulled through the holes in the base assembly so they can eventually be connected to the Arduino. Layers 3-9 are connected to the base assembly with tabs on Layer 9 that fit into the walls of the electronics box.

Layers 1-2 can now be pushed into holes on Layer 3. Finally, even longer connector arms are pressed into Layers 1-15 to hold all the layers together and connect the top portion of the instrument to the electronics box.

Step 10: Wheel Assembly

The stepper motor is secured onto the mount with two bolts. There is directionality to this mount; see the CAD model gif and video to make sure everything is in the right direction. A 3D-printed motor coupler connects the motor shaft and wheel axle. The two axle pieces are glued together and pushed into the coupler. Then the first face of the wheel (the one with the bigger rectangular cutout) slides over the axle, followed by the second face of the wheel. Some wax may be required because it is a tight fit. The rim of the wheel with the instrument types holds the two faces together. The words will be upside down when viewing the wheel with the first face to the right of the second face.

Next the two parts holding the Hall effect sensor are glued together. The Hall effect sensor is used to determine the position of the wheel. The bipolar Hall effect sensor switches high to low when the magnet field over the sensor changes. Two magnets are therefore placed on the wheel facing opposite directions. The wheel rotates until the sensor reads high and then switches to low. Some offset in steps is then added to position the first instrument at the right position in the display.

The Hall effect sensor is pushed into place with housing over the middle lead to avoid a short. Check the wiring in the schematic. Now three circular parts slide over the axle so that the axle can turn in the circular hole in the Hall effect sensor mount. Two C-shaped parts are pushed orthogonally into the axle to hold everything in place.

The motor is then connected to the axle via the coupler, which holds a nut and set screw that presses into the motor shaft. Finally, the whole assembly is held together with two spline shaped mounts.

Step 11: Box Component Mounting

I designed all the electronics to be mounted to the top of the electronics box so that the bottom panel could easily be removed if the electronics needed to be troubleshooted. The Arduino Mega, stepper motor controller, prototype board, and instrument wheel are all pressed into the top of the box using the mounts.

A few lasercut parts slide over the boards as shown in the images above. These parts then press into the holes in the top of the box. All the electrical components shown in the diagram are soldered to the prototype board: transistors for controlling the laser diode modules, resistors for the photoresistor circuit, pins for front panel components. There is a lot of soldering work here so I'd like to some day make a PCB for the upright laser harp.

Make sure to wire the Adafruit Music Maker according to the MIDI configuration in the instructions on Adafruit's website.

Step 12: Front and Rear Panel

I decided to build the device with two separate panels. In the rear are the jacks and switches for power and uploading programs to the device. In the front are all the controls related to controlling the instrument and audio of the device.

Black acrylic pieces hold the components on the rear and front panel. Both acrylic panels are glued onto the wooden front and rear walls of the electronics box. After gluing the acrylic, I mounted the potentiometer, rotary encoder, on/off speaker switch, and headphone jack. On the rear, I attached a reset pushbutton, on/off power switch, power jack, and USB jack for uploading programs to the Arduino.

The front and rear walls were then hammered into Layers 10-15, just like the side panels. At this point, I also connected the corner joints at the bottom of the device. A nut is glued into these joints so that bolts can hold on the bottom panel.

I did a lot of soldering and wire wrapping to connect all the components as shown in the schematic. The power supply is 12V, so I made sure the Buck converter was adjusted for 4.5V output before connecting lasers and the motor. Finally outer walls for the electronics box were glued on to cover the Layer 10-15 tabs.

Step 13: Playing the Harp

Attached is the code for the laser harp and some additional troubleshooting code. I followed the code from the Adafruit documentation for the Music Maker shield. The general procedure is as follows:

SETUP

1. Calibrate the instrument wheel with Hall effect sensor signals

2. Set up Music Maker Shield for MIDI output

3. Select the notes played by the device

4. Turn lasers on

LOOP

5. Update volume of device by reading the potentiometer

6. Update the motor position and MIDI instrument by reading rotary encoder

7. Read the state of the photoresistors and compare to previous state to determine if beam was blocked

8. Send appropriate MIDI signal if beam is blocked

The Reset button and Speaker enable button work by being tied to ground so they don’t have to be read into digitial pins of Arduino. You may have to adjust the lasers using the kinematic mounts to make sure they are aligned with the photoresistors.

Now you are ready to play the instrument! The device plays like a fretted instrument because of the rails running down the sides of the device, so it is easier to play than other laser harps I have tried. Thanks for reading my instructable!

1 Person Made This Project!

Recommendations

  • The 1000th Contest

    The 1000th Contest
  • Battery Powered Contest

    Battery Powered Contest
  • Hand Tools Only Challenge

    Hand Tools Only Challenge

82 Discussions

0
ELZurdo
ELZurdo

9 months ago

Muy buen trabajo!!! Esta genial

0
cdavenport
cdavenport

10 months ago



sheer genius!

0
askjerry
askjerry

10 months ago

Very nice design! Thanks!

0
snydeemm019
snydeemm019

1 year ago

Hello! Im trying to make this but I was wondering how much wood you used when you laser cut to make this project and roughly how big the base of it was. Thanks

1
jbumstead
jbumstead

Reply 1 year ago

Awesome! I used Graphic, which is an Autodesk vector program for Mac, to arrange the sheets and export pdfs. You should be able to open the pdfs in any vector editing program. You may have to rearrange the components to fit best for your laser cutter.
I used around 30 sheets of 12"x12", but I bought additional sheets for troubleshooting. The base is 29.5cm x 29.5cm and the structure is 35cm tall.

0
snydeemm019
snydeemm019

Reply 10 months ago

Hello! im making great progress on this project but I've come to a road bump as i don't know where the magnet go on the wheel. Could you help me out a bit?

0
jbumstead
jbumstead

Reply 10 months ago

Great! You can put the magnet anywhere that will move over the hall effect sensor. In the code, you can then add some number of steps for the calibration.
You should test to make sure your hall effect sensor is working, because some people have been having some trouble.

0
snydeemm019
snydeemm019

Reply 11 months ago

hey I'm having troubles with the measures of the boards could you maybe help me out with my sizing?

0
vasospaz
vasospaz

Reply 1 year ago

I used a 4' x 8' sheet of 1/8 birch plywood that I got from Home Depot for around $20, I think It ended up being just over half of the sheet.

0
snydeemm019
snydeemm019

Reply 11 months ago

hey I'm having troubles with the measures of the boards could you maybe help me out with my sizing?

0
jbumstead
jbumstead

Reply 11 months ago

Super! I love the start up music. That's a great idea.

0
vasospaz
vasospaz

Question 1 year ago

So...I'm making really great progress but I have run in to a few problems during the debugging stage.

1. The Hall effect sensor doesn't seem to be detecting properly. I wonder if the orientation for the sensor is the issue since the magnet passes over the top and not across the N or S face?

2. I also notice in your schematics that both the volume control potentiometer and the Hall sensor are assigned to pin 14. I think this might be a typo since this would imply that you are reading an analog voltage off of the Hall sensor rather that treating it as a digital switch. Is this correct?

3. I am having problems getting the lasers to turn on. In looking at your schematic and doing a little research on signaling transistors like the PN2222, it appears that it is customary to put the load device (laser) upstream from the collector. Your schematic shows the laser on the down stream side of the transistor distal to the emitter. I have tested the voltages and it seems to work this way but there is a small voltage on the emitter side when the 5V load power through the transistor is disconnected. If the laser has to be up stream, this will change the way I have strung the wires. Do you think this is an issue that I need to worry about? Is your machine actually wired this way?

4. Do you use the 5V tap on the MEGA to drive any of the components (Hall, Potentiometer, Stepper, Photodiodes) or are they all connected to the buck converter?

It took me a while to figure out that the transistor power needs a common ground with the Arduino.

0
jbumstead
jbumstead

Reply 1 year ago

I am happy to hear you are making progress!
1. I would hook the Hall effect sensor up separately and try reading the output with an analog pin. Plot the output with serial plotter in the Arduino IDE. I had to use three or four magnets for the magnetic field to be strong enough to flip the sensor.
2. That is a typo. They should go to separate pins. Thanks for catching that. You can check the code to see how I actually connected them.
3. I do have them connected as shown in the schematic, but in the second version I am working on, I connected them as you are describing. I can't remember what drove me to connect them this way, but I think it was to minimize the wires I had to pull down through the device.
That being said, I don't know why it isn't working for you. I just tested this setup and it is working fine with the high end of the laser connected to the emitter and the low end of the laser connected to ground. I have a 1kOhm resistor between the base and 5V and the collector connected directly to 5V. The laser turns on. You can test this without coding the Arduino.
The small voltage (around 0.7V I am guessing) is the base-emitter voltage drop present when the transistor is operating in saturation (which is what you want when you are driving a component via a transistor with a small power control signal like this).
4. They are all connected to the Buck converter output. Make sure the Buck converter is tuned to 5V before connecting everything.

Everything should share a common ground. Whenever something isn't working in a project, I always check that first.

0
vasospaz
vasospaz

Reply 1 year ago

Thanks for the response.

1. I discovered that my hall sensor was faulty. I have the circuit working now but I am still not sure I have a strong enough magnet to generate the fields properly when it is mounted on the selector wheel. I am curious why you chose to use two magnets ( N and S) on the wheel instead of coding for just one sensor activation like a typical tachometer setup?

2. I think the Hall pin (HE Pin) is actually D48 based on the arduino code.

3. I am certain you chose this method to conserve wire. It enabled a common ground to come down each post. I think it would be possible with future versions to use a common ground for both the photoresistors and the lasers if you positioned the laser ciruit proximal to the collector. On this topic, it would be a nice addition to have holes to pass the wires on every corner.

I was able to get it working with a test circuit.I think I had the Base and collector mixed up initially. Also, Using just one lase to test with, I ad a hard time convincing myself that the laser was being powered off the 5 V Buck supply. With certain wiring errors and just one laser, the voltage from the arduino would light the laser with only a slight brightness difference.

4. I have everything routed to the Buck.

I will hopefully have pictures and a working machine to share with you soon. Its a lot of soldering!

0
jbumstead
jbumstead

Reply 1 year ago

All magnets have north and south pole. For the bipolar Hall effect sensor, they flip high when the magnet field direction changes. That is why I needed two magnets (one facing north and one facing south). When the Hall Effect sensor passes south, it flips high and it will stay high until a magnetic field facing north passes it front of it. I think I had three or four of those 2mm diameter magnets to get it working. For version 2, I am switching to a photointerrupt sensor.
For one laser, the Arduino will work, but 12 may be too much so I would go with the Buck output.
I am so excited to see your build! Yes, please share photos.

0
vasospaz
vasospaz

Reply 12 months ago

OK. So I have made huge progress since our last message.
1. I tried several different magnets butI never could get the Hall sensor to trigger properly until I mounted it so that the magnet passed over the face of the sensor rather than the top. A little hot glue was all it took to stick it to the side of the axel mount. But now it works and the wheel initializes properly. I just have to fiddle with the offset to get it to initialize to the correct instrument.

2. I shad problems getting the machine to make noise. I downloaded a test sketch for the MusicMaker shield to test it and make sure that it worked. I noticed a very important little comment in the sketch that made all the difference. I had to install a jumper from the Rx pin to Digital pin 2 and bridge the GPIO 1 Lin to 3V. I noticed from your pictures that you did this with your device but I did not see that mentioned in your instructions. Fortunately, NOW IT WORKS!

3. I waited to cut my acrylic face and back panels until I knew the dimensions of the various switches and potentiometers. I discovered that my local Joann Craft Store has a Laser cutter that they rent for 15$ an hour. It took me about 2 minutes to cut my front and back panels. They also sell plywood and acrylic for a pretty good price in a pinch.The device was extremely easy to use. I just needed to bring my files in svg format on a thumb drive. I thought this might be of interest to others who might be making this cool instrument. It actually made me think that maybe I'll make my next one entirely out of plexiglass.

4. Even at maximum volume, mine is not very loud. I think the volume is updating correctly but I am not sure I am getting the best range. I may have to install an amplifier.

5. I have fiddled a little with the code to add some tones as each phase lights.

6. I have had a few problems with variability in quality of the lasers. I have had a few extremely dim ones and I have noticed a few faulty transistors. I think I am going to try one more time to lay out the transistors a little better to make them more accessible for repairs. Hopefully, the third time will be the charm.

Thank you so much for the help. I will send a video once I get it really debugged and tuned up.

Cheers!

0
jbumstead
jbumstead

Reply 12 months ago

WOW! I am so excited you have made such progress and that you have the device close to working! This is a really tough build and you have pointed out some important details to the construction, so I appreciate you sharing this information with the community. I love the photos. Thank you for sharing them!
1. Interesting results with the Hall Effect sensor. Hearing your experience definitely motivates me to switch to the photointerrupt... They make a lot for sense for homing devices, even though the magnets are cool.
2. I updated the step in this instructable to inform others to refer to the Adafruit website for how to set up the Music Maker. Thanks for pointing this out.
3. Another very useful tip. Is this how you cut the wood too?
4. I remember having issues with volume as well, so I primarily connected my output to external speakers. The music maker has a built in amplifier. Maybe this can be solved in software by making the MIDI note play for a longer time or by increasing the volume in the MIDI command.
5. Cool, excited to see a video.
6. I had two lasers fail during the build. They are very cheap, so I was happy the failure rate wasn't higher.

How was the laser alignment? Did the mounts work well enough?

0
vasospaz
vasospaz

Reply 11 months ago

I have to admit that this has been my first significant Arduino project and while it was very difficult, I learned an immense amount.

I have a few more observations and questions.

I noticed in the code that the stepper is set to 2038 steps per revolution but I think it should actually be 2048. I have some jittering in my stepper motor so that the movement of the selector wheel is not totally smooth and sometimes it reverses a few steps. Is there a way to insure that the CLK signal is being correctly interpreted before the code moves forward such s a delay somewhere in the sketch?

My volume is still pretty low despite using a 8 Ohm 1 W pair of speakers. I have been reading a bit and it may be better to use 4 ohm and 3 W to optimize the volume. I cannot find documentation on the MIDI volume variable but I do see the setup variable #define MIDI_CHAN_VOLUME 0x07. Do you know the parameters for this variable. I am not sure if this would impact the volume.

I am still waiting on replacement lasers get all my lasers working. I have a total of 4 that are either very dim or the photoreceptor is not reading correctly. I may have a few faulty transistors also.

I have tried to modify the script to play a note as each laser fires as follows:

// Lasers
void lasersOn(int delayTime) {
for (int p = 0; p < numNotes; p++) {
digitalWrite(Lpins[p], HIGH);
delay(delayTime);

Serial.print("Play Note = ");
Serial.println(p);

midiNoteOn(0, 57, 127);
delayMicroseconds(50);
midiNoteOff(0, 57, 127);
delay(50);

Serial.print("Laser = ");
Serial.println(p);

}
}
void lasersOff(int delayTime) {
for (int p = 0; p < numNotes; p++) {
digitalWrite(Lpins[p], LOW);
delay(delayTime);
}
}

The tone only occasionally plays when the machine fires up and then only once or twice. It is as if the code is speeding past the command. Any ideas? What I am really striving for is a way for it to place the melody for Close Encounters of the Third Kind and it fires up! A nod to Speilberg ;)

Unfortunately, I was not able to get the laser mounts to work very well. I think this was because my lasers are too small for the laser cut holes and so they don't fit very snugly. I found that they had to be lined up pretty close to perfect before the alignment screws would move them enough to fine tune. I noticed a bit of deformation of the entire layer once the screws got tight which then affected the adjacent layers. Aligning one would affect virtually all the others and with warping of the layers, I ended up chasing my tail. I finally 3D printed a little laser pylon and hot glued them in place. Its pretty low tech but it works and I was anxious to get it working. Next time, I will start with the correct size hole in the laser mount. See photo.

IMG_1046.jpeg
0
jbumstead
jbumstead

Reply 11 months ago

First Arduino project, that’s great! I’m glad you learned so much. I shared your progress on my Hackaday. Please let me know if you have an issue with sharing your photos.

Not sure about that line for setting up the MIDI and better control of clock for the motor. If you dive into the forums on stepper motors, you will find way more info on how they work and how to get more control of them.

I think your issue for the MIDI during the startup is this line:
midiNoteOn(0, 57, 127);
delayMicroseconds(50);

50 microseconds is too short for the note to play. Change it to 5000microseconds to see if that worked. I want to hear that Encounters rift!

The mounts still need work. I want them to be more user friendly for the next design. Thanks for sharing all your ideas, suggestions, and questions!