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

Do you have a question on how to do something.
Ask in here.
Post Reply
DavidinGA
Posts: 83
Joined: Fri Jun 07, 2013 11:26 am

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

Post 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()
{
}
ReeferBee
Posts: 55
Joined: Wed May 08, 2013 6:23 pm
Location: North GA

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

Post 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
Barry

Current tank info: 150g mixed reef

"Some of the worst mistakes of my life were hair cuts" -Jim Morrison
ReeferBee
Posts: 55
Joined: Wed May 08, 2013 6:23 pm
Location: North GA

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

Post by ReeferBee »

I'm on the older library, my code looks different. I'm sure someone else can chime in and help you.
Barry

Current tank info: 150g mixed reef

"Some of the worst mistakes of my life were hair cuts" -Jim Morrison
DavidinGA
Posts: 83
Joined: Fri Jun 07, 2013 11:26 am

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

Post 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.
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

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

Post 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.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

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

Post 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.
DavidinGA
Posts: 83
Joined: Fri Jun 07, 2013 11:26 am

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

Post 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).
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

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

Post 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.
DavidinGA
Posts: 83
Joined: Fri Jun 07, 2013 11:26 am

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

Post by DavidinGA »

So there really isn't a way to code them for separate speed levels???

Sent from my SCH-I605 using Tapatalk 4
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

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

Post 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
Post Reply