Help - Search - Members - Calendar
Full Version: Plantarms DIY Reef Controller
Nano-Reef.com Forums > System Setup > Do It Yourself

plantarms
I just finished building a custom 8 LED light(4cw 4rb) for my 2.7 gallon pico tank and my next project is a DIY aquarium controller to control the LED sunrise/sunset phases as well as display the air/water/heatsink temps, and possibly have a pH probe. The relays will be wired to the arduino digital pins to control every electrical part of the tank. I am going to be using the arduino duemilanove microcontroller, i am open to any suggestions/help/criticism on this project and I will update this thread as I build it

Parts
8 Outlet American DJ Power Center
8 Crouzet Solid State Relays
Arduino Duemilanove
Graphic LCD or OLED Display (Still searching)
Joystick and Momentary Pushbutton Controls
Real Time Clock Module DS1307
DS18B20 Temp Sensors
pH Probe?
Stereo cables, RCA cables, AC power cables, etc

Parts Plugged into Relays
Pump
Heater
Light - Blue
Light - White
Light - Fans
Moonlight
Fuge Light
ATO
DIY Chiller (once built)
isidro0
Larger controller, You would be surprised how fast you can outgrow the controller.
plantarms
QUOTE (isidro0 @ Jan 14 2010, 05:18 PM) *
Larger controller, You would be surprised how fast you can outgrow the controller.

i was considering using the arduino mega because it has more pins and memory, but that doubles the price of the controller unit
Vancouver Reefer
just something i noticed. are connecting the relays directly to the Arduino or are you going to use a transistor to drive the relay coils???

If you connect the relay coils directly to the arduino you will blow the output. Not sure if you knew, just wanted to give you a heads up!!

Let me know if i can help with anything.

VR
cptbjorn
If you are considering the jump to a mega you could alternatively use an I2C port expander in the external relay box. This would free up at least 8 pins and also replace the printer cable with something like a headphone cable. That's how I'm considering doing it for mine.

He's using solid state relays so running directly from the arduino should be fine, most SSRs draw <5ma.

Do the LEDs actually need their own relays though? That would mean they each need their own power supply too, I just have mine dimmed down to 0 when the lights are off and it hardly draws any power.
plantarms
QUOTE (Vancouver Reefer @ Jan 14 2010, 08:21 PM) *
just something i noticed. are connecting the relays directly to the Arduino or are you going to use a transistor to drive the relay coils???

If you connect the relay coils directly to the arduino you will blow the output. Not sure if you knew, just wanted to give you a heads up!!

Let me know if i can help with anything.

VR

cptbjorn already beat me to it, yes i am using solid state relays, these specifically
http://www.crouzet-usa.com/catalog/gordos/gnssr.pdf
thanks though!
Vancouver Reefer
Thats good, Just wanted to make sure. Nothing worse than frying a good processor!!!!
plantarms
QUOTE (cptbjorn @ Jan 14 2010, 08:54 PM) *
If you are considering the jump to a mega you could alternatively use an I2C port expander in the external relay box. This would free up at least 8 pins and also replace the printer cable with something like a headphone cable. That's how I'm considering doing it for mine.

He's using solid state relays so running directly from the arduino should be fine, most SSRs draw <5ma.

Do the LEDs actually need their own relays though? That would mean they each need their own power supply too, I just have mine dimmed down to 0 when the lights are off and it hardly draws any power.

It isn't absolutely necessary to keep them on relays, however the power center I am using has 8 outlets and I was able to get 8 relays for a good price, so it makes sense. I do understand your point however, maybe if i start running low on pins i might do that. Do you know how much, if any, it draws when it is at 0?

Hmm I didn't think about using an I2C port expander, thanks that could be very useful!
are you talking about this? that would give me 16 extra ports and it uses analog inputs
http://www.sparkfun.com/commerce/product_i...roducts_id=8130

QUOTE (Vancouver Reefer @ Jan 15 2010, 12:06 AM) *
Thats good, Just wanted to make sure. Nothing worse than frying a good processor!!!!

For real
cptbjorn
I think the power draw of my LED driver board was 5 or 6 watts with the dimming inputs grounded and that includes two drivers, two 555 PWM circuits and two fans at low speed. The buckpucks may be higher or lower but probably not by a ton, it is probably small enough to forget about at least.
plantarms
good point, that would mean i could only use 6 relays which would save space in the power center/relay box, and then with all my other inputs(3 temp sensors, possibly 1 ph) i probably wouldn't even need to get a get the i2c expander unit, or i could add it on later as an upgrade
plantarms
I got the American DJ 8 Outlet Power Center, this seemed like the best option without building the whole power center by myself and I have seen it used in another build. Here are a couple pics of my supplies so far

American DJ PC-100A Power Center (8 outlets, room to mount SSR's)
Heat sink box (aluminum, about 4L x 4W x 2.3H)
Back Panel (aluminum panel i will drill the holes for inputs in this)
Front Panel (I cut this using razor blades from a plastic sheet I had)
Arduino Duemilanove
20x4 serial lcd display (does not fit the box and I think I am going to go with this oled one)
Perforated Board (will hold arduino, rtc, and other components in place in the box)
Superlock strips (strong strips from radioshack, always useful for something)





plantarms
for the i2c connection could i use this cable? it is trrs meaning it has 4 wires
http://www.kvconnection.com/ProductDetails...&click=4105

and this panel mount on each end?
http://www.sjmediasystem.com/30-712.html
cptbjorn
That should work, you could run 5v on the 4th wire as long as you aren't using much of it. You could have the I/O expander running some SSRs easily at least. Also you could put your RTC, maybe an i2c temp sensor, eeproms etc in there too if space gets cramped in the main box, you can run up to 127 devices off the i2c I think.
ajmckay
Looks a lot like the controller I started. I'm still looking for the right relays though. Be sure to give an update on how those work out.

Good luck.
plantarms
QUOTE (cptbjorn @ Jan 16 2010, 05:58 PM) *
That should work, you could run 5v on the 4th wire as long as you aren't using much of it. You could have the I/O expander running some SSRs easily at least. Also you could put your RTC, maybe an i2c temp sensor, eeproms etc in there too if space gets cramped in the main box, you can run up to 127 devices off the i2c I think.

Would I be able to run all 8 relays on the ic2 expander since it is 16 pins ( i could use 8 + and 8 - coming from the relays) and have that all in one relay box then run the 4 wire audio cable from the i2c expander to the arduino in the controller?
plantarms
QUOTE (ajmckay @ Jan 16 2010, 10:11 PM) *
Looks a lot like the controller I started. I'm still looking for the right relays though. Be sure to give an update on how those work out.

Good luck.

Thanks I will let you know how they work for me, I know there is a build on here with someone who has already used them successfully which is part of the reason i chose them. Here is the other build
http://www.nano-reef.com/forums/index.php?showtopic=190984
cptbjorn
You would only need 8 outputs to run 8 relays, the other side of the "coil" should go to ground (or 5v.) But yes, all it should need is the 4 wire cable to the arduino.
plantarms
QUOTE (cptbjorn @ Jan 17 2010, 12:41 AM) *
You would only need 8 outputs to run 8 relays, the other side of the "coil" should go to ground (or 5v.) But yes, all it should need is the 4 wire cable to the arduino.

it completely slipped my mind that i would be sending the other 8 wires to the ground on the breadboard! haha man i'm thinking this through so much im missing the simple things. Okay then I will maybe use an old ethernet cable to connect those to the grounds
plantarms
i'm going with an 8-pin mini din cable and two panel mounts to connect the ground wires
cptbjorn
The grounds don't all have to go back separately, if you go with a 4 connector cable then one of them would be ground and you'd just connect all the negative inputs of the SSRs to there.
plantarms
okay so interference would only come from the positive wires on the relays if they are too close together?
plantarms
vancouverreefer, i saw your thread and website with your entire controller build, very impressive. i do have a question about how you got the pH probe/power/board all worked out, you said you built a board?
plantarms
this build is taking a good amount of plannig, however i did order the i2c expander board as well as a buzzer and some cables a few days ago. I also just got my 8 relays! And I am going to get the OLED screen to use as a display when I get enough money for it. Any input on a kepad or joystick or button controller?
amnesiak
If you don't have a display yet, Noritake VFDs are really cool, albeit a bit expensive, and rock-solid.

As far as control goes, I am of the opinion if you construct your UI correctly you can do everything you want with a rotary encoder and one or two buttons. Quadrature encoded is usually the best for microcontroller apps where you don't need an absolute position because it only uses two lines.

Just remember that every button can have two functions, short press and long press.
plantarms
i think i'm going to stick to the OLED screen mainly because its small enough to fit my build and i kind of want to play around with the new technology, those VFD's do look cool though! i am thinking about possibly using a small joystick (i've seen another controller with this)
neanderthalman
QUOTE (plantarms @ Jan 17 2010, 05:30 PM) *
okay so interference would only come from the positive wires on the relays if they are too close together?


Relays are exceptionally noise tolerant. Don't worry about cross-talk between wires.
plantarms
QUOTE (neanderthalman @ Jan 23 2010, 08:43 PM) *
Relays are exceptionally noise tolerant. Don't worry about cross-talk between wires.

alright thanks, i think some people have had cross talk when using ethernet cables as an interface though, mostly because they are all twisted together.
neanderthalman
QUOTE (plantarms @ Jan 23 2010, 10:07 PM) *
alright thanks, i think some people have had cross talk when using ethernet cables as an interface though, mostly because they are all twisted together.


Relays need actual power, measurable power on the several mW order. Sounds more like they nicked wires when they stripped the cable. You're not going to trigger a relay with crosstalk. You might trigger a mosfet or triac, but you're not going to trigger a mechanical relay. Crosstalk will not transmit that amount of power.



The twisting will actually reduce self-inductance and crosstalk - provided they're used in pairs/triads as intended.
plantarms
here is my power supply and my 8 crouzet solid state relays



cptbjorn
+1 on the crosstalk with relays, I thought you were using an IO expander for those though? If so you should only need 4 wires running to the relay box: the two I2C wires, 5v and ground. All the relay inputs would connect to ground and to the IO expander in the box and wouldn't need a separate ground back to the arduino.

Interference with the I2C might be a concern though, I haven't tried extending them that far so I don't know. Since there are no other ac/data signals in the cable though I would think you should be fine but you might want to do some reading on how sensitive they are.
plantarms
QUOTE (cptbjorn @ Jan 25 2010, 03:09 AM) *
+1 on the crosstalk with relays, I thought you were using an IO expander for those though? If so you should only need 4 wires running to the relay box: the two I2C wires, 5v and ground. All the relay inputs would connect to ground and to the IO expander in the box and wouldn't need a separate ground back to the arduino.

Interference with the I2C might be a concern though, I haven't tried extending them that far so I don't know. Since there are no other ac/data signals in the cable though I would think you should be fine but you might want to do some reading on how sensitive they are.


Right i am using the i2c expander, the 8 pin mini din panels would be used to interface the 8 wires from the power supply to the relay box. the relay box would then house the 8 relays, the i2c expander, and the rtc module. would there be enough current running from the i2c to send a signal to the relays though if they were all on at once? i think i still need to research this
cptbjorn
The I2C pins only transmit data they don't carry any significant amount of current. The IO expander will source/sink current from the supply lines not from the connection to the arduino, the I2C pins just let the arduino tell the expander to put its pins high or low.

There's no reason to use a din cable though, the relays you got draw a maximum of 14ma on the input; you could run ~50 of them on a single 24 gauge wire if you wanted. It would be best to just connect all of the grounds together in the relay box and run it back as a single wire.
plantarms
okay i think i understand the i2c expander a little better now, the i2c expander board will be housed in the relay box and it will interface to the controller box using a TRRS stereo cable (4 internal wires)

as far as the din goes i'm not using it for the ground of the relays, it will be used to connect the positive power center wires to the relay box which will then have one go to each relay without having 8 individual wires coming to it.
plantarms
wrote the code for my failure alarm on the tank if something goes wrong, the buzzer beeps three times then the led will flash off and on until the system is resumed

plantarms
currently working on modding the american dj power center, will post pics later
plantarms
here is what some of the wiring looks like, still working

plantarms
there will be three boxes: power center, relay box, and controller box

controller box(will not be using this piece of polycarbonate for the final thing, it is being used to test and drill)
neanderthalman
QUOTE (plantarms @ Jan 27 2010, 12:16 AM) *
here is what some of the wiring looks like, still working



Looks like someone gives a damn.

Nice job. cool.gif

plantarms
thanks man, i'm putting a lot of time and work into this
systemtool
Kudos man.. that is an awesome project. Hope it all works well for you.
plantarms
thanks, it's a lot to learn considering i have no background in electronics at all
plantarms
i made a couple plastic trays to slide into the heat sink box and screw the relays onto. they will be in an 8'' heat sink box and i'm planning on using 9 RCA panel mounts to connect the power center to the relay box.





kristina5014
Aren't you just copying everything from reefprojects.com and claiming it as your own?
plantarms
QUOTE (kristina5014 @ Jan 29 2010, 08:18 PM) *
Aren't you just copying everything from reefprojects.com and claiming it as your own?

wow that's kind of rude to say, did you even read the thread? (check post #11) yes i am designing an arduino based controller using the power center mod and relays that jener8tionx used to build his controller and i am asking him questions and getting help and suggestions along the way because i think he has made a great controller build. in fact i am looking at a lot of different controller projects and getting ideas from many different sources to build this project exactly the way i would like it. i don't think i claimed any ideas for my own, if there was a misunderstanding let me clear that up now

*This aquarium controller implements ideas from other sources
ajmckay
I personally like the controller jener8ionx put together and I've followed his page (though he hasn't updated it in a long time I think...).

Anyways, good progress. I'm still looking for cheap relays (fundage low). I was also planning on scoring some free stuff from sparkfun, but I tried to check out all morning and it kept timing out.

plantarms
yeah i think he has a really good build, and actually he updated the code recently and i've been getting help from him with the power supply. i know he is also selling some of the crouzet ssr's for about $7 each if that is what you are looking for, i know still comes out to a decent amount but better than the $45 new they usually cost. wait sparkfun had another free-day that i missed?!
ajmckay
Maybe I'll have to message him about those relays...

The free day was on the 7th of January 2010.
plantarms
QUOTE (ajmckay @ Jan 30 2010, 01:44 AM) *
Maybe I'll have to message him about those relays...

The free day was on the 7th of January 2010.

here is the link for the sale thread, i was a little off on the price, my bad. man i can't believe i missed free day at sparkfun, i am always getting things from there

http://reefprojects.com/w/phpBB3/viewtopic.php?f=5&t=125
plantarms
my idea is to connect the power center to the relay box using the 3 of the rca coaxial cables below. that would total 9 connections for the 9 wires and it would keep the wire guage consistant at 18awg. they would connect through rca panel jacks. wire in the cables is rg-6 18awg wire and is essentially a coaxial cable and it is rated for 75ohms and 3000v.

cable

cable rating

these jacks would be used only using the center conductor to connect the power
cptbjorn
RCAs aren't a good idea to carry AC line voltage because when you unplug them the tip is exposed and people are used to them carrying low voltage and won't even see the shock coming.

You could look into something like a molex mini-fit/micro-fit or AMP mate-n-lock. A circular connector would be even better but they are $$$, you might find one cheap on ebay though.
Pages: 1, 2

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Copyright © 2001-2012 Nano-Reef.com | Invision Power Board © 2001-2012 Invision Power Services, Inc.