DIY Arduino Aquarium Controller

matseski

Gambusia
MFK Member
Mar 30, 2014
107
12
18
United States
Since my aquarium is built, plants and livestock are flourishing and it requires very minimal intervention, I need a new project. I am a PhD student working in nanotechnology and am currently in the process of building some of my own custom deposition tools and control systems so I figured I would take a go at an aquarium controller. I have no experience in electronics, software, or computer programming so I still need to learn A LOT! I am hoping some who frequent this site are much more experienced and can lend a watchful eye and offer some insight as I work though this project. Like any good scientist, I did my literature review and found what appears to be a very thorough guide by d0ughb0y (http://www.reefcentral.com/forums/showthread.php?t=2332822) which I will be using as my starting point. I will be using much of what has been done and will be using some of the code from that project.

Many of my goals are the same as what was done in that thread, but to introduce the project I will reiterate and add those things that were not included in that project:
-web interface, email alerts
-data logging
-ATO
-Water temperature (2 probes)
-pH sensor
-auto feeder control
-light control (display, moonlights, and sump)
-ambient temperature and humidity monitoring (canopy, sump)
-fan control (canopy and sump)
-PWM pump control and power supply (1, but maybe 3 in case I add some powerheads)
-heater controller
-Dosing (micro and macro)
-leak detection (2 sensors)
-moonlight control
-ORP probe (maybe)
-conductivity probe (maybe)
-CO2 control (maybe)
-webcam (maybe)
-all incorporated into a single unit with a single power cable

Currently, this is being designed for a 120g planted, low tech aquarium with 55g sump. Being a graduate student, I am away from home a lot and being able to get email alerts if something goes awry would bring great piece of mind. There are many days where I am only home to sleep, so being able to monitor things remotely would be very helpful. I am also slightly anal when it comes to creating a self contained, efficient system. I do not want to see any wiring when I am done, only jacks that the probes and pumps plug into. This will also make installation easy and will make it easy to replace/remove components when necessary.

Some other probes I would like are nitrate and dissolved oxygen, but those seem to be significantly more expensive than the ones mentioned above.

If I missed anything that you have thought would be helpful, please chime in!

Stay tuned.
 

Andy_R

Feeder Fish
MFK Member
Feb 12, 2014
14
0
1
California
I am excited to see how this turns out! I bought the parts to start on a arduino light controller to match my tanks lights to the seasons where the livestock are from, but got side tracked!
 

DIDYSIS

Mantilla Stingray
MFK Member
Feb 9, 2012
5,542
307
1,946
West Jordan Utah
I love my Apex, Good investment
 

matseski

Gambusia
MFK Member
Mar 30, 2014
107
12
18
United States
The Apex is certainly a great system. Unfortunately, to get the functionality I am planning with this project, the components will cost around $1200-500. Thus far, I have priced out the components for this project to be between $250-450 depending on which probes I end up incorporating.
 

fishguy306

Peacock Bass
Community Vendor
MFK Member
Oct 24, 2005
1,161
313
122
35
Illinois
I'll start with this sounds like an awesome project, I'd love to see someone create a controller that can do all of this. That said, I see you dont want to spend the money on an Apex system, why not look into the Reefkeeper Lite? I'm in the process of setting up my new tank, I've added one to it, it'll be able to do nearly all that you have mentioned for a fairly reasonable price.

With mine I'll be controlling the heater, monitoring pH and using that to inject CO2, controlling the lights, I have the float switch already, but I'll be adding an ATO down the road. I have the SL2 which monitors salinity, but if you go SL1 you can measure ORP. Adding the net module would allow graphing and alerting you to any issues.

Just something to consider! Its a bit cheaper than the Apex but still a great system. As mentioned, totally get building your own if you have the skills. I just see a lot of these started and never finished due to the work involved. Good luck!
 

matseski

Gambusia
MFK Member
Mar 30, 2014
107
12
18
United States
Yes, while the Reefkeeper system is a little cheaper (about $1000), it is still significantly more expensive. I am aiming to stay under $350. Since this is entirely overkill for my system, I am hoping that it keeps me busy for a while. The "project" value is probably greater than the actual improvement in my aquarium care. As it stands, most weeks I do not do anything except add a bucket of tap water to the system (with the ATO I should only have to touch it every 3 weeks). I realize that this may change as the fish grow and stocking levels increase, but it has been designed to be a low maintenance system. I really just enjoy coming home and watching the fish, not so much actively taking care of them.

I am working on finalizing the first draft of my circuit diagram now and will hopefully have it ready to share in a few days. I still need to learn a bit more about PWM circuits and ensure I have accounted for all the pins appropriately.
 

fishguy306

Peacock Bass
Community Vendor
MFK Member
Oct 24, 2005
1,161
313
122
35
Illinois
If you are paying $1000 for a reefkeeper you are getting robbed. If you got with the lite version you can have up to four modules, which will do majority of the functions you are looking for. You'd probably be looking at about $400. I'll be impressed if you keep your design under that including the probes. pH probe is $50 alone for a middle of the road one.

That said, as I mentioned before I do get the appeal of building one yourself. It is a very cool project, one I wish I had the knowledge to do. Wanting to come home and just watch the fish is exactly why I added a controller to my tank. With the push of a button it telling me most of the info I need to know, keeping the CO2 injection in check, adding water to the sump, that is awesome to me. More time enjoying the tank rather than on my knees under it.
 

BearFish

Feeder Fish
MFK Member
Aug 1, 2014
39
0
6
Ohio
Love the project, here is my 2 cents. For your main relays (heater, sump, etc...), I would (actually did) purchase a Ubiquiti Mpower Pro for $80. It is allot of hardware for 80$. 8 mains relays (turn power on and off remotely) with the ability to monitor power usage. It also comes with wifi and Ethernet. Run a Ethernet line to a raspberry pi B+ (It is more capable than Arduino at the same price but more difficult to program). Also, the Mpower will become a big part of the microcontroller part, so processing power of the raspberry pi is more useful.

As far as cost goes on monitoring, you start to pick up about ~100$ a probe on your build. Frankly, this is where you start to spend the big bucks. Stray current in the aquarium and noise of the sensor, typically requires a shield to isolate the controller from the sensor. Atlas Scientific makes some of these shields. Don't know how well they work, but people talk them up.

Keeps us updated and post lots of pics!
 

matseski

Gambusia
MFK Member
Mar 30, 2014
107
12
18
United States
The main area where I know I will struggle is with programming the web interface. I have no experience programming, or with networks, so that seems to be the most daunting part and why I am leaning towards the Arduino side as there is already a really good set of code that has over a year of development by people who know what they are doing. I am living in an apartment so I cannot easily run an Ethernet cable, but if I have to I can. I have read a lot of problems with response time over wifi, so I may just deal with the inconvenience of the Ethernet cable. This will be in my sump and will be mounted with 2.25" of solid wood between it and my router which cannot be avoided due to the design of my cabinet and sump, so I am also concerned with the reliability of a wifi signal.

Regarding probes I am still debating whether I need an ORP and conductivity probe. This is for a freshwater tank so there is not as much information on either of those two measurements. I may just leave the board space available and start with just the pH probe and see if I feel I need (or get bored and want to add) the others later. Similarly, I will decide on the power isolation after try it. Some people report problems, some don't, so no reason to add the circuit complexity and cost if I don't need it. I am interested in eventually adding a CO2 system, so the dissolved oxygen probe also interests me...but is significantly more expensive than the others. Also, with the Arduino, after 3 probes you need to add a multiplexer.

I am planning to add a 24V power supply to power my DC PWM return pump with the capability to add 2 DC PWM powerheads.

Here is the first version of my wiring diagram. I'm sure I messed something up, so please critique if you see anything.

The only component left to add is a PWM controller for some LED moonlights. I think it will just be the same as the Fan circuit, but without the Tach.
Controller_schem.jpg

Controller_schem.jpg
 
zoomed.com
hikariusa.com
aqaimports.com
Store