Heater relay not controlled by proper temperature sensor?

Basic / Standard Reef Angel hardware
Post Reply
billybob
Posts: 21
Joined: Tue Apr 17, 2012 2:47 pm
Location: Colorado

Heater relay not controlled by proper temperature sensor?

Post by billybob »

Hi--

I have three temperature probes in use with an RA+:
T1_PROBE = lights temperature (probe thermally cemented to LED heatsink)
T2_PROBE = room temperature
T3_PROBE = water temperature

I have always had my heater relay (port 6, in this case) tied to T3_PROBE, but recently the relay apparently started responding instead to T1: when the 'lights temperature' exceeded the 'heater-off temperature', the heater goes off. When the lights later turn off and the heatsink temperature drops below the 'heater-on temperature', the heater goes on.

I can verify that each of the 3 probes are reading the correct corresponding temperatures, e.g. the T3_PROBE reading matches the water temperature obtained with a simple bulb thermometer. Since the heatsink is generally much warmer than the water temp when the lights are on, the net effect is that my heater runs continuously during the entire period when the lights are off, and the heater stays off throughout the period when the lights are on.

(FWIW, the overheat function is tied to the T1_PROBE so that the lights turn off if the heatsink gets too warm, and appears to work correctly. The heater does not respond at all to any fluctuations in the water temperature.)

I'm baffled. I've tried re-uploading my code, replacing probes, and even swapped in a spare RA+ board, but get the same effect.

FTR, here is my current working code. Pretty basic, straight off the RA Wizard with the addition of a couple lines changing the Overheat and TempProbe definitions. Does this look correct? Am I doing something stupid in the code, or is this possibly some kind of hardware issue?

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 <PAR.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
    // ReefAngel.AddStandardMenu ();  // Add standard menu
    ReefAngel.Use2014Screen();  // Let's use 2014 Screen 
    // Ports toggled in Feeding Mode
    ReefAngel.FeedingModePorts = Port3Bit | Port4Bit | Port6Bit;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = Port3Bit | Port4Bit | Port6Bit;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = Port5Bit | Port7Bit | Port8Bit;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = Port7Bit | Port8Bit;
    // Use T1 (light) probe as overheat function and T3 (water) probe as temperature function
    ReefAngel.TempProbe = T3_PROBE;
    ReefAngel.OverheatProbe = T1_PROBE;


    // Ports that are always on
    ReefAngel.Relay.On( Port1 );
    ReefAngel.Relay.On( Port2 );
    ReefAngel.Relay.On( Port4 );

    ////// Place additional initialization code below here
    

    ////// Place additional initialization code above here
}

void loop()
{
    ReefAngel.CO2Control( Port3 );
    ReefAngel.DayLights( Port5 );
    ReefAngel.StandardHeater( Port6 );
    ReefAngel.DayLights( Port7 );
    ReefAngel.ActinicLights( Port8 );
    ReefAngel.PWM.DaylightPWMParabola();
    ReefAngel.PWM.ActinicPWMParabola();
    ReefAngel.PWM.SetChannel( 0, MoonPhase() );
    ////// Place your custom code below here
    

    ////// Place your custom code above here
    ReefAngel.Portal( "xxx","xxxxxxxxxxxxxxxx" );
    
    // This should always be the last line
    ReefAngel.AddWifi();
    ReefAngel.ShowInterface();
}
Any thoughts? I'd greatly appreciate suggestions or diagnostics.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Heater relay not controlled by proper temperature sensor

Post by rimai »

Somehow there was a mistake on the last libraries release that is not taking the temp probe you assigned in the code.
So, as a work around, replace StandardHeater with StandardHeater3
Let us know if that fixes it.
Roberto.
billybob
Posts: 21
Joined: Tue Apr 17, 2012 2:47 pm
Location: Colorado

Re: Heater relay not controlled by proper temperature sensor

Post by billybob »

...replacing line

Code: Select all

ReefAngel.StandardHeater( Port6 );
with

Code: Select all

ReefAngel.StandardHeater3( Port6 );
gives me a "no matching function for call to 'ReefAngelClass::StandardHeater3(int)' " error when I try to compile. Did I misunderstand the change that needed to be made?

I'm using libraries v1.1.3. I could roll back a version or two if that seems like a sensible solution.

many thanks.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Heater relay not controlled by proper temperature sensor

Post by rimai »

I think you better off using the web wizard.
It has the latest dev brach.
http://forum.reefangel.com/viewtopic.php?f=8&t=6199
Roberto.
billybob
Posts: 21
Joined: Tue Apr 17, 2012 2:47 pm
Location: Colorado

Re: Heater relay not controlled by proper temperature sensor

Post by billybob »

Thanks Roberto, I missed that thread entirely.

The Webwizard worked like a charm, and appears to also work around the admin libraries issue I mentioned in viewtopic.php?f=7&t=1793. The heater port appears to be responding correctly to the water temperature probe now.

ReefAngel rocks! Thanks so much for your efforts and help.
Post Reply