Shy Lotus

Made by rkandala

The objective of this project was to explore how emotions can be communicated through expressive motions for inanimate objects to give them a personality.

Created: December 20th, 2015

0
Password: mti2015
- https://vimeo.com/149596483
0
//***********************
//Audio+Smoothing
//***********************
const int numReadings = 10;

int readings[numReadings];      // the readings from the analog input
int index = 0;                  // the index of the current reading
int total = 0;                  // the running total
int average = 0;                // the average

int micPin = A0;
int micVal;
int micMin = 33;
int micMax = 500;
//**************
//NeoPixel
//**************

#include <Adafruit_NeoPixel.h> //include the neopixel library
//declarations
#define PIXEL_PIN 6
#define NUMPIXELS 12
Adafruit_NeoPixel ring = Adafruit_NeoPixel(NUMPIXELS, PIXEL_PIN, NEO_GRB + NEO_KHZ800); //initialize neopixel object
//colors
uint32_t ringColor;

//Yellow(255,11,78)
//pink(255,133,152)
int yelr=255;int yelg=11;int yelb=78;
int pinkr=255;int pinkg=133;int pinkb=152;
//deepBlue(16,91,99)
//purple(51,37,50)
int deepr=16;int deepg=91;int deepb=91;
int purpr=51;int purpg=37;int purpb=50;

//******************
//Servo Motor
//******************
#include <Servo.h>

Servo myServo;
int servoPin = 10;
int servoPos = 0;
int minPos = 0;
int maxPos = 60;

//******************
//State Logic
//******************
int micThres = 200;//800
boolean closed = false;
boolean servoOn = false;
float counter = 0;
float countdown = 500;

void setup() {
  // put your setup code here, to run once:
    //Initialize Servo
  myServo.attach(servoPin);

  //Initialize NeoPixel
  ring.begin();
  ring.setBrightness(80);
  ring.show();

  Serial.begin(9600);
    myServo.write(maxPos);
}

void loop() {
    //smoothing
  micVal = smoothing();
  Serial.print("Mic: ");
  Serial.println(micVal);
  delay(1);        // delay in between reads for stability
  updateState();
  updatePos();
  updatePixels();
}

//Servo Motion
void updatePos() {
  servoPos = map(counter, 0, countdown, maxPos, minPos);
  servoPos = constrain(servoPos, minPos, maxPos);
  myServo.write(servoPos);
  Serial.print("Pos: ");
  Serial.println(servoPos);
  delay(15);
}

//neoPixel Update
void updatePixels() {
  int r = 0;int g = 0;int b = 0;
  int minr = 0;int ming = 0;int minb = 0;
  int maxr = 0;int maxg = 0;int maxb = 0;
  
  if(closed){
    minr=purpr;ming=purpg;minb=purpb;
    maxr=deepr;maxg=deepg;maxb=deepb;    
  }
  else{
    minr=yelr;ming=yelg;minb=yelb;
    maxr=pinkr;maxg=pinkg;maxb=pinkb; 
  }
  
  r = map(micVal, micMin, micMax, minr, maxr);
  g = map(micVal, micMin, micMax, ming, maxg);
  b = map(micVal, micMin, micMax, minb, maxb);
  ringColor = ring.Color(r, g, b);
  for (int i = 0; i < NUMPIXELS; i++)
  {
    ring.setPixelColor(i, ringColor);
  }
  ring.show();
}


void updateState(){
  if(!servoOn){
    if(micVal>micThres){closed = true;counter=countdown;}
    else{closed = false;counter=0;}
  }
  if(counter>0){counter--;servoOn=true;}
  else{servoOn = false;counter=0;}
  
//  Serial.print("close:");
//  Serial.print(closed);
//  Serial.print("; time:");
//  Serial.println(counter);
}
//sensorReading
int smoothing() {
  // subtract the last reading:
  total = total - readings[index];
  // read from the sensor:
  readings[index] = analogRead(micPin);
  // add the reading to the total:
  total = total + readings[index];
  // advance to the next position in the array:
  index = index + 1;

  // if we're at the end of the array...
  if (index >= numReadings)
    // ...wrap around to the beginning:
    index = 0;

  // calculate the average:
  average = total / numReadings;
  // send it to the computer as ASCII digits
  return average;
}
Click to Expand
0

Gestures are considered one of the most primitive forms of communication amongst human beings. However, when you look at objects the way they communicate with us it is a bit more explicit (i.e. speech or text). With Shy Lotus, I wanted to explore the expressivity of motion and to see if objects can communicate to us through motions.

The interaction I wanted to design is that of a shy plant that is sensitive to loud environments. Essentially if it is too loud it would close its petals and change color to convey a mood of shyness. Only when the ambient environment has calmed down do the petals reopen and the flower changes color to convey a state of calmness.

The shy lotus has three major components: the petals, the center dome, and the pedestal.

- The petals are made out of rice paper and held together with a stem made out of laser cut acrylic.

- The center dome, which unfortunately was too small in my final build, is made out of a translucent resin such that the LEDs can be nested in it to create a glossy effect when they shine through.

- The pedestal is made out of laser cut plywood and houses the electronics controlling the mechanism.

The mechanism works using a pulley system. Strings are attached to the outside and inside of the petal stems. The outside strings are attached to a spring in the center, which creates tension for the petals to stay open. The inside strings are attached to a servo arm that creates downward tension on the petals, when the lotus is in a shy state. The servo motion is triggered with a sound sensor.

There were two things I learned from this project 1) choice of materials changes the experience 2) mechanisms are difficult to build. The rice paper made huge difference in the experience and I felt that the delicate nature of the paper reflected the delicateness of the flower. With regards to the mechanism, originally I had planned on using nitinol wires to actuate the petals rather than a pulley system. Unfortunately, the wires never arrived on time and choosing to create a pulley system was back up strategy. The mechanism doesn't work quite as well as I had planned (I wanted the motion to be gradual rather than sudden) and I could’ve spent more time refining how it moves.

If I had a few more weeks to revise this project I would use the nitinol wires and rice paper to make the petals look more delicate. I would also rebuild the stand use wood or other materials so that it feels like it fits in a home. Finally, I would try to play around with the motion of the petals a bit more (i.e. add more degrees of movement or change motion path) to see if I could create more expressive and aesthetic motions.   

x
Share this Project

Courses

48-739 Making Things Interactive

· 0 members

Making Things Interactive (MTI) is a studio course based on physical prototyping and computing. You will develop novel sensing, interaction and display techniques through projects and short assignm...more


About

The objective of this project was to explore how emotions can be communicated through expressive motions for inanimate objects to give them a personality.