Overview

I built an automated aquarium that can control its own lighting and record temperatures and send notifications for anomalous readings.

Technical Setup

This is a Raspberry Pi 2-powered aquarium system and I monitor temperatures and control lighting. Python scripts and Crontab scheduling read the water and ambient temperatures, sending an email notification via IFTTT if the readings were out of range.

The data was recorded in a MySQL database. This was accessed using a PHP web page on an Apache server. The PHP called a Python script to read the data from the database, graphing the output through a Google API.

Temperature

Having discovered Cayenne this morning, I migrated the temperature monitoring to Cayenne. It was very easy to do, and I had no problems. I will migrate the lighting control at a later date.

Temperature monitoring is via a pair of waterproof D18B20. One in the water, the other on the outside of the tank.

Lighting

Blue and White 12V LED lighting is controlled by a pair of relays. The LEDs are basic 12V as seen underneath toy racer cars and are very cheap on eBay: less than £2 for 5! By switching different combinations, I can simulate different times of the day.

Daytime = White

Night = Blue

Morning/Evening = dimmed Blue/White

The advantage of the cheap lights is that for under a fiver, I can replace all the lights yearly, and it is very easy to do. When I replace these, I will replace the 12V distribution board so the strips will connect via screw connectors.

Camera

The camera was streaming live video via RPi Cam Control, but it was very water dependent. It need to be full to the brim, which the Catfish didn't like, they like a pocket of air above the surface. I ended up removing the camera for my telescope, and then for a reversing cam for my car!

Alerts

Email and SMS alerts are set if the water temperature goes outside set limits.

Scheduling

Scheduling will set the lighting according to set times of the day, although I would like to link it to sunrise/sunset times.

Feeding

I'll work on a feed system sometime, using a wood auger as an Archimedes screw, driven by a stepper motor.

Fish Tank

My tank is a Fluval Edge 46-liter tank with a solid top. The way I made the housing, it just sits on top, but the original lights are still there if needed. Painting the inside of the housing with white spray paint would probably be a good improvement.

The housing was made over a couple of days because the glue I had needed time to set. The install of the components was done on Christmas Day afternoon. The basic coding as done in advance, and then tweaked in situation.

Photos of the housing and tank

1 / 2 • The housing I made. Not all the equipment is still in use, and I still plan changes.

Lighting strip combinations, in action