Building an Aquarium Controller <Help Needed>

All;

I’ve seen some people trying to build an aquarium controller so I thought I might as wlel give it a try :smile:
and ofcourse, i met my first problem…

dimmable LED drivers…

i have seen some of the other topics as well, but they don’t seem very well documented.

so i have the spark, i know i will need PWM and a PWM controller but what to do next?
what kind of drivers do i need? i have no clue regarding the hardware that i need honestly, i see small and large drivers, people with 2N2222 parts and i am now lost…

I’ll try to publish everything i do including a hardware manual for people that want to build their own :slight_smile:

Alright, let’s do this.

Couple of questions:
Dimmable LEDs: Do you want RGB? What’s your budget? Do you want to buy strips or build your own strips? Do you even want strips (of LEDs)? How many LEDs do you want? Will they be submerged or above the water line under the top of the Aquarium?

Once those questions are answered I can help you some more!

1 Like

thanks!

i currently have a (dimmable) LED Driver which i assuma i cannot reuse. it’s a no-brand driver, model number JNY-L2736B which outputs 27-45 volts at 600ma. it is connected to a dimmer.

the LED’s i’m using are LED strips, 24 volts (have to confirm).
for daylight, I have 12 LED Strips, 2 Watt’s each.
for night lighting, i have 3 LED strips, 2 WAtt’s each.

they are above water.

what i want to accomplish is connecting them to a spark core, then being able to dim them, simulating daylight rising and daylight dimming. same with night light.

i will also connect temperature sensors and displays, but those are all well documented.

As for the LED Driver I assume you mean: http://www.hktdc.com/suppliers-products/Street-Lighting-Waterproof-LED-Power-Supply/en/1X08DPIF/2390593/

Can I also get a link to the LEDs you have?

Given the high voltage requirement it might be easier to go with something like a neopixel strip (http://www.adafruit.com/product/1138)

1 Like

correct that is the one! I am currently using LED’s in a serie, that are similar to these http://www.wayjun.com/index.php?main_page=product_info&cPath=53_194&products_id=648&zenid=c2k2adgck6kom9ba6vkqta8126

i am not married to either the LED’s or the driver… if there is a better dimmable solution i would be open to that. unfortunately I cannot seem to find a decent solution.

How big is your aquarium? The neopixels I linked to should work fairly well for most residential aquariums. Have a look at that and get back to me? It’s the last link I posted

I agree with @harrisonhjones that neopixels are much easier to power, they are quite bright and their color easily controlled. There are existing libraries and the interface requirements are a single resistor and a level shifter if extra long strings are used (I drive 240 neopixels with no level shifter. :smile:

1 Like

(@harrisonhjones) Wouldn’t regular RGB strips suffice for this purpose? You can get them waterproof and they’re remarkably cheaper. I’m not saying I don’t like the neopixels, but I’ve got a feeling those fishes won’t need fancy animations as much as they do require a certain color.

@Moors7, it’s two-wire control (neopixels) versus LED driver hardware and PWM for LED strip. Simple and a bit more costly versus more complicated and a bit cheaper. :smile:

1 Like

I think either would work. A quick ebay search seems to return more addressable strips then non-addressable.

The non-addressable ones are cheaper but require a little more work, you need your own LED driver as @peekay123 said.

Here’s an example of an addressable 5 meter addressible strip for $40 shipped: http://www.ebay.com/itm/WS2812B-WS2811-RGB-LED-Strip-5M-150-300-Leds-60LED-M-Individual-Addressable-5V-/231105154168?pt=US_String_Lights_Fairy_Lights&var=&hash=item35cef0cc78

A 5V power supply to supply both the Spark and the string is easy to find. The neopixels require 60ma each at full brightness (white) so for 300 LEDs you would need an 18A or more supply (20A supply is about $25). A one meter string with 60 LEDs costs $20 and you only need a 5V 4A (5A supply is about $12) supply to power both the string and the Spark. You can even cut the string into smaller pieces so you have a lot of options. :smile:

apologies for my late reply;
i did some reasearch in the LED strip and unfortunately, that will not work.
seems i am married to the LED’s anyway.
they have to be this specific kind of high wattage high power LED’s or else the plants and fish will become quite unhappy.

so the LED strip will not work.

i can change the driver, but not the LED’s…

so now I guess i need a dimmable driver, but what I don’t understand is how to dim my driver using a SPark Core. I am thinking something like an electronicaly changeable resistor but no clue how to call such a thing.

I could be terribly mistaken, but some LED strips have an output of 18W/m. Seeing as those things are generally only 1cm wide, you could put multiple strips next to each other, increasing the output.

A dimmable driver can be bought, or made. Dimming LEDs is doing via Pulse Width Modulation (PWM). By quickly alternating between on/off it appears to be more or less bright, thus dimming it. Luckily, the Spark has several PWM pins which can be used for this very purpose. analogWrite is to be used for that, which gives you a range of 0-255 colors.
You can’t really dim an LED with a variable voltage, since it more or less a boolean switch, being either fully on, or fully off. That’s why you use the PWM to trick your brain into seeing less light, while it’s actually the same amount, but for a shorter period of time.

well, i talked to the aquarium guy and he tells me there is something with the color and the brightness that makes me stuck with the current LED’s…
honestly, when it’s about expensive fish, i don’t really want to experiment :wink:

ok, PWM sounds like a plan, but i can’t just simply feed 24 volts through the spark i guess?

do i need like a coupling circuit or something?

Then you’d better take his word for it, since I’ve got no clue when it comes to fish.

24V will most certainly fry your Core (been there, done that, wasn’t fun…)
You can use transistors to switch the 24V for you. These can be driven by the Core’s PWM pins.
Adafruit has a nice tutorial on this, which can be found here: https://learn.adafruit.com/rgb-led-strips/usage simply replace the LED strip with your LED, and you should be good to go :slight_smile:
Mind the power requirements though, since they can be significantly different for your LEDs compared to those strips.

no, you definitely CAN’T feed 24 volts through the spark core! DO NOT TRY THAT

I imagine you will need some kind of “Switch” between the LED driver you already have and the LEDs. The switch would be driven by the Sparkcore at different frequencies using PWM. I imagine he could use something like a motor driver could he not? Would a simple H-bridge suffice? Electronics aren’t my strong suit so someone else is going to have to chime in. I don’t want to accidentally give you advice which blows up your core/leds

1 Like

To drive 24V PWM from the Spark you can use a MOSFET. I just googled Arduino MOSFET and got this. It’s 5A at 24V max (you need 1A), but there are better ones, or you can easily make one yourself. It’s basically an N-channel MOSFET and 2 resistors switching the negative side of the LEDs so the 24V is only powering the positive side. There’s no choke or capacitors on this one, so a very low level may have noticeable flicker.

so, update from my side;
I’ve ordered a couple of NPN’s. hope to get them middle of the week.
my thought is to use one for the night light, one for the day light, using two PWM ports.
i’ll keep you updated :slight_smile:

Have you considered the specific colors fish/plants require? I remember reading somewhere that at night it’s best to provide them with blue light, as to imitate the sun. Something to do with their circadian rhythm.

yes, which is why i am married to the LED lights i have :wink:

they are high intensity white ones during the day, and high intensity blue ones during the night. the dimming is to simulate the natural cadence of slowly getting the light brighter and brigther.