Creepy Medusa!

Submitted by syh on Sat, 03/02/2013 - 16:34

Description: This scary little Medusa wants to turn you to stone! When she stands or jumps on her platform, the fires of her magic appear, and she moans in a creepy voice.

A piezo speaker is controlled by a photocell, which was bent and sewn into the top of her head (inspired by this LED tutorial (http://web.media.mit.edu/~leah/grad_work/diy/diy_e_sewing.html). The little snakes on her head cast different shadows that affect the frequency. Conductive thread runs down the inside of her head, then out and along the back of her cape, and exposed at the end so it can be connected to alligator clips.  Similarly, the wires for the piezo speaker (which is tucked inside her back) are tacked onto the back of her cape, to be connected by alligator clips.

The force sensor is placed between two pieces of cardboard to form a base, with a piece of felt in-between to provide some dampening. This controls the brightness of the LED, and whether or not Medusa is “speaking.”

Components:
- Arduino Uno + USB cable
- Breadboard
- 3 LEDs (red, green, blue)
- 3 220-ohm resistors
- 1 piezo speaker
- 1 photocell
- 1 force sensitive resistor
- 2 10k-ohm resistors
- 4 alligator clips
- conductive thread (http://www.aniomagic.com/sparkle/connections.php)
- 1 crocheted “Medusa” (green and taupe wool, grey felt, fibrefill, glass weights, thread, fabric glue, Tacky Glue)
- 1 base of cardboard with scrap felt (for force sensor)

Arduino Code:
/* Medusa Theremin
* --------
* Takes input from a photocell and a force sensor and sends out light and sound.
* Adapted by Sandra Helsley from Tod E. Kurt
*/

int photoPin = 0;    // select the input pin for the potentiometer
int touchPin = 1;

int speakerPin = 7;
int redLED = 9;
int blueLED = 10;
int greenLED = 11;
int soundState = 0;

int val = 0;

void setup() {
 pinMode(speakerPin, OUTPUT);
 pinMode(redLED, OUTPUT);
 pinMode(greenLED, OUTPUT);
 pinMode(blueLED, OUTPUT);
 
 Serial.begin(9600);
 Serial.println("ready");
}

void loop() {
 //turn everything off
 digitalWrite(speakerPin, LOW);
 digitalWrite(redLED, LOW);
 digitalWrite(greenLED, LOW);
 digitalWrite(blueLED, LOW);
 
 soundState = analogRead(touchPin);
 Serial.println(soundState);
 
 // if the force sensor is pushed down enough, turn on the LEDs and make noise
 if (soundState > 25){
   int brightness = soundState/4;
   analogWrite(redLED, brightness);
   analogWrite(greenLED, brightness);
   analogWrite(blueLED, brightness);

   val = analogRead(photoPin);    // read value from the sensor
   val = val/2;                 // process the value a little
    
   for( int i=0; i<50; i++ ) {  // play it for 5 cycles
     digitalWrite(speakerPin, HIGH);
     delayMicroseconds(val);
     digitalWrite(speakerPin, LOW);
     delayMicroseconds(val);
   }
 }
}

Circuit
Medusa Doll
Photocell
Plugged In
Upside-down inside-out cape
0
Your rating: None
Drupal theme by Kiwi Themes.