This project is a demonstration of a cool electronic music instrument – ‘Theremin’. A Theremin player fascinates the audience and drives their attention because he/she does not have to touch an instrument at all! For those who got into this page obviously do not think it’s a magic, unlike others. We will rather find out what makes a Theremin to play notes with our hand movements and we will build a basic one.
A Theremin has three basic components – an ultrasonic sensor, a microcontroller, and a speaker. A distance of an object is detected by an ultrasonic sensor and that value is sent to a speaker to output different frequencies as notes.
With this basic understanding, I built a basic Theremin as below:
Parts Used:
- - SRF005 Ultrasonic Sensor
- Arduino Duimilanove
- Speaker
- Wires
Here is the circuit sketch used in this project:
And the code below was loaded into arduino to drive the Theremin.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
//Setting the pins as in the diagram above
int echopin = 2;
int trigpin = 3;
int speakerpin = 6;
unsigned long pulseTime = 0;
unsigned long distance = 0;
unsigned long soundDelay = 0;
void setup() {
pinMode(speakerpin, OUTPUT);
pinMode (trigpin, OUTPUT);
pinMode(echopin, INPUT); p
}
void loop() {
digitalWrite(trigpin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
pulseTime = pulseIn(echopin, HIGH);
distance = pulseTime/58;
soundDelay = pulseTime/3; // This sets the frequency
if (distance < 30) {
digitalWrite(speakerpin, HIGH);
delayMicroseconds(soundDelay);
digitalWrite(speakerpin, LOW);
delayMicroseconds(soundDelay);
}
} |
So this was a demonstration of a basic Theremin. Anyone is most welcome to share ideas on how to build an advanced one.



3 comments
No ping yet
Tanveer says:
February 21, 2012 at 7:59 am (UTC -7)
Has ayonne ever managed to add a 6th motor for a wrist to this robot arm, to allow the jaws to rotate?Any ideas of comments would be very welcome, as im tempted to have a go!John
Juan says:
June 6, 2012 at 11:44 am (UTC -7)
Hi, and thanks so much for all that iofnrmation. It is very nice to come across instructions that are not missing bits..!Would you say this is likely to work as well for a SRF10? I have tried according to your instruction (yep, as close as I could) and I am not getting a sketch in Processing.Any ideas?
Adam says:
July 23, 2012 at 3:32 pm (UTC -7)
is it possible to display the input in a LCD screen ??