#700 Laser Harp Kit
Build and test an 8051-based laser harp kit.
Here’s a quick demo..
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:
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!
|3mm blue LED||10||D1-10|
|50 pin DIP socket||1||U1|
|40mm copper pillar||2||U1|
|USB power cable||1|
|small copper pillar||4|
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:
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|
Here are some sample scope traces of the lowest and highest notes in the first octave:
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
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
- DIY Kit C51 MCU Laser Harp Kit String DIY Keyboard Kit Electronic Parts 7 Strings Electronic DIY Kit Technology Piano Music Box - aliexpress
- DIY Kit C51 MCU Laser Harp Kit String Electronic Keyboard Kit DIY Module Electric Production Sensor Music Controller - same product from icstation
- STC89Cxx series MCU Data Sheet