Page 1 of 1

Can I code my 2 jebao wp40's to run at different speeds?

Posted: Thu Oct 03, 2013 1:18 pm
by DavidinGA
I have two Jebao WP40 wavemakers and it seems like one of them has lost noticeable power and so I was wondering if I could code them to have the weaker one run at higher percentages to make up for the power loss...???

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
    // Ports toggled in Feeding Mode
    ReefAngel.FeedingModePorts = 0;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = 0;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = 0;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = Port1Bit | Port2Bit;
    // Use T1 probe as temperature and overheat functions
    ReefAngel.TempProbe = T1_PROBE;
    ReefAngel.OverheatProbe = T1_PROBE;
    // Set the Overheat temperature setting
    InternalMemory.OverheatTemp_write( 810 );

    // Feeeding and Water Change mode speed
    ReefAngel.DCPump.FeedingSpeed=0;
    ReefAngel.DCPump.WaterChangeSpeed=0;


    // Ports that are always on

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

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

void loop()
{
    ReefAngel.StandardHeater( Port1,795,800 );
    ReefAngel.StandardHeater( Port2,793,800 );
    ReefAngel.StandardLights( Port3,1,0,24,0 );   ////gfo
    ReefAngel.StandardLights( Port4,11,0,21,0 );  ////UV
    ReefAngel.DosingPumpRepeat( Port6,0,240,600 ); /////ato powerhead 240min = 4hrs
    ReefAngel.DosingPumpRepeat( Port7,0,360,20 );  /////alk 360min = 6hrs
    ReefAngel.DosingPumpRepeat( Port8,0,420,35 );  ////cal 420min = 7hrs
    ReefAngel.DCPump.UseMemory = false;
    ReefAngel.DCPump.SetMode( LongPulse,40,10 );
    ReefAngel.DCPump.DaylightChannel = Sync;
    ReefAngel.DCPump.ActinicChannel = AntiSync;
    ////// Place your custom code below here
    if (hour()<8)
{
ReefAngel.PWM.SetActinic(0);
ReefAngel.PWM.SetDaylight(0);
}
else if (hour()>=8 && hour()<10)
ReefAngel.DCPump.SetMode( ShortPulse,80,20 );
else if (hour()>=10 && hour()<12)
ReefAngel.DCPump.SetMode( LongPulse,65,5 );
else if (hour()>=12 && hour()<14)
ReefAngel.DCPump.SetMode( ShortPulse,70,15);
else if (hour()>=14 && hour()<16)
ReefAngel.DCPump.SetMode( ReefCrest,50,20 );
else if (hour()>=16 && hour()<22)
ReefAngel.DCPump.SetMode( ShortPulse,75,20 );
else
{
ReefAngel.PWM.SetActinic(0);
ReefAngel.PWM.SetDaylight(0);
}

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

    // This should always be the last line
    ReefAngel.Portal( "davidinga" );
    ReefAngel.ShowInterface();
}

void DrawCustomMain()
{
    int x,y;
    char text[10];
    // Parameters
#if defined DisplayLEDPWM && ! defined RemoveAllLights
    ReefAngel.LCD.DrawMonitor( 15, 20, ReefAngel.Params,
    ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue() );
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
    ReefAngel.LCD.DrawMonitor( 15, 20, ReefAngel.Params );
#endif // defined DisplayLEDPWM && ! defined RemoveAllLights
    pingSerial();

    // pH Expansion
    ReefAngel.LCD.DrawText( COLOR_MEDIUMSEAGREEN,DefaultBGColor,15,66, "PHE:" );
    ReefAngel.LCD.DrawSingleMonitor( ReefAngel.Params.PHExp,COLOR_MEDIUMSEAGREEN,39,66, 100 );    
    pingSerial();

    // Main Relay Box
    byte TempRelay = ReefAngel.Relay.RelayData;
    TempRelay &= ReefAngel.Relay.RelayMaskOff;
    TempRelay |= ReefAngel.Relay.RelayMaskOn;
    ReefAngel.LCD.DrawOutletBox( 12, 92, TempRelay );
    pingSerial();

    // Date and Time
    ReefAngel.LCD.DrawDate( 6, 122 );
    pingSerial();
}

void DrawCustomGraph()
{
}

Re: Can I code my 2 jebao wp40's to run at different speeds?

Posted: Thu Oct 03, 2013 1:25 pm
by ReeferBee

Code: Select all

 if (hour()<8)
{
ReefAngel.PWM.SetActinic(0);
ReefAngel.PWM.SetDaylight(0);
}
else if (hour()>=8 && hour()<10)
ReefAngel.DCPump.SetMode( ShortPulse,80,20 );
else if (hour()>=10 && hour()<12)
ReefAngel.DCPump.SetMode( LongPulse,65,5 );
else if (hour()>=12 && hour()<14)
ReefAngel.DCPump.SetMode( ShortPulse,70,15);
else if (hour()>=14 && hour()<16)
ReefAngel.DCPump.SetMode( ReefCrest,50,20 );
else if (hour()>=16 && hour()<22)
ReefAngel.DCPump.SetMode( ShortPulse,75,20 );
else
{
ReefAngel.PWM.SetActinic(0);
ReefAngel.PWM.SetDaylight(0);
}
The values 80, 65, 70, 50, and 75 are the speeds. Adjust that number on the modes accordingly

Re: Can I code my 2 jebao wp40's to run at different speeds?

Posted: Thu Oct 03, 2013 1:29 pm
by ReeferBee
I'm on the older library, my code looks different. I'm sure someone else can chime in and help you.

Re: Can I code my 2 jebao wp40's to run at different speeds?

Posted: Thu Oct 03, 2013 1:39 pm
by DavidinGA
ReeferBee wrote:

Code: Select all

 if (hour()<8)
{
ReefAngel.PWM.SetActinic(0);
ReefAngel.PWM.SetDaylight(0);
}
else if (hour()>=8 && hour()<10)
ReefAngel.DCPump.SetMode( ShortPulse,80,20 );
else if (hour()>=10 && hour()<12)
ReefAngel.DCPump.SetMode( LongPulse,65,5 );
else if (hour()>=12 && hour()<14)
ReefAngel.DCPump.SetMode( ShortPulse,70,15);
else if (hour()>=14 && hour()<16)
ReefAngel.DCPump.SetMode( ReefCrest,50,20 );
else if (hour()>=16 && hour()<22)
ReefAngel.DCPump.SetMode( ShortPulse,75,20 );
else
{
ReefAngel.PWM.SetActinic(0);
ReefAngel.PWM.SetDaylight(0);
}
The values 80, 65, 70, 50, and 75 are the speeds. Adjust that number on the modes accordingly

Right but I only want to increase the speed of one of the pumps; not both of them.

Re: Can I code my 2 jebao wp40's to run at different speeds?

Posted: Thu Oct 03, 2013 3:58 pm
by Sacohen
Take the pump apart and clean the impeller shaft and inside of the housing it will run like new once you do that.
Just twist the top cover counter clockwise and it pops right off.

Can I code my 2 jebao wp40's to run at different speeds?

Posted: Thu Oct 03, 2013 4:39 pm
by lnevo
At some point i will add a way to add an AntiSync speed offset. So there is more control. Especially when you may have different types of pumps.

Re: Can I code my 2 jebao wp40's to run at different speeds?

Posted: Thu Oct 03, 2013 4:46 pm
by DavidinGA
Sacohen wrote:Take the pump apart and clean the impeller shaft and inside of the housing it will run like new once you do that.
Just twist the top cover counter clockwise and it pops right off.

I actually did do that. It improves the performance a little but the new WP40 still outperforms this older one (6 months old now).

Re: Can I code my 2 jebao wp40's to run at different speeds?

Posted: Fri Oct 04, 2013 5:27 am
by Sacohen
In a couple of months the new one will probably slow down a bit too and be somewhat equal to the old one.

Re: Can I code my 2 jebao wp40's to run at different speeds?

Posted: Sat Oct 05, 2013 1:31 pm
by DavidinGA
So there really isn't a way to code them for separate speed levels???

Sent from my SCH-I605 using Tapatalk 4

Re: Can I code my 2 jebao wp40's to run at different speeds?

Posted: Sat Oct 05, 2013 2:00 pm
by Sacohen
Not right now if you are using the DCPump Class.
If you want to use the older method then yes it is possible.

I had it set up on my WP-40 and WP-25.

Code: Select all

ReefAngel.PWM.SetDaylight( LongPulseMode(45,70,10,true));
ReefAngel.PWM.SetActinic( LongPulseMode(65,70,10,true));
PulseMinSpeed - % for minimal speed
PulseMaxSpeed - % for maximum speed
PulseDuration - Duration (seconds) in which each pulse will be held. The pump will stay at minimal speed for PulseDuration and will stay at maximum speed for PulseDuration.
PulseSync - true if you want to sync pumps to same cycle. one false and one true if you want to anti-sync pumps.

Here is a link to the different pump modes and their settings.

http://forum.reefangel.com/viewtopic.php?f=7&t=2844