Added second Tunze, now pumps turn on/off rapidly

Share you PDE file with our community
Post Reply
meadowsad
Posts: 53
Joined: Sat Jun 15, 2013 9:56 am

Added second Tunze, now pumps turn on/off rapidly

Post by meadowsad »

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();
}



rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Added second Tunze, now pumps turn on/off rapidly

Post by rimai »

Code looks fine.
Did you have the same exact code before?
Roberto.
meadowsad
Posts: 53
Joined: Sat Jun 15, 2013 9:56 am

Re: Added second Tunze, now pumps turn on/off rapidly

Post by meadowsad »

Yes, same exact code. I had to upload the code again since it looked like you had some test code in there after the repair. I even ran the wizard again and tried the dc pumps in reef crest mode without all the code for the times and it does the same thing.

Another thing I tried was just setting the ports to be always on. The control cable had to be unplugged for this to work. This code has the pumps on all the time, not being controlled, as expected.

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( Port1 );
    ReefAngel.Relay.On( Port2 );
    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.SetMode( ReefCrest,70,70 );
    //ReefAngel.DCPump.DaylightChannel = Sync;
    //ReefAngel.DCPump.ActinicChannel = AntiSync;
    ReefAngel.ShowInterface();
    ////// Place your custom code below here

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

    // This should always be the last line
    ReefAngel.Portal( "meadowsad" );
    ReefAngel.ShowInterface();
}
mudcat1
Posts: 133
Joined: Sun Dec 09, 2012 7:23 pm

Re: Added second Tunze, now pumps turn on/off rapidly

Post by mudcat1 »

Meadowsad,
Does the pump start and stop only when the pump speed is set to 30? Try to increase the minimum speed to 40 to see if the pumps no longer stop and start.
meadowsad
Posts: 53
Joined: Sat Jun 15, 2013 9:56 am

Re: Added second Tunze, now pumps turn on/off rapidly

Post by meadowsad »

I tried with the pumps set at 70 and no luck. I did notice some more weirdness though. After a short amount of time on of the pumps started spinning fine. Then I left to go to the store and when I came back both pumps were off when it should have switched from reef crest to lagoon mode.
meadowsad
Posts: 53
Joined: Sat Jun 15, 2013 9:56 am

Re: Added second Tunze, now pumps turn on/off rapidly

Post by meadowsad »

Is there any code I should try to see if the pumps run normally?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Added second Tunze, now pumps turn on/off rapidly

Post by rimai »

Try removing all the if statements and set the channels to 70% to see what it does

Sent from my SPH-L710 using Tapatalk 4
Roberto.
meadowsad
Posts: 53
Joined: Sat Jun 15, 2013 9:56 am

Re: Added second Tunze, now pumps turn on/off rapidly

Post by meadowsad »

I removed all the extra code and just had this line

ReefAngel.DCPump.SetMode( ReefCrest,70,20 );

The pumps still turned on and off rapidly.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Added second Tunze, now pumps turn on/off rapidly

Post by rimai »

No, try setting them to always 70%

Code: Select all

ReefAngel.PWM.SetActinic(70);
ReefAngel.PWM.SetDaylight(70);
Roberto.
meadowsad
Posts: 53
Joined: Sat Jun 15, 2013 9:56 am

Re: Added second Tunze, now pumps turn on/off rapidly

Post by meadowsad »

I used the code below like you suggested and the pumps were spinning while the code was uploading but as soon as it was done the pumps started turning on and off rapidly.

Code: Select all

ReefAngel.PWM.SetActinic(70);
ReefAngel.PWM.SetDaylight(70);
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Added second Tunze, now pumps turn on/off rapidly

Post by rimai »

You mentioned you had a repair done. May I ask what it was??
It sounds like you have the wrong dimming signal.
Roberto.
meadowsad
Posts: 53
Joined: Sat Jun 15, 2013 9:56 am

Re: Added second Tunze, now pumps turn on/off rapidly

Post by meadowsad »

So now that you mention that...

I had an issue with port 6 turning on and off rapidly on the relay box. In the PM you sent back to me you said there was a defective chip in the head unit and you replaced the chip.

Also I ordered a relay expansion module with box while I waited for my unit to be repaired. Would using the new relay box instead of the original have anything to do with that? I can't be sure which one I am using because I got them mixed up.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Added second Tunze, now pumps turn on/off rapidly

Post by rimai »

Yes.
You must use the original one.
Roberto.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Added second Tunze, now pumps turn on/off rapidly

Post by rimai »

The original one will have a sticker "Analog Dimming" at the bottom
Roberto.
meadowsad
Posts: 53
Joined: Sat Jun 15, 2013 9:56 am

Re: Added second Tunze, now pumps turn on/off rapidly

Post by meadowsad »

Sorry for being an idiot.... lol
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Added second Tunze, now pumps turn on/off rapidly

Post by rimai »

There is no such thing... :)
Roberto.
Post Reply