Gloria Suzie Kim \ Zoe Fraade-Blanar
Physical Computing Final, ITP Fall 2008


Catherine Sings a Duet with Karaoke Butterfly.

Concept:
We wished to create a natural, visual interface for a singer to be able to express themselves. During a performance, someone out of earshot, or not able to hear, could still have a sense of the performer's vocal expression.


Early concept drawing

Process:
Our original implementation was to use muscle wire to pull on the wings and cause natural looking open-and-close movement.


Early implementation drawing

However, even though muscle wires were very effective, they ran too hot and melted our plastic base. And set our insulating materials on fire. We eventually settled on first a pull solenoid, and when that didn't work, a push solenoid, to power the system. A stepper motor was also set up as a backup plan. Inputs were tested with Photocells, and later with a microphone/amp chip. It is attached to a choker to pick up sound waves directly off of the neck.


A melted base with muscle wire
 

An early green butterfly model with a pull solenoid



Final model, with a push Solenoid, set to a random flap generator

Successes:
The final version of the butterfly flaps its wings in reaction to sound, flapping more the longer a tone is held.


The final model, flapping in reaction to sound

Code:

int butterflyPin = 2;                 // butterfly connected to digital pin 2

int voicePin = 0;    // Analog input pin that the potentiometer is attached to
int voiceValue = 0;   // value read from the pot
int flapTimer = 0;


void setup()
{
  
  Serial.begin(9600); 
  pinMode(butterflyPin, OUTPUT);      // sets the digital pin as output
}

void loop()
{
  delay(10);
  voiceValue = analogRead(voicePin); // read the pot value
  
  Serial.println(voiceValue);      // print the pot value back to the debugger pane
                       // wait 10 milliseconds before the next loop
  //voiceValue = 100;
    if (voiceValue >= 550)    { ///pay attention to this item right here
      
      simpleFlapping(1);          // creates two rounds of simple flapping
     //fastFlapping(3);
     //flutter(3);
     //pumpItUp(3);
     
    }//end if
    
    //flapTimer++
    
    //if (switchwings) {
      
}

//these are the functions that control the timing of the flaps

void simpleFlapping(int iterations) {
  
  for (int i = 0; i < iterations; i++){
    
    Serial.println("I'm flapping");
    
    wingsDown(400) ;
    wingsUp(200);   
      
  }
}

void fastFlapping(int iterations) {
  
  for (int i = 0; i < iterations; i++){
    wingsUp(400);   
    wingsDown(400) ;
  }
}

void flutter(int iterations) {
  
  for (int i = 0; i < iterations; i++){
    wingsDown(random(300, 2000)) ;
    wingsUp(random(300, 2000));   
  }
}

void pumpItUp(int iterations) {
  
  for (int i = 0; i < iterations; i++){
    wingsDown(300) ;
    wingsUp(random(1000) );   
  }
}

//these are the functrions that actually run the wings

void wingsDown(int timer) {
  digitalWrite(butterflyPin, HIGH);  
  delay(timer);
}

void wingsUp(int timer) {
  digitalWrite(butterflyPin, LOW); 
  delay(timer);
}