RF Expansion Module

Expansion modules and attachments
User avatar
Posts: 818
Joined: Tue May 29, 2012 2:12 pm
Location: Christopher, IL
PostPosted: Wed Mar 13, 2013 2:28 pm
coming out of night mode has been fixed?
Out for now...but not over.

VISIT: Ethernet Module/Wifi Alternative

Posts: 12057
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Wed Mar 13, 2013 2:33 pm
To come out of night mode, you must send a command.
You need to send Night_Stop or Feeding_Stop. They are the same thing... lol
lnevo is controlling his pumps according to the tidal info on top of parabola to go into night mode :)
Roberto.
User avatar
Posts: 818
Joined: Tue May 29, 2012 2:12 pm
Location: Christopher, IL
PostPosted: Wed Mar 13, 2013 2:54 pm
I like his tidal code. I just like to be in control of my tanks time. Lol. Not based on lat/long. I guess I'll just do if else if else. The else would be the feed_stop correct?
Out for now...but not over.

VISIT: Ethernet Module/Wifi Alternative
User avatar
Posts: 5338
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Wed Mar 13, 2013 2:57 pm
You can take a look at my code. I track previous modes. If previous mode is Night, i flip feeding stop and then set the mode. I only do this if I'm not in reefcrest mode since that mode I'm overriding with mu custom.

But yeah, you can scratch the night mode and just set speed with the slope or parabola. I'm using slope to transition to my night speed.

Roberto, any chance we can get Custom added to the drop down on the portal?
User avatar
Posts: 818
Joined: Tue May 29, 2012 2:12 pm
Location: Christopher, IL
PostPosted: Wed Mar 13, 2013 3:05 pm
What kind of flow do you experience with your tide.h set up? Random? Variable bc of the moon? Is it more constant from the MPs and the speed increases? I enjoy more of an alternating current instead of full blast on.
Out for now...but not over.

VISIT: Ethernet Module/Wifi Alternative
User avatar
Posts: 5338
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Wed Mar 13, 2013 4:05 pm
I'm waiting till I have some more long term graphing to post some charts and my night mode speed is taking away from the view...need to find a better way to show it..I may declare a Tide class just to use for the charting :)

Actual results of RFS
status/chart.aspx?id=lnevo&filter=rfs

Result of tide.CalcSpeed() you can see the shift that happens for night mode. Try and shift it back up and you'll see how high and low tide get formed.
status/chart.aspx?id=lnevo&filter=c4

Ebb/Flood result of isIncoming()
status/chart.aspx?id=lnevo&filter=c6

The way the tide class works is this...

a cosine wave represents the lunar pull in the ocean. So the difference between high tide and low tide is greater at new moon and full moon and less during quarter moons. So a cosine curve represents this nicely,

The tide class gets set to a speed. The arguments to unit represent the minimum gap and maximum gap between high and low tide. This gap gets adjusted based on the moon phase curve and applied to the speed that you set the tide class to.

I also track (now working properly) the direction of the current and you can get that as a true false from isIncoming() and I set which pump to set faster, the other gets multiplied by a percentage.

The CalcTide() function returns the speed based on the parameters discussed above. You could also adjust the wavelength (default is 12 hours) if you want more or less high and low tides. If you used this output directly you would get a smooth transition.

I pass the output to Roberto's ReefCrestMode function and it adds a bunch of randomness to the output. The randomness though is still shaped by the tides and of course the flow direction based on the shifting current.

You could just as easily do more complex functions or pass them to the tunze functions or your own pwm slope / parabola. The main point for me is that base speed is set in memory and everything is variable based on what is entered.

Here's my relevant code to give you a better idea how I'm doing everything...

Code: Select all
Tide tide;
Tide.Init(vtSpeed, 10, 30);

// Night Mode
tideSpeed=PWMSlope(sl.GetRiseHour()-1,sl.GetRiseMinute(),sl.GetSetHour()+1,sl.GetSetMinute(),vtNightSpeed,vtSpeed,60,vtNightSpeed);
 
// Set tide classes to desired speed
tide.SetSpeed(tideSpeed);

Int rcSpeed=ReefCrestMode(tide.CalcTide());

ReefAngel.RF.SetMode(Custom,rcSpeed*tideDiff,1-tide.isIncoming());
ReefAngel.RF.SetMode(Custom,rcSpeed,tide.isIncoming());
User avatar
Posts: 5338
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Wed Mar 13, 2013 4:08 pm
This chart shows the effect of MoonPhase over the course of the month.

download/file.php?id=632
User avatar
Posts: 818
Joined: Tue May 29, 2012 2:12 pm
Location: Christopher, IL
PostPosted: Wed Mar 13, 2013 4:48 pm
Graphs look good! Maybe a short video of how it looks in your tank. :)
Out for now...but not over.

VISIT: Ethernet Module/Wifi Alternative
User avatar
Posts: 818
Joined: Tue May 29, 2012 2:12 pm
Location: Christopher, IL
PostPosted: Wed Mar 13, 2013 5:13 pm
Also if we could contain a max speed value that would be nice. My two MP10s could and might rip my tank apart lol. IF unregulated.
Out for now...but not over.

VISIT: Ethernet Module/Wifi Alternative
User avatar
Posts: 5338
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Wed Mar 13, 2013 5:21 pm
Max speed for the tide class would be speed+(maxOffset/2)

For roberto's ReefCrestMode its speed +/- 20. I changed it to 10 for my needs.

I set my day speed to 45 and night at 25.

Pump 2 offset is .6 i think.

I hear the ripping apart...2 mp40 on a 65 :)
PreviousNext

Return to Addons

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron