Kelvin Chan's profile

IAT320 - Project 1 Technical Prototype

Interactional Mapping:

As shown in the diagram below the user can interact with the tangible object in three ways. The first way would be adjust the amount of light present in the objects surroundings. By doing so the user can adjust the brightness of the flower to their satisfaction. The second way of interaction with the tangible object is movement within a certain range of the the object. Once the object detects the user within a certain range, the flowerbud will begin to unfurl and bloom as if waking up and standing at attention. Likewise the opposite can occur as well, should the user move away from the object the flower will furl up as if falling asleep. A third way of interacting with the tangible object is through a touch sensor that when pressed will cause the flower to light in a sequence of random colors. Touching the sensor again will revert the flower back to a white light.
Components:
 
The image below shows an image of the technical prototype. As shown in the right image, the prototype is made out of multiple components: Arduino Uno, a small breadboard, an ultrasonic sensor, a touch sensor, light sensor, a servo motor, and a RGB LED. In the technical protoype everything except for the servo motor was connected to Arduino simply due to the USB connection being unable to supply enough power to the circuit when both the servo motor and ultrasonic sensor were attached. Furthermore connecting an external battery in an attempt to supply enough power to the circuit prove ineffective as doing so almost caused some components to burnout.
Technical Drawings:
 
The diagram below shows the connection between of each section of the technical prototype. The first connection is that of the ultrasonic sensor and the servo motor. When the ultrasonic detects a presence within or outside a certain distance it causes the servo motor to rotate 180 degrees which in turn to either release or pull the wires attached to each petal of the flower, and therefore causing the flower to open and close. However this was not implemented into the physical technical prototype in the end due to technical difficulties involving the power supply needed to run both components. The second connection is the light sensor to the RGB LED. When the light sensor detects the amount of light present in the surroundings, it causes the RGB LED to either shine brighter when there is less light detected or shine dimmer when there is a large amount of light detected. The third connection is the touch sensor and the RGB LED. When the touch sensor is pressed it causes the RGB LED to emit random colors of light instead of white light. When pressed again the RGB LED reverts back to producing white light.
Circuit Schematic:
 
As shown below there are five components connected to the Arduino Uno board, a RGB LED, a ultrasonic sensor, a light sensor, a touch sensor, and a servo motor. However in the physical technical prototype the servo motor was disconnected from the circuit due to draining too much power from the Arduino Uno when connected with the ultrasonic sensor. This was a major problem in the end as one of the interactive components relied on the servo motor receiving data from the ultrasonic sensor so as to know when to start moving. Furthermore an external battery was not able to be implemented to compensate for the lack of power due to a risk of almost burning out certain components when connected.
Iterative Refinement:
 
As shown by the images below as well as the one under the Interactional Mapping section, the technical prototype went through three stages of refinement. The first stage is shown in the first image as well as the one used in the concept blog. As mention in the blog the concept behind the design was an arrangement of flowers that represented the stars in the night sky. The interaction in this stage was simple as there was only the light detection and presence detection. Overall the main idea at this stage was to create an object that could create a certain space or atmosphere.
 
The second image shows the second stage of the refinement process. At this point I decided it might be better to design the object into a from of lamp or stand rather than simply an arrangement of flowers. The reason for this decision was mostly due to the third form of interaction implemented at this stage. The second design retained the light detection and presence detection from the first design while also including a touch interaction to the concept. The idea behind the touch interaction was that when the touch sensor was pressed, how the flowers lit up would change. Instead of simply having all the flower light up at the same time, by pressing the touch sensor, it would be possible to have the flowers light up in patterns representing constellation in the night sky. By pressing the sensor again though, you can revert back to the normal settings.
 
The last stage of the refinement process is shown in the image seen under the Interactional Mapping section. As shown in the image, the technical prototype went through a process of simplification as much of the more complex design elements from the previous two designs were removed. Reason for this was due to time constraints as it proved difficult to design everything within the given time. As shown by the image the amount of flowers were limited to a single flower, which instead of representing a cluster of stars, represented a lone star. This was done to make it easier for testing and wiring. Interaction wise the third design like the second design kept the light and presence detection of the first design. However there were change done to the third interaction compared to the one from the second design. Instead of changing patterns to represent constellation, the third design used a more simple output of emitting a random sequence of colors. This was used as it represented how a single star emits a large variety of lights of different color all of which are combined to form white light.
Code:
 
#include <Servo.h>
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
  #include <avr/power.h>
#endif
#define LED 11
Servo servo1;
int light_sensor = A0;
int echoPin = 6;
int triggerPin = 5;
int touch_sensor = 2;
int brightness = 0;
int pos = 0;
Adafruit_NeoPixel rgbPin = Adafruit_NeoPixel(1, LED, NEO_GRB + NEO_KHZ800);
void setup() {
  // put your setup code here, to run once:
  servo1.attach(3);
  rgbPin.begin();
  rgbPin.show();
  pinMode(touch_sensor, INPUT);
  Serial.begin(9600);
}
void loop() {
  // put your main code here, to run repeatedly:
  long duration, inches, cm;
  pinMode(triggerPin, OUTPUT);
  digitalWrite(triggerPin,HIGH);
  delay(100);
  digitalWrite(triggerPin, LOW);
  pinMode(echoPin, INPUT);
  duration = pulseIn(echoPin, HIGH);
  inches = microsecondsToInches(duration);
  cm = microsecondsToCentimeters(duration);
  Serial.print(inches);
  Serial.print("in, ");
  Serial.print(cm);
  Serial.print("cm");
  Serial.println();
  int touch_val = digitalRead(touch_sensor);
  if (touch_val == HIGH){
    Serial.println("touched");
    rgbPin.setPixelColor(0, random(0, 255), random(0, 255), random(0, 255));
    rgbPin.show();
  }
  else {
    int light_val = analogRead(light_sensor);
    Serial.println(light_val);
  
    brightness = map(light_val, 0, 1023, 0, 255);
    Serial.println(brightness);
    brightness = 255 - brightness;
    if (brightness < 100) {
       brightness = 0;
    }
    Serial.println(brightness);
    rgbPin.setPixelColor(0, brightness, brightness, brightness);
    rgbPin.show();
    Serial.println("no touch");
  }
  if (cm < 50) {
    if (pos < 180){
    for (pos = 0; pos <= 180; pos++) {
      servo1.write(pos);
      //servo2.write(pos);
      //servo3.write(pos);
      delay(10);
    }
    }                
  }
  if (cm > 50) {
    if (pos > 0){
    for (pos = 180; pos >= 0; pos--) {
      servo1.write(pos);
      //servo2.write(pos);
      //servo3.write(pos);
      delay(10);
    }
    }         
  }
  delay(1000);
}
long microsecondsToInches(long microseconds) {
  return microseconds / 74 / 2;
}
long microsecondsToCentimeters(long microseconds) {
  return microseconds / 29 / 2;
}
IAT320 - Project 1 Technical Prototype
Published:

IAT320 - Project 1 Technical Prototype

The technical prototype based off of IAT320 Project 1 concept

Published:

Creative Fields