Midterm Project Documentation: Rising Dragon

Project name: Rising Dragon

Phuong Anh Nguyen

Professor Andy Garcia


  1. CONTEXT AND SIGNIFICANCE

Our previous project was a helmet that can move its parts to reveal the face. I would say this midterm project in particular was independent on its own, just that since we experimented with servo movements in the helmet project, we were more inspired by the use of them again in this project. 

Our project was intended for spectators who would like something fun and aesthetically pleasing; it was more supposed to be like an artwork than a game that I saw most of our classmates do; and we wanted to celebrate the year of the Dragon through this, since the animal is also an important symbol in both our cultures. We originally planned for a simple interaction where the audience will kickstart the artwork by themselves through the activation of different sensors. Since interactions to us are just a process of communication between humans and the object, it doesn’t necessarily have to be difficult to guess or bring in the wow-factor; instead, we wanted it to be rather straightforward to leave the wow-factor to the product itself.

  1. CONCEPTION AND DESIGN

We understood that our project itself, although requires simple interactions, may not be so easily figured out by spectators. For example, with a game, people understand and figure out relatively fast; but imagine facing a drawing, it’s less straightforward on what you should do. I wouldn’t say we were very careful in considering this, because the position to place the sensors could have been improved (i.e place it at the front, sticking out from the background instead of on top of it since it’s less likely that people would have thought of that). Our project is constructed mainly with cardboard, paper, and fabric. We believe that these materials will be easy to assemble, correct and disassemble, since they are firm enough but not too hard that you cannot poke/cut through if you miss something.  The dragon was purchased pre-made, we just had to assemble it; the background was painted by us and the rest were just decorations. I believe a better options could have been thin wooden boards but as I said above, that leaves not as flexible room for correcting as cardboard, so would require more careful planning from the beginning. 

  1. FABRICATION AND PRODUCTION

The most significant steps in the production process was the construction of the mechanics, since our project focused more on how to make it move the way we imagined. Without that being correctly constructed, coding wouldn’t solve anything. This was also the reason the first prototype we made was very big and more complicated, but we eventually abandoned it since the dragon that arrived later turns out to be smaller in size. We started over and faced huge time constraints. I mainly did the creation and decoration of the project, including assembling the dragon, creating the hardware (cardboard part) and the decoration. My partner took care of the coding and mechanics. We gathered to do the project together instead of each taking their own part home, because there was little room for mistake the second time we built it. 

At the User Testing Session, the dragon was not there yet, so we only displayed the mechanic part. Furthermore, the motor was not working suitably that time, so there was not much we could show others. We did talk to the professor and he suggested a change in the direction of our project that we later followed, thus restarting everything. We changed the mechanic that controls the dragon, from the original vertical-up movement to now a horizontal movement. We also changed the overall size to be more suitable to the size of the dragon. The size was more appropriate, so was the aesthetic; but the mechanic was not as perfect as we had hoped for. However, it surely was more feasible than our first prototype. 

Overall, I believe that although it turned out working, there were a lot of rooms for improvement regarding this project. For the hardware part (not counting the mechanic), the use of material and the construction ensures its stability to work on and the timeliness of the project; however, if time allowed, there was much more we could have done to make the project more exciting, perhaps by coming up with something that introduces a little mystery. For the mechanics, the second time we did it, the horizontal movement worked much better with the structure of the dragon itself; however, it was difficult to achieve the smooth effect we imagined. As for the coding, we used millis instead of the delay to ensure the code works smoothly. 

     

  1. CONCLUSIONS

The goal of our project was to display a fun artwork featuring the dragon that allow the audience to enjoy not only as a still object but with moving and lighting effects, enhancing the experience. Our project results fulfilled our goal of a simple interaction, although by the end of it, we saw the potential for enhancement so that the interaction duration may be extended. This is also something where we felt a disconnection between what we thought and the actual outcome; since the interaction felt too cut-short to have left a lasting impression.

If we had had more time, we would have designed something more complex so that the duration of the interaction would have been longer. For example, keeping the interaction as simple as it is now, we could have added more elements to the artwork (such as something dropping from the dragon, smoking effect, sound effect,…) that would appear gradually so there’s that feeling of “surprise after surprise”. However, through the outcome, we learned of both the limitless possibility of working on a tight deadline, and the courage to start over again once we see a mistake has been made. On the technical sides of things, through the process of building, we learned how the different parts would work together, how problems can arise during the process despite what we believed to be careful planning initially, and how we can calmly resolve them. Overall, this project has been an invaluable learning experience to sum up what we have practiced within the first half of the semester. 

  1. DISASSEMBLY:

 

  1. APPENDIX

The code for the project is inserted below: 

#define Trig 2  //引脚Tring 连接 IO D2

#define Echo 3  //引脚Echo 连接 IO D3

long startTime = 0;

float cm;    //距离变量

float temp;  //

int intal = 150;

int i;

#include <Servo.h>

Servo myservo1;

Servo myservo2;

Servo myservo3;

Servo myservo4;

void setup() {

  Serial.begin(115200);

  myservo1.attach(8);

  myservo2.attach(7);

  myservo3.attach(10);

  myservo4.attach(11);

  pinMode(Trig, OUTPUT);

  pinMode(Echo, INPUT);

  pinMode(5, OUTPUT);  //将端口设置为输出

  digitalWrite(5, 0);

  pinMode(9, OUTPUT);  //将端口设置为输出

  digitalWrite(9, 0);

  pinMode(6, OUTPUT);  //将端口设置为输出

  digitalWrite(6, 0);

}

void loop() {

  digitalWrite(Trig, LOW);   //给Trig发送一个低电平

  delayMicroseconds(2);      //等待 2微妙

  digitalWrite(Trig, HIGH);  //给Trig发送一个高电平

  delayMicroseconds(10);     //等待 10微妙

  digitalWrite(Trig, LOW);   //给Trig发送一个低电平

  temp = float(pulseIn(Echo, HIGH));  //存储回波等待时间,

  cm = (temp * 17) / 1000;            //把回波时间换算成cm

  Serial.print(“Distance = “);

  Serial.print(cm);  //串口输出距离换算成cm的结果

  Serial.println(“cm”);

  if (cm <= 20) {

    Long();

  } else if (cm >= 20 && cm <= 60) {

    slow();

  }

}

void Long() {

  intal = 150;

  if (millis() – startTime < 1 * intal) {

    myservo1.write(125);

  }

  if (millis() – startTime > 1 * intal && millis() – startTime < 2 * intal) {

    myservo2.write(55);

  }

  if (millis() – startTime > 2 * intal && millis() – startTime < 3 * intal) {

    myservo3.write(125);

  }

  if (millis() – startTime > 3 * intal && millis() – startTime < 4 * intal) {

    myservo4.write(55);

  }

  if (millis() – startTime > 4 * intal && millis() – startTime < 5 * intal) {

    myservo1.write(55);

  }

  if (millis() – startTime > 5 * intal && millis() – startTime < 6 * intal) {

    myservo2.write(125);

  }

  if (millis() – startTime > 6 * intal && millis() – startTime < 7 * intal) {

    myservo3.write(55);

  }

  if (millis() – startTime > 7 * intal) {

    myservo4.write(125);

    startTime = millis();

  }

}

void slow() {

  intal = constrain(map(cm, 20, 60, 150, 300), 150, 300);

  if (millis() – startTime < 1 * intal) {

    myservo1.write(105);

  }

  if (millis() – startTime > 1 * intal && millis() – startTime < 2 * intal) {

    myservo2.write(75);

  }

  if (millis() – startTime > 2 * intal && millis() – startTime < 3 * intal) {

    myservo3.write(105);

  }

  if (millis() – startTime > 3 * intal && millis() – startTime < 4 * intal) {

    myservo4.write(75);

  }

  if (millis() – startTime > 4 * intal && millis() – startTime < 5 * intal) {

    myservo1.write(75);

  }

  if (millis() – startTime > 5 * intal && millis() – startTime < 6 * intal) {

    myservo2.write(105);

  }

  if (millis() – startTime > 6 * intal && millis() – startTime < 7 * intal) {

    myservo3.write(75);

  }

  if (millis() – startTime > 7 * intal) {

    myservo4.write(105);

    startTime = millis();

  }

}

The first (failed) prototype: 

Leave a Reply

Your email address will not be published. Required fields are marked *