There are many exciting things that you can do with laser. One of these is playing harp! In this project, a LIDAR scanner (LIDAR = Light Detection and Ranging) is used for that. LIDAR works like RADAR, but uses laser instead of microwaves.
The LIDAR sensor used here has a small DC Motor, that drives a turntable with a laser diode and a receiver diode. The Laser diode emits short pulses of Infrared light which are reflected by the neighbored objects around. The reflected light is then detected by the receiver diode. The electronics measures the time between the emission and detection of the reflected light and calculates the distance from the LIDAR. An accuracy of a few millimeters can be achieved with this method!
The LIDAR continuously sends the angle of the laser beam and the measured distance to an Arduino Mega over its UART interface.
The Arduino sketch then extracts the angles of up to two objects (i.e. hands) within a sector of 90 degrees above the scanner and in a distance between 10 cm and 1 meter from the LIDAR. According to these angles, up to two independent chimes are generated.
Instead of simply using the tone() function, the Arduino outputs a PWM signal that represents a sinusoidal wave with a decay. After low-pass-filtering with a 10k resistor and a 1 micro capacitor and amplification with an active speaker, we get a harp-like sound.
Note: An Arduino UNO or similar ATmega328-powered device can also be used here. But in this case, debugging and uploading of sketches is not possible while the LIDAR sensor is connected, because it also uses the UART pins. So, Arduino Mega with its 4 UARTs is more convenient here.
Comments