Hey, Its my First Arduino Project: Aquarium Controller

I'm new to the Arduino World,

I have been looking at using an Arduino for my project since the beginning of this year, and I think I have decided to run with it.

First off I have seen a few aquarium controllers built with the Arduino, but none of them really hit the spot for me.

The first controller I'm going to build we be run/tested on my inside aquarium, then once its where I want it, it will be implemented on my salt water pond.

I just finished the main housing for this project, and I have it wired in, the power supplied in the unit will be (values not exact), 120VAC - 12VAC - 5VAC - 4VAC - 12VDC - 5VDC - 4VDC...

from my reading I have heard that some probes like a Salinity probe, require AC voltage, but I have not gotten that far yet.

I have a background in Programming, but the 555 Timer is the only IC that I have worked with yet, so the hardware part may take a long time for me to do.

So first things first,
I'm not sure what chip to start out with, I've been looking at doing a DIY barebones board, since I will not be using this particular arduino setup for anything else, why not build it into the finished board, right?

now I need to find the right chip, I will be needing a lot of I/O pins (I mean a lot maybe 100-150) I looked into linking arduinos, but everyone says there are ways to get more I/O's without needing another processor. I would also assume I will need a good amount of storage space for the code, I will also need multiple LCD screens and user inputs. I would also like to log data, and have a memory storage for user settings, like a BIOS I guess.

Sorry this is a long post, but its going to be a Long Project for me I think, but I hope not too long.

I'm also a begginer so not to much help but for addtional LED's you may look at 74HC595 shift registers. They allow PWM control (I'm guessing you may want to control the brightness as well as on/off times) and can be daisy chained together to extend to the amount needed. I'm also thinking of building my ATMega chip directly to a board when I build my project but I currently have the Arduino Uno with removable/replaceable 328 chip so I can play with to learn, test and then just add the chip to the board once complete.
I'm also thinking of adding a SD/breakout solution for datalogging as I will have a Ph Probe/Temp sensors also.
Why will you need multpile LCD's?

Like I said I'm BRAND NEW to this whole world so take what i've said with a pinch of salt, just what I've picked up whilst trying to learn what I'm doing.

I hope its of a least a snippet of help.

Good luck and keep the post updated to I can track your progress please.

P.s. What type of tank do you run?

(this page will be updated as I think of things)
Display: its going to have a 20 x 4 LCD display, and a small graphical display for line/area chart display...

User Input: 5-Position Switch and maybe a number pad

Sensors: Light, Temperature, Humidity, vibration, pH, Salinity, Calcium, ORP, Nitrate, Float, Energy Usage

Controlling: Relays (lights, pumps)


Program Points: moon Phase, sunrise/sunset, storms, seasonal temperature change, tidal change, flow change

Add-ons: RTC, Wave maker control circuit, BIOS? type Memory, SD card memory

long_p1:
I'm also a begginer so not to much help but for addtional LED's you may look at 74HC595 shift registers. They allow PWM control (I'm guessing you may want to control the brightness as well as on/off times) and can be daisy chained together to extend to the amount needed. I'm also thinking of building my ATMega chip directly to a board when I build my project but I currently have the Arduino Uno with removable/replaceable 328 chip so I can play with to learn, test and then just add the chip to the board once complete.
I'm also thinking of adding a SD/breakout solution for datalogging as I will have a Ph Probe/Temp sensors also.
Why will you need multpile LCD's?

Like I said I'm BRAND NEW to this whole world so take what i've said with a pinch of salt, just what I've picked up whilst trying to learn what I'm doing.

I hope its of a least a snippet of help.

Good luck and keep the post updated to I can track your progress please.

P.s. What type of tank do you run?

thanks for the reply,

I run a 55g reef tank right now, and am in the process of a 90g shallow reef tank. I'm also thinking about running tide pools, and even a fresh water stream in the tank, so all that needs to be monitored and automated. after that I'm putting in a large salt water pond in the back yard, and it too needs to be automated, but I want to start off a little smaller for my first project.

I need to LCD screens so I can run a Text menu display, and also a graphical line chart, it would be nice to also have the line chart run in real time.

I was originally thinking of using an old computer to run things, but I can't see wasting that much processing power/energy to run a few relays and sensors 24/7...

I have a $200 aquarium controller now, and hate the fact I can't fix some of the programming in it, so why not build mine the way I need it to work, and learn doing it.

Yea, why buy a controller when you can create something that does exactly what you want it to & get to have some fun building it.

I've been looking at this http://arduino-info.wikispaces.com/ArduinoPower#4-8, the relay & Power Fet look intresting but by the sound of it you may already have this part covered.

I've only got time for a quick response right now.

It sounds like you will need a lot of RAM and flash, that would point me to the ATmega1284 or 2560 chip. I would look at the Arduino Mega or the new "Bobduino" (search this forum for that) which has built in SD card for your logging.

IO can be expanded almost indefinitely with shift registers and multiplexers.

More later if nobody else has stepped in when I return.

EDIT: I just tried searching for "Bobduino" with no luck, maybe I spelt it wrong. Hopefully Crossroads (the guy who made it) will see this and respond.

ANOTHER EDIT: Found the thread http://arduino.cc/forum/index.php/topic,61126.405.html


Rob

that Bobduino looks promising, I'll have to read a bit more, I'm only on page 6...

thanks again guys!

That seems to be a quite complex project - definitely easier with a Mega. If you're going to want to graph your data, consider using an ethernet or wi-fi shield so you can send the data to a service like Pachube (or a local web server if you have access to one) rather than presenting it on an LCD. That might be simpler and provide more graphing flexibility. For LCDs you can get the pincount down if you use one with a serial interface.

If you're new to this, start small - just getting a single sensor wired up and read by the arduino will have plenty of challenges - good luck!

thanks Bill,

ya its a complex project, but nothing like jumping in the deep end to learn how to swim. I love a good challenge and if something can stump me even better. I was thinking about doing an internet connection with this unit, I have read a few projects where someone made the Arduino some type of web server (not sure how that would work) but I definitely would like to be able to monitor and operate equipment remotely.

but for the first go at it, this unit dose not have to have internet connection, but it would be nice.

also I'll be building this stuff from scratch, so no out of the box here building is half the fun :wink:

Nate_Bro, You might find this interesting. Some good stuff/ideas. practicalmaker.com - This website is for sale! - practicalmaker Resources and Information.

Paul.

I built one long time (yr 2000) ago using a AT89C2051 (2kb, 8051). Here is my post Loading...
It had a few shortcomings but it worked good. Basically, you connect the unit to serial port with hyperterm and follow the menu to set the on and off times.

Chetan

Hi, Great project.. will keep on expanding over time, right??

Since you have so many aquariums / ponds etc. I would suggest you might want to take each one separately with it's own Arduino. The $20 or so for and Arduino, or even $40 or less for a Mega2560 (Copies, not originals) is small compared to the rest of your project. That way each one can run and be updated without affecting the others..

Can you point to some of the actual sensors you plan to use??

Other opinion: With so much data and complexity (And living creatures depending on it) I would suggest using a PC with a decent display for centralized view of what the Arduinos are doing. There are nice graphics available in "Processing" which is a PC Cousin of Arduino (http://processing.org/ Then you can easily support Internet connection, too.

Connecting several arduino's together at low cost?? Maybe Serial interface using RS485 (Multidrop Serial)..

Disclaimer: I'm showing some stuff from my own shop, but that's what I know best:

This little RS485 board: http://arduino-direct.com/sunshop/index.php?l=product_detail&p=63 is low cost and doesn't take up much Arduino room. Here's some beginning How-To on that:
http://arduino-info.wikispaces.com/RS485-Brick

Also, some users are running CAT5 cable to connect Arduinos and also supply power. There's not exactly a standard for this, but here is one quasi-standard that I like:
http://www.aag.com.mx/aagusa/index1.html
(see the RJ45 pinout at the top)...

And someone mentioned this already, about Power: http://arduino-info.wikispaces.com/ArduinoPower

Quite a few Aquarium guys are using this stuff, and temperature sensors like this:
http://arduino-info.wikispaces.com/Brick-Temperature-DS18B20#TS

Lots of great stuff to work on! I'm trying to learn more about the Reef Environment aquariums and make one some day. I have had the privilege of spending some time on reefs in Borneo etc. and last 2 years I lived right on the Red Sea and got out to the reefs a few times.
Next year I'll be on the Mediterranean in Genoa. Probably no real reefs right there, though...

Keep us posted as you make your many decisions and prototypes!

Regards, Terry King
...In The Woods In Vermont
terry@yourduino.com

Thanks everyone!

Terry King, that's what I have been thinking about, I'm thinking about writing a GUI in JAVA (or C++ but I'm faster in JAVA, others are still on the table as well, PYTHON, PERL, FLASH...) and also making a web based control for it as well, so even if I'm gone I can send SMS to my phone, or e-mails, basically once you can get data on the web the possibilities are endless, but right now I'm just researching on getting data into the Arduino, and retrieving it to a PC.

I have also been looking into this unit, A credit card sized Ethernet Arduino compatible

If I could in fact get these units on a network, the amount of controllers could be great, also with a network function and some additional programming I could also do some automation to other things around besides the aquarium related things.

as for the sensors I'm still looking around, I'm still in the "brain storming" mode, so it may take a little time before I get down to picking components.

also Terry if you want to start up a Reef Aquarium, this is a must read: Reefkeeping made easy- what was not explained. | The Reef Tank

Paul & Chetan, thanks for the links, I took a look at them and it looks like I can "take" some functions and ideas from them.

Thanks Again Everyone!

also just in case anyone is looking this thread up here are a few links I found before starting this project.

also the reef angel controller has a few things I like, and hope to use some of that also..

now This list is not done yet, but here is just the start on the I/O just to give you all an idea of what I'm needing this thing to do...

I'll update this list over the next couple of weeks as I finalize what I will be having on this aquarium..

~OUTs~

RELAY:
1-Skimmer
2-skimmer waste
3-MH light #1
4-MH light #2
5-T5 light #1
6-T5 light #2
7-Heater
8-Chiller
9-Light Fans
10-Canopy Fans
11-Stand fans
12-Water surface blowers
13-Return Pump

DIMMER:
1-Main LEDs #1
2-Main LEDs #2
3-Main LEDs #3
4-Main LEDs #4
5-Moon LEDs
6-Red LEDs

PWM:
1-Spotlight LEDs #1
2-Spotlight LEDs #2
3-Canopy Raise Motor

~INs~

ON/OFF SWICH:
1- Skimmer
2- skimmer waste
3-MH light #1
4-MH light #2
5-T5 light #1
6-T5 light #2
7-Heater
8-Chiller
9-Light Fans
10-Canopy Fans
11-Stand fans
12-Water surface blowers
13-Return Pump
14-Main LEDs #1
15-Main LEDs #2
16-Main LEDs #3
17-Main LEDs #4
18-Moon LEDs
19-Red LEDs

PWM:
1-Spotlight LEDs #1
2-Spotlight LEDs #2
3-Canopy Raise Motor

DIMMER SWICH:
1-Main LEDs #1
2-Main LEDs #2
3-Main LEDs #3
4-Main LEDs #4
5-Moon LEDs
6-Spotlight LEDs #1
7-Spotlight LEDs #2

SENSORS:
1-Counterbalance Locator (IR) #1
2-Counterbalance Locator (IR) #2
3-Counterbalance Locator (IR) #3
4-Counterbalance Locator (IR) #4
5-Counterbalance Locator (IR) #5
6-Counterbalance Locator (IR) #6
7-Counterbalance Locator (IR) #7
8-Counterbalance Locator (IR) #8
9-Stand Temp #1
10-Stand Temp #2
11-Stand Temp #3
12-Room Temp
13-Lights Temp #1
14-Lights Temp #2
15-Stand Humidity
16-Room Humidity

I know I will be needing a lot of I/O channels, since these are over 60, and I'll just scratching the surface (more like 200 will be in the final range)...

I was thinking about this.. Arduino Playground - 4051
dose that seem like a good way to go?

Hi Nate,

(Hey thanks for the aquarium controller pointers; I'm still trying to learn more about this.) Warning, I will point to examples in my own shop, but you can buy this stuff in many other places...

Your list is exactly the right place to start. Later add details about each sensor and actuator, expected values , actions etc.

Seems like you could do almost all this with a Mega 2560: http://arduino.cc/en/Main/ArduinoBoardMega2560

You'll have a LOT of wires to hook up. To make secure connections, easy +5 and GND connections, and (maybe) avoid a total rats-nest of wiring, think about using a Mega Sensor Shield: http://arduino-direct.com/sunshop/index.php?l=product_detail&p=195

The Mega has 16 analog inputs and you can avoid external analog multiplexors. Also a lot of the temperatures can go on one or two pins using DS18B20 sensors like: http://arduino-direct.com/sunshop/index.php?l=product_detail&p=151

The 52 Digital I/Os on the Mega might be enough...

Wow this has as much I/O as some Wet Process machines I worked on at IBM :slight_smile:

Keep us up to date on how it's going...

thanks again Terry!

I'll be building a large case for this project (I am thinking a large Breaker Panel), also I'm planning to use some CAT-5 for some of the sensors so that should cut down on some wire messes, and a RF link kit for the canopy systems, so I guess I can use a "small" arduino on that receiving end to handle the light relays, and dimming...

also, before I forget, this also needs to connect to the local network, most of the operations and monitoring will be done server side, and I will also have that hooked up to a website so I can view parameters, and do anything to the tank while I'm away, even a remote water change...

this will most likely be a slow project until I finish the designs, and figure out exactly what equipment I will be using.

just to give some ideas what this thing will be controlling...

Have you been here yet?

ya I have been around, and lots of great stuff!

Ok, so here is the basic Idea I have...

not sure what the best way to hook up the Arduino to the WWW, but I'm open to idea :smiley:

thanks again!

Hi Nate_Bro,

I'm working on control network that would do most of this.

http://maxx.robgray.com/index.php

It won't be ready any time soon so maybe no good for you but you might get some ideas from the above pages.

Personally I would make a small RS-485 based network to handle all or most of the stuff down stream of the LAN controller. That way you only have a single wire running around.


Rob