This Digital IR Theremin creates tones based on the distance of an object from its IR sensor. There’s no microcontroller here, since the project is part of an Introduction to Digital Electronics course. Instead, it uses a handful of comparators, transistors, AND gates, and a 555 timer to make noise.
The comparators are connected to create window comparators. This configuration will output a digital 1 if the input is between two reference voltages, and 0 if it is not. Using this, the analog output of the IR range sensor can be converted to digital values.
The 555 timer takes care of creating the output waveform. A specific resistor is switched in to the timer’s RC circuit depending on which window comparator is active. This allows for a different tone to be played depending on the distance from the IR sensor.
The result is a square wave, which has a frequency dependant on how close an object is to the IR sensor. By selecting the right resistances for each distance, the theremin can be tuned to play a specific scale.
This is a neat project for people looking to learn digital electronics, and the write up does a great job of explaining the theory. After the break, check out a video of the theremin generating some tones.