Controller

The heart of the aquarium operation is the controller, and by that I mean the Arduino itself and all the circuitry in place for performing the functions needed to automate tank maintenance.  This video provides a short tour of everything in my controller.


Below shows the initial placement of the Arduino Mega and breadboard for wiring up circuits for the automated fisher feeder, power panel, and led status lights.  You can see I fed the USB input for the Arduino to the outside of the project box with an extension cord so it is easy to plug in when I need to update the controller software.  Also fed to the outside of the box is the power input to the board and a connector for the temperature sensors.


You can pick up extension cables and connectors like these and other bits'n pieces from eBay and AliExpress.  Items shipped from China are a great deal, but sometimes it takes a long time to receive them. (Tip: Look for shipping called an ePacket which tends to arrive in about half the time of standard shipping from China ~2 weeks vs 4+ weeks.)


More wiring!  It is too much to follow in the photo.  This controller, like most Arduino projects, is a series of simple circuits that are tied together with software.  For example, you can see I have labeled on the project box connectors for the LCDs, Reverse Osmosis Floats (i.e. tank holding reverse osmosis water to refill evaporated aquarium water), Sump Floats, Skimmer Floats, and Temperature Sensors.  

The float switches are essentially on/off switches that are controlled by water level.  I just happen to use a lot of them!  You can learn how to wire these circuits with the basic Arduino Switch Tutorial.  You can find these by searching for "float switch" on eBay or AliExpress.  Try to find ones that are suitable for saltwater.  Many float switches, even though they are intended to be triggered by a water level, do not hold up to being completely submerged.  See my notes on float switches and how I mounted the ones I used in the RO tank, sump, and skimmer overflow.

There are many inexpensive options for Arduino compatible displays today.  When I put this project together in 2011 I used two 20x4 blue LCDs which I show in another video.  If I were to build this controller today I would probably use something like the 3.2 inch TFT LCD I used in my Arduino Accelerometer project, which you can pick up from Adafruit.  You can also find these on eBay or AliExpress by searching for "3.2 inch TFT LCD" and usually go for less than $15!  However, make sure they are Arduino compatible and the software libraries available for the Chinese imports may be a little trickier to use.  I have one I've been meaning to try out.  On the other hand, the Adafruit displays have a well developed library with fonts, drawing utilities, and other things that are well tested which may be worth the additional cost for less frustration.

Below shows the hookup of the EasyDriver Stepper Motor board I used to control the stepper motor used in my fish feeder.   This hookup is well documented on Sparkfun.  Again, this board can be purchased from many stores domestic and overseas.


You can see five TIP 120 in the photo below which I use in switching the solid state relays used in my power panel.  There is a good tutorial on this circuit on the instructables site and this ez-robot forum.  This circuit is a low cost way of driving higher voltage switching, which was needed for the solid state relays I selected, from the low voltage Arduino.


Also in this photo is a green Real Time Clock (RTC) module.  There are many forms of this module to choose from, but they are all intended to do one thing - keep time.  This means when the Arduino is powered off and back on this module can supply the Arduino with the current time, as previously set by a simple program.  Most Arduino board varieties, like the Arduino Mega used in this project,  do not come with an onboard RTC, so you'll need one of these to have the current time for lighting, feeding, and other schedules for your automated tank.  Modules like these are easy to wire.  Check out the simple guide on adafruit.





Fortunately I haven't had any significant problems with circuitry since I put this together, but I would recommend, in hindsight, to try for a neater wiring configuration like I did for my Accelerometer Project or another even better example of neat wiring is over on my friend Dave's blog of his chicken coop controller build.   This most definitely means housing the controller in a larger project box, which may have drawbacks if you are trying to fit everything in the aquarium cabinet, but it's something to think about before you start your own build!