Introduction: Camera in a Fishbowl

During my first week on the HKU I found a fishbowl on the street and brougth it home, I promised myself to do something with it. I had the idea to turn it into a terrarium and have a camera inside of the bowl that can be moved around via a pc! This way you can see how it's going inside the terratium from the inside.

Supplies

For this project I used:

  • A ESP32-CAM module
  • A FTDI232
  • An arduino Uno
  • A few M to M and F to F wires
  • A glass drill bit
  • A wood drill bit
  • A drill
  • Safety goggles.
  • An old Nightstand
  • A soldering Iron
  • Wire Cutter
  • A servo
  • Uduino (Arduino to Unity)
  • Node.js
  • The arduino app
  • A piece of foam
  • glue
  • A laptop

And of course a fishbowl!

Step 1: Place a Hole in a Fish Bowl

The first step of the project was to drill a hole into the fishbowl. This was the first step because if the fish bowl broke I knew that I didn't have to waste any more time on this project. If you want to drill into glass, make sure you do research and buy the proper equipment. There are drill bits that are specificly made for cutting glass and make sure to alway wear safety goggles. Before I drilled the hole I place a ring of plasic ontop of the drill spot and filled it with water. This prevents a lot of glass particles from going into the air. Than drill on a slow setting. The glass of a fishbowl is quite think so I takes some time but has less chance of shattering! I made a 6mm hole for this project but it was a bit to hard to put the wires trough. So try a 8mm drill!

Step 2: Setup the 32-Cam

For this project I needed to use the 32 core libary and choose the example cam project. Change the "ssid" and "password" to your wifi username and password. Then I used F to F wires to connect the FTDI232 with the Esp32-CAM and put a one wire from the IO0 to ground on the Esp32-Cam. This sets the camera out of flash mode so you can upload your code on to the FTDI232 and Esp32-Cam. Then upload the sketch.

I also Used node.js to try and connect my ESP-Cam output to Unity but this didn't work. To do this I watched this tutorial and learned a lot about websocket and Node.js.

After everything is calibrated, I removed the F to F wires and solderd new wires on to the ESP-Cam. These cabels need to be long and thin because they have to fit through the hole. Make sure to make strong soldering connections because the first time I made this on of my wires broke and I had to restart the entire project!

Step 3: Install Everything Inside of the Fish Bowl

I glued the servo to the bottom of the bowl and attached a piece of foam onto it. Then I glue the soldered esp cam on the foam as well. I connencted the servo with some M to M wires and pryed the wires through the hole. Then pryed the wires of the ESP cam in the hole aswell.

Step 4: The Hole Through the Nightstand

The next thing I did is drill a hole into the nightstand. Around the same place as the fish bowl. Then pry the same wires through to newly created hole.

Step 5: Solder the FTDI232

Now the hardest part of the project started. Soldering the FTDI232 to the hanging wires. I seperated the wires so that I could remember whitch cable had to connect where. Because my last cable was a bit shorter and soldering it next to the other solderd wire proved to be difficult, I solderd the wire to a F to F wire instead. I still had to solder the F to F wire because a regular F to F wire does not fit trough the hole and isn't long enougth. After soldering I Put the cubert in to the night stand.

Step 6: Add the Arduino and Put Every Thing Together

I Exported the Uduino code in the arduino and attached it to the remainding wires of the arduino. I didn't want to solder any wires to the arduino because I wanted to reused it for further projects and was scared of destroying it. Then I put a mini USB to USB cable on the FTDI and USB A to USB B cable to the arduino.

Step 7: Open Unity and Move the Camara Around

The Next step is to Open Unity (Or the build) and move the camera around. You have 2 arrows. Clicking on an arrow will turn the servo into that direction. I planned to have the view of the camera the middle white square. But for some reason the websocket Unity plugin I used didn't recieve any messages. If anyone knows how to fix this let it know in the commends!

Here is the code for the Button in Unity

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Uduino;


public class servobutton : MonoBehaviour
{
    // int that changes sets the degree of the servo
    public int degrees;

    void Start()
    {
        UduinoManager.Instance.pinMode(11, PinMode.Servo);
    }

    public void SetServo()
    {
        UduinoManager.Instance.analogWrite(11, degrees);
    }
}


Step 8: Thank People That Help You Make the Project

I want to give a special thanks to my father for helping me with drilling (I never drilled before) and other stuff for this project. I want to also thank my ThatProject for great tutorials and even responding to my comment.

Step 9: Reflection

I learned a lot from this project: I learned how to solder, I learned how to drill through glass, I learned how to work with node.js, a lot about electronics and a lot more! One of the more important lessons is to check the strength of you soldering wires. And I had to learn this the hard way, by one of the wires breaking inside of the fishbowl.

Step 10: Video of the End Result