Overview

Aquariduino is the uncreative name I have given to my Arduino-powered aquarium controller. It is designed to track a number of sensors and control various things based upon those results. Initially, it monitors the water temperature to control the aquarium heater, along with a simple LCD read-out to show current temperature and various other things. I am planning to add more functionality as I am able to buy more shields and parts.

Parts List

Some of the above can be substituted as needed, but I opted to include everything from Adafruit to make it easier. I actually bought the temperature sensor from Amazon since I was able to find one that had an all-plastic enclosure.

Building It

The RGB LCD and Screwshield are kits that need to be assembled. I used this guide for the LCD shield. It is very step-by-step, almost overly so, but it worked. Only part I thought was odd was how it suggests to install the pins to attach the LCD itself. It recommends installing them long-side down and clipping off the ends, but I don’t really see the need – they could just be installed long-side up (have some pins sticking up, but that’s not a big deal). Matter of preference I guess. I went with what the docs said.

Adafruit’s Screwshield is basically a modified clone of this shield, but adds a prototype board to it. Pretty nice addition! The build docs for the original work mostly, but there are 2 extra LEDs and resistors that can be installed. No special instructions there – just be sure to install the LEDs the correct way. Adafruit’s kit also includes all the screw-terminal blocks for the pins so you can fully populate the board. After that, solder the 4.7k resistor onto the Screwshield from +5V to the pad connecting to the pin you wish to use for the temperature sensor bus. Originally I picked pin 7, but I plan on changing this to another pin as pin 7 is used by the WiFi shield (which I plan to add later). I soldered the resistor standing up, which only requires slightly more effort but ends up looking much nicer.

One thing to be mindful of is to avoid excessive solder when soldering the stackable pins on the Screwshield. Since the male pins will connect to whatever board is below it, if there is too muck solder, it can be difficult to connect the Uno board and for the pins to form a good connection. Fortunately, Adafruit provided longer headers for this shield compared to some other shields I have built in the past, and it does make things a bit easier.

Apart from that, just follow the build docs, assemble, and connect the shields together. It’s a really good idea to make sure there is a good connection through the whole thing, so I recommend connecting everything up (Uno on bottom, then protoshield, then LCD) and doing continuity testing for all the I/O pins to both the screw-terminals and to the LCD. It’s pretty quick to do so might as well.

Wiring up the Powerswitch and temperature sensor is fairly straightforward. I used solid-core wiring for all the connections to the Screwshield. The temperature sensor has a very long cable which could be stripped so that the leads will fit unto the Screwshield. I opted, instead, to solder wires to the ends. Pin 1 (+) on the Powerswitch goes to the digital output pin. In my current design, it is pin A0. Pin 2 (-) goes to GND. My temperature sensor had 3 wires – red, black, and white. Since the leads were short, I opted to use some larger solid core wiring which I soldered to those leads and wrapped with both heat-shrink and electrical tape. That is probably optional – you could just cut the outer jacket back a bit so there is room to wire things to the Screwshield, but I thought it better to use bigger wire anyway.

Note that you can opt to only use 2 wires for the temperature sensor but I saw no reason to do that since +5V is easily accessible and can offer better performance when polling the temperature sensor.

Programming It

The source-code is hosted off GitHub but also requires some external libraries that can be found here:

For those not familiar with adding libraries, unzip the contents of the above and move the resulting directories into your local libraries directory. I use OS X, so mine is in my home directory under Documents/Arduino/libraries (create it if it does not exist). Rename the library for the RGB LCD to something like Adafruit_RGBLCDShield. Otherwise the Arduino IDE will complain and the library won’t be imported. If you had the IDE running, go ahead and restart it.

Note that the LCD will not work until loading the Arduino with code that uses it. For a quick test, there should be a HelloWorld sketch under Adafruit_RGBLCDShield under the Examples section of the File menu. You can load that up to make sure the LCD works and play around with the buttons and things.

To Be Implemented

The next planned addition is making it network aware, likely using the WiFi shield. I would rather use the Ethernet Shield for both cost and reliability reasons, but do not have an easily accessible wired connection around where my aquarium current sits. Either way, this will allow for being able to pull stats from the controller and, in my case, put them into Cacti and Nagios for graphing and alerting respectively. This will also allow me to use network time services, enabling me to control things like aquarium lighting with greater reliability. I have thought about some other, cheaper, solutions, such as using some of the lower cost non-WiFi options. These would likely involve additional hardware on the PC side and are not quite as easy to use as one of the network shields, but is something I am still considering.

Eventually, when I add a sump to my aquarium, I am going to add water level sensors so I can control power to the water pump and/or top-off valves. I would also like to switch to LED lighting so I can simulate a sunrise/sunset, though I need to do more research on how that (and LED lighting in general) would affect the plants and fish. I also thought about controlling the air pump in response to CO2 and O2 readings, but I have yet to find a solution for monitoring that type of data (economical or otherwise).