wow guys thanks for the quick replies!! i figured since this thread had been asleep for a month i might have to poke the beehive a few times before anything happened haha...
So here's MY update. I realized my first problem is that i hadn't set the time in my rtc shield. So that made a big difference (obviously). now then, when i woke up the serial code at the end of the tank control pde... it was talking to me in.. i dunno, klingon maybe. But i DID get the times set, and get the arduino to turn on and off the lights at the correct interval. This is for a smaller LED string (for now) and I'm running it on the Meanwell 60-27P driver. I've notices that anything below ~300 for brightness in the program just turns the LED's off. above 300 is pretty bright, and then it just gets brighter. Was i under a false impression thinking that these guys (CREE XP-Gs) would dim quite a bit? or is the dimming function just to pinpoint your PAR readings at the substrate?? I would love to see this thing power a full sunrise simulation but as of now it's less "sunrise" and more "daybreak". let me know if you have any ideas, and again, thanks for the quick responses!!
I'm subscribed to this thread, so I get prodded when new posts show up. I assume the rest of these guys just spend all day on the forums...
I'm glad you got everything working. Did you set the clock using the Python script, or the time-set code? I guess the latter should still work, though the former is easier and more accurate (and allows you to reset the clock without having to re-sketch the Arduino. You should also make sure the time stays accurate across a power cycle: Pull the power to the arduino and RTC (leave the battery in though), wait about ten seconds, then turn it back on and make sure it still sets the lights the right way. The RTC should keep time fine during a power outage when configured properly.
The dimming issue is your driver. The XP-Gs (I have 6 each of Neutral White and Cool White over my tank...) allow linear dimming all the way down, and my code can dim to about 0.1% intensity (1/1023). The limitation regarding how much dimming you actually get is in the driver, though.
I use CAT4101 drivers on my board. The specs say they dim linearly to about 1% intensity and this is consistent with what I see in practice (I can dim below that, but it's not very smooth). Other drivers like the Meanwells are slower and only have linear dimming to a much higher cutoff. I recall the manufacturer telling me that the *P models (the ones with PWM) can only dim to about 11-12 % intensity. If yours cuts off at about 300, that's about 29%, which seems high.
If you don't mind experimenting a bit, try two things for me. Set your intensity to, say, 200 (a bit lower than you can achieve right now). Now, in the tank_control.pde sketch there is this on line 176:
Timer1.initialize(6666); // 150Hz PWM
That sets the frequency of your PWM output. I want you to try a few new values instead of that 6666 and see if your driver likes them better. Try 10000 first and experiment with the dimming, and then try 333. Those correspond to 100Hz and 3kHz respectively, the upper and lower frequencies that your Meanwell can handle (obviously you'll have to save and then upload the sketch again to the Arduino after each change). You might be able to eek out a bit better dimming using one of those settings. Don't expect miracles though, the Meanwells won't dim all the way down no matter what you do.
One more thing that may make a difference -- that 11-12% might be expressed as a percentage of *max* output. So if you aren't running the LEDs at full power during daylight anyway, turn the current knob on the Meanwell down all the way and then check. I bet that will give a bigger dimmable range...
Good luck and please let me know how it goes.