Page 17 of 18

Re: RF Expansion Module

PostPosted: Wed Mar 13, 2013 2:28 pm
by DrewPalmer04
coming out of night mode has been fixed?

Re: RF Expansion Module

PostPosted: Wed Mar 13, 2013 2:33 pm
by rimai
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 :)

Re: RF Expansion Module

PostPosted: Wed Mar 13, 2013 2:54 pm
by DrewPalmer04
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?

RF Expansion Module

PostPosted: Wed Mar 13, 2013 2:57 pm
by lnevo
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?

Re: RF Expansion Module

PostPosted: Wed Mar 13, 2013 3:05 pm
by DrewPalmer04
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.

RF Expansion Module

PostPosted: Wed Mar 13, 2013 4:05 pm
by lnevo
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

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.

Ebb/Flood result of isIncoming()

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
// Set tide classes to desired speed

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


RF Expansion Module

PostPosted: Wed Mar 13, 2013 4:08 pm
by lnevo
This chart shows the effect of MoonPhase over the course of the month.


Re: RF Expansion Module

PostPosted: Wed Mar 13, 2013 4:48 pm
by DrewPalmer04
Graphs look good! Maybe a short video of how it looks in your tank. :)

Re: RF Expansion Module

PostPosted: Wed Mar 13, 2013 5:13 pm
by DrewPalmer04
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.

RF Expansion Module

PostPosted: Wed Mar 13, 2013 5:21 pm
by lnevo
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 :)