Overview
ReefCam started as an experiment to continuously observe the life inside my reef tank — fish, corals, and microorganisms that form dynamic, ever-changing ecosystems. The goal was to build a low-cost, energy-efficient camera system that could capture long-term footage and support AI-based insights into aquarium health and behavior.
Hardware Overview
The current setup uses a non-submerged camera mounted directly on the outside of the aquarium glass, looking inward through the tank wall. This design keeps electronics safe and dry while still offering clear, stable footage.
Core Components
- Camera: Arducam 12MP IMX477 motorized-focus HQ camera
- Compute Unit: Raspberry Pi Zero 2W for edge streaming and image capture
- Mounting System: 3D-printed bracket and PVC pipe for quick positioning and alignment
- Lighting: Optimized for reef aquarium spectrum (primarily blue/UV)
- Connectivity: Wi-Fi streaming to a local FastAPI/Flask server and remote dashboard


Software Architecture
ReefCam’s software stack is built entirely from scratch using Python + FastAPI + aiortc.
At its core is a custom WebRTC signaling server that I implemented to manage peer connections — including SDP offers/answers and ICE candidate exchange — allowing secure, low-latency video streaming directly between the camera (Raspberry Pi) and any browser client.
Key Components
- WebRTC Backend: Handles signaling, candidate negotiation, and media relay
- FastAPI REST Endpoints: For authentication, camera registration, and snapshots
- Cloudflare R2 Storage: For saving time-lapse videos and event captures
- Browser Dashboard: Lets users view live feeds and trigger recordings
- OpenCV + AI (Planned): Event detection and behavior analysis
This architecture achieves true peer-to-peer streaming, reducing latency and bandwidth usage while keeping all media private to the user’s network. Below you can find a snapshot of the dashboard on the web that was created. There is per user authentication so that the data of each user is isolated. The infrastructure also supports adding multiple cameras per user.

Applications and Snapshots
Using the ReefCam, I was able to remotely control the camera and its focus from anywhere via the internet. Here are a couple of images I was able to capture of my clownfish pair.


I also was able to capture some macroscopic shots of my corals in the tank. Here is a close-up of a mushroom coral. Thanks to the ability to remotely control and program the controls of the camera, I also captured some long form time-lapses to observe feeding behavior.

I also pointed the camera into my peppermint shrimp broodstock tank and was able to record events when the shrimp would come out from hiding. It was challenging to capture them especially in the dark as they are primarily nocturnal but I got some good images to demonstrate their foraging behaviors.

After a month of keeping my peppermint shrimp, they had spawned one day! I collected the pelagic larvae and placed them in their own tank. In this new tank, I was able to continuously monitor the larvae to assess their health remotely. I also fed them baby brine shrimp twice a day and could monitor the health of the live feed. A next experiment I want to run is to watch their feeding strikes to quantify their ability to catch and eat live prey – which is crucial to ensuring the sensitive larvae make it to adulthood.
