Neptune Apex Seasonal Lighting Table for EcoTech XR Series

samba_dad

Active Member
View Badges
Joined
Jun 6, 2014
Messages
474
Reaction score
154
Location
Huntsville, Alabama
Rating - 0%
0   0   0
In this post, I am trying to describe what I have done to apply seasonal light timing to a complex Radion lighting profile. I had recently switched my tank temperature to use the seasonal table, and was very interested in doing something similar for my Radions which were already using a complex lighting profile. The temperature seasonal table implementation is much much easier than the lighting profile. I am hopeful this post will provide some additional useful information that was not captured in other posts (at least not in a way obvious to me) and help others wanting to setup a complex lighting profile based on seasonal tables. Up to now, I have used the Radion profile shown in the first image below. To implement most of the original Radion lighting profile, I used a total of 11 profiles (see below for more specifics). The profiles are setup in the Apex Web Interface (not Fusion) with 2 additional profiles for clouds and storms (left identical to the first post from RussM in the Neptune forums). Note: I may either remove the storms or dramatically reduce the lightning intensity due to not wanting to freak out my fish and cause them to jump and injure themselves. Below are the steps I followed....

1) I created an Excel table to translate my existing Radion profile to a format helpful in converting fixed times to "if sun (delta from sunrise)/(delta from sunset)" statements. The Excel table allowed me to more easily list the color temperature using CW, B, RB, G, R, UV settings, starting and ending light intensities, ramp times, and implement a calculation for the delta time parameters in the "if sun" statements. My Excel table is shown below. Note that in my table, the start/end times will have no meaning once I switch to the seasonal table but were used for me to double-check my computations for the delta times. I pulled up the seasonal table with the Apex Web Interface and saw the sunrise time was roughly 06:30 and the sunset time was roughly 19:30 for end of May. Referencing these times provided a sanity check for me in setting up the delta times for the "if sun" statements. Also, I obtained the CW,B,RB,G,R,UV color settings, starting and ending intensities from the original profile using the wizard from the WXM Radion module outlets (see Radion lighting profile image below). Also, I simplified my lighting profile slightly to make programming with the seasonal table a little easier. My previous Radion profile extended past midnight and I was not sure if this would work in the Apex "if sun" statements. Note that at this point, I have not adjusted my seasonal table times to local/preferred times as RussM suggests. I am just adding deltas to the if sun (delta from sunrise)/(delta from sunset) statements to account for these times.

2) I created a series of lighting profiles using the data from the Excel spreadsheet. This is achieved by using the Apex Web Interface under Configuration->Profile Setup. I simply reconfigured PF1 through PF11 to implement each of the entries on my Excel spreadsheet. See the image below for a graphic from my PreDawn(PF1) profile. Upon inspection, it is easy to see where the information from the Excel spreadsheet is simply entered into the appropriate fields of the profile entry.

3) Next, I computed a horizontal bar chart like the one that RussM produced previously on the Neptune forum. I needed this to ensure I setup the program properly referencing each of the "if sun" reference times, so I put a time scale on the horizontal axis as a sanity check. Again these times will become meaningless once I use the seasonal table. Note that the order of the if sun statements is very important. You basically want to start with the broadest time window on the pre-midday portion and work your way through all the other pre-midday profiles. Next you start with your broadest times on the post-midday portion for your "if sun" statements and work your way through the other post-midday profiles. In other words, the "if sun" statements are entered from the top to down order of this chart. The last "if sun" entry will by your midday brightest light listing. RussM reminded me that the last if statement that is satisfied in your script "wins" and will control which profile you are using. Below is my horizontal bar chart with my "if sun" delta times listed along with the intensities. It is important to take a moment and look through the chart and understand the critical points. Starting at the top of the chart the Pre-Dawn (PreDawn) profile will only be active from sunrise-120 minutes to sunrise-60 minutes. This will allow the lighting intensity to ramp from 0% to 2% over a 60 minute period. At the end of 60 minutes, then the Early Morning (EarlyMorn) profile will kick in and ramp from 2% to 7% light intensity over 60 minutes from sunrise-060 to sunrise time. Next, the MidMorn profile will become active from sunrise to sunrise+090 minutes where we continue to increase the intensity from 7% to 22% over 90 minutes. This continues all the way through the horizontal bars until we reach midday which runs from sunrise+360 to sunset-240 minutes. Very important: the second delta time (reference to sunset) for the pre-midday portion of the horizontal bar chart is irrelevant and does not matter - it is just conveniently set to somewhere near the middle of the midday profile. Likewise, the first delta time (reference to sunrise) for the post-midday portion of the chart is irrelevant and is just set to somewhere near the middle of the midday profile. See the chart below.

4) Start writing the code for the Radions using the horizontal bar chart and Excel spreadsheet. Note you have to turn off the wizard for the Radion in order to write the script to control the Radion. Below is my code snippet. So far, it appears to be working just fine.

Fallback OFF
Set OFF
If Sun -120/-330 Then PreDawn
If Sun -060/-330 Then EarlyMorn
If Sun 000/-330 Then MidMorn
If Sun 090/-330 Then LateMorn
If Sun 240/-330 Then EarlyMid
If Sun 450/240 Then Evening
If Sun 450/180 Then LateAfter
If Sun 450/120 Then MidAfter
If Sun 450/030 Then EarlyAft
If Sun 450/-120 Then LateMid
If Sun 360/-240 Then Midday
If Outlet Clouds = ON Then Cloudy
If Outlet Storms = ON Then Stormy

I hope this helps folks. If nothing else, it is a more verbose description of how to implement the seasonal lighting capability. This took me a couple of hours while buying corals online (haha) to a) climb the learning curve, b) ask RussM (genius at large) enough questions to figure it out, and c) get the code developed and somewhat tested. This is probably the hardest programming effort I have had with the Radion to date. Keep in mind, my Apex controls 3 tanks, automatic water changes, temperature control (heating/cooling), lighting, salinity, pH control of kalkwasser, etc. The only more difficult task I have had with the Apex is isolating a stray voltage/EMI issue with my PM2 and conductivity probe. However, with that said, once you have the necessary information, this was only about a dozen lines of code - lol! I hope that this post will help/enable others who have been wanting to do something similar, but found it too cumbersome/challenging. Let me know if you have questions and I will try to help. And a sincere thanks to RussM who provided enough information to me to figure this one out!
image.jpg

image.jpg

image.jpg

image.jpg

image.jpg
 

143MPCo

ASSIST PROTECT DEFEND
View Badges
Joined
May 14, 2012
Messages
6,696
Reaction score
8,294
Rating - 0%
0   0   0
Nice write up, thank you for posting that!!!
 

143MPCo

ASSIST PROTECT DEFEND
View Badges
Joined
May 14, 2012
Messages
6,696
Reaction score
8,294
Rating - 0%
0   0   0
One question... are you planning on incorporating cloud coverage and thunderstorms in to this or is that outside the scope of this endeavor?
 

revhtree

Owner Administrator
View Badges
Joined
May 8, 2006
Messages
47,787
Reaction score
87,416
Rating - 100%
1   0   0
This is great! Thank you for sharing!
 
OP
OP
samba_dad

samba_dad

Active Member
View Badges
Joined
Jun 6, 2014
Messages
474
Reaction score
154
Location
Huntsville, Alabama
Rating - 0%
0   0   0
One question... are you planning on incorporating cloud coverage and thunderstorms in to this or is that outside the scope of this endeavor?

So, I actually have incorporated clouds and storms already. I have done this in a somewhat "random" approach in the afternoons. I have a virtual outlet called clouds that has the following scripting...

<<<<<<< Clouds Virtual Outlet Script >>>>>>>>
OSC 000:00/037:00/636:00 Then ON
If Time 21:30 to 15:59 Then OFF
Min Time 037:00 Then ON
If DoW -M-W-F- Then OFF

The oscillate command is in the OFF/ON/OFF time sequence starting at midnight. Therefore, we are on for 37 minutes at midnight and then off for 636 minutes (10 hr 36 mins) and then turn back on for 37 minutes. This unusual set of times is deliberate and tends to produce a somewhat random effect. Next, I don't allow a storm from 7:30pm at night to 3:59pm the next afternoon. In other words, if the OSC happens to turn on any other time than 4:00pm to 7:30pm in the afternoon then it will not allow the clouds to occur. Finally, if the DoW is Mon, Wed or Fri then don't allow the clouds.

Similarly for storms, I have a virtual outlet called storms with the following script...

<<<<<<<<<<< Storms Virtual Outlet Script>>>>>>>>>>>>>>>>
OSC 000:00/037:00/636:00 Then ON
If Time 21:30 to 15:59 Then OFF
Min Time 037:00 Then ON
If DoW S-T-T-S Then OFF

This script is very similar to the clouds, but only works on Sunday, Tuesday, Thursday and Saturday. Overall, I only seem to get clouds or storms a couple times per week in the afternoon between 4:00pm and 7:30pm. The only other code you need is the script for the radeon lights themselves.

Fallback OFF
Set OFF
If Outlet Moonlight = ON Then LED_Moon
If Sun -120/-330 Then PreDawn
If Sun -060/-330 Then EarlyMorn
If Sun 000/-330 Then MidMorn
If Sun 090/-330 Then LateMorn
If Sun 240/-330 Then EarlyMid
If Sun 450/240 Then Evening
If Sun 450/180 Then LateAfter
If Sun 450/120 Then MidAfter
If Sun 450/030 Then EarlyAft
If Sun 450/-120 Then LateMid
If Sun 360/-240 Then Midday
If Outlet Clouds = ON Then Cloudy
If Outlet Storms = ON Then Stormy

The profiles I use for storms and clouds are shown below.
Cloudy_Profile.JPG

Stormy_Profile.JPG


I am glad you found the post helpful. Let me know if you have any other questions, and I will answer them the best I can. Geek out!
 

143MPCo

ASSIST PROTECT DEFEND
View Badges
Joined
May 14, 2012
Messages
6,696
Reaction score
8,294
Rating - 0%
0   0   0
Now if along with lighting you can have the apex send an RF message to a receiver to turn on thunder via a .wav file that would complete this program:D.
 
OP
OP
samba_dad

samba_dad

Active Member
View Badges
Joined
Jun 6, 2014
Messages
474
Reaction score
154
Location
Huntsville, Alabama
Rating - 0%
0   0   0
Now if along with lighting you can have the apex send an RF message to a receiver to turn on thunder via a .wav file that would complete this program:D.

Lol! Thunder would be pretty easy to do actually. Just hook up a sound machine that has a thunderstorm mode and place it by your tank. Whenever the storm mode kicks on just turn on the sound machine. Presto - sound and light!
 

markstubb

Well-Known Member
View Badges
Joined
Jul 11, 2016
Messages
624
Reaction score
433
Location
Atlanta GA
Rating - 0%
0   0   0
@samba_dad - any way to provide that spreadsheet? The photo periods are too long for my tank - my algae went totally bonkers once I implemented it. My brain hurts when I try to calculate the If Sun statements, so instead of reinventing the wheel, was wondering if the sheet was available.
 

markstubb

Well-Known Member
View Badges
Joined
Jul 11, 2016
Messages
624
Reaction score
433
Location
Atlanta GA
Rating - 0%
0   0   0
So for posterity's purpose, I put @samba_dad's stuff into an excel sheet and made it do some calculations so I could tailor it more to my needs. Hopefully it helps someone - you can just make a copy if you want to modify anything, or just download it. I only enabled comments as to keep it intact, but since it's on gdocs, it should be there for as long as needed.

@RussM if you wanted to poke at it and verify the accuracy, I'd humbly appreciate it!

https://docs.google.com/spreadsheets/d/1jEdTEJFErcE8So21PlwG-i0Fd1WImw0PUmZLN-ED4K8/edit?usp=sharing
 

migs

Community Member
View Badges
Joined
Nov 15, 2011
Messages
77
Reaction score
38
Location
Austin
Rating - 0%
0   0   0
I am trying to convert this over to AI Hydra 52s and had some questions. If I have no offset and update the seasonal table to local times, what sunrise / sunset should i use to get the times as it will vary with the season table? Thank you.
 

Creating a strong bulwark: Did you consider floor support for your reef tank?

  • I put a major focus on floor support.

    Votes: 57 40.4%
  • I put minimal focus on floor support.

    Votes: 30 21.3%
  • I put no focus on floor support.

    Votes: 49 34.8%
  • Other.

    Votes: 5 3.5%

New Posts

Back
Top