Jebao Pump Antisync turning off.

Expansion modules and attachments
Post Reply
GugsJr
Posts: 68
Joined: Fri Jun 20, 2014 6:30 am

Jebao Pump Antisync turning off.

Post by GugsJr »

My Jebao pump (on actinic) keeps turning off after about 3.5 minutes, If I unplug it and plug it back in it will go off after 3.5 minutes again.

Doesn't matter what mode the pump is in, does the same thing.

The LED light on the ac adapter is green, the RA display is showing that the speed is set to 27%(currently),

I don't think it's my code but I may be wrong. What else could cause this?

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 <PAR.h>
#include <ReefAngel.h>

// Define Relay Ports by Name

#define Feeder             Port6

////// Place global variable code below here


////// Place global variable code above here


void setup()
{
    // This must be the first line
    ReefAngel.Init();  //Initialize controller
      
    // Feeeding and Water Change mode speed
    ReefAngel.DCPump.WaterChangeSpeed=0;
        
    // Ports toggled in Feeding Mode
    ReefAngel.FeedingModePorts = 0;
    ReefAngel.FeedingModePortsE[0] = Port2Bit;
   
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = 0;
    ReefAngel.WaterChangePortsE[0] = 0;
   
    // 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 = Port5Bit;
    ReefAngel.OverheatShutoffPortsE[0] = Port3Bit | Port5Bit;
   
    // Use T1 probe as temperature and overheat functions
    ReefAngel.TempProbe = T1_PROBE;
    ReefAngel.OverheatProbe = T1_PROBE;
    
    // Jebaos
    ReefAngel.DCPump.UseMemory = true;
    ReefAngel.DCPump.DaylightChannel = Sync;
    ReefAngel.DCPump.ActinicChannel = AntiSync;
    ReefAngel.DCPump.AntiSyncOffset=110; //power of the Antisync pump

       // Ports that are always on
    ReefAngel.Relay.On( Port7 );
    ReefAngel.Relay.On( Port8 );
    ReefAngel.Relay.On( Box1_Port1 );
    ReefAngel.Relay.On( Box1_Port2 );
    ReefAngel.Relay.On( Box1_Port8 );

    ////// Place additional initialization code below here


    

    ////// Place additional initialization code above here
}

void loop()
{

// seasonal temperatures
    SeasonalTemps();

    ReefAngel.StandardLights( Port1,14,25,1,5 );
    ReefAngel.StandardLights( Port2,14,25,3,10 );
    ReefAngel.StandardATO( Box1_Port6 );
    ReefAngel.StandardLights( Box1_Port7,22,0,17,0 );
    ReefAngel.DCPump.ExpansionChannel[0] = Sync;
    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


//Lights Schedule

if (now()%SECS_PER_DAY<0|| now()%SECS_PER_DAY >=52200) { // Time is before Midnight and after 12:30am
    ReefAngel.PWM.Channel1PWMParabola(); //Front Whites 4:00pm-10:00pm
    ReefAngel.PWM.Channel2PWMParabola(90); //Back Blues 2:30pm-11:30pm
    ReefAngel.PWM.Channel3PWMParabola(-30,30); //Back Whites 4:30pm-10:30pm
    ReefAngel.PWM.Channel4PWMParabola(120); //Back Blues 3:00pm-12:00AM

} else if (now()%SECS_PER_DAY<10800|| now()%SECS_PER_DAY >=0) { // Time is before 3:00am and after Midnight
    ReefAngel.PWM.SetChannel( 2,PWMParabola( 0,1,3,0,1,5,0 ) );
    ReefAngel.PWM.SetChannel( 4,PWMParabola( 0,1,3,30,1,5,0 ) );
}


//AutoFeeder
static unsigned long autofeeding = 0;

if (hour()==17 && minute()==0 && second() <= 2)//if it is 5 pm
{
ReefAngel.FeedingModeStart(); //START FEEDING MODE
}

if (ReefAngel.DisplayedMenu==FEEDING_MODE)
{
if ( autofeeding == 0 ) {
autofeeding = now(); //set the time of the start of feeding to variable feeding
}

if (hour()==17 && minute()==1 && second() <= 1)//if it is 5:01.01 pm
{
ReefAngel.Relay.On(Feeder); //TURN FEEDER RELAY ON
}
else
{
ReefAngel.Relay.Off(Feeder); //TURN FEEDER RELAY OFF
}
} else {
if ( autofeeding > 0 ) {
autofeeding = 0;
}
} 

// Add random mode if we set to Mode to Custom in portal
static int rmode;
static boolean changeMode=true;

// These are the modes we can cycle through. You can add more and even repeat...
byte modes[] = { Else, Lagoon, ReefCrest, ShortPulse, LongPulse, Gyre,};

if (now()%SECS_PER_DAY==0 || changeMode==true) { // Change at midnight or if controller rebooted
rmode=random(100)%sizeof(modes); // Change the mode once per day to pick from our array
changeMode=false;
}

// Set timer when in feeding mode
static unsigned long feeding;
if (ReefAngel.DisplayedMenu==FEEDING_MODE) feeding=now();

// keep Jebaos off for first 5 minutes of feeding mode.
if (now()-feeding<=300 && ReefAngel.DisplayedMenu==FEEDING_MODE) {
  ReefAngel.DCPump.UseMemory=false;
  ReefAngel.DCPump.Mode=NutrientTransport;
    
} else if (now()-feeding<8700) { // 5 minutes plus 2 hour 25 minutes
  // Continue NTM for the next 2 hours  25 minutes (150 minutes total)
  ReefAngel.DCPump.UseMemory=false;
  ReefAngel.DCPump.Mode=NutrientTransport;
  
 }
// Add night mode (constant 16%)
if (now()%SECS_PER_DAY<52200|| now()%SECS_PER_DAY >=1800) { // Time is before 4:30pm and after 12:30am
  ReefAngel.DCPump.UseMemory=false;
  ReefAngel.DCPump.Mode=Constant;
  ReefAngel.DCPump.Speed=16;
    
} else if (InternalMemory.DCPumpMode_read()==11) { 
  // Custom Mode and nothing else going on
  ReefAngel.DCPump.UseMemory=false;
  ReefAngel.DCPump.Duration=InternalMemory.DCPumpDuration_read();
  if (modes[rmode]==Else) {
    ReefAngel.DCPump.UseMemory=false;
    ReefAngel.DCPump.Mode=Constant;
    ReefAngel.DCPump.Speed=ElseMode(InternalMemory.DCPumpSpeed_read(),25,true );    // ElseMode on sync mode, Portal Speed Setting +/- 25%
  } else {
    ReefAngel.DCPump.Mode=modes[rmode];  // Put the mode to the random mode :)
    ReefAngel.DCPump.Speed=InternalMemory.DCPumpSpeed_read(); // Set speed from portal
  }
} else {
  ReefAngel.DCPump.UseMemory=true; // Will reset all values from memory
}
    

    ////// Place your custom code above here
    
    

    // This should always be the last line
    ReefAngel.Portal( "GugsJr" );
    ReefAngel.DDNS( "Home" ); // Your DDNS is GugsJr-Home.myreefangel.com
    ReefAngel.ShowInterface();
}

//Custom Main, Graph & Menu

static unsigned long PumpSpeed = InternalMemory.DCPumpSpeed_read(); //Sets Value to pump speed
static int PumpOffset = (PumpSpeed*1.10); //Change Value to match AntiSyncOffset value

void DrawCustomMain() {
  byte x = 6;
  byte y = 2;
  byte t;
  char text[7];

 ReefAngel.LCD.DrawLargeText(COLOR_BLACK,COLOR_WHITE, 6, 2, " GugsJr's Reef");
 ReefAngel.LCD.DrawDate(6, 118);
 ReefAngel.LCD.Clear(COLOR_BLACK, 1, 17, 132, 17);
 pingSerial();

  ReefAngel.LCD.DrawLargeText(COLOR_BLUE,COLOR_WHITE, 24,16,"Jebao Mode:");
       if  (now()%SECS_PER_DAY<52200|| now()%SECS_PER_DAY >=1800) ReefAngel.LCD.DrawLargeText(COLOR_MAGENTA,255,28,26,"Night Mode");
  else if  (InternalMemory.DCPumpMode_read()==Lagoon) ReefAngel.LCD.DrawLargeText(COLOR_MAGENTA,255,42,26,"Lagoon");
  else if  (InternalMemory.DCPumpMode_read()==ReefCrest) ReefAngel.LCD.DrawLargeText(COLOR_MAGENTA,255,25,26,"Reef Crest");
  else if  (InternalMemory.DCPumpMode_read()==ShortPulse) ReefAngel.LCD.DrawLargeText(COLOR_MAGENTA,255,22,26,"Short Pulse");
  else if  (InternalMemory.DCPumpMode_read()==LongPulse) ReefAngel.LCD.DrawLargeText(COLOR_MAGENTA,255,25,26,"Long Pulse");
  else if  (InternalMemory.DCPumpMode_read()==NutrientTransport) ReefAngel.LCD.DrawLargeText(COLOR_MAGENTA,255,8,26,"Nutrient Trnsp.");
  else if  (InternalMemory.DCPumpMode_read()==TidalSwell) ReefAngel.LCD.DrawLargeText(COLOR_MAGENTA,255,23,26,"Tidal Swell");
  else if  (InternalMemory.DCPumpMode_read()==Custom) ReefAngel.LCD.DrawLargeText(COLOR_MAGENTA,255,23,26,"Custom");
  else if  (InternalMemory.DCPumpMode_read()==Else) ReefAngel.LCD.DrawLargeText(COLOR_MAGENTA,255,23,26,"Tidal Else");
  else if  (InternalMemory.DCPumpMode_read()==Sine) ReefAngel.LCD.DrawLargeText(COLOR_MAGENTA,255,23,26,"Sine");
  else if  (InternalMemory.DCPumpMode_read()==Gyre) ReefAngel.LCD.DrawLargeText(COLOR_MAGENTA,255,23,26,"Gyre");
  else if  (InternalMemory.DCPumpMode_read()== Constant) ReefAngel.LCD.DrawLargeText(COLOR_MAGENTA,255,35,27,"Constant");

  ReefAngel.LCD.DrawLargeText(0,255,17,36,"Display");
  ReefAngel.LCD.DrawLargeText(0,255,17,49,"Temp");
  ConvertNumToString(text, ReefAngel.Params.Temp[T1_PROBE], 10);
  ReefAngel.LCD.DrawHugeText(COLOR_RED, 255, 12, 65, text, Num12x16);
  pingSerial();

  ReefAngel.LCD.DrawLargeText(0,255,100,45,"pH");
  ConvertNumToString(text, ReefAngel.Params.PH, 100);
  ReefAngel.LCD.DrawLargeText(COLOR_BLUE, 255, 89, 65, text, Num8x8);
  pingSerial();
  
  ReefAngel.LCD.DrawText(COLOR_CORNFLOWERBLUE,255,5,80, "Jebao");
  ReefAngel.LCD.DrawText(COLOR_CORNFLOWERBLUE,255,10,89, "Left"); 
  ReefAngel.LCD.DrawText(COLOR_BLACK,255,16,100, InternalMemory.DCPumpSpeed_read());
  ReefAngel.LCD.DrawText(COLOR_CORNFLOWERBLUE,255,50,80, "Jebao");
  ReefAngel.LCD.DrawText(COLOR_CORNFLOWERBLUE,255,49,89, "Center"); 
  ReefAngel.LCD.DrawText(COLOR_BLACK,255,59,100, PumpOffset);
  ReefAngel.LCD.DrawText(COLOR_CORNFLOWERBLUE,255,93,80, "Jebao");
  ReefAngel.LCD.DrawText(COLOR_CORNFLOWERBLUE,255,88,89, " Right"); 
  ReefAngel.LCD.DrawText(COLOR_BLACK,255,100,100, InternalMemory.DCPumpSpeed_read());

  pingSerial();
 
  
  
}
void DrawCustomGraph()
{
}



void SeasonalTemps ()
 {
  static int heatArray[][2] = { {780,785},// default in case of error in month=0 (June)
                    {770,774},//January (winter) 77.2
                    {774,778},//February (winter) 77.6
                    {775,779},//March (early spring) 77.7
                    {779,783},//April (spring) 78.1
                    {785,789},//May (spring) 78.7
                    {792,796},//June (early summer) 79.4
                    {799,803},//July (summer) 80.1
                    {806,810},//August (summer) 80.8
                    {796,800},//September (early fall) 79.8
                    {787,791},//October (fall) 78.9
                    {780,784},//November (fall) 78.2
                    {775,779} };//December (early winter) 77.7
                    
               
ReefAngel.StandardHeater(Port5,heatArray[month()][0],heatArray[month()][1]);
ReefAngel.StandardHeater(Box1_Port3,heatArray[month()][0],heatArray[month()][1]);
ReefAngel.StandardHeater(Box1_Port5,heatArray[month()][0],heatArray[month()][1]);
 }//end seasonalTemps



// RA_STRING2=null
// RA_STRING3=null
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Jebao Pump Antisync turning off.

Post by rimai »

27% may be too low.
I know Jebao pumps turn off below a certain threshold.
Roberto.
GugsJr
Posts: 68
Joined: Fri Jun 20, 2014 6:30 am

Re: Jebao Pump Antisync turning off.

Post by GugsJr »

The other 2 are at 25% and they are running Those are set to my Daylights and are in sync mode. Ones on the daylight dimming port on the relay box, the other is on channel 0 on the dimming expansion.

I've actually been able to dim the PP8s to 10% and they were still running

Currently they are in night mode and are set to constant at 25% with an antisynoff set of 110%. So there should be no fluctuation correct?
GugsJr
Posts: 68
Joined: Fri Jun 20, 2014 6:30 am

Re: Jebao Pump Antisync turning off.

Post by GugsJr »

Well it seems that something in the code is causing it

I deleted all the pump code and just put in the code below and everything is working.

Code: Select all

ReefAngel.DCPump.UseMemory = true;
    ReefAngel.DCPump.DaylightChannel = Sync;
    ReefAngel.DCPump.ActinicChannel = AntiSync;
    ReefAngel.DCPump.AntiSyncOffset=110; //power of the Antisync pump
Post Reply