Controlling and dimming outlets for aquarium lights

I have two of these lights: http://innovative-marine.com/skkye-light/clamp-8-watt-white.html specifically model 6106

Each light comes with two non-dimmable drivers, one for the day and one for the night lights.

I have an arduino R3 with a LCD Keypad Shield from SainSmart. I want to be able to control all my outlets so I can turn anything off when I want to or with a timer. I'd also like to display a time/water readings from a few sensors on the LCD screen. I'd also like to make my LED lights dimmable in order to program sunrises and sunsets.

I'm currently looking at this for an outlet setup:
http://www.mikerags.com/node/24

But I don't think that helps as far as dimmability.
I'm fairly new to electronics as far as circuitry and making my own circuits, but programming is more my expertise.

Overall, here is my goal:

Control 7 outlets:

  • 4 of which control the lights (2 outlets day/2 outlets night)
  • 1 pump
  • 1 skimmer
  • 1 heater
    Make LED lighting dimmable in order to program sunset/sunrise and clouds/storms
    Read a temperature sensor

Can I do all this with a R3?
My biggest concern is making the LEDs dimmable and if it's even possible.

I'm looking at this to get for keeping real time:

And I'd prefer to get a pre-made board than making my own, simply because I know it'll work and not blow something up or electrocute myself with 120v.
I was looking at this:

but I don't think that's what I need...

Also looking at possibly these for dimmable drivers, but I don't know if these will work with arduino. The 27P works for 5-8 LEDs. Each light has 6 Day LEDs and 4 night LEDs. The more I think about it, I'm curious if I can run both days (12 LEDs) I could use 48P for both and the 27P for the nights (8 LEDs), though I have no idea if it would work wattage/voltage wise.
http://www.rapidled.com/dimmable-drivers/

Any advice on where to start or any tutorials for something like this I can run through?
Thanks in advance!

The "R3" is a version.
I hope you have a Arduino Uno (version R3), that is the most common Arduino.

The outputs and sensors can be handled by the Arduino Uno.
The DS1307 is a very common chip for time and date.
Also the relay shield is okay, but you need 12V. There are also relays for 5V.

To be able to dim the leds, you have to know what is inside.
Is it only leds, or also resistors and capacitors ?
Are those rapidled dimmers compatible with the skkye light leds ?

Normally the Arduino uses PWM to dim leds.

But you have to be sure that the leds can handle a PWM frequency of about 450Hz.

I'm looking at this to get for keeping real time:
http://www.amazon.com/SainSmart-DS1307-AT24C32-Clock-module/dp/B006J4FZW4/ref=wl_it_dp_o_pC_S_nC?ie=UTF8&colid=CJR7UR57UTOI&coliid=I2MTJDEUDQUMA6

Search for DS1307 on EBay. $24 seems about $18 dollars too much.

Yes, sorry, forgot to add the "Uno" :stuck_out_tongue:

I honestly don't know what kind of LEDs are in the lights...
Only thing I can find is that Days are 1w and 350mA
Nights are 1/2w and 60mA

I have no idea if the rapidLED drivers will work with the LEDs and I don't really know how I can find out.
Sorry, this probably isn't really helping anything, and it doesn't help that I don't really know a lot about circuits.

My other idea is to just get rapidLED LEDs...

Search for DS1307 on EBay. $24 seems about $18 dollars too much.

Still too much. They are 2 dollars or 1.50 euros (total actual costs).

Those leds are a problem. Bare leds need a constant current. And lights with a rectifier and capacitor or other circuit inside cannot be dimmed with PWM.

I figured as much... Well, I should be able to at least control the outlet for on/off. Perhaps that'll be easier to tackle for starters, then I'll work up to getting dimmable LEDs.
Would the relay board I found on amazon work or would you suggest a different board to relay 120v wall outlets?

If you have 12V, use the 12V relay.
If you have 5V, search for : relay shield 5V
The 5V from the Arduino Uno is not enough to power a few relays.

A relay shield with four 12V relays is about 8 dollars on Ebay.

Yea, just noticed the voltage differences.
I found this:
http://item.mobileweb.ebay.com/viewitem?itemId=300749445346
Since it's 5v, it should work fine with the arduino right?

Both the 12V relay and 5V relay will work with the Arduino.
They both have inputs of a 5V digital signal to switch the relays.

It depends on what kind of power supply you rather would like to use.
If you have 12V, use the 12V relays.
If you have 5V, for example from an adapter or DC-DC converter, use the 5V relays.

5V signals from the Arduino should work with either of those boards. The difference is that the 5V board needs a 5V power supply (on the VCC pin) to drive the coils and the 12V board needs a 12V power supply. There should be about a 30% leeway though; e.g. a 9V supply should still work with the 12V board.

Here's a tutorial for relay boards.

Note that your 8 relay board has optoisolation (the small, black, 4 pin rectangles on the board). The 4 relay board does not. See above tutorial for more details on that.

(overlapping Krodal's reply but too lazy to adjust the parts of mine that restate what he said :wink:

Thanks for the help and the tutorial. I ordered a real time module (ended up being 3$ including shipping, haha!) And the 8 channel relay.

The tutorial helped a lot too! Although it did raise a question. When I hit the relay to switch off to on, the and vice versa, the article spoke about a build up of electricity and a sudden brief burst to my electronics, which I don't really feel like replacing if I fry. Is there a way to prevent that surge or at least reduce it to a safer level? Or does it really not matter as much?

Endevor:
When I hit the relay to switch off to on, the and vice versa, the article spoke about a build up of electricity and a sudden brief burst to my electronics, which I don't really feel like replacing if I fry. Is there a way to prevent that surge or at least reduce it to a safer level? Or does it really not matter as much?

Yes, back EMF does matter and will occur strongly in any type of coil that is switched off rapidly.... but these boards already include a diode to take care of that.

This sounds like it should be fairly easy then. Thanks to everyone for the help, I'm just waiting for parts to come in from China now. Hopefully this will come together without a hitch.

Chagrin:

Endevor:
When I hit the relay to switch off to on, the and vice versa, the article spoke about a build up of electricity and a sudden brief burst to my electronics, which I don't really feel like replacing if I fry. Is there a way to prevent that surge or at least reduce it to a safer level? Or does it really not matter as much?

Yes, back EMF does matter and will occur strongly in any type of coil that is switched off rapidly.... but these boards already include a diode to take care of that.

Hello everyone. I am having a similar problem.
I am using an Arduino Mega 2560 to control several PWM LED Drivers and a 8 channel relay board for my wavemaker and heater. Whenever one of the relays disengages, I get a blink on LED lights. I believe this is caused by the surge produced when the relays discharge. On the relay board you talk about above, I see where each relay has a D1, D2, D3, etc .... Is this the diode across the coil that is needed for surge suppression?

I have this Relay Board and I don't see D1, D2, D3, etc, next to each relay. So I assume I don't have surge suppression :frowning: http://www.ebay.com/itm/110983062639?var=410149497719&ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

I would rather find a 12vdc 8 channel relay board. Any thoughts on which board I should use with a diode suppression? I found this one on eBay and each relay has a D1, D2, D3, etc .... Is this the diode across the coil that is needed for surge suppression?
http://www.ebay.com/itm/221207713757?ssPageName=STRK:MEWAX:IT&_trksid=p3984.m1423.l2649

Thanks everyone
Billy

On your relay board, the second largest-sized chip on that board marked "M7" on it is the diode. The stripe next to the "M" indicates the cathode, FWIW.

With respect to your LED blinking problem I would bet that it is the driver itself (assuming it's an AC driver?) acting inappropriately. Can you provide more details on that driver?

Chagrin:
On your relay board, the second largest-sized chip on that board marked "M7" on it is the diode. The stripe next to the "M" indicates the cathode, FWIW.

With respect to your LED blinking problem I would bet that it is the driver itself (assuming it's an AC driver?) acting inappropriately. Can you provide more details on that driver?

So what you are telling me is that my board has the diodes on them for surge suppression? Now I'm more confused about what could be causing this.

Here is my drivers

http://www.meanwell.com/search/LDD-H/LDD-H-spec.pdf

Thanks for your help.

Do your LEDs blink if you stop/start a high current appliance (e.g. a vacuum cleaner) on the same circuit?

Chagrin:
Do your LEDs blink if you stop/start a high current appliance (e.g. a vacuum cleaner) on the same circuit?

No. It only reacts when the relays discharge. I have a 48 VDC 5A power supply to run my LED drivers and a 12vdc 3A power supply to run my arduino and cooling fans. I am using a 5v regulator that stepsdown the 12vdc to give power to my relay board. In order for all PWM drivers and fans to work, everything is on a common ground. I think I might have to isolate the relay board with its own 5vdc power supply that doesn't share the same common ground. I don't know if I can do that since my relay board doesn't have the VCC JD-VCC jumper on it.

This is my basic setup. I have added a few thing since this pic.