Hi..
I would like to know if I could make my jebao pumps cycle different through the hours of the day?
For example
from 10PM to 06:00am - Night mode
From 06:00am to 10am - Reef crest
From 10:00am to 13:00pm Long pulse
from 13:00pm to 16:00pm nutrient transport
from 16:00pm to 22:00pm - Lagoon
Is this possible?
Would be awesome if something like this could be done..
Im not a programmer so if it is possible, could someone help me program this?
Cool
Ridwaan
Jebao WP40 customs programming
Re: Jebao WP40 customs programming
Here is what I do in my loop. What I'm doing is a bit silly because I'm using memory to run the pumps, but then setting the memory values in my .ino file, which kind of defeats the purpose of letting you change pump modes with the portal's internal memory editor to override the .ino file. However, this works fine.
Code: Select all
ReefAngel.DCPump.UseMemory = true;
if ((hour() >= 13) && (hour() <= 16)) { // reef crest from 1 to 5, mode 2
InternalMemory.DCPumpMode_write(ReefCrest);
InternalMemory.DCPumpSpeed_write(50);
InternalMemory.DCPumpDuration_write(120);
} else if ((hour() >= 17) && (hour() <= 19)) { // nutrient transport from 5 to 8, mode 5
InternalMemory.DCPumpMode_write(NutrientTransport);
InternalMemory.DCPumpSpeed_write(70);
InternalMemory.DCPumpDuration_write(120);
} else if ((hour() >= 8) && (hour() <= 12)) { // gyre from 8 to 1, new mode 14, in dev branch
InternalMemory.DCPumpMode_write(Gyre);
InternalMemory.DCPumpSpeed_write(70);
InternalMemory.DCPumpDuration_write(4);
} else {
InternalMemory.DCPumpMode_write(Constant); // Constant the rest of the time
InternalMemory.DCPumpSpeed_write(30);
InternalMemory.DCPumpDuration_write(120);
}
Re: Jebao WP40 customs programming
here's how I program my Jebao's
Code: Select all
// Custom Wave Routine
// set the wpMode based on what time it is
if ( (hour() >= 2) && (hour() < 5) ) wpMode=1; // from 2am - 5am
if ( (hour() >= 5) && (hour() < 8) ) wpMode=2; // from 5am - 8am
if ( (hour() >= 8) && (hour() < 11) ) wpMode=4; // from 8am - 11am Nutrient Transport
if ( (hour() >= 11) && (hour() < 14) ) wpMode=2; // from 11a - 2pm
if ( (hour() >= 14) && (hour() < 17) ) wpMode=1; // from 2pm - 5pm
if ( (hour() >= 17) && (hour() < 20) ) wpMode=2; // from 5pm - 8pm
if ( (hour() >= 20) && (hour() < 23) ) wpMode=3; // from 8pm - 11p
if (hour() >= 23) wpMode=2; // from 11pm - midnight
if (hour() < 2) wpMode=1; // from midnight - 2am
if (ReefAngel.DisplayedMenu==FEEDING_MODE) wpMode=5; // Feeding Mode
if (ReefAngel.DisplayedMenu==WATERCHANGE_MODE) wpMode=6; //Water Change Mode
switch (wpMode)
{
case 1: wpWavStr=37; wpWavOff=3; break;
case 2: wpWavStr=41; wpWavOff=8; break;
case 3: wpWavStr=44; wpWavOff=10; break;
case 4: wpWavStr=55; wpWavOff=70; break;
case 5: wpWavStr=33; wpWavOff=0; break;
case 6: wpWavStr=0; wpWavOff=0; break;
default: wpWavStr=36; wpWavOff=2;
}
//If 8am - 11am, Nutrient Transport
if (wpMode==4)
{
ReefAngel.PWM.SetDaylight( NutrientTransportMode(wpWavStr,wpWavOff,7000,true) );
ReefAngel.PWM.SetActinic ( NutrientTransportMode(wpWavStr,wpWavOff,7000,false) );
}
else
{
if (wpMode==5)
{
ReefAngel.PWM.SetDaylight(0);
ReefAngel.PWM.SetActinic(35); //// Right wavemaker under feeder
}
else
{
//Set the wave
ReefAngel.PWM.SetDaylight( ElseMode(wpWavStr,wpWavOff,true) );
ReefAngel.PWM.SetActinic( ElseMode(wpWavStr,wpWavOff,false) );
}}
//end Custom Wave Routine
Re: Jebao WP40 customs programming
Thanks so much for the help ..appreciate it...
But I have no idea where to put the code...lol
Here is my code, what should I remove and where should I put the code...
I would also like the pumps to ramp down to like 5% when I put them in feeding mode and they should be antisync
Im so sorry and I ask for your patience with me as I am trying to get my head around all of this coding stuff....lol
But I have no idea where to put the code...lol
Here is my code, what should I remove and where should I put the code...
I would also like the pumps to ramp down to like 5% when I put them in feeding mode and they should be antisync
Code: Select all
#include <ReefAngel_Features.h>
#include <Globals.h>
#include <RA_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <InternalEEPROM.h>
#include <RA_NokiaLCD.h>
#include <RA_ATO.h>
#include <RA_Joystick.h>
#include <LED.h>
#include <RA_TempSensor.h>
#include <Relay.h>
#include <RA_PWM.h>
#include <Timer.h>
#include <Memory.h>
#include <InternalEEPROM.h>
#include <RA_Colors.h>
#include <RA_CustomColors.h>
#include <Salinity.h>
#include <RF.h>
#include <IO.h>
#include <ORP.h>
#include <AI.h>
#include <PH.h>
#include <WaterLevel.h>
#include <Humidity.h>
#include <DCPump.h>
#include <ReefAngel.h>
////// Place global variable code below here
////// Place global variable code above here
void setup()
{
// This must be the first line
ReefAngel.Init(); //Initialize controller
ReefAngel.SetTemperatureUnit( Celsius ); // set to Celsius Temperature
ReefAngel.Use2014Screen(); // Let's use 2014 Screen
ReefAngel.AddPHExpansion(); // pH Expansion Module
ReefAngel.AddWaterLevelExpansion(); // Water Level Expansion Module
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = 0;
ReefAngel.FeedingModePortsE[0] = Port1Bit | Port2Bit | Port3Bit | Port4Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port6Bit | Port7Bit | Port8Bit;
ReefAngel.WaterChangePortsE[0] = Port1Bit | Port2Bit | Port3Bit | Port4Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port1Bit | Port2Bit;
ReefAngel.LightsOnPortsE[0] = 0;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port3Bit | Port4Bit;
ReefAngel.OverheatShutoffPortsE[0] = 0;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 280 );
// Feeeding and Water Change mode speed
ReefAngel.DCPump.FeedingSpeed=0;
ReefAngel.DCPump.WaterChangeSpeed=0;
// Ports that are always on
ReefAngel.Relay.On( Box1_Port1 );
ReefAngel.Relay.On( Box1_Port2 );
ReefAngel.Relay.On( Box1_Port3 );
ReefAngel.Relay.On( Box1_Port4 );
ReefAngel.Relay.On( Box1_Port5 );
ReefAngel.Relay.On( Box1_Port6 );
ReefAngel.Relay.On( Box1_Port7 );
ReefAngel.Relay.On( Box1_Port8 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.StandardLights( Port1,10,0,19,0 );
ReefAngel.StandardLights( Port2,11,45,18,30 );
ReefAngel.StandardHeater( Port3,255,261 );
ReefAngel.StandardHeater( Port4,255,262 );
ReefAngel.StandardFan( Port5,260,267 );
ReefAngel.StandardATO( Port6,30 );
ReefAngel.CO2Control( Port7,640,680 );
ReefAngel.Relay.DelayedOn( Port8,5 );
ReefAngel.DCPump.UseMemory = false;
ReefAngel.DCPump.SetMode( LongPulse,100,60 );
ReefAngel.DCPump.DaylightChannel = Sync;
ReefAngel.DCPump.ActinicChannel = AntiSync;
ReefAngel.DCPump.ExpansionChannel[0] = None;
ReefAngel.DCPump.ExpansionChannel[1] = None;
ReefAngel.DCPump.ExpansionChannel[2] = None;
ReefAngel.DCPump.ExpansionChannel[3] = None;
ReefAngel.DCPump.ExpansionChannel[4] = None;
ReefAngel.DCPump.ExpansionChannel[5] = None;
////// Place your custom code below here
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "Ridwaan" );
ReefAngel.ShowInterface();
}
-
- Posts: 245
- Joined: Tue Jan 28, 2014 11:10 am
- Location: Northern VA
Re: Jebao WP40 customs programming
Click on my link below..you can see my code and where I placed my schedule for my pump.
Jack
Re: Jebao WP40 customs programming
I have decided to use the above code...AlanM wrote:Here is what I do in my loop. What I'm doing is a bit silly because I'm using memory to run the pumps, but then setting the memory values in my .ino file, which kind of defeats the purpose of letting you change pump modes with the portal's internal memory editor to override the .ino file. However, this works fine.
Code: Select all
ReefAngel.DCPump.UseMemory = true; if ((hour() >= 13) && (hour() <= 16)) { // reef crest from 1 to 5, mode 2 InternalMemory.DCPumpMode_write(ReefCrest); InternalMemory.DCPumpSpeed_write(50); InternalMemory.DCPumpDuration_write(120); } else if ((hour() >= 17) && (hour() <= 19)) { // nutrient transport from 5 to 8, mode 5 InternalMemory.DCPumpMode_write(NutrientTransport); InternalMemory.DCPumpSpeed_write(70); InternalMemory.DCPumpDuration_write(120); } else if ((hour() >= 8) && (hour() <= 12)) { // gyre from 8 to 1, new mode 14, in dev branch InternalMemory.DCPumpMode_write(Gyre); InternalMemory.DCPumpSpeed_write(70); InternalMemory.DCPumpDuration_write(4); } else { InternalMemory.DCPumpMode_write(Constant); // Constant the rest of the time InternalMemory.DCPumpSpeed_write(30); InternalMemory.DCPumpDuration_write(120); }
But look slike im having a problem with reefcrest.
Im not sure if the reefcrest on the reef angel is same as the vortechs where if one pump is slowing down the other one should speed up?
WHat is happening now is that I set max speed to 80 but both pumps are not going lower than 73.
e.g if one pump is on 73, the other will be on 77
if one pump is on 78, the other will be on 72
Any ideas?