Our interactive Fish Tank is a small aquarium with a jump scare. On the right side of the tank is a white cup labeledfish food”. When the user picks up this cup and empties the food into the top of the tank, a shark jumps up to eat the green fish and a small red LED lights up to indicate danger to the user.

 

The user feeds the fish.

Perspective view of the surprise!

Action shot of the shark! + LED

 

Close up of the fish food to demonstrate usability.

Schematic:

Code:


#include <Servo.h>

Servo motor_large;
Servo motor_1;
Servo motor_2;
Servo motor_3;

void setup() {
motor_large.attach(3);
motor_1.attach(5);
motor_2.attach(6);
motor_3.attach(9);
pinMode(A5, INPUT);
pinMode(10, OUTPUT);
motor_1.write(100);
motor_2.write(100);
motor_3.write(180);
motor_large.write(30);
Serial.begin(9600);
}

void loop() {
int photoVal = 0;
photoVal = analogRead(A5);
Serial.print("photoVal = ");
Serial.println(photoVal);
motor_1.write(100);
motor_2.write(130);
motor_3.write(180);
delay(1000);
motor_1.write(135);
motor_2.write(165);
if (photoVal <= 400) {
motor_large.write(135);
digitalWrite(10, HIGH);
}
else
{
digitalWrite(10, LOW);
motor_3.write(140);
motor_large.write(30);
}
delay(1000);
}

Overall, the intended user reaction in class was close to what we originally hoped for, although several features of our project differed from our initial ideas. The largest change during the creation process was the use of sensors – we first set out to use an ultrasonic sensor to trigger the shark when the user came close to the fish tank (placed where the “Feed the Fish” sign currently is) , but after realizing that the feedback from this sensor was not reliable, we came up with the idea of using a photocell sensor placed underneath the fish food cup with a timer delay. Another hiccup we had was that we were only able to power our project using a computer, rather than a bench supply or battery. We believe that the problem might’ve been spurred by using Serial statements in our code, or by not having all the grounds synced up together. Since we were pressed for time, we could not address this issue and continued to power the project using a laptop. One thing that we would probably change in the current state of the project is adding a cutout in the back of the board to easily access the breadboard and wires, since currently we have to reach down the inside of the fish tank which is not very efficient or easy to do. During the building process, we made sure to be precise in our measurements of cutting the board and placing the Arduino/breadboard/servos, which was very helpful in the overall organization of our project. Additionally, we focused on making the different parts of our setup aesthetically pleasing, which contributed to the user reaction/satisfaction with our project.