Build a Laser Harp From Scratch
by gamezero in Circuits > Audio
2987 Views, 25 Favorites, 0 Comments
Build a Laser Harp From Scratch
This is actually a really simple circuit, using just one hex-inverter chip and a handful of small, common components. Discover step-by-step how this circuit works by building it on breadboard first with a detailed guide. Finally, build the finished instrument, tune it and play!
Supplies
- Breadboard + jumper wires
- 1 piece 37x24 stripboard
- CD40106 IC x1
- 2N5457 x6
- 2N3904 x6
- Laser LED x6
- LDR x6
- 10k Trim pot x6
- 1k resistors x18
- 100k resistors x12
- 100nF capacitors x6
- 470nF capacitors x6
- Coloured wire (28AWG)
- 3.5mm jack socket
- 5.5mm DC jack socket
- Toggle switch
- 3mm Threaded Inserts x4
- M3 20mm nylon spacers & screws x2
- M3 Screws x6
- Plastic project box 100mm x 60mm x 25mm
- Amplifier or powered PC speakers + jack lead
Experimenting on Breadboard
Let's start by building up a quick proof-of-concept on breadboard. We need an audio-range oscillator that can be tuned so lets start with a CD40106 CMOS chip and wire up a basic relaxation oscillator circuit using a 470nF capacitor from pin 1 to ground and a B10k potentiometer placed at the edge of the IC so that its wiper is connected to pin 1 and the high of the pot is connected to pin 2. If you only have larger pots just place it in the breadboard nearby and run jumper wires to connect to the chip. CMOS chips get grumpy if you leave their inputs floating so connect all the other inputs of the chip to ground. Then we need to limit the output current with a resistor, 100k ought to do it and for now run this to an output jack connected to an amp or powered PC speakers and lets check its making noise - watch out its likely to be loud! Make sure you can tune the tone with the pot. This oscillator works because the CD40106 is an inverter; feeding the output back into its input via a resistor-capacitor (RC) timing network makes the inverter oscillate from a high signal to a low signal very fast which you then hear as a square-shaped audio wave.
For this to work as an instrument the player needs to be able to turn on and off the sound from each 'string'. This is where the lasers come in - we will setup a circuit which turns the sound on when the player breaks a laser beam firing into a sensor. We can 'gate' the signal using a rudimentary filter made from a 2N5457 N-Channel JFET transistor in voltage-controlled resistor (VCR) mode and a capacitor. In this configuration when the voltage at the JFET's gate pin increases, the resistance between its drain and source goes down, resulting in the filter's cutoff frequency increasing. Connect the oscillator's output 100k resistor to the gate of the JFET and run 9V to its source via a light-dependent resistor (LDR) and lets test this circuit. You will find that when there is light hitting the LDR you can hear the sound, but when you cover the LDR the sound turns off. Great we've got the gate system working but its the opposite effect to what we want - the sound should be off when there is light hitting the LDR. To fix this we need to invert the signal from the LDR, which we can do very simply with an NPN BJT transistor, a common 2N3904 will be perfect. Connect the LDR to the BJT's base pin and the collector to the JFET's source and bingo, you've got a sound which is triggered by a broken light beam. The CD40106 is a hex inverter, meaning there are an extra 5 inverters on this chip we can use, so that will naturally set us up for a 6-'stringed' harp.
Building the Circuits
In terms of circuit boards we will need a strip to hold the 6 tuner trimpots, as well as two identical strips to hold the laser LEDs and the light-dependent resistors; and then we will need a larger board to house the integrated circuit chip and the rest of the components. We can get all 4 required boards out of just one standard stripboard piece which comes in a 37x24 size.
Mark out the stripboard using a permanent marker on both sides then score firmly down your lines with the heal of a strong craft knife; make a few score marks for each line, then simply snap off the pieces. To clean up the board edges you can use a rotary sanding tool, a file or sandpaper; I prefer to use a rough file and use the leftover pen marks to file down to.
All that's left for the circuit boards is to drill away the copper strip according to the diagrams. Mark up the cuts; I'll go through each board and mark each cut on both sides of the board. I use a 3mm shallow tipped drill bit held in a hand-vice and generally make 3 or 4 turns to get the strip properly severed. I'll then run over all the cuts with the back of my tweezers just to free up and knock off any burrs and unwanted flashes of copper. Last job with the drill is to make the mounting holes; drill them slowly, a little from each side at a time so you don't tear away chunks of the board. Be sure to clean up any mangled flash copper from around all the holes.
Build 1 board at a time, adding components from smallest to largest. Don't attach the lasers or the LDRs just yet, you'll want to set them as square as you can once you have the enclosures printed; try to set the trimpots as straight as you can and keep internal wires neat. For the inter-board connecting wires, always start with more length than you'll need - you can always cut it down.
3D Printing the Enclosure
Dividing these boards up into modules makes it easier to plan out the enclosure. I have included the stl files I designed to fit but you could equally design your own enclosure to 3D print or craft with other skills. I blocked-out the boards, lasers, LDRs and the battery in Blender and laid them out in a rough arrangement. Then, keeping in mind some considerations necessary for 3D printing, I started to shape some pieces around the boards and components into an enclosure resembling somewhere between a medieval hand-harp and a lyre.
The major design considerations for 3D printing are: size; print direction; tolerances; and assembly. I built these parts for 3D printing in Blender; you can use the stls files to print your own, but I'll describe how I constructed the parts so you can make your own design if you like. You don't have to have a 3D printed frame either - you could use any craft material you're used to: foam board, wood, metal, junk, etc.
I created the boxes for the top and bottom bars which house the Lasers at the top and the LDRs at the bottom; and some supports to hold the bars together. Next these boxes need some shaping and hollowing out. I roughly shaped the bars and supports and then split them in half on the xy plane to make them easier to print, access inside and assemble. The top bar needs to support the lasers so I shaped a rail using some half-cylinders with a pinch at the top to hold the casings in. I dropped in some screw-mount posts in the corners and dug out a gap for the supports to fit into. The top bar can just be copied, flipped and reshaped to make the bottom bar. The rails to hold the LDRs are the same as the LEDs so leave that alone but the case needed to be shaped differently and made a bit larger to accommodate the transistors on the LDR board. The bottom bar also needed an extrusion at the bottom to slot into the base unit, which also needs to be hollow to allow wires to feed through. The supports just needed to have a duct running through to carry the power cables for the LEDs, the 2 halves of the supports will be held together by the top and bottom bars.
For the base I used a small project box, drilled a hole in the top for the wires to enter, drilled out holes on each of the short ends - one for the jack socket, the other for the toggle switch. Then drilled a hole for the power jack and the 6 holes and 2 screw holes for the tuners. This was all on the back face of the box so it doesn't really matter that it chips a bit. Glue the frame bracket piece to the top of the box.
I printed these parts out using 3 different metallic PLAs on my Ender 3 Pro. The support beams took about an hour to print, the top and bottom bars took a couple of hours each and the base took 4 hours. Once you have the parts printed, you'll need to use a soldering iron to push threaded inserts into the screw shafts and then you're ready to start assembling.
Place the Laser LEDs and their board in one half of the top bar, running the cables through the support beam ducts. Then lay out the LDR board to line up all the LDRs with their slots, holding them in place with a blob of putty and run the wires out through the slot at the bottom of the bar.
Connect up all the wires running into the project box, then run a wire from the positive lug of the power socket into the middle lug of the toggle switch - the end lug is where to draw +9V from. Finally connect the mix rail of the main board to the signal lug of the jack socket.
Power it on and you should see the lasers beaming down on their corresponding sensors - break the beam and you'll hear the note so while you have the beam broken, use a screwdriver to adjust the tuning. The harp is fully polyphonic so make sure its tuned well! You could try guitar tuning: E A D G B E; or tune from the circle of fifths: C G D E A.