Context and Significance
My previous research allowed me to realize the importance of receiving and providing inputs in the world of interaction. One project that really inspired me was the GhostWriter produced by Arvind Sanjeev that allowed the user to be able to communicate and ask questions to the AI. For this project there is a continuance of the user providing input and the machine gaining that input to provide a specific output for the user who can then choose whether or not they would like to continue their “conversation” with more inputs. This project made me realize that interaction should never be a one way thing. Interaction should be both parties (the human and the machine) providing both inputs and outputs. Hence I wanted to make something that was fun and quirky that would be both useful and decorative. What is significant about my project is that we utilized this concept of the “vending machine” but rather than a user seeking for something from the “vending machine” my “vending machine” is seeking for something from the user. The Candy Shooter’s goal is to collect information from people. To be specific, we aim to gain feedback from people on certain topics. As a reward for providing feedback, the Candy Shooter will reward the person with a candy no matter what choice they decide to pick. My project is intended for event holders and merchants who would like to collect information from their participants or customers. The best way to know whether something is working fine or liked by the public is to gain feedback. Oftentimes people refrain from providing feedback on surveys and questionnaires because they see it as a waste of time However, the appearance of the Candy Shooter and the rewarding feature makes it a good machine to attract and thus gain information. We took inspirations from vending machines in our design to dispense candies but our vending machine is not used to simply sell products.
Concept and Design
We wanted our model to be people friendly thus we decided very early on that we were going to use fabric to make our project look very cozy and touchable. Our users needed to come in close contact with our project, hence making it furry and friendly was the key to luring potential users. The plant like appearance of the project makes it suitable not only for gaining information but also a great little decoration. After all, who wouldn’t like a furry little plant sitting lying around! We decided to take inspirations from the Plant vs. Zombie character the PeaShooter for the form of the project because it is a very well known game among people of all ages and is a friendly character which makes it very likable. In addition, the feature of shooting out peas from its mouth can be applied to our initial idea of giving the users a reward through the mechanism of a vending machine. The overall structure of the project was to be made out of cardboard as that is the most affordable and available material. Below was our plans for what materials were to be used for which parts:
Petals
- Inside: plastics
- Outside: wrapped with cloth
Leaves
- Felt paper
Stalk
- Inside: cardboard
- Outside: wrapped with cloth
Pot
- Buy it from taobao
FACE
- Inside: cardboard
- Outside: translucent paper or plastic paper
Fabrication and Production
Our group’s initial goal was to make the project look like a flower that will “eat” coins from the mouth and store the coins until it is asked to dispense. Below is our initial sketch:
However, due to the fact that coin savers are not quite useful nowadays we decided to create a machine that can dispense candy from the flower’s head and the petals will open up when a person is in front of it. The dispensing of the candy will be controlled by the pressing of buttons. Below is the final sketch and design:
After we sketched out the appearance of the project and all the mechanisms we planned to use the first thing we did was to make the plant stalk. At first we hot glued the plant stalk shut, but then we realized that we were going to have to work with the inside of the stalk later so we cut a new piece of cardboard and attached velcro to the two sides so that it was capable of being opened and closed.
After the plant stalk was made we cut out 5 flower petals from delivery bags and glued them around the top of the flower stalk. After that, we taped strings of yarn to each flower petal. We then glued inside the plant stalk five bubble tea straws so that we can restrict the movement of the strings and not have it interfere with the vending machine in the middle of the stalk. We used three different diameter of straws and eventually decided that the bubble tea straw was the best for allowing enough space for the string to move can to its original position after being pulled but small enough that we can still fit the vending machine in the middle.
.
Moreover, we then built the vending machine mechanism separately through the use of a geared dc motor, cardboard, and some wire taken from fabrication lab. After discussing with Professor Andy, he suggested that a geared dc motor was the best choice for recreating the vending machine mechanism and also provided us with the wheels of a toy car on which we attached the coiled wire. We added a piece of cardboard between the coiled wire and the motor to have some separation and made a little cardboard box to hold the coiled part. We left a side of the box open and attached velcro so that it would be easier for the “refilling” of candy to happen.This step was successfully performed with minimal problems occurring.
I did all of the coding for this project and my partner and I worked together for all of the building process. We’d meet whenever our schedules were both free and worked until dark for at least three days of the week. After the vending machine was coded properly we decided to tackle the ultrasonic sensor and music part. We searched online for how to put together the sensor and coded the music ourselves. After that, we attached the ultrasonic sensor to the flower pot that we had bought. The inspiration for the vending machine was taken from the video below.
https://www.youtube.com/watch?v=IzD6wC8MlQw
The hardest part of the process was to make the petals open and close without any effort. After attaching the strings to the petals and covering the petals with the fuzzy material we realized that it was difficult to pull all the petals to the center of the plant so we decided to add anchors to the side of the plant to hold up the petals. However, that method was not effective. We then decided to restrict the shape of the petal so that it is curved. We did so by hot glueing the leftover wire we had from the vending machine to the petals and then shaping them. We then attached the strings to the tip of the petal to make it easier to pull the petals down.
After that we decided that pulling all the petals from one servo was going to be difficult so we glued two of the petals’ strings together and the other three together and decided to use two servos. We then attempted to connected the strings with servos and see if they can close. Unfortunately, with the design of placing the vending machine in the middle of the plant stalk it was difficult for the servo to pull down the strings. We realized that our design of adding the vending machine in the middle made it extremely difficult for the petals to get pulled by the servos.
Another problem arose during User Testing Session in which we didn’t have time to figure out how to make the vending machine’s motor run simultaneously with the music and ultrasonic sensor due to the delay() function. During the User Testing Session we had two separate sketches, one for music and ultrasonic sensor and one for the geared dc motor but one Arduino board. One of the LA’s suggested to us that we should use multiple Arduino boards since the music had no connection to the functionality of the motor so we connected and coded the music and ultrasonic sensor on one board and the motor on another Arduino board. That really solved the issue having constant music without messing around with the motor’s functionality. We then attached buttons to the project on the Arduino board that controlled the geared dc motor so that every time a button is pressed we can keep count of which buttons were pressed how many times. The button was coded to trigger the rotation of the dc motor to rotate long enough for just one candy to fall at a time. Below are the finalized codes, one for the Arduino board connected to the geared dc motor and the buttons and the other one for the board connected to the sensor and buzzer. Below is also what we had during User Testing.
/*Code for Motor and Buttons
The code for the ultrasonic sensor was adapted from the
tutorial found here:
*/
int dcmotor = 6;
//blue
int button1 = 10;
//yellow
int button2 = 11;
int val1;
int val2 = 0;
int counter1 = 0;
int counter2 = 0;
int start = -1;
void setup() {
pinMode(button1, INPUT);
pinMode(button2, INPUT);
pinMode(dcmotor, OUTPUT);
Serial.begin(9600);
}
void loop() {
val1 = digitalRead(button1);
val2 = digitalRead(button2);
if(val1 == 1 || val2 == 1){
start = millis();
digitalWrite(dcmotor, HIGH);
if(val1 == 1){
counter1 ++;
Serial.println("Button 1: ");
Serial.print(counter1);
}
if(val2 == 1){
counter2 ++;
Serial.println("Button 2: ");
Serial.print(counter2);
}
}
if(start != -1 && millis() - start > 2000)
digitalWrite(dcmotor, LOW);
start = -1;
}
//Code for Buzzer and Sensor
int buzzer = 11;
//ultrasonic
int trigPin = 3;
int echoPin = 5;
long duration;
int dist;
bool isPerson = true;
int state = 0;
int pauseBetweenNotes;
int melody[] = {
277, 294, 277, 294, 233, 196, 233, 196, 277, 196};
int noteDur [] = {300, 300, 300, 300, 300, 900, 300, 900, 300, 900};
void setup() {
pinMode(buzzer, OUTPUT);
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
Serial.begin(9600);
}
void loop() {
if(state == 0){
state0();
}
elseif(state == 1){
state1();
}
}
void state0(){
ultra();
if(isPerson == true){
state = 1;
}
}
void state1(){
ultra();
playPvZ();
if(isPerson == false){
state = 0;
}
}
void ultra(){
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
dist = duration * 0.034 / 2;
Serial.print("Distance: ");
Serial.println(dist);
if(dist < 50 && dist > 0){
isPerson = true;
}
else{
isPerson = false;
}
delay(100);
}
void playPvZ() {
for(int note = 0; note < 10; note++){
int noteDuration = noteDur[note];
tone(buzzer, melody[note], noteDuration);
pauseBetweenNotes = noteDuration * 1.30;
delay(pauseBetweenNotes);
noTone(buzzer);
}
}
Nonetheless, we were running out of time as both my partner and I were busy with other assignments and midterms coming up so we decided to discard the flower opening feature of our project and just change the project’s appearance to the Pea Shooter of Plant vs. Zombie because in that way we can keep all of the features we already have now and just move the vending machine mechanism to become the mouth of the PeaShooter rather than being inside the stalk. We acknowledged that the vending machine aspect was the most important mechanism and the opening and closing flower was just an addition so we decided to discard that mechanism due to limited time. Here is our final product and user testing:
Conclusion:
The goal of this project was to create a project that would allow interaction between the machine and users. The user would be able to provide input to the machine which would generate an output for the user. The Candy Shooter aligns with this definition of interaction in which the user inputs through the pressing of buttons and the Candy Shooter outputs a reward no matter which button the user chooses. The ultimate goal was to gain feedback and information on a specific topic or questionnaire through the user’s interaction with the machine and it has been achieved by our final product. The audience was able to answer to the question provided and the machine was able to capture the number of times each choice was chosen. As a reward for their effort to provide an input, the machine would generate a candy from its mouth for the user. In addition, interaction also happens between the user and our project when they come into close contact. The Candy Shooter will play a little music for the audience when it senses through the ultrasonic sensor. Unfortunately, we are unable to have the project produce more outcomes based on what input is provided, rather the output is quite static in which we give only candies to the users who answers the question. If more time were given I’d really like to do more reactions of the project with the ultrasonic sensor and perhaps allow a different reward to be given based on what answer was provided. In addition, I’d figure out how to have the flower petals open and close accordingly. There were many other setbacks along the way of constructing the different mechanisms but we managed to overcome most of them through researching online and asking Professors and Fellows. The making of this project really ignited my inner creativity whether it was thinking and designing the mechanisms or choosing the materials to use. I gained more experience and knowledge with the Arduino board and building circuit. It is still a shame that we couldn’t stick to our initial plan due to limited time but overall, this was a successful project and I am proud of what we’ve done.
Leave a Reply