Posts: 3
Joined: Fri Jul 12, 2013 6:16 pm

Pi for an aquarium controller

Thu Apr 17, 2014 9:58 pm

I am wanting to use my Pi to control my reef tank (pumps, light timers, heater etc).
I need a set mode to set light on/off times, temp setpoints. A run mode, and both an interactive TFT touch screen, an IR remote input AND a web interface. It also needs to send texts/emails if something is out of spec.
What would be the most efficient language to write the code in?

User avatar
Posts: 147
Joined: Mon Sep 17, 2012 2:23 pm
Location: Germany
Contact: Website

Re: Pi for an aquarium controller

Tue Apr 22, 2014 1:25 pm

For Starters, go with a high-Level language. That means not C.

The language of choice on the Pi is Python. I personally prefer stuff like Java or C#.

Posts: 2
Joined: Wed Apr 30, 2014 3:06 pm

Re: Pi for an aquarium controller

Wed Apr 30, 2014 3:16 pm


I just finished a build exactly like you describe. Here is how I did it:

- Raspberry Pi v2 running Rasbian
- Raspberry camera takes tank pics regularly
- Used a phidgets USB digital interface to control mechanical relays that control pumps (turn off if overflow detected) and heaters (turn off if overheat detected.) I connected the relays to power strips.
- Installed a phidgets PH sensor
- Used float valves to detect main tank overflow and sump underflow
- Connected a USB water temp sensor and a phidgets air temp sensor
- Connected a small speaker to announce warnings
- Installed a phidgets light level sensor
- System will text me if an issue is detected
- Data is logged to a Carbon/Graphite data logging system
- A web server displays a web page with current stats, pics and 24 hour graphs
- Code is written in Ruby, available here https://github.com/eatenbyagrue/reeftank (it's not really meant for general use, but you can possibly modify parts of it)

Picture attached.


Works great so far!

Posts: 4
Joined: Fri Jan 04, 2013 7:10 pm

Re: Pi for an aquarium controller

Mon Jan 05, 2015 11:02 am

eatenbyagrue wrote:Hi,

I just finished a build exactly like you describe.
Works great so far!

Do you have any tutorial describing the building process?
Im looking for something similar


Posts: 1
Joined: Wed Jan 28, 2015 1:41 am

Re: Pi for an aquarium controller

Wed Jan 28, 2015 2:20 am


I use a pi to control lights(10000k,actinic,moon and bluemoon), powerheads, heaters and monitor the temp(notify via email/text and auto turn on/off heaters based on temp thresholds) . I didn't worry about chemistry only the temp, but there with a usb hub could add other sensors. All I used was a pi with wifi, crossover cable, usb tempr thermometer, and an APC 9211 Masterswitch PDU(off ebay). A bit of php/bash programming and all has been well for over 18 months.

Lights turn on/off in phases(dark, bluemoon, full moon, actinic, day, actinic, moon, bluemoon, dark). Initially I used the pi to track moon phases, adjust the moon lights accordingly, and turn powerheads on/off to mimic tides, however I got tired of not seeing the predark tank activity when there was no moon and saw no benefit from the circulation changes. So the moon rises and sets at the same time everyday. :D

Posts: 2
Joined: Tue May 06, 2014 9:23 pm

Re: Pi for an aquarium controller

Mon Aug 10, 2015 1:36 pm

I am beginning my research on the topic. Can any of you guys (or gals) above please refer me to useful resources? I am wanting to find out if I can control my LED Lights from the Raspberry Pi, if so how? That is my main objective, after that everything else is icing on the cake. Thanks in advance!


Posts: 1
Joined: Mon Jul 11, 2016 11:27 am

Re: Pi for an aquarium controller

Mon Jul 11, 2016 11:29 am

FYI, I developped a system handling Auto Water Change and ATO, plus the monitoring of the levels in the sump and the code is freely accessible on Github here: https://github.com/aquamonitor/Aquamonitor

it would nicely complete your project I guess.

The documentation also includes the wiring diagram and parts to buy to make it easier to reproduce.

Return to “General programming discussion”