My pH meter doesn't appear to have any physical damage. The bulb is not cracked or damaged in any visible way. After I calibrate it, it measures the pHs of my 7 and 10 standards correctly and it measures the pH of my tap water approximately correctly. But when I drop it in my tank, it says the pH is 1.6 ...
Considering that I did not just dump a bottle of HCL into my tank, and its inhabitants are all pretty much OK, I know something is wrong. I have been having this issue for a few months now... The probe is not near any wires or pumps.
I had problems getting my RA to properly perform the StandardATO function. It kept performing the SingleATO function instead. I finally got it to work last week (I have no idea how...it just decided to work for no apparent reason that I can understand). But it only works properly intermittently. When the low ATO switch is triggered, the pump comes on. I have the timeout set for 240 seconds. But sometimes, the pump just shuts off, before the high ATO switch is visibly triggered and way before the timeout expires. I have the float switches mounted correctly, the high switch pointing up and the low switch pointing down.
Here's my code:
Code: Select all
// Autogenerated file by RAGen (v1.2.2.171), (06/07/2012 14:54)
// RA_060712_1454.ino
//
// This version designed for v0.9.0 or later
/* The following features are enabled for this File:
#define VersionMenu
#define DisplayLEDPWM
#define CUSTOM_MENU
#define CUSTOM_MENU_ENTRIES 8
*/
#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 <ReefAngel.h>
////// Place global variable code below here
////// Place global variable code above here
#include <avr/pgmspace.h>
prog_char menu0_label[] PROGMEM = "Feeding";
prog_char menu1_label[] PROGMEM = "Water Change";
prog_char menu2_label[] PROGMEM = "pH Calibration";
prog_char menu3_label[] PROGMEM = "DT Lights On";
prog_char menu4_label[] PROGMEM = "DT Lights Off";
prog_char menu5_label[] PROGMEM = "Toggle Fuge Lights";
prog_char menu6_label[] PROGMEM = "Date/Time";
prog_char menu7_label[] PROGMEM = "ATO Clear";
PROGMEM const char *menu_items[] = {
menu0_label, menu1_label, menu2_label, menu3_label, menu4_label, menu5_label, menu6_label, menu7_label };
void MenuEntry1()
{
ReefAngel.DisplayMenuEntry("Item 1");
ReefAngel.FeedingModeStart();
}
void MenuEntry2()
{
ReefAngel.DisplayMenuEntry("Item 2");
ReefAngel.WaterChangeModeStart();
}
void MenuEntry3()
{
ReefAngel.DisplayMenuEntry("Item 3");
ReefAngel.SetupCalibratePH();
ReefAngel.DisplayedMenu = ALT_SCREEN_MODE;
}
void MenuEntry4()
{
ReefAngel.DisplayMenuEntry("Item 4");
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 MenuEntry5()
{
ReefAngel.DisplayMenuEntry("Item 5");
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 MenuEntry6()
{
ReefAngel.DisplayMenuEntry("Item 6");
ReefAngel.Relay.Toggle(Port3);
ReefAngel.Relay.Write();
}
void MenuEntry7()
{
ReefAngel.DisplayMenuEntry("Item 7");
ReefAngel.SetupDateTime();
ReefAngel.DisplayedMenu = ALT_SCREEN_MODE;
}
void MenuEntry8()
{
ReefAngel.ATOClear();
ReefAngel.DisplayMenuEntry("Cleared ATO Timeout");
}
void setup()
{
// This must be the first line
ReefAngel.Init(); //Initialize controller
// Initialize the custom menu
ReefAngel.InitMenu(pgm_read_word(&(menu_items[0])),SIZE(menu_items));
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port2Bit | Port4Bit | Port5Bit | Port6Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port2Bit | Port4Bit | Port5Bit | Port6Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port1Bit;
// Ports that are always on
ReefAngel.Relay.On(Port4);
ReefAngel.Relay.On(Port5);
////// Place additional initialization code below here
ReefAngel.Timer[1].SetInterval(8);//Wavemaker Timer
ReefAngel.Timer[1].Start();
ReefAngel.Timer[2].SetInterval(8);//Wavemaker Delay Timer
// Initialize and start the RA Client logging timer
ReefAngel.Timer[4].SetInterval(15); // set interval to 15 seconds
ReefAngel.Timer[4].Start();
////// Place additional initialization code above here
}
void loop()
{
// Specific functions that use Internal Memory values
ReefAngel.StandardLights(Port1);
ReefAngel.StandardHeater(Port2);
ReefAngel.StandardLights(Port3,19,00,11,00);
ReefAngel.StandardATO(Port7);
//ReefAngel.DosingPumpRepeat(Port8,0,1440,3); // Dose for 6 second every 24 hours with 0 minutes offset
// PWMSlope based on Internal Memory values for Standard Lights
ReefAngel.PWM.ActinicPWMSlope(90);
ReefAngel.PWM.DaylightPWMSlope();
////// Place your custom code below here
if (ReefAngel.Timer[1].IsTriggered())//Wavemakers' Control
{
ReefAngel.Timer[2].Start();
ReefAngel.Relay.On(Port6);//Wavemaker 2
}
if (ReefAngel.Timer[2].IsTriggered())//Wavemakers' Control
{
ReefAngel.Relay.Off(Port6);
ReefAngel.Timer[1].Start();
}
// Dump Params
if(ReefAngel.Timer[4].IsTriggered())
{
Serial.flush();
Serial.print("<RA><T1>");
Serial.print(ReefAngel.TempSensor.ReadTemperature(ReefAngel.TempSensor.addrT1));
Serial.print("</T1><T2>");
Serial.print(ReefAngel.TempSensor.ReadTemperature(ReefAngel.TempSensor.addrT2));
Serial.print("</T2><T3>");
Serial.print(ReefAngel.TempSensor.ReadTemperature(ReefAngel.TempSensor.addrT3));
Serial.print("</T3><PH>");
Serial.print(ReefAngel.Params.PH);
Serial.print("</PH><R>");
Serial.print(ReefAngel.Relay.RelayData,DEC);
Serial.print("</R><RON>");
Serial.print(ReefAngel.Relay.RelayMaskOn,DEC);
Serial.print("</RON><ROFF>");
Serial.print(ReefAngel.Relay.RelayMaskOff,DEC);
Serial.print("</ROFF></RA>");
ReefAngel.Timer[4].Start();
}
////// Place your custom code above here
// This should always be the last line
ReefAngel.ShowInterface();
}
Thanks!