both ph probes completely berserk

Talk about you and your tank/equipment

Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD
PostPosted: Thu Jul 04, 2013 3:19 pm
no more rebooting, pH is stable, probe still in the glass of tank water. I'll put the probe back in the tank before leaving for tonite's festivities and see what happens while I'm gone.

I bought a multimeter, also thinking about stray voltage, but have no clue how to use it. For AC voltage it has two settings, 200V and 600V, not clear on which one to use. Any advice would be welcome.

I did a google search and posted it here: viewtopic.php?f=2&t=3097 on how to do this sort of thing but I am the sort that like specific instructions, especially around electricity.

Finally, if you are right and the probe is accurate, shouldn't I be doing some dosing to raise my pH?

Again, thanks to all contributing...
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.
User avatar
Posts: 5349
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Thu Jul 04, 2013 3:23 pm
8.4 is pretty high pH wise. Are you sure your test kit is good? I would try with another. Whats your Ca and Alk? Are you taking water near your probe for your test?

The important thing is more the stability and monitoring your ph for swings not necessarily the value.

Posts: 151
Joined: Wed Mar 13, 2013 5:36 pm
PostPosted: Thu Jul 04, 2013 4:49 pm
try something for me, plug everything back in and use this code for your heaters. I think I may have found a bug. This fixed my rebooting issue...until I got my wifi moduleback.
change your temps and ports accordingly.

Code: Select all
 StandardHeater1( Port3,760,770 );
        StandardHeater2( Port1,796,802 );


Code: Select all
  void StandardHeater2(byte HeaterRelay, int LowTemp, int HighTemp)
    {
    if (ReefAngel.Params.Temp[T2_PROBE] == 0) return; // Don't turn the heater on if the temp is reading 0
    if (ReefAngel.Params.Temp[T2_PROBE] <= LowTemp && ReefAngel.Params.Temp[T2_PROBE] > 0) ReefAngel.Relay.On(HeaterRelay); // If sensor 2 temperature <= LowTemp - turn on heater
    if (ReefAngel.Params.Temp[T2_PROBE] >= HighTemp) ReefAngel.Relay.Off(HeaterRelay); // If sensor 2 temperature >= HighTemp - turn off heater
    }
    void StandardHeater1(byte HeaterRelay, int LowTemp, int HighTemp)
    {
    if (ReefAngel.Params.Temp[T1_PROBE] == 0) return; // Don't turn the heater on if the temp is reading 0
    if (ReefAngel.Params.Temp[T1_PROBE] <= LowTemp && ReefAngel.Params.Temp[T1_PROBE] > 0) ReefAngel.Relay.On(HeaterRelay); // If sensor 2 temperature <= LowTemp - turn on heater
    if (ReefAngel.Params.Temp[T1_PROBE] >= HighTemp) ReefAngel.Relay.Off(HeaterRelay); // If sensor 2 temperature >= HighTemp - turn off heater
    }



what I stumbled upon was when I got a second temp probe(6ft) the RA would still see the 3ft temp probe as number one. (due to the serial numbers).

my original code used ReefAngel.StandardHeater
and this for my second
Code: Select all
void StandardHeater2(byte HeaterRelay, int LowTemp, int HighTemp)
    {
    if (ReefAngel.Params.Temp[T2_PROBE] == 0) return; // Don't turn the heater on if the temp is reading 0
    if (ReefAngel.Params.Temp[T2_PROBE] <= LowTemp && ReefAngel.Params.Temp[T2_PROBE] > 0) ReefAngel.Relay.On(HeaterRelay); // If sensor 2 temperature <= LowTemp - turn on heater
    if (ReefAngel.Params.Temp[T2_PROBE] >= HighTemp) ReefAngel.Relay.Off(HeaterRelay); // If sensor 2 temperature >= HighTemp - turn off heater
    }


the problem was that the RA was seeing both probes as probe 1 even though I told it not to. so my first probe was for my second tank and was supposed to kick the heater on at 76. my second probe was for my first tank and was supposed to kick that heater on at 80. what I noticed was that when the first probe would tell the relay to turn on it would reboot the RA endlessly.

I verified this by taking the 80 degree probe and putting it in freezing cold water and it would try to turn on the relay port for the 76 degree temp probe.

hopefully you're following all of this.

so I dropped the reefangel.standard and used this
Code: Select all
    void StandardHeater2(byte HeaterRelay, int LowTemp, int HighTemp)
    {
    if (ReefAngel.Params.Temp[T2_PROBE] == 0) return; // Don't turn the heater on if the temp is reading 0
    if (ReefAngel.Params.Temp[T2_PROBE] <= LowTemp && ReefAngel.Params.Temp[T2_PROBE] > 0) ReefAngel.Relay.On(HeaterRelay); // If sensor 2 temperature <= LowTemp - turn on heater
    if (ReefAngel.Params.Temp[T2_PROBE] >= HighTemp) ReefAngel.Relay.Off(HeaterRelay); // If sensor 2 temperature >= HighTemp - turn off heater
    }
    void StandardHeater1(byte HeaterRelay, int LowTemp, int HighTemp)
    {
    if (ReefAngel.Params.Temp[T1_PROBE] == 0) return; // Don't turn the heater on if the temp is reading 0
    if (ReefAngel.Params.Temp[T1_PROBE] <= LowTemp && ReefAngel.Params.Temp[T1_PROBE] > 0) ReefAngel.Relay.On(HeaterRelay); // If sensor 2 temperature <= LowTemp - turn on heater
    if (ReefAngel.Params.Temp[T1_PROBE] >= HighTemp) ReefAngel.Relay.Off(HeaterRelay); // If sensor 2 temperature >= HighTemp - turn off heater
    }


and THOSE reboots ceased. I'm still getting reboots from the wifi module however.
Image

Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD
PostPosted: Thu Jul 04, 2013 7:54 pm
thx, I'll study this this weekend.
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.

Posts: 151
Joined: Wed Mar 13, 2013 5:36 pm
PostPosted: Fri Jul 05, 2013 5:16 am
to make it easy on you...

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 <RA_Colors.h>
    #include <RA_CustomColors.h>
    #include <Relay.h>
    #include <RA_PWM.h>
    #include <Timer.h>
    #include <Memory.h>
    #include <IO.h>
    #include <Salinity.h>
    #include <PH.h>
    #include <ReefAngel.h>

    // Set global variables
        boolean PowerOutage=false;
        boolean DelayedPowerOutage=false;

    // Globals for Params on Custom Main
    byte x,y;
    char text[10];

    // Custom Menu
    #include <avr/pgmspace.h>
    prog_char menu0_label[] PROGMEM = "Turn Lights On";
    prog_char menu1_label[] PROGMEM = "Turn Lights Off";
    prog_char menu2_label[] PROGMEM = "Start Feeding";
    prog_char menu3_label[] PROGMEM = "Start Water Change";
    prog_char menu4_label[] PROGMEM = "Clear Overheat";
    prog_char menu5_label[] PROGMEM = "Calibrate pH";
    prog_char menu6_label[] PROGMEM = "Calibrate Salinity";
    PROGMEM const char *menu_items[] = {
    menu0_label, menu1_label, menu2_label, menu3_label, menu4_label, menu5_label, menu6_label  };

    void MenuEntry1()
    {
    ReefAngel.DisplayMenuEntry("Item 1");ReefAngel.Relay.RelayMaskOn = ReefAngel.LightsOnPorts;
    #ifdef RelayExp
    for ( byte i = 0; i < MAX_RELAY_EXPANSION_MODULES; i++ )
    {
        ReefAngel.Relay.RelayMaskOnE[i] = ReefAngel.LightsOnPortsE[i];
    }
    #endif  // RelayExp
    ReefAngel.Relay.Write();

    }
    void MenuEntry2()
    {
    ReefAngel.DisplayMenuEntry("Item 2");ReefAngel.Relay.RelayMaskOn = 0;
    #ifdef RelayExp
    for ( byte i = 0; i < MAX_RELAY_EXPANSION_MODULES; i++ )
    {
        ReefAngel.Relay.RelayMaskOnE[i] = 0;
    }
    #endif  // RelayExp
    ReefAngel.Relay.Write();

    }
    void MenuEntry3()
    {
    ReefAngel.DisplayMenuEntry("Item 3");ReefAngel.FeedingModeStart();

    }
    void MenuEntry4()
    {
    ReefAngel.DisplayMenuEntry("Item 4");ReefAngel.WaterChangeModeStart();

    }
    void MenuEntry5()
    {
    ReefAngel.DisplayMenuEntry("Item 5");ReefAngel.OverheatClear();

    }
    void MenuEntry6()
    {
    ReefAngel.DisplayMenuEntry("Item 6");ReefAngel.SetupCalibratePH();
    ReefAngel.DisplayedMenu = ALT_SCREEN_MODE;

    }
    void MenuEntry7()
    {
    ReefAngel.DisplayMenuEntry("Item 7");ReefAngel.SetupCalibrateSalinity();

    }
    // End Custom Menu Globals

    void setup() {
        ReefAngel.Init();  //Initialize controller
        ReefAngel.InitMenu(pgm_read_word(&(menu_items[0])),SIZE(menu_items)); // Initialize the menu
        ReefAngel.FeedingModePorts = Port5Bit | Port6Bit | Port7Bit | Port8Bit; // Turn off DT-LWM, GT-LWM, GT-Pump, and DT-Pump when feeding mode is activated is activated on Box1
        ReefAngel.FeedingModePortsE[0] = Port5Bit | Port6Bit | Port7Bit; // Turn off DT-RWM, GT-RWM, and Skimmer when feeding mode is activated is activated on Box2
        ReefAngel.WaterChangePorts = Port3Bit | Port5Bit | Port6Bit | Port7Bit | Port8Bit; // Turn off DT-Heat, DT-LWM, GT-Pump, and DT-Pump when water change mode is activated
        ReefAngel.TempProbe = T2_PROBE;  // Set the 2nd plug to be DT Main temp
        ReefAngel.OverheatProbe = T2_PROBE;  // to monitor the overheat and temperatures
        ReefAngel.OverheatShutoffPorts = Port1Bit | Port3Bit;  // DT-Lights and DT-Heat turned off when Overheat temperature exceeded
        ReefAngel.OverheatShutoffPortsE[0] = Port7Bit; //Skimmer turned off if overheat
        InternalMemory.OverheatTemp_write( 829 ); // Set the DT Overheat temperature setting
        ReefAngel.LightsOnPorts = Port1Bit | Port2Bit; // Toggle DT Lights
        ReefAngel.LightsOnPortsE[0] = Port3Bit | Port4Bit; // Toggle GT Lights
    }

    void loop()
    {

    // Specific functions
        ReefAngel.Relay.On(Port8); // Turn on Pump
        ReefAngel.Relay.On(Port7); // Turn on GT Pump
    // Ports that are delayed on Power Cycle & Feeding & Water Change
        if (PowerOutage && ReefAngel.Relay.IsRelayPresent(EXP1_RELAY))
        {
          PowerOutage=false;
          DelayedPowerOutage=false;
          LastStart=now();
        }
        ReefAngel.Relay.DelayedOn( Port7,2 ); //GT-Pump -set to 2 min for testing CHANGE TO 4MINS
        ReefAngel.Relay.DelayedOn( Port8,1 ); //DT-Pump -set to 1 min for testing CHANGE TO 2MINS
        // ReefAngel.Relay.DelayedOn( Box1_Port7,3 ); //Skimmer -set to 1 min for testing CHANGE TO 6MINS
        ReefAngel.Relay.On(Box1_Port8); // power the PH expansion hub
        ReefAngel.StandardLights( Port1,14,00,22,00 ); // DT Lights on at 2:00pm and off at 10:00pm
        // ReefAngel.StandardLights( Port2,22,00,01,00 ); // DT-Moon Lights on at 10:00am and off at 1:00am
        ReefAngel.StandardLights( Box1_Port1,0,0,6,0 ); //Turn on reservoir between 12 AM and 6 AM
        ReefAngel.StandardLights( Box1_Port3,14,00,21,45 );  //GT Lights Main 2:00pm - 9:45pm
        ReefAngel.StandardLights( Box1_Port4,15,00,22,30 ); //GT Lights Actinic 3:00pm - 10:30pm
        ReefAngel.WavemakerRandom( Port5,60,100 );
        ReefAngel.Relay.Set( Box1_Port5, !ReefAngel.Relay.Status( Port5 ) ); //Randomize DT powerheads
        ReefAngel.WavemakerRandom1( Port6,60,100 );
        ReefAngel.Relay.Set( Box1_Port6, !ReefAngel.Relay.Status( Port6 ) ); //Randomize GT powerheads
        StandardHeater1(Port3,779,791); //DT-Heat
        StandardHeater2( Port4,779,791 ); //GT-Heat
       
    // if the hour is 2p or 8p, minute is 55 and seconds is 0, start the feeding mode
          if ( ((hour() == 14) || (hour() == 20)) &&
          (minute() == 55) &&
          (second() == 0) )
                    {
          ReefAngel.FeedingModeStart();
          }   
         
    //turn off port 8 - DT pump when switch is tripped and sound buzzer
         ReefAngel.Relay.Set(Port8,ReefAngel.IO.GetChannel(0));
         ReefAngel.PWM.SetDaylight(100-(ReefAngel.IO.GetChannel(0)*100));
       
    //turn off port 7 - GT pump when switch is tripped and sound buzzer
         ReefAngel.Relay.Set(Port7,ReefAngel.IO.GetChannel(1));
         ReefAngel.PWM.SetDaylight(100-(ReefAngel.IO.GetChannel(1)*100));
             
    //tell the portal we have a overflow problem
         ReefAngel.CustomVar[0]=ReefAngel.IO.GetChannel(0);
         ReefAngel.CustomVar[1]=ReefAngel.IO.GetChannel(1);
         ReefAngel.CustomVar[7]=1;
         
    //set up dosing pump one to run twice a week for 4 minutes
         //ReefAngel.Relay.Set(Box1_Port2,((weekday()==1||weekday()==4) && hour()==14 && minute()<6));
         //ReefAngel.Relay.Set (Box1_Port3,(hour()%2==0)); //stir chemicals in water top off unit

    // Power Outage - Only DT,GT LWM & Heat ports on
         if (!ReefAngel.Relay.IsRelayPresent(EXP1_RELAY)) PowerOutage=true; //Exp1 Relay NOT present
         if (!PowerOutage)
         {
          ReefAngel.Timer[1].Start();
         }
         if (ReefAngel.Timer[1].IsTriggered())
         {
          DelayedPowerOutage=true;
         }
         if (DelayedPowerOutage)
         {
          ReefAngel.Relay.Off (Port1); //DT Lights 1
          ReefAngel.Relay.Off (Port2); //DT Lights 2
          ReefAngel.Relay.Off (Port7); //GT Pump
          ReefAngel.Relay.Off (Port8); //DT Pump
         
         }
         // Skimmer off when Return pump is off.
         if (bitRead(ReefAngel.Relay.RelayMaskOff,7)==0) //Return
         {
            bitClear(ReefAngel.Relay.RelayMaskOffE[0],6); //Skimmer
         }     
     
             
        ReefAngel.Portal("rossbryant1956");
        ReefAngel.ShowInterface();
    }
     void StandardHeater1(byte HeaterRelay, int LowTemp, int HighTemp)
        {
        if (ReefAngel.Params.Temp[T2_PROBE] == 0) return; // Don't turn the heater on if the temp is reading 0
        if (ReefAngel.Params.Temp[T2_PROBE] <= LowTemp && ReefAngel.Params.Temp[T2_PROBE] > 0) ReefAngel.Relay.On(HeaterRelay); // If sensor 2 temperature <= LowTemp - turn on heater
        if (ReefAngel.Params.Temp[T2_PROBE] >= HighTemp) ReefAngel.Relay.Off(HeaterRelay); // If sensor 2 temperature >= HighTemp - turn off heater
        }


   void StandardHeater2(byte HeaterRelay, int LowTemp, int HighTemp) //Heater for Grow Tank
    {
        if (ReefAngel.Params.Temp[T1_PROBE] == 0) return;  // Don't turn the heater on if the temp is reading 0
        if (ReefAngel.Params.Temp[T1_PROBE] <= LowTemp && ReefAngel.Params.Temp[T1_PROBE] > 0) ReefAngel.Relay.On(HeaterRelay);  // If sensor temperature <= LowTemp - turn on heater
        if (ReefAngel.Params.Temp[T1_PROBE] >= HighTemp) ReefAngel.Relay.Off(HeaterRelay);  // If sensor temperature >= HighTemp - turn off heater
    }

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

       // pH Expansion
      ReefAngel.LCD.DrawText( COLOR_MEDIUMSEAGREEN,DefaultBGColor,15,75, "GT pH:" );
      char text[7];
      ConvertNumToString(text, ReefAngel.Params.PHExp, 100);
      ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN, DefaultBGColor, 55, 75, text);
     
      // Main Relay Box
      byte TempRelay = ReefAngel.Relay.RelayData;
      TempRelay &= ReefAngel.Relay.RelayMaskOff;
      TempRelay |= ReefAngel.Relay.RelayMaskOn;
      ReefAngel.LCD.DrawOutletBox( 12, 93, TempRelay );
      pingSerial();

       // Relay Expansion
      TempRelay = ReefAngel.Relay.RelayDataE[0];
      TempRelay &= ReefAngel.Relay.RelayMaskOffE[0];
      TempRelay |= ReefAngel.Relay.RelayMaskOnE[0];
      ReefAngel.LCD.DrawOutletBox( 12, 107, TempRelay );
      pingSerial();

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

    void DrawCustomGraph()
    {
    // ReefAngel.LCD.DrawGraph( 5, 5 );
    }
Image

Posts: 267
Joined: Fri Jul 20, 2012 7:13 am
Location: Oakley, CA
PostPosted: Fri Jul 05, 2013 12:16 pm
rossbryant1956 wrote:no more rebooting, pH is stable, probe still in the glass of tank water. I'll put the probe back in the tank before leaving for tonite's festivities and see what happens while I'm gone.


How did the pH do with the probe back in the tank?

To check for stray voltage the best thing to do is start unplugging devices one by one and checking your pH swing. When your pH stops fluctuating, you found the offending device. Don't forget to unplug your float switches to see if one of them may be causing the problem as well.

~Charlie

Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD
PostPosted: Fri Jul 05, 2013 1:07 pm
It has been steady at 7.85 since going back in the tank on the portal. On the client, however, I'll see an occasional blip where the pH drops down into the 4's for a hour and then comes right back. The portal hasn't caught that, yet. I am almost wondering if I am seeing an internet outage at home periodically.

What does the portal do if it sees an outage in the logs? Running fine, loses connectivity for a short period, then it's back?

At any rate, I am going start hooking everything back up tonite\this weekend. I will be playing with my new multimeter to see if I can detect any stray voltage while I do it. Really don't want to discover it is bad float valves because I use a bunch of them in my systems.

Thx to all that helped and maybe some others learned something as well. Ross
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.

Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD
PostPosted: Fri Jul 05, 2013 4:46 pm
Thx Ben for the code change. I also grabbed some of your menu code from another post. Again, thx!!
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.
Previous

Return to You and your tank

Who is online

Users browsing this forum: No registered users and 2 guests

cron