Aquastyleonline.com LED questions.

Referencing an outside voltage source for the dimmer on a maxwellen driver does not work. That's why I built an arduino with a digital pot to control them. Very cheap and very easy to do
 
Dread man, i had not been able to coment since i have been sick but wow bro your the man! will deff be heading to the Shack and pick up the adruino goods and start fiddling with it, im guessing you will have a shopping list for us ;)....

Thanks for all the hard work bud.
 
I'll make sure I have all the part #'s and where to source them. RadioShack doesn't carry digital pots unfortunately, so you'll be placing orders online regardless. I'll have direct links to the digikey items though so it'll be as easy as click a link, add to basket, and then checkout :)

and I also figured out a better setup for determining what position the dimmer should be at regardless if it lost power or not. I was just not thinking clearly while the super bowl was going... aka :beer:
 
hahah for sure man, I hear that.... was good game. Sounds good man looking forward to it for sure. Im ordering more LED's as well soon too approx another 40 to put me right around 60LED's per 24X24. I think it will be just the right amount of light(PAR) and spread combo i need to keep SPS anywhere int he tank not just the center mass of each opening. Looking forward to the shopping list!!!
 
I just built a small LED kit from aquastyle, great service from ray and crazy fast shipping too. i am seeing a blinking look of both white and blue LED's, and a sizzle type sound from the pot, is this cause the pot is cheap? is there a fix/solution. thanks, i figured this would be the best place to post as most of you guys are dealing in the same items as me.
 
double check your connections, did you solder the connections for the pot?
double check wiring, i had a similar issue and it was my connection to the dimmers.
 
i solered all the connections, seems weird both pots/drivers do the same thing. i will double check all solder connections tho.
 
http://i770.photobucket.com/albums/xx345/Dread240/75g reef tank/IMG_0321.jpg

http://i770.photobucket.com/albums/xx345/Dread240/75g reef tank/IMG_0320.jpg

http://i770.photobucket.com/albums/xx345/Dread240/75g reef tank/IMG_0319.jpg

There's the pictures of the control at least. This is built on an arduino mega as I plan on adding way more functionality as I go along, but an arduino uno or Duemilanove is perfectly capable of doing the lighting control functions. Of my arduino mega I have so far used the following pins

digital 53, digital 52, digital 51, communication 20, communication 21. That's all that's needed to make this work as the 6 channel digital pot is SPI interface and the real time clock works over I2C. Both communication systems can hold more items on the same channels too.

Grabbing Eagle tonight so I can make some decent circuit diagrams and yadda yadda. Try and make this as simple and easy to follow so anybody can do it.
 
Last edited:
I'm thinking of pulling the trigger on the 120 kit for my 120g 48x24x24 I'm thinking 60 blue 8 uv and 52 10K. Do you guys think this will give me good par and color around 15-20k. I plan on using 5 chanels with 24 leds on each.
 
Last edited:
the UV's are barley noticed unless you add alot. if i had to do it again i would not get them or get alot more.
 
Thanks to Dread now we have a way to control this kit, is anyone there trying to improve the colors of this kit??

Mine see really nice, but yellows are pale and blue is almost unnoticeable, anyone trying to mix other color temps??

I'm planning on add a few 4500k or 6500k to see if i can make those colors look beter.
 
Dread, thank you for doing this for all of us.:thumbsup: Subscribed.

Yes, thank you so much Dread. I can't wait to see it in action. Although I'm still gonna have to "Throw you under the bus"! You know you're about to make it impossible for me to not buy an arduino and get hooked on a new time sucking hobby. I have always loved electronic projects. If I even own one of these arduino things... I'm a goner... I just know it lmao It's ALL your fault! Kinda like slipping a recovering alcoholic a rum and coke and then taking him to the bar. ;)

Nick
 
Just an update for those following...

I'm not happy with the resolution of the ad5206. It's a great chip, and if we were looking at a high resistance needed (such as a 0-10v control) it would be amazing. Problem is I'm having to use such a huge difference on resistors to get it into the ranges we need (roughly 0-50ohms) That I'm only getting a couple good steps. It's not over yet though, I have a few ideas which I can try some of them this weekend.

First thing I'm going to do, or if somebody gets a chance with a larger pot before this weekend... is to find out the REAL resistance range we need. The pots shipped with the kit are 22ohm pots, however they don't fully dim the lights as most people have noticed. I need to bring my meter home again with like a 100ohm pot and find out where the current really stops dropping at. I'm thinking 50 ohms is about the target, but it may be 75 or 100ohms... Afterall they're cheap chinese drivers so who knows what they designed them at since we don't have datasheets.

Now, if the ad5206 doesn't work at all, we have the options of some i2c digital pots in the 1k ohm range. It will use up more pins on the arduino as you have to do a chip select wire for each, and they're only 1 channel a piece.

The cost goes up with this route, as instead of 1 $10 chip for all dimming circuits like I had planned, you'll need like 2-4 i2c pots per driver channel, at about $4 a piece. Coding becomes a nightmare on my part, but I have thoughts already on how to fix that without too much hassle. Also to make it easier if I end up going the i2c pot route, I'll have a batch of pcb boards made up to simplify things. I wasn't too worried with the 1 pot as it was pretty easy to just use a protoboard for it. When we start talking 8 ic's with individual chip select circuits and all, it'd be a lot more wiring which can just be negated with a nice, cheap, $10 custom pcb.

Of course, a whole lot of this could be avoided if somebody just made a freaking 100 ohm digital pot with linear steps, but I've yet to find one. Hell 32 steps would be enough to work in that range, but instead I'm right now contemplating 4 1k ohm dpots with 100 steps a piece. (that does give us 250 ohm max resistance and 400 steps of resolution down to 0-2.5 ohms, plus they all come down uniformly. Would be 8 total for blues and whites like I have mine setup.) With the 4 pots though, assuming we really only need 0-125 ohms, we realistically have like 200 steps, which is still some pretty damn good resolution :p

and just to boggle some minds for the people following along... I'll post my arduino sketch that I had written up already. If you had 0-10v drivers, this would be awesome for those LOL

Code:
#include <Wire.h>

#include <SPI.h>

#include <RTClib.h>

/*

 Dread240 reef aquarium controller project. Scope of controller to include full
 dimming and control capabilities for maxwellen 750ma constant current LED drivers,
 16 programmable 120vac relay, 3 BNC inputs for use in PH, ORP and Salinity monitoring,
 4 x 20 LCD screen for monitoring, temperature monitoring and control, top off functions
 and dosing parameters, and whatever else crazy gadgets I decide to come up with or get
 motivated to do 
 
 */

RTC_DS1307 RTC;

//slaveSelectPin is different on mega2560 boards. All other boards use pin 10 as slaveSelectPin
const int slaveSelectPin = 53;

/*
User Define Variables --- If using the ad5206 Digital Pot like I specified, the correct step amount
is 255. The variable is only in here so that if you opt for a different pot you can change it here and 
all the calculations will scale to new pot. Please note that you only set your start points for the fades
here, not the start and finish times. Your actual FINISH time will be your p#FadeOffStart + p#TimeToFade.
You do not have to fill in every variable. If you're only using 2 channels of the pot, you can simply input
your start times on that. Start and Fade times are ALL configured by what SECOND of the day you want it to
occur. If you want your FadeOnStart to be 12:00 (noon), your value to input here is 12hrs x 60 min x 60 sec.
The value to enter would be 43200. In a GUI you would see this as a time, but welcome to only working on the
code side of things. If you need more help pm me on reefcentral till I get the website going
*/

int potSteps = 255;
long p1TimeToFade = 0;
long p1FadeOnStart = 0;
long p1FadeOffStart = 0;
long p2TimeToFade = 0;
long p2FadeOnStart = 0;
long p2FadeOffStart = 0;
long p3TimeToFade = 600;
long p3FadeOnStart = 78000;
long p3FadeOffStart = 79000;
long p4TimeToFade = 0;
long p4FadeOnStart = 0;
long p4FadeOffStart = 0;
long p5TimeToFade = 60;
long p5FadeOnStart = 80350;
long p5FadeOffStart = 80550;
long p6TimeToFade = 0;
long p6FadeOnStart = 0;
long p6FadeOffStart = 0;


//Program Defined Variables ****do not touch****
int p1CurrentPosition;
int p2CurrentPosition;
int p3CurrentPosition;
int p4CurrentPosition;
int p5CurrentPosition;
int p6CurrentPosition;
int p1NewPosition;
int p2NewPosition;
int p3NewPosition;
int p4NewPosition;
int p5NewPosition;
int p6NewPosition;
long seconds_of_day;
long lastPrint;
long p1LastStep;
long p2LastStep;
long p3LastStep;
long p4LastStep;
long p5LastStep;
long p6LastStep;
long p1FadeOnEnd = (p1FadeOnStart + p1TimeToFade);
long p1FadeOffEnd = (p1FadeOffStart + p1TimeToFade);
long p2FadeOnEnd = (p2FadeOnStart + p2TimeToFade);
long p2FadeOffEnd = (p2FadeOffStart + p2TimeToFade);
long p3FadeOnEnd = (p3FadeOnStart + p3TimeToFade);
long p3FadeOffEnd = (p3FadeOffStart + p3TimeToFade);
long p4FadeOnEnd = (p4FadeOnStart + p4TimeToFade);
long p4FadeOffEnd = (p4FadeOnStart + p4TimeToFade);
long p5FadeOnEnd = (p5FadeOnStart + p5TimeToFade);
long p5FadeOffEnd = (p5FadeOffStart + p5TimeToFade);
long p6FadeOnEnd = (p6FadeOnStart + p6TimeToFade);
long p6FadeOffEnd = (p6FadeOffStart + p6TimeToFade);
long p1SecBetweenStep = (p1TimeToFade / potSteps);
long p2SecBetweenStep = (p2TimeToFade / potSteps);
long p3SecBetweenStep = (p3TimeToFade / potSteps);
long p4SecBetweenStep = (p4TimeToFade / potSteps);
long p5SecBetweenStep = (p5TimeToFade / potSteps);
long p6SecBetweenStep = (p6TimeToFade / potSteps);

void setup () {
  pinMode (slaveSelectPin, OUTPUT);
  Serial.begin(57600);
  Wire.begin();
  RTC.begin();
  SPI.begin();

  if (! RTC.isrunning()) {
    Serial.println("RTC is NOT running!");
    // following line sets the RTC to the date & time this sketch was compiled
    RTC.adjust(DateTime(__DATE__, __TIME__));
  }
} 

void loop () {
  DateTime now = RTC.now();

  seconds_of_day = now.second() + (now.minute() * 60L) + ((now.hour() * 60L) * 60L);

  /************* Conditional statements and controls for pot 1 *****************/

  if (seconds_of_day < p1FadeOnStart)
    p1NewPosition = 1;

  if (seconds_of_day > p1FadeOffEnd)
    p1NewPosition = 1;

  if (seconds_of_day >= p1FadeOnStart){
    if (seconds_of_day <= p1FadeOnEnd){
      if (p1NewPosition <= potSteps){
        p1NewPosition = (seconds_of_day - p1FadeOnStart) / p1SecBetweenStep;
      }
    }
  }
  if (seconds_of_day > p1FadeOnEnd){
    if (seconds_of_day < p1FadeOffStart){
      if (p1NewPosition != potSteps){
        p1NewPosition = potSteps;
      }
    }
  }

  if (seconds_of_day >= p1FadeOffStart){
    if (seconds_of_day <= p1FadeOffEnd){
      if (p1NewPosition >= 1){   
        p1NewPosition = (p1FadeOffEnd - seconds_of_day) / p1SecBetweenStep;
      }
    }
  }   

  if (p1NewPosition < 1){
    p1NewPosition = 1;
  }
  
  if (p1NewPosition > potSteps){
    p1NewPosition = potSteps;
  }


  //Send updated values to digital pot if a change is necessary
  if (p1NewPosition != p1CurrentPosition){
    digitalWrite(slaveSelectPin,LOW);
    delay(10);
    SPI.transfer(0);
    SPI.transfer(p1NewPosition);
    delay(10);
    digitalWrite(slaveSelectPin,HIGH);
    p1CurrentPosition = p1NewPosition;
    p1LastStep = seconds_of_day;
  }
  
    /************* Conditional statements and controls for pot 2 *****************/

  if (seconds_of_day < p2FadeOnStart)
    p2NewPosition = 1;

  if (seconds_of_day > p2FadeOffEnd)
    p2NewPosition = 1;

  if (seconds_of_day >= p2FadeOnStart){
    if (seconds_of_day <= p2FadeOnEnd){
      if (p2NewPosition < potSteps){
        p2NewPosition = (seconds_of_day - p2FadeOnStart) / p2SecBetweenStep;
      }
    }
  }
  if (seconds_of_day > p2FadeOnEnd){
    if (seconds_of_day < p2FadeOffStart){
      if (p2NewPosition != potSteps){
        p2NewPosition = potSteps;
      }
    }
  }

  if (seconds_of_day >= p2FadeOffStart){
    if (seconds_of_day <= p2FadeOffEnd){
      if (p2NewPosition >= 1){   
        p2NewPosition = (p2FadeOffEnd - seconds_of_day) / p2SecBetweenStep;
      }
    }
  }   

  if (p2NewPosition < 1){
    p2NewPosition = 1;
  }

  if (p2NewPosition > potSteps){
    p2NewPosition = potSteps;
  }

  //Send updated values to digital pot if a change is necessary
  if (p2NewPosition != p2CurrentPosition){
    digitalWrite(slaveSelectPin,LOW);
    delay(10);
    SPI.transfer(1);
    SPI.transfer(p2NewPosition);
    delay(10);
    digitalWrite(slaveSelectPin,HIGH);
    p2CurrentPosition = p2NewPosition;
    p2LastStep = seconds_of_day;
  }
  
    /************* Conditional statements and controls for pot 3 *****************/

  if (seconds_of_day < p3FadeOnStart)
    p3NewPosition = 1;

  if (seconds_of_day > p3FadeOffEnd)
    p3NewPosition = 1;

  if (seconds_of_day >= p3FadeOnStart){
    if (seconds_of_day <= p3FadeOnEnd){
      if (p3NewPosition <= potSteps){
        p3NewPosition = (seconds_of_day - p3FadeOnStart) / p3SecBetweenStep;
      }
    }
  }
  if (seconds_of_day > p3FadeOnEnd){
    if (seconds_of_day < p3FadeOffStart){
      if (p3NewPosition != potSteps){
        p3NewPosition = potSteps;
      }
    }
  }

  if (seconds_of_day >= p3FadeOffStart){
    if (seconds_of_day <= p3FadeOffEnd){
      if (p3NewPosition >= 1){   
        p3NewPosition = (p3FadeOffEnd - seconds_of_day) / p3SecBetweenStep;
      }
    }
  }   

  if (p3NewPosition < 1){
    p3NewPosition = 1;
  }
  
  if (p3NewPosition > potSteps){
    p3NewPosition = potSteps;
  }


  //Send updated values to digital pot if a change is necessary
  if (p3NewPosition != p3CurrentPosition){
    digitalWrite(slaveSelectPin,LOW);
    delay(10);
    SPI.transfer(2);
    SPI.transfer(p3NewPosition);
    delay(10);
    digitalWrite(slaveSelectPin,HIGH);
    p3CurrentPosition = p3NewPosition;
    p3LastStep = seconds_of_day;
  }
  
    /************* Conditional statements and controls for pot 4 *****************/

  if (seconds_of_day < p4FadeOnStart)
    p4NewPosition = 1;

  if (seconds_of_day > p4FadeOffEnd)
    p4NewPosition = 1;

  if (seconds_of_day >= p4FadeOnStart){
    if (seconds_of_day <= p4FadeOnEnd){
      if (p4NewPosition <= potSteps){
        p4NewPosition = (seconds_of_day - p4FadeOnStart) / p4SecBetweenStep;
      }
    }
  }
  if (seconds_of_day > p4FadeOnEnd){
    if (seconds_of_day < p4FadeOffStart){
      if (p4NewPosition != potSteps){
        p4NewPosition = potSteps;
      }
    }
  }

  if (seconds_of_day >= p4FadeOffStart){
    if (seconds_of_day <= p4FadeOffEnd){
      if (p4NewPosition >= 1){   
        p4NewPosition = (p4FadeOffEnd - seconds_of_day) / p4SecBetweenStep;
      }
    }
  }   

  if (p4NewPosition < 1){
    p4NewPosition = 1;
  }
  
  if (p4NewPosition > potSteps){
    p4NewPosition = potSteps;
  }


  //Send updated values to digital pot if a change is necessary
  if (p4NewPosition != p4CurrentPosition){
    digitalWrite(slaveSelectPin,LOW);
    delay(10);
    SPI.transfer(3);
    SPI.transfer(p4NewPosition);
    delay(10);
    digitalWrite(slaveSelectPin,HIGH);
    p4CurrentPosition = p4NewPosition;
    p4LastStep = seconds_of_day;
  }
  
    /************* Conditional statements and controls for pot 5 *****************/

  if (seconds_of_day < p5FadeOnStart)
    p5NewPosition = 0;

  if (seconds_of_day > p5FadeOffEnd)
    p5NewPosition = 0;

  if (seconds_of_day >= p5FadeOnStart){
    if (seconds_of_day <= p5FadeOnEnd){
      if (p5NewPosition <= potSteps){
        p5NewPosition = (seconds_of_day - p5FadeOnStart) / p5SecBetweenStep;
      }
    }
  }
  if (seconds_of_day > p5FadeOnEnd){
    if (seconds_of_day < p5FadeOffStart){
      if (p5NewPosition != potSteps){
        p5NewPosition = potSteps;
      }
    }
  }

  if (seconds_of_day >= p5FadeOffStart){
    if (seconds_of_day <= p5FadeOffEnd){
      if (p5NewPosition >= 0){   
        p5NewPosition = (p5FadeOffEnd - seconds_of_day) / p5SecBetweenStep;
      }
    }
  }   

  if (p5NewPosition < 0){
    p5NewPosition = 0;
  }

  if (p5NewPosition > potSteps){
    p5NewPosition = potSteps;
  }

  //Send updated values to digital pot if a change is necessary
  if (p5NewPosition != p5CurrentPosition){
    digitalWrite(slaveSelectPin,LOW);
    delay(10);
    SPI.transfer(4);
    SPI.transfer(p5NewPosition);
    delay(10);
    digitalWrite(slaveSelectPin,HIGH);
    p5CurrentPosition = p5NewPosition;
    p5LastStep = seconds_of_day;
  }
  
    /************* Conditional statements and controls for pot 6 *****************/

  if (seconds_of_day < p6FadeOnStart)
    p6NewPosition = 1;

  if (seconds_of_day > p6FadeOffEnd)
    p6NewPosition = 1;

  if (seconds_of_day >= p6FadeOnStart){
    if (seconds_of_day <= p6FadeOnEnd){
      if (p6NewPosition <= potSteps){
        p6NewPosition = (seconds_of_day - p6FadeOnStart) / p6SecBetweenStep;
      }
    }
  }
  if (seconds_of_day > p6FadeOnEnd){
    if (seconds_of_day < p6FadeOffStart){
      if (p6NewPosition != potSteps){
        p6NewPosition = potSteps;
      }
    }
  }

  if (seconds_of_day >= p6FadeOffStart){
    if (seconds_of_day <= p6FadeOffEnd){
      if (p6NewPosition >= 1){   
        p6NewPosition = (p6FadeOffEnd - seconds_of_day) / p6SecBetweenStep;
      }
    }
  }   

  if (p6NewPosition < 1){
    p6NewPosition = 1;
  }

  if (p6NewPosition > potSteps){
    p6NewPosition = potSteps;
  }

  //Send updated values to digital pot if a change is necessary
  if (p6NewPosition != p6CurrentPosition){
    digitalWrite(slaveSelectPin,LOW);
    delay(10);
    SPI.transfer(5);
    SPI.transfer(p6NewPosition);
    delay(10);
    digitalWrite(slaveSelectPin,HIGH);
    p6CurrentPosition = p6NewPosition;
    p6LastStep = seconds_of_day;
  }
  
  
  /* Serial Reporting to computer... inside an IF statement so that delay isn't used and hangs calculations on controller*/

  if (seconds_of_day >= (lastPrint + 3L)){
    Serial.print("seconds into day : ");
    Serial.print(seconds_of_day);
    Serial.println();
    Serial.print(now.month(), DEC);
    Serial.print('/');
    Serial.print(now.day(), DEC);
    Serial.print('/');
    Serial.print(now.year(), DEC);
    Serial.println();

    Serial.print(now.hour(), DEC);
    Serial.print(':');
    Serial.print(now.minute(), DEC);
    Serial.print(':');
    Serial.print(now.second(), DEC);
    Serial.println();

    Serial.print("Digital Pot channel and positiong reporting");
    Serial.println();
    Serial.print("Channel #1: ");
    Serial.print(p1CurrentPosition, DEC);
    Serial.print(" last step: ");
    Serial.print(p1LastStep, DEC);
    Serial.print(" Seconds Between Steps: ");
    Serial.print(p1SecBetweenStep, DEC);
    Serial.println();
    Serial.print("Channel #2: ");
    Serial.print(p2CurrentPosition, DEC);
    Serial.print(" last step: ");
    Serial.print(p2LastStep, DEC);
    Serial.print(" Seconds Between Steps: ");
    Serial.print(p2SecBetweenStep, DEC);
    Serial.println();
    Serial.print("Channel #3: ");
    Serial.print(p3CurrentPosition, DEC);
    Serial.print(" last step: ");
    Serial.print(p3LastStep, DEC);
    Serial.print(" Seconds Between Steps: ");
    Serial.print(p3SecBetweenStep, DEC);
    Serial.println();
    Serial.print("Channel #4: ");
    Serial.print(p4CurrentPosition, DEC);
    Serial.print(" last step: ");
    Serial.print(p4LastStep, DEC);
    Serial.print(" Seconds Between Steps: ");
    Serial.print(p4SecBetweenStep, DEC);
    Serial.println();
    Serial.print("Channel #5: ");
    Serial.print(p5CurrentPosition, DEC);
    Serial.print(" last step: ");
    Serial.print(p5LastStep, DEC);
    Serial.print(" Seconds Between Steps: ");
    Serial.print(p5SecBetweenStep, DEC);
    Serial.println();
    Serial.print("Channel #6: ");
    Serial.print(p6CurrentPosition, DEC);
    Serial.print(" last step: ");
    Serial.print(p6LastStep, DEC);
    Serial.print(" Seconds Between Steps: ");
    Serial.print(p6SecBetweenStep, DEC);
    Serial.println();
    Serial.println();
    Serial.println();

    lastPrint = seconds_of_day;
    if (lastPrint >= 86400){
      lastPrint = lastPrint - 86400;
    }
  }

}
 
I'm thinking of pulling the trigger on the 120 kit for my 120g 48x24x24 I'm thinking 60 blue 8 uv and 52 10K. Do you guys think this will give me good par and color around 15-20k. I plan on using 5 chanels with 24 leds on each.

Being no one else answered ill throw in my 2 cents. 120 leds on a 120 is way too much. Also the color config you have is probably going to give you around 10-12k. Go 2 blue for each white. I made that mistake with the 50/50 split and have had to add several blues. If i were you i would go with the 72 led kit and the money you save buying the smaller kit add either a figi purple t5 retro 2 bulb or a super actinic t12 retro. If going with the extra actinic bulbs then add a few more white but not too many more.
 
To add to it, I would not go with 72LED's no disrespect buddy, i jsut dont see the spread there with only 36 and if he spreads them out wider the PAR will not be there. I run 40 Per 24X24 opening in my 210G and I dont get fill from front to back of the glass. If i did it again i would go with 48 Per 24X24 area. This will allow for more PAR and allow for the LED placement to be a bit wider.

My current setup: 2" on center X 1.5X on center, if i went with 48 Per opening I'd go with 2X2 on center for spacing. That would be plenty of PAR and spread for his tank, so my suggestion is go with 96 total LED's, and run either the Heatsinks 19X8 or go with 5 C Channels, and do a 60/40(RB/CW) mix if you want 20k look. I would recomend you mix the LED's to get better color spectrum.

6500k, RB, UV(purple), Blue if possible. If you will mount the light higher than 11" use the 60* optics, if you mounting any lower than 11" use 80 on the inside and 60" on the outside of the light.

Hope that makes any sense lol.
 
Just pulled the trigger on a 90 kit to go over an upcoming 90g build I'm doing. Going to lose some of the whites and add in some 420nm violets I picked up and possibly a few pinks to round out the spectrum.

Pictures when i get around to building it.
 
Back
Top