Fork me on GitHub

Project Notes

#700 Laser Harp Kit

Build and test an 8051-based laser harp kit.

Build

Here’s a quick demo..

clip

Notes

There’s a common C51-based “laser harp” kit that is available in various packagings from sellers on aliexpress, icstation and other market-places.

I picked up one of the kits from an aliexpress seller to check it out. There are various build and demo videos out there, for example:

clip

Parts

The kit comes with all the parts needed to build the harp, including USB power cable and speaker. Note: in the final build, I replaced the speaker with a piezo buzzer - the sound quality is not much different!

Item Qty Ref
1kΩ 11 R1-7, R16-19
10kΩ 8 R8-15
30pF 2 C3-4
10µF 2 C5-6
12MHz crystal 1 Y1
3mm blue LED 10 D1-10
STC89C52 1 U1
50 pin DIP socket 1 U1
wire 2 U1
40mm copper pillar 2 U1
speaker 1 SPK
5V laser 7 JG1-7
power jack 1 DC002
USB power cable 1  
8550 PNP 1 Q1
5516 LDR 7 GM1-7
pushbutton 2 K1-2
small copper pillar 4  
DPDT switch 1 KG
screw 4  

Circuit Design

The circuit is quite straight-forward:

  • 7 lasers are pointed at 7 LDRs monitored by 7 GPIO ports
  • 2 switches are wired to GPIO ports
  • the microcontroller polls/reads the LDR inputs and switches
  • the microcontroller generates the appropriate sound output (square wave)

Here is a transcription of the circuit in Fritzing:

bb

schematic

Testing the Behaviour

The two buttons control the mode of the harp:

  • K1: play a tune. Rotates between “Happy Birthday” and a Chinese nursery rhyme “世上只有妈妈好” (Mother is the Best)
  • K2: selects between 3 note ranges octaves (low, medium, high)

The output frequencies:

Note Octave 1 Octave 2 Octave 2
1 141 281 561
2 153 317 627
3 178 355 705
4 187 375 740
5 211 421 837
6 237 473 937
7 266 530 1047

Here are some sample scope traces of the lowest and highest notes in the first octave:

scope-oct1_1

scope-oct1_7

Conclusion

After playing around for a few minutes, a couple of limitation are quite apparent:

  • why 7 notes?? There are plenty of spare GPIO pins, so why not 8 for a full octave?
  • tuning: I don’t think the note frequencies match standard tuning
  • button responsiveness: the code doesn’t handle concurrently pressing the range button and playing a note, making it very hard to play a tune across multiple octaves
  • “string” sensitivity: it does not appear very responsive to making/breaking contact with a laser

Next Steps?

I haven’t found the 8051 source code or tried to download it fro the chip. Hoever given the problems with the laser harp - most of which can be solved in code - I don’t think that’s a big loss.

The obvious next step is to redo this project but with:

  • 8 lasers/notes
  • new code that is more responsive and handles concurrent button presses while playing a note. Maybe attempt this with 8051, or switch to an AVR/Arduino.

Credits and References

About LEAP#700 AudioLaserLED8051

This page is a web-friendly rendering of my project notes shared in the LEAP GitHub repository.

Project Source on GitHub Return to the LEAP Catalog
About LEAP

LEAP is my personal collection of electronics projects - usually involving an Arduino or other microprocessor in one way or another. Some are full-blown projects, while many are trivial breadboard experiments, intended to learn and explore something interesting.

Projects are often inspired by things found wild on the net, or ideas from the many great electronics podcasts and YouTube channels. Feel free to borrow liberally, and if you spot any issues do let me know or send a pull-request.

NOTE: For a while I included various scale modelling projects here too, but I've now split them off into a new repository: check out LittleModelArt if you are looking for these projects.

Project Gallery view the projects as an image gallery Notebook reference materials and other notes Follow the Blog follow projects and notes as they are published in your favourite feed reader