Laser Harp – Schematic

The fundamental principle behind the laser harp is that a laser shines on a photoresistor making the resistance in the photoresistor close to 0 ohm, and when the a finger is blocking the laser from making contact with the photoresistor, the resistance goes to almost 200k ohm. By using the photoresistors as pulldown resistors in parallel with another set of resistors, the voltage divider rule can be applied to determine what the voltage values will be when the laser is broken. High and low voltages can be sent to the Atmega328p to determine when to play a note.

In the above equation, Vin is the 5V power supply from Vcc of the Atmega328p, R1 is the 200k ohm photoresistor, R2 is the 10k ohm resistor, and Vout is the voltage across R2. This is applied to the schematic and the Atmega328p determines if an incoming signal is high if it is greater than 70% of Vcc and low if it is less than 30% of Vcc. The pins for the incoming signal to the Atmega328p are PD0-PD7. Pin PB1 sends the signal to the speaker to play a note.

The math works out as follows:

Vin (V) R1 (ohm) R2 (ohm) Vout (V)
5 200,000 10,000 0.238
5 150 10,000 4.926

Below are pictures of the schematic in practice: