By Patricia Yu and Caio Araujo, Dec 6th 2019

Abstract

Our project is called Whale Rescue. We wanted to create a fun creature that would attract children with a recognizable appearance and an eye-catching movement. The primary function of our mechanism was to have an interaction where a person would want to place their hands inside the jaws of the creature and take the items inside without being caught or “bitten” by the jaw. The fear of being captured by the jaw would raise more thrill in the user and when they obtain the items in the jaw, they could appreciate it more due to the “danger” they had to go through while getting it. We chose to place small sea creature figurines inside the jaw and purposely told each child to help save the creatures inside the jaw in order to  implicitly teach children to help those in need.

Objectives

For this project, we had four main objectives in mind. First, we wanted to create an enjoyable experience for the children by making what we thought would be a fun and attractive machine for them to play with. One of the most rewarding feelings we got from our previous projects was to see children having fun when interacting with them, so we wanted to preserve that.

Second, we thought the machine should have an intuitive interface which would allow children to play by themselves with little facilitation from our side. We believed that this independence would improve the children’s experience and motivate their autonomy.

Next, we believed the playing experience should be challenging enough to incite curiosity, but not enough to be intimidating. As such, we attempted to create a gamified interaction which had both a smooth learning curve and strategy to it. The longer a child played with our project, the more often they should succeed in rescuing the fish.

Lastly, on a more technical detail, we wanted to expand our “area of sensing”. In previous iterations of the general “chomping machine”, there was a small area that the sensors were able to detect, so children could easily get around it. In this project, we believed it would be better if we could have a larger sensitive area, in order to create an experience that would be both more challenging and rewarding.

Implementation

We first designed the shape of our whale on SolidWorks and using the laser cutter created the major structure of the whale. Then we used felt to cover the exterior and its back to create a curved surface. 

For the jaw movement, we did not want to attach the laser cut jaw pieces directly on the servo horn, and instead used a pull-string method. We used a horizontal wood pole as an axle to attach the two sides of the jaw on the whale, then using twine to connect the axle and the moving servo to lift and drop the jaw. This was an improvement from using two servos attached to both sides of the jaw; it prevented the servo to overheat and melt the glue that held the jaw to the servo, the two servos from accidentally moving desynchronized, and from children forcing the jaw open or closing and breaking the servo completely. 

For the movement sensing pressure plate, we used IR proximity sensors and springs. There were two places where this mechanism was implemented: on the top of the head of the whale to sense when someone was petting it, and inside the jaw to detect when there was a hand trying to grab the contents inside. We did this by having two plywood plate placed on top of each other with four springs in between, and an IR sensor placed in the middle of the wooden plates. The sensor will be able to detect a change in light according to the proximity of a non-attached wood plate above it. For example, if a hand was touching the top plate, it would press it down, then the sensor would be able to detect a change in light and cause another reaction. 

One reaction that is triggered from the two pressure plates is the servo mentioned before into moving the jaw. The other is placed on the top of the head, where if someone pets the top of the head, it will activate a speaker that creates a tone mimicking a whale sound and the servo will turn to a larger degree, making the jaw opening wide like a yawn. 

Outcomes

We managed to achieve many of our goals, but we also learned that some parts of our project could have been better. Regarding the overall experience, children enjoyed playing with our whale, but the younger ones (around 3 years old) seemed a bit scared at first. One interesting interaction we had was that when groups of children played with the whale at the same time, they would create a competition around it without any suggestion from us. Sometimes they would see who retrieved more fish, or who got bitten less times, but they always had fun.

Concerning the technical aspects, the jaw movement was very smooth and robust. Although our mechanism relied on the string being tensioned during the entire process of opening and closing the mouth, the movement did not feel ‘blocky’ and the string did not pop during the demo. Also, since the servo was not supporting the jaw, a direct hit to the whale’s head would likely compromise the wooden structure, but the servo would not break.

Furthermore, our attempts to expand the sensitivity area by using movable plates worked well, although with some caveats. The pressure plate in the mouth was successful in detecting rushed attempts to retrieve fish, so, combined with our robust structure, the mouth plate mechanism was very consistent. The head plate, however, did not work quite well. Because of the moving nature of the opening jaw, our proximity sensor would detect changes in the distance between the two plates while the jaw was opening and closing. Therefore, while it did detect petting, it would also detect the whale’s own movement.

There were a couple more obstacles we faced. First, we forgot to consider the ambient noise of the Children’s Museum, so our speaker went by unnoticed for most of the demo. And our last mishappen was that our power source failed to provide enough current to the whale during the demo (this could have been easily avoided with earlier testing ). The 5-Volts power supply we had for the Arduino could not provide enough power to run both the servos and our speaker, thus we had to keep Caio’s laptop out to power the Arduino.

Future Work

In our next iteration of this project, we could have made the creature look friendlier and that could mean changing to an animal with a beak. The sharp teeth was something that made some of the younger children hesitant to approach it. We would also change our power source to a higher voltage because our code to allow it to function with the mechanism being plugged to a computer. For this specific project, we were in a space where there were many people and so the noise was very loud and the sound of our whale “yawning” was barely visible. Therefore, for our next iteration, instead of the whale making noises through the speaker when petted, we could add more animation in the chomping or include LED lights for more dramatic visual elements.

Contributions

For our individual contributions, we decided to split tasks according to our specific skills. Our general idea for the project came from Patricia, as she wanted to create a fun experience for the children by reimagining the interactions with her previous project, the chomping dinossaur. As a design major, Patricia worked mostly on the overall physical structure and appearance. She did most of the SolidWorks pieces and decorations. Also, she planned the aesthetics of our whale and was responsible for creating the intuitive interface of the whale.

Caio, on the other hand, worked the software and designed the general sensing and jaw structures. He wrote the code for the whale and came up with the idea of checking for differences in readings of the proximity sensor rather than detecting whether it was below a certain threshold. Also, he planned the initial design for the robust jaw structure.

After our first iteration, we tweaked the part measurements and mechanical structures together. Lastly, we both contributed to improving the initial design of the robust jaw, which did not work well since the fishing line we used kept popping.

Our Video

Our mechanism in action

Photo Documentation

The pull string mechanism where the laser cut jaws are attached to a pole that rotates. The pole is rotated by a twine (in the photo, we replaced the fishing string with twine later) connected to the servo horn.
The pressure plate held up by springs and photosensor on top of the whale’s head
The pressure plate held up by springs and photosensor inside the whale’s jaw
Whale Rescue in action being played by children

Supporting Material

CAD Files

Electronic Schematics

IR Proximity Sensors interface
The hobby servo interface
Speaker interface with a transistor serving as an amplifier

Code

#include <Servo.h&gt;

const int SERVO_PIN_1 = 8;
const int BUZZER_PIN  = 11;
const int PHOTO_PIN_1 = A1;
const int PHOTO_PIN_2 = A0;
const float open_angle1 = 130;
const float wideness = 70;
const float closed_angle1 = open_angle1 - wideness;

Servo servo1;

void reset_all() {
  servo1.write(open_angle1);
}

void slow_open(int angle, float cur1) {
  float i = 0;
  float j = 40;
  while (i <= angle){
    servo1.write(cur1 + i);
    tone(BUZZER_PIN, j);
    i += 0.25; // 0.25 and delay(10) super smooth, delay(15) also good
    j += 0.5;
    delay(15);  
  }
  delay(250);
}

void slow_close(int angle, float cur1) {
  float i = 0;
  float j = 140.5;
  while (i <= angle){
    servo1.write(cur1 - i);
    tone(BUZZER_PIN, j);
    i += 0.25; // 0.25 and delay(10) super smooth, delay(15) also good
    j -= 0.2;
    delay(15);  
  }
  noTone(BUZZER_PIN);
  delay(250);
}

void regular_open(int angle, float cur1) {
  servo1.write(cur1 + angle);
  delay(250);
}

void regular_close(int angle, float cur1) {
  servo1.write(cur1 - angle);
  delay(250);
}

void setup() {
  // put your setup code here, to run once:
  servo1.attach(SERVO_PIN_1);
  reset_all();
  pinMode(PHOTO_PIN_1, INPUT);
  pinMode(PHOTO_PIN_2, INPUT); 
  Serial.begin(9600);
}

void loop() {
  // put your main code here, to run repeatedly:
  // reset_all();
  int photo_read = analogRead(PHOTO_PIN_1);
  int photo_read_top = analogRead(PHOTO_PIN_2);
  int bite_threshold = 5;
  float now = millis();
  float yawn_threshold = 15000; // 30 milliseconds
  
  static float current_angle1 = open_angle1;
  static float last_yawn_time = 0;
  static int last_read = -1;
  static int last_read_top = -1;
  static int prev_last_read = -1;
  static int bites_since_yawn = bite_threshold;
  
  // yawn if being pet (petting detection is currently unreliable -&gt; NOT FIXED)
  if (last_read_top &gt; 0 &amp;&amp; (bites_since_yawn &gt; bite_threshold || (now - last_yawn_time) &gt; 30000) &amp;&amp; prev_last_read == last_read_top &amp;&amp; 
      abs(last_read_top-photo_read_top) &gt; 0 &amp;&amp; (now - last_yawn_time) &gt; yawn_threshold){
    bites_since_yawn = 0;
    // yawn
    slow_open(50, current_angle1);
    current_angle1 += 50;
    delay(500);
    slow_close(50, current_angle1);
    current_angle1 -= 50;
    delay(500);
    last_yawn_time = now; 
  }

  // bite if being pressured (detect difference from previous reading)
  if (last_read &gt; 0 &amp;&amp; abs(last_read-photo_read) &gt; 2){
    bites_since_yawn++;
    int angle = random(wideness-10, wideness+1);
    int chomps = random(1, 5);
    for (int i = 0; i < chomps; i++){
      regular_close(angle, current_angle1);
      current_angle1 -= angle;
      regular_open(angle, current_angle1);
      current_angle1 += angle;  
    }
    delay(725);  
  }
  
  prev_last_read = last_read_top;
  last_read_top = photo_read_top;
  last_read = photo_read;
}

Mechanical Drawings

Push-board mechanism with the chomping of the jaws
Pull-string method with the movement of the jaws