My arduino build

arthurdent510

New member
So I've slowly been working on my arduino based reef controller. I finally have phase 1 in production, so I thought I'd share what I've been working on :)

Right now it is based on a basic Arduino Uno, no internet connectivity, yet. I have 2 solid state relays controlling my heaters, and I'm planning on grabbing a third to control my fans (right now the fans are just left on all the time, as the tank is usually too warm, not too cold. That may change in a month or so, but hopefully by then I'll have my other relay.)

So for relays, I'm using these - http://www.amazon.com/gp/product/B004HZN628/ref=oh_details_o00_s00_i00?ie=UTF8&psc=1. As a warning from the comments, it appears that it's common to get knock offs that fail right away... The pair that I ordered came from an American vendor (most of the vendors ship directly from China), so I'm not sure if that played a part, but both of the relays I got work fine and I've had no heat issues while running. They're rated up to 25 amps, so they should be more then enough to handle the heaters.

The display is just a generic 16x2 lcd, stuffed into a case that I got from Adafruit. (http://www.adafruit.com/products/271 and http://www.adafruit.com/products/181). Power is from a 1.5 amp, 9v power supply from RadioShack.

I'm currently only running a temp probe... I'd like to eventually get a ph and salinity probe, but those are down the road. The temp probe I'm using I got from Adafruit as well. I'm using the high temp version of this (http://www.adafruit.com/products/381) only because it was repurposed from another project that I never got to ;) The only gotcha was that by default it spits readings back in Celsius, but a simple conversion to Fahrenheit in code fixed that. As a note, the arduino does it's math ordering strange.... the formula to convert c to f is f = c*(9/5)+32, and it was always coming back really low when I used that. I couldn't figure it out, till I used f = (c*1.8)+32. Strange... but it works now /shrug

So the heaters are set to turn on at 2 different points... at 78 the first (and smaller) of the 2 heaters turn on, and at 77.5 both heaters are running. The relays themselves have some indicator led's to show that they're running, but I'm also spitting some text out to the display to indicate what's going on. When I get fans triggered through code, I'll probably have them set for over 78.5.

As for the fans, I'm using 2 12v dc computer case fans, one on each side, both blowing air into the tank. It actually is working better then I expected... This weekend I'll probably test out having one fan blow in and one suck out to see if it works any better, but for now it's good. The big test will come next summer I guess... I'll use an a/c relay to control power to the power supply. I've tossed around the idea of using a dc relay in case I end up running anything else off that dc power supply, but for right now using another ac solid state relay will work fine.

To connect the relays and probes back to the box, I'm running the control lines over some phone and network cable. The temp probe requires 3 wires, so it got the rj11 and phone cord, and the relays are running over the cat5/rj45 cable. The cat5 gives me more then enough wires for running the 2 relays I have now, but gives me plenty of room for expansion so far.

So my plans of things to come, mostly in order that I think I'll get to them:
- Adding fan control
- Adding wifi capabilities with logging to my website so I can both watch my tank's levels remotely and get some stats on fan/heater efficiency and such
- tie into my led controller
- Adding more sensors
-- Moving my ato to be controlled by code, possibly using a pump where I can keep track of how much water I'm adding
-- PH probe
-- Salinity probe
-- ?

I don't have the code with me right now, but I'll add in a link to it later in case anyone wants to look at my hacked together code :-) And please ignore my rats nest of cords and cables behind my tank... That's this weekends project to clean all of that up...

Now onto pictures! And yes, the lcd display is upside down... I'm not sure why it's doing that, it was right side up when I tested off the board. Guessing I have the data pins wired backwards or something...

And I'd love to hear feedback! In all, between the arduino, ssr's, and various bits and pieces, I'd say I have right around $100 in to it, if you don't count all the wire, soldering iron, and other necessary tools that I already had on hand..

Everything mocked up on a breadboard
arduinoreef1.jpg


The relays all wired up outside of the box
relays.jpg


And everything in the box with the rj45 plug hanging out
plugs.jpg


The display, although upside down...
faceplate.jpg


And the bottom with my cords hanging out! I do have a bottom plate, I just need to cut holes to allow my wires coming out still
bottom.jpg


and for good measure, a full tank shot :)
ft11-13.jpg
 
That is a pretty awesome project. Are you trying to DIY so you can option in exactly what you need? I'll be interested to see how it turns out in the end.
 
Yea, that and I'm just a tinkerer by nature, so I enjoy doing this type of stuff :) I'd rather play around and figure it out on my own then pay a load of money for something I could teach myself to do.
 
I just got my DIY arduino controller going again. I have the website reefprojects.com. I just updated my code, but I haven't uploaded the new streamlined code just yet. Good luck on your build!
 
so I built a pretty full blown arduino controller, 5 temp sensors, 8 outlet power strip each on seperate relays, pwm LED controls... Then i touched a 12v circuit with a 120v wire.. oops. It was a fun project and i enjoyed the challenge. In the end, I saw how much time getting it all web integrated was going to be and backed off (hello Apex).
It seems that people are continuing to develop these and they're really great LED dimming controllers.
http://www.openreefs.com/
 
The wifi stuff is actually much easier now... TI released a pretty cool chipset that handles almost all of the connection stuff now. You can pick up as a breakout board or shield from adafruit with all the libraries you need for about $40. http://www.adafruit.com/products/1491 It should be pretty easy now to get it hooked up to the web and make web service calls to report in. If I can simply replace my prototype shield with this, I'll go that route. Otherwise I'll figure out how to make the breakout board fit in my case :-p
 
Congrats on your DIY project! I may have to piggyback your project for any additional tanks I set up. I discovered early on that controllers are the way to go for me.

Continue to keep us posted!
 
compared to standard apex lets say $500 (we know it's always more) what are you saving you think by going the diy route that does the basics (temp, ph, salinity, ato, lights)? just curious i'm really undecided what direction i wanta go 100% just yet... cost is always a factor
 
I'm not terribly familiar with the Apex setup, but if I read it correctly... let's say you want to add some outlets? for a 4 outlet strip it's about $130? To add 4 outlets to the arduino it's a matter of just buying some more relays. I picked up mine for about $5 each with free shipping. If I wanted to switch just dc power for some fans or lights, relays for those are just as cheap. One thing I don't see with the Apex, and maybe I'm just not seeing it, is dosing pumps. For about $15 I can get a dosing pump from ebay to automate whatever I need. For example, dosing kalkwaser on a schedule. Or what I would like to do is to be able to wire in a dosing pump to an ato sensor so I can calculate how much water I'm losing. So yes, it would be quite a bit cheaper then an Apex setup, but it does come with it's own costs ;) It's by no means plug and play (at least at the level that I currently have it), and it's no where near as pretty or as well put together as an apex. Granted, a little bit of woodwork or 3d printed parts could go a long way to prettying things up as well, but I guess you get out of it what you put into it!
 
I used this for relays, you get 8 all at once.. http://yourduino.com/sunshop2/index.php?l=product_detail&p=156 and they can be run optically isolated. The HUGE trade for me was TIME. I spent a LOT of time making a contrller, but I enjoyed the challenge and was going all out. It was a great challenge to take on and I always wanted to prove that I could do programming, but when it came to web interface and GUI I bowed out.
Tell me about this 15$ doser!
 
its def the route i would like to go i just need to research some good build threads...you know of any good detailed diy builds that would really help!
 
wow, that dosing pump only pulls 80ma. Do you need a power source, or can you just power it through a pin on the arduino?

Ah, that's cool! I might have to look into that...

http://www.ebay.com/itm/12V-DC-DIY-...751?pt=LH_DefaultDomain_0&hash=item338285e797 is the pump, but there are a number of similar pumps. I just searched for dosing pump.

A pretty good article made it up to hackaday a while back where a guy was using 3 of these to automate the dosing of fertilizer for his freshwater tank. http://hackaday.com/2013/06/04/automated-aquarium-fertilizer-doser/
 
Probably not, as the pump wants 12v... it might work, but it would probably be inconsistent at best. The best option would be to give it 12v through a relay.
 
Can you tell me the benefits of wiring in the outlets as opposed to cutting the plugs of devices and hard wiring them directly to the relays?
 
Can you tell me the benefits of wiring in the outlets as opposed to cutting the plugs of devices and hard wiring them directly to the relays?

By keeping the pulg intact you can:

1. Still resell the item.
2. Unplug it easily for cleaning.
3. Change where it is plugged in.
 
That's what I was thinking. Just wanted to make sure I wasn't missing something electrical wise.
I was also thinking about devices like fans and LEDs that I have to buy DC converters and plugs for. These it would seem to be easier to wire in direct.
 
I used a common plug strip from H. Depot along with the yourduino/arduino 8 relay board to make a diy controlled energy bar.. worked well. If you use a 6 plug strip, you still have 2 of the relays left to run fans or lower voltage items (ATO, LEDs).
 
That's pretty cool! I'd just have to see about wiring a shift register into that so it would be possible to control all 8 plugs with only 3 pins... I'm going to quickly run out of pins soon I think, so it'll be either shifting all my relays to a shift register or upgrading to a mega. Although I have been eyeing a beagle bone black as a possible alternative to the arduino. Get a lot of goodies on one of those and plenty of room for expansion... and being able to run a web server off of it is very tempting...
 
I don't know what a beagle is, but I def. suggest starting off with the Mega, if going arduino route. (Also, i don't see any reason to go with name brand.. get the Chinese knockoff Mega) That said, I have a real Mega and that DIY controlled plugin strip, 5 temp sensors, and a Real Time Clock all someone needs to make the controller, would love for someone to make some use of it in exchange for supporting my frag habit!
 
Back
Top