Reef Central Online Community

Home Forum Here you can view your subscribed threads, work with private messages and edit your profile and preferences View New Posts View Today's Posts

Find other members Frequently Asked Questions Search Reefkeeping ...an online magazine for marine aquarists Support our sponsors and mention Reef Central

Go Back   Reef Central Online Community > General Interest Forums > Do It Yourself
Register Blogs FAQ Calendar Mark Forums Read

Notices

Reply
Thread Tools
Old 03/21/2012, 06:01 PM   #1
timekiller
Registered Member
 
Join Date: Mar 2012
Posts: 79
Down the rabbit hole I go... (aka I bought an arduino to build a custom controller)

So I'm 3 weeks into the cycling of my first saltwater tank (90 gallon). I'm a geek by nature, so the idea of automating things like pumps, lighting etc really appeals to me.

Long story short, tomorrow I will be getting the following:

1 x Arduino Mega 2560 R3
1 x Arduino Ethernet shield R3 with micro SD connector
1 x Standard LCD 20x4 + extras (white on blue)
1 x DS1307 Real Time Clock breakout board kit

Initial plan is to start small and build on top so all I am aiming for initially is to build a controllable power strip to control the pumps. I want a button that will put the pumps into "feed mode" and start a countdown on the LCD. I also plan to alternate power between the two powerheads to create a wave effect.

Ultimate plan is to build my own LED lighting system, attach every sensor I can think of, add auto top off, etc etc etc.

Going from the thread here I'm thinking I'll buy a few opto-isolated relay boards for power strip control. Has anybody else tried these ? I'm curious what people's experience is.

Thanks, and wish me luck!


timekiller is offline   Reply With Quote
Old 03/21/2012, 06:41 PM   #2
der_wille_zur_macht
Team RC Member
 
der_wille_zur_macht's Avatar
 
Join Date: Sep 2003
Location: NY
Posts: 16,620
Good luck!

A few comments:

Especially when you're in the design/build stage, and experimenting, concentrate on doing things in a failsafe way. If you're building a power strip, what would happen if the controller hung and all the outlets went to their default state? For this reason, I'd probably prefer to start with something non-critical, i.e. fading LEDs, monitoring temperature and pH, etc.

I do like your concept of starting small though. It really makes sense to develop and deploy discrete bits rather than trying to do everything at once.

Which raises another point - the mega board is attractive due to it's big capabilities, but it also means all your eggs are in one basket. Another alternative would be to use several "smaller" less powerful units dedicated to specific tasks, with a more modular approach.

If you haven't seen it yet, the Hydra thread has a lot of good reading:

http://reefcentral.com/forums/showthread.php?t=1783536

Then again I'm probably biased, having been involved in it.


__________________
Inconveniencing marine life since 1992

"It is my personal belief that reef aquaria should be thriving communities of biodiversity, representative of their wild counterparts, and not merely collections of pretty specimens growing on tidy clean rock shelves covered in purple coralline algae." (Eric Borneman)
der_wille_zur_macht is offline   Reply With Quote
Old 03/21/2012, 07:14 PM   #3
timekiller
Registered Member
 
Join Date: Mar 2012
Posts: 79
Thanks for the reply!

Yes I started reading the Hydra thread, and will continue - 69 pages! Man that is a lot to go through.

As far as fail safe, yes that is big on my mind. In the thread I originally mentioned, mprygh mentions he doubles up on the relays for important stuff in case the relay "sticks". I'm curious how likely that is.

Like I said, this is a new tank (not done cycling yet), and I'm just starting with controlling the powerheads. Worst case, the powerheads get stuck either on or off for a few hours. Stuck on is fine, they're always on now. Off is'nt a big deal for now, but could be later, so of course I'll want to minimize that.

As for using multiple smaller boards, that's a good idea, but I like the idea of eventually setting up a web server that can graph sensor data, control pumps, etc. Having all that in one place would make life easier there.

Would it be unreasonable to connect a smaller arduino as a backup for "critical" parts like the return pump and heaters ?

On a side note, I was also looking into keypads but couldn't find anything that I liked. Eventually I got the idea to hook up an IR receiver and use my universal remote for control. I like the idea of being able to dim/brighten the lights with my volume or channel buttons I plan to keep a single button on the lcd casing for easy access to "feed mode" since that is a daily thing.

So many ideas...can't wait to get started.


timekiller is offline   Reply With Quote
Old 03/23/2012, 09:31 AM   #4
timekiller
Registered Member
 
Join Date: Mar 2012
Posts: 79
So I got my arduino in last night and started playing. No previous experience, but I was really surprised how far I got.

Was a little surprised when the RTC came as a bag of parts! No problem, time to break out ye ol' soldering iron. Soldered everything up and started playing with sketches. By the end of the night I was MUCH further along than I thought I would be.

With absolutely no arduino experience beforehand, I had written a sketch that upon boot, first tries to connect to NTP and get current time. It compares this the the time in the RTC and, if there is drift, it displays the drift and sets the correct time. If ethernet is not connected it just displays an NTP error and continues. Then it goes to what I am calling "Normal run" where it shows the current tank mode based on time (sunrise, daytime,sunset,nighttime,sleep) these will eventually control the lighting in the tank. There will also be manual modes "feed" and "maintenance" for feeding the fish and doing water changes. These modes will control the pumps. Then, on the same line it displays the current time, pulled from the RTC.

Below that the next 3 lines cycle between current probe values and the days hi/low values. Of course these are dummy values for now since I have no probes (yet!).

Not bad for a few hours of work. I thought it would take much longer to get here. Now I need to order the parts to build a switchable power strip. I'm torn between physical relays and SSRs. I'm leaning away from physical because I plan to alternate power to the powerheads to create a wave effect in the tank and I'm afraid the relay switching will be too noticeable.

Here are some pictures of what I have so far:


Attached Images
File Type: jpg 20120322_191524.jpg (96.8 KB, 14 views)
File Type: jpg 20120322_193050.jpg (105.1 KB, 16 views)
File Type: jpg 20120322_203443.jpg (76.7 KB, 21 views)
File Type: jpg 20120322_210242.jpg (50.9 KB, 24 views)
timekiller is offline   Reply With Quote
Old 03/23/2012, 09:42 AM   #5
timekiller
Registered Member
 
Join Date: Mar 2012
Posts: 79
Here's a quick video of the "run" mode:

http://www.youtube.com/watch?v=kNkxu5zgDz8


timekiller is offline   Reply With Quote
Old 03/23/2012, 09:52 AM   #6
der_wille_zur_macht
Team RC Member
 
der_wille_zur_macht's Avatar
 
Join Date: Sep 2003
Location: NY
Posts: 16,620
Well congrats, that's an impressive start!


__________________
Inconveniencing marine life since 1992

"It is my personal belief that reef aquaria should be thriving communities of biodiversity, representative of their wild counterparts, and not merely collections of pretty specimens growing on tidy clean rock shelves covered in purple coralline algae." (Eric Borneman)
der_wille_zur_macht is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -6. The time now is 06:25 AM.


TapaTalk Enabled

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Powered by Searchlight © 2013 Axivo Inc.
Use of this web site is subject to the terms and conditions described in the user agreement.
Reef CentralTM Reef Central, LLC. Copyright ©1999-2011