Go Down

Topic: My Arduino Aquarium Controller (Read 41696 times) previous topic - next topic

Dimitris

Very nice project. I was working on something similar and would love to see your progress.

I just wanted to make a suggestion. One of the main stress factors for fish and corals is instant light switching. How do you control your light-cycle? Simple timers?
Instant turning on and off of lights? This might be scaring the sh$& out of them and might reduce their life.

Now as I have seen, you are using Metal Halide lamps, which I don t know if they are dimmable.
My project used a dimmable ballast for fluorescent lamps and simulated dusk and dawn. You can use something like that to bring the light up initially, and then when it is on its peak, fire up the metal halides. The reverse at night for killing the lights.

The results from this was that my fish where far more social and active, even with people on the front glass.
Plus the aquarium looks soooooo cool when the device is simulating dusk/dawn. I can t even imaging how cool a reef would look with two dimmed actinic and daylight tubes.

@GregL, well I just got around to hooking up and testing the I2C module with the lcd. The good news is that it's completely different than the one from web4robots.

I'm working on changing the lcdi2c library that's out there so it works. So far I can get it to turn on and clear the display etc. Still haven't gotten printing to the display working yet, but I'll let you know.

Why oh why did web4robots disappear? All this extra work sucks.

ill_switch

Andrew,

Looking forward to seeing your board. I've thought about doing something very similar.

What sort of a tank are you running those luxeon LEDs over? I'm likely using LEDs for the main lighting on all my reef tanks for the foreseeable future, and have a driver designed around the OnSemi NCP3066 that I'll be using. Perhaps not as simple as a linear reg like you're using, though.

For those looking for an I2C LCD driver, there are a few other vendors selling them, including this place:

http://www.spikenzielabs.com/Catalog/

I have no experience with them, but figured it was worth mentioning since it seems people are looking for this functionality.

I'm considering just using an I2C slave RBBB attached to the LCD in parallel (with the LiquidCrystal library to control it). This will cost about the same as a dedicated driver, but also give me extra PWM pins, analog in pins, etc. though of course there will be a fair amount of coding to do. . .

Right now I've got a 75 Gal. saltwater tank with a lonely tang in it.

I was going to use a fancier led driver, but since the led's are 5 watts each and i'm hooking 5 in series per driver the wasted energy amount to only about 1% per driver which is fine by me. I kind of want to balance cost with function so the lm317 is a good choice for me.

Thanks for the i2c lcd driver link. If there's a library written for it I'll probably get them from there instead.

I can't wait to finish the board and get it built too. I had it finished twice already, but decided to add in more stuff. I'll keep you guys posted and might need some help.

Oh yeah, before I go... I found the coax connectors for PH and ORP sensors so you don't need to cut cut off the connector  :)

@ill_switch, do you have a schematic of the NCP3066 circuit you're using? I was looking around and it's designed to drive the high power LED's. Why are you using it over an LM317? For me the lighting is the most important part of the project. This whole thing started because I got sick of replacing 4 T5's every year lol.

ill_switch

No schematic right now, but if you were really interested I could get one, or at least walk you through it. It's a very flexible chip, and the reference designs in the datasheet (plus the application note they publish) are pretty good.

I'm using it in boost topology, since that gets a few more % efficiency and works better with some of the other components I'm using. The one problem with boost is that the "full off" state from the PWM signal translates to the base voltage of the power supply going through the LEDs, so the dimming range is chopped off at the bottom end - you can't turn them down any farther than about 10% brightness. I have it driving 8 HB LEDs from a 24V DC supply, so it's better than some of the commercial solutions. Lotsa reef people are using buckpucks, which will drive 6 LEDs each from a 24v supply (in buck mode, of course) and cost $15 - $20. This driver is costing me about $6 in parts and drives more LEDs.

I'm right with you, the lighting is one of the main reasons I'm doing a controller. I have the arduino fading three separate banks of LEDs up and down to simulate sunrise and sunset (plus the sun moving across the sky, to an extent, since the banks are oriented as east, center, and west.) Right now, I'm working on coding a "storm simulator" such that every few days, the lights dim for a random period of time, to imitate cloud cover. Next up is a moonlight that will simulate a 20-day lunar cycle.

All that said, I'm trying to figure out if paralleling output pins from a TLC5940, and using them to drive an external transistor, would allow me to drive HB LEDs directly from the TLC. I was going to use one as a PWM port expander to let me control more channels of LEDs, but if it can drive the LEDs without the NCP3066 circuits, that's even better.

Well, I printed out the datasheet last night and went over it. The calculator they have is pretty cool as well. I think I'm going to stick with the LM317's though because the NCP3066 is 92% efficient while the 317 circuit is around 88 - 90% efficient. I'm driving 7 led's per driver from 22.75 volts (after 317 drop) at 1.25 amps ~3.2 volts. The other reason is I wouldn't need to add on a separate led bank to do moonlight because I can dim the full range.

I figured I'd give a little bit of an update as well since I've been busy with the board the last few days.

the DS1307 RTC is now onboard so no need to buy one.
Also added in an eeprom chip to store values (in case of power outage the aquarium doesn't screw up).

Got the board almost routed so it can be done with 1oz copper instead of 4oz (led driver traces are giving me headaches)

Giving up one float sensor in favor of a salinity (conductivity) sensor. I need to order the parts and breadboard it still, but I want it more than the second float.


I have a question for those who are smarter than me. The PH/ORP/Salinity sensors all need a dual power supply. Currently I have been using a TLE2426 in a virtual ground circuit. It's a rail splitter that provides the reference. Last night I found a negative voltage regulator and my question is this: which is better? I'm assuming the negative regulator will give me a true dual power supply, but is that better than using a rail splitter? Any help would be appreciated since I don't have that firm of a grasp on opamps yet.

GregL

Hi Andrew,
im just back from holiday and apparently my byvac adaptor is in the office awaiting me..
Did you manage to get the LCD working? I see on your DIY Labs page you have created a library for a keypad, but what about the LCD?

Awesome work by the way....im an utter beginner with this stuff so really appreciate everyone on here's efforts...one day i hope i can contribute.


Hi Greg,

I did manage to get the LCD working. I should have googled around first because a guy named John Crouchley already developed one.

You can find it here:

http://john.crouchley.com/blog/archives/264


Controllers coming along pretty nicely. I can set the temp and date through the keypad. LED's are slowly getting soldered together and man they are blinding.

GregL

Hi Andrew,

Thanks again mate. I grabbed that library and its working nicely!.

Ive grabbed the assistance of a mate at work to help put my code together - but will start a new thread ( once ive at least tested it! )

I still need to add the setting date and temp via the keypad - are you ready to share your code by chance? either here or on your blog?

Hi Greg,

I did manage to get setting the temp and time working (as well as be able to set it). I posted it on my blog:

http://www.diy-labs.com/aquaduino/arduino-aquaduino-code-rev-01

The * button goes to a config screen and # button shows you the settings. I'll make a video and put it up on the blog too.

Temp goes in as 4 digits last two (79.50 = 7950). I've added in some code to make sure you can't enter 100 degrees and stuff.

All the date params can be set except seconds and day of week. Seconds I don't really care about, but day of week could be useful in dosing etc.

One thing about the date. When putting in a day less than 10 you have to put in the leading 0. Not sure why yet because I haven't looked at the code in 2 weeks (since I got the temp working). I bought non zero crossing SSR's so my progress has slowed until I have money to buy more.

Anyways, hope this helps you.

squartochi

Hi, This is my first post here. I would like to do a project like this but I have a couple questions. Does the Arduino have enough memory and connections to add Ethernet and if not what would have to be done to achieve this.
Thanks

It does have enough memory for ethernet. Check this out:

http://www.makershed.com/ProductDetails.asp?ProductCode=MKSP7&Click=19212


Lil B

any way to get the keypad on the bv4218 to interface with the aquadino code you have written, Andrew?

Not as of yet. It's too hard for me to try and debug code when I don't have the hardware.

I'm going to order another i2c module and a keypad so I can finish that library.

On the flip side, I got the code for automatic lights working. All I need to do now is breadboard the sensors and than I'll probably release a shield :).

The goal for the shield is to be in modules I think . That way as you get money you can just add on. ie. the BNC connectors are $4 a piece so it drives costs up.

Anyways, I'll be working on the code in the near future.

Go Up