Reef Central Online Community

Go Back   Reef Central Online Community > General Interest Forums > Do It Yourself
Blogs FAQ Calendar

Notices

User Tag List

Reply
Thread Tools
Unread 02/06/2012, 10:18 AM   #401
dread240
Registered Member
 
Join Date: May 2010
Location: Essex, MD
Posts: 979
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


__________________
BRB, Goldfish on fire
How much deeper would the ocean really be if sponges didn't exist?

Current Tank Info: 75 gallon mixed reef tank
dread240 is offline   Reply With Quote
Unread 02/06/2012, 03:09 PM   #402
MADtanks
Stix Anyone?
 
MADtanks's Avatar
 
Join Date: Sep 2004
Location: East Coast
Posts: 5,392
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.


__________________
M.A.D. 75G(36X24X20 E-Overflow) | DIY - LED/T5 | Tunze ATO | Eheim 1260 | Reef Keeper.... in progress

Current Tank Info: 24X24X20 AIO SPS Dom
MADtanks is offline   Reply With Quote
Unread 02/06/2012, 03:21 PM   #403
dread240
Registered Member
 
Join Date: May 2010
Location: Essex, MD
Posts: 979
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


__________________
BRB, Goldfish on fire
How much deeper would the ocean really be if sponges didn't exist?

Current Tank Info: 75 gallon mixed reef tank
dread240 is offline   Reply With Quote
Unread 02/06/2012, 03:48 PM   #404
MADtanks
Stix Anyone?
 
MADtanks's Avatar
 
Join Date: Sep 2004
Location: East Coast
Posts: 5,392
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!!!


__________________
M.A.D. 75G(36X24X20 E-Overflow) | DIY - LED/T5 | Tunze ATO | Eheim 1260 | Reef Keeper.... in progress

Current Tank Info: 24X24X20 AIO SPS Dom
MADtanks is offline   Reply With Quote
Unread 02/06/2012, 04:56 PM   #405
jayinh
Registered Member
 
jayinh's Avatar
 
Join Date: Nov 2008
Location: nh
Posts: 391
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.


__________________
Hi my name is jay and im a reefaholic
(pause) HI JAY

Current Tank Info: 60 CUBE, GEN1 RADION, AUTO WATER CHANGE BUILDER AT LARGE!
jayinh is offline   Reply With Quote
Unread 02/06/2012, 06:22 PM   #406
nemosworld
Registered Member
 
Join Date: Oct 2009
Location: Houston TX
Posts: 1,411
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.


__________________
Felix
Nice to meet you!

Current Tank Info: 60 Gallon Cube
nemosworld is offline   Reply With Quote
Unread 02/06/2012, 06:46 PM   #407
jayinh
Registered Member
 
jayinh's Avatar
 
Join Date: Nov 2008
Location: nh
Posts: 391
i solered all the connections, seems weird both pots/drivers do the same thing. i will double check all solder connections tho.


__________________
Hi my name is jay and im a reefaholic
(pause) HI JAY

Current Tank Info: 60 CUBE, GEN1 RADION, AUTO WATER CHANGE BUILDER AT LARGE!
jayinh is offline   Reply With Quote
Unread 02/06/2012, 08:15 PM   #408
dread240
Registered Member
 
Join Date: May 2010
Location: Essex, MD
Posts: 979
http://i770.photobucket.com/albums/x...k/IMG_0321.jpg

http://i770.photobucket.com/albums/x...k/IMG_0320.jpg

http://i770.photobucket.com/albums/x...k/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.


__________________
BRB, Goldfish on fire
How much deeper would the ocean really be if sponges didn't exist?

Current Tank Info: 75 gallon mixed reef tank

Last edited by dread240; 02/06/2012 at 08:21 PM.
dread240 is offline   Reply With Quote
Unread 02/06/2012, 11:58 PM   #409
MADtanks
Stix Anyone?
 
MADtanks's Avatar
 
Join Date: Sep 2004
Location: East Coast
Posts: 5,392
Nice Dread looking clean!


__________________
M.A.D. 75G(36X24X20 E-Overflow) | DIY - LED/T5 | Tunze ATO | Eheim 1260 | Reef Keeper.... in progress

Current Tank Info: 24X24X20 AIO SPS Dom
MADtanks is offline   Reply With Quote
Unread 02/07/2012, 06:00 AM   #410
CorbetJackson50
Registered Member
 
CorbetJackson50's Avatar
 
Join Date: Feb 2005
Location: nicholasville ky
Posts: 780
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 by CorbetJackson50; 02/07/2012 at 06:22 AM.
CorbetJackson50 is offline   Reply With Quote
Unread 02/07/2012, 06:33 AM   #411
jayinh
Registered Member
 
jayinh's Avatar
 
Join Date: Nov 2008
Location: nh
Posts: 391
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.


__________________
Hi my name is jay and im a reefaholic
(pause) HI JAY

Current Tank Info: 60 CUBE, GEN1 RADION, AUTO WATER CHANGE BUILDER AT LARGE!
jayinh is offline   Reply With Quote
Unread 02/07/2012, 08:53 AM   #412
CorbetJackson50
Registered Member
 
CorbetJackson50's Avatar
 
Join Date: Feb 2005
Location: nicholasville ky
Posts: 780
one concern I have is if I put 24 leds on a 40" you channel will it run too hot? How would you put fans on it to cool it?


CorbetJackson50 is offline   Reply With Quote
Unread 02/07/2012, 03:47 PM   #413
symon_say
Registered Member
 
symon_say's Avatar
 
Join Date: Apr 2011
Location: Dominican Republic
Posts: 556
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.


__________________
Bigger/more tanks don't give you knowledge, they just show you have the money...

ICH is overrated...

Current Tank Info: Designing a 200G
symon_say is offline   Reply With Quote
Unread 02/07/2012, 05:30 PM   #414
dread240
Registered Member
 
Join Date: May 2010
Location: Essex, MD
Posts: 979
heh, dread needs to stop working so much and get a few more things and polish some stuff to make this final :-P


__________________
BRB, Goldfish on fire
How much deeper would the ocean really be if sponges didn't exist?

Current Tank Info: 75 gallon mixed reef tank
dread240 is offline   Reply With Quote
Unread 02/08/2012, 10:56 AM   #415
BBOSS
Registered Member
 
BBOSS's Avatar
 
Join Date: Jan 2010
Location: Richmond Hill, Ontario, Canada
Posts: 14
Quote:
Originally Posted by dread240 View Post
Try and make this as simple and easy to follow so anybody can do it.
Dread, thank you for doing this for all of us. Subscribed.


BBOSS is offline   Reply With Quote
Unread 02/08/2012, 10:59 PM   #416
00Warpig00
Registered Member
 
00Warpig00's Avatar
 
Join Date: Sep 2011
Location: Schaumburg, IL.
Posts: 621
Quote:
Originally Posted by BBOSS View Post
Dread, thank you for doing this for all of us. 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


__________________
180G - 5 Yellow Tail Blue Damsels, Two Lined Sleeper Goby, Royal Gramma, Flame Angel pair, Yellow Stripe Maroon Clown, Pearlscale Butterfly, Australian Harlequin Tuskfish, Magnificent Foxface, Yellow

Current Tank Info: 180G FOWLR Established 10/2010
00Warpig00 is offline   Reply With Quote
Unread 02/08/2012, 10:59 PM   #417
dread240
Registered Member
 
Join Date: May 2010
Location: Essex, MD
Posts: 979
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 

#include 

#include 

/*

 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;
    }
  }

}



__________________
BRB, Goldfish on fire
How much deeper would the ocean really be if sponges didn't exist?

Current Tank Info: 75 gallon mixed reef tank
dread240 is offline   Reply With Quote
Unread 02/09/2012, 08:12 AM   #418
jwoyshnar
Registered Member
 
jwoyshnar's Avatar
 
Join Date: May 2009
Location: 18441
Posts: 1,531
Quote:
Originally Posted by CorbetJackson50 View Post
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.


jwoyshnar is offline   Reply With Quote
Unread 02/09/2012, 12:13 PM   #419
MADtanks
Stix Anyone?
 
MADtanks's Avatar
 
Join Date: Sep 2004
Location: East Coast
Posts: 5,392
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.


__________________
M.A.D. 75G(36X24X20 E-Overflow) | DIY - LED/T5 | Tunze ATO | Eheim 1260 | Reef Keeper.... in progress

Current Tank Info: 24X24X20 AIO SPS Dom
MADtanks is offline   Reply With Quote
Unread 02/09/2012, 05:46 PM   #420
Stusdesktop
Registered Member
 
Stusdesktop's Avatar
 
Join Date: Mar 2010
Location: Rochester NY
Posts: 192
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.


__________________
Pro Lurker, occasional poster

Current Tank Info: 90g LPS dominated
Stusdesktop is offline   Reply With Quote
Unread 02/09/2012, 11:59 PM   #421
00Warpig00
Registered Member
 
00Warpig00's Avatar
 
Join Date: Sep 2011
Location: Schaumburg, IL.
Posts: 621
Dread... you got my mind turning... I've been crunching some numbers for the last hour or so. I have an idea... not sure if it will work yet (I'm leaning toward yes it will at this point). I need to crunch more numbers but it's time for bed. I need to look at your code in your sketch to try to deduce some things too. I haven't done programming in a LONG time am just a programming hack and don't know how robust the arduino sketch language is... but if we can do basic math in a sketch (I assume we can) and compare some variables and make some decisions based on those comparisons and possibly add a time wasting loop/delay this may be workable. I cant think right now I'm fried, but I will look more into it tomorrow.

Nick


__________________
180G - 5 Yellow Tail Blue Damsels, Two Lined Sleeper Goby, Royal Gramma, Flame Angel pair, Yellow Stripe Maroon Clown, Pearlscale Butterfly, Australian Harlequin Tuskfish, Magnificent Foxface, Yellow

Current Tank Info: 180G FOWLR Established 10/2010
00Warpig00 is offline   Reply With Quote
Unread 02/10/2012, 12:23 AM   #422
00Warpig00
Registered Member
 
00Warpig00's Avatar
 
Join Date: Sep 2011
Location: Schaumburg, IL.
Posts: 621
Dread... just looked at your sketch. I'm not 100% familiar with the syntax of the sketch language yet but from what I do understand about it from looking at it for about 15 minutes I think what I'm thinking is workable in the software dept. A little more thinking tomorrow but I need sleep. I will come up with something as soon as I can to try to communicate my idea so everyone can pick at it... I think i will have to come up with a rough outline that resembles a program/sketch with my limited programming experience and see if we can hammer things out. Are there multi channel I2C digital pot chips that contain either 2 or 4 channels per chip and are 1K ohm? I didnt search hi and low cuz it's late but from your writings above you may have found some 1K I2C's

Nick


__________________
180G - 5 Yellow Tail Blue Damsels, Two Lined Sleeper Goby, Royal Gramma, Flame Angel pair, Yellow Stripe Maroon Clown, Pearlscale Butterfly, Australian Harlequin Tuskfish, Magnificent Foxface, Yellow

Current Tank Info: 180G FOWLR Established 10/2010
00Warpig00 is offline   Reply With Quote
Unread 02/10/2012, 04:09 PM   #423
want2reef
Registered Member
 
want2reef's Avatar
 
Join Date: Mar 2003
Location: Tracy CA.
Posts: 1,353
Just placed my order... Will keep you guys updated on how it goes.

Oh ya, 24 Royal blues 6 10000K 6 6500K.
If I end up liking them, I will be ordering more.


__________________
Kevin

The early bird may get the worm, but the second mouse gets the cheese.

Current Tank Info: CADlights Artison II 165g, 50g sump,Aquamaxx Q-3 Skimmer, AI Hydra 26 HD.
want2reef is offline   Reply With Quote
Unread 02/10/2012, 06:17 PM   #424
jwoyshnar
Registered Member
 
jwoyshnar's Avatar
 
Join Date: May 2009
Location: 18441
Posts: 1,531
Quote:
Originally Posted by want2reef View Post
Just placed my order... Will keep you guys updated on how it goes.

Oh ya, 24 Royal blues 6 10000K 6 6500K.
If I end up liking them, I will be ordering more.
you will like them. I said the same thing. I am ordering more soon.


jwoyshnar is offline   Reply With Quote
Unread 02/10/2012, 08:18 PM   #425
dread240
Registered Member
 
Join Date: May 2010
Location: Essex, MD
Posts: 979
I need to call mouser sometime next week (or tomorrow if they're open). They have lots of chips in the ranges I'd really like for this project, but when pulling up datasheets it all says they're different resistances and like 10k ohm end to end on the coil.

The other idea I'm toying with right now too is resistor arrays, but I've never played with one of those before andthe main company I saw 'bourns' website was down


__________________
BRB, Goldfish on fire
How much deeper would the ocean really be if sponges didn't exist?

Current Tank Info: 75 gallon mixed reef tank
dread240 is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On


Similar Threads
Thread Thread Starter Forum Replies Last Post
One last LED question MrGeoReefer Do It Yourself 4 06/13/2011 01:32 PM
DIY led question puck3 Do It Yourself 7 03/22/2011 10:08 AM
URGENT, about the nano rapid led kit. a44007 Lighting, Filtration & Other Equipment 5 12/27/2010 01:02 AM
NEW LED FIXTURE COMMING, NOW WHAT? help ? a44007 Lighting, Filtration & Other Equipment 6 12/26/2010 01:20 PM
One quick DIY LED question Impossible Do It Yourself 4 10/27/2010 09:50 AM


All times are GMT -6. The time now is 06:30 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Powered by Searchlight © 2024 Axivo Inc.
Use of this web site is subject to the terms and conditions described in the user agreement.
Reef CentralTM Reef Central, LLC. Copyright ©1999-2022
User Alert System provided by Advanced User Tagging v3.3.0 (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.