Added second Tunze, now pumps turn on/off rapidly
Posted: Mon Aug 19, 2013 4:39 pm
So I just got my Reef Angel back from repair, I took this opportunity to add a second pump while I was hooking everything up. I have now 2 Tunze 6095s controlled by the Reef Angel. I am using the same exact code but the pumps are not behaving as expected. When I had one pump it would gradually speed up and slow down. Right now both pumps are turning on and off rapidly. Am I missing something in my code now that I have a second pump? Also when I go to Feeding Mode the pumps stop completely. I am so lost right now, help!
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 = Port3Bit | Port4Bit | Port8Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port3Bit | Port4Bit | Port8Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port5Bit | Port6Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port5Bit | Port6Bit | Port7Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 830 );
// Feeeding and Water Change mode speed
ReefAngel.DCPump.FeedingSpeed=30;
ReefAngel.DCPump.WaterChangeSpeed=0;
// Ports that are always on
ReefAngel.Relay.On( Port3 );
ReefAngel.Relay.On( Port5 );
ReefAngel.Relay.On( Port6 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.Relay.DelayedOn( Port1,1 );
ReefAngel.Relay.DelayedOn( Port2,1 );
ReefAngel.Relay.DelayedOn( Port4,1 );
ReefAngel.StandardHeater( Port7,780,800 );
ReefAngel.StandardATO(Port8,1200);
ReefAngel.DCPump.UseMemory = false;
ReefAngel.DCPump.DaylightChannel = Sync;
ReefAngel.DCPump.ActinicChannel = AntiSync;
ReefAngel.ShowInterface();
////// Place your custom code below here
if (hour()>=0000 && hour()<8)
{
ReefAngel.DCPump.SetMode( Constant,30,30 );
}
if (hour()>=8 && hour()<9)
{
ReefAngel.DCPump.SetMode( Lagoon,30,30 );
}
if (hour()>=9 && hour()<20)
{
ReefAngel.DCPump.SetMode( ReefCrest,70,70 );
}
if (hour()>=20 && hour()<21)
{
ReefAngel.DCPump.SetMode( Lagoon,30,30 );
}
if (hour()>=21 && hour()<2359)
{
ReefAngel.DCPump.SetMode( Constant,30,30 );
}
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "meadowsad" );
ReefAngel.ShowInterface();
}