Page 2 of 3

Re: need help getting kessil 360w's to work with RA

Posted: Sat Sep 21, 2013 1:49 pm
by Reefbound
OK, I'm willing to try to help you any way I can. Just know I'm not an electronics wiz. Whats first?

Re: need help getting kessil 360w's to work with RA

Posted: Sat Sep 21, 2013 2:21 pm
by rimai
Ok, you will need to do this:
Open the head unit enclosure and unscrew the board.
Use the USB power cable to power the head unit.
Flip it upside down
Use the black lead of the multimeter on the GND pin.
Measure the voltage in those two pins shown in the photo.
SVGA-Connector.png

Re: need help getting kessil 360w's to work with RA

Posted: Sat Sep 21, 2013 2:40 pm
by Reefbound
USB power cable?

Re: need help getting kessil 360w's to work with RA

Posted: Sat Sep 21, 2013 2:49 pm
by rimai
Did you get the standard RA?
It doesn't come with one :(
I can send you one to test this or we don't have another choice but sending it back.

Re: need help getting kessil 360w's to work with RA

Posted: Sat Sep 21, 2013 2:52 pm
by Reefbound
Yes standard, Let me ask. Can I hook up the controller and power cable and test that way with it apart?

Re: need help getting kessil 360w's to work with RA

Posted: Sat Sep 21, 2013 2:53 pm
by rimai
Yes, try doing that.

Re: need help getting kessil 360w's to work with RA

Posted: Sat Sep 21, 2013 3:00 pm
by Reefbound
I'm not getting any voltage on both pins testing this way.

Re: need help getting kessil 360w's to work with RA

Posted: Sat Sep 21, 2013 3:01 pm
by rimai
Did you set both channels to 70%?

Re: need help getting kessil 360w's to work with RA

Posted: Sat Sep 21, 2013 3:07 pm
by Reefbound
OK, with both channels on 70% on the actinic side my meter is bouncing between 3 and 5 volts and on the daylight side 0 to 2.

Re: need help getting kessil 360w's to work with RA

Posted: Sat Sep 21, 2013 3:34 pm
by rimai
It should not be bouncing. Maybe it is just bad connection.
Can you try again?
But it does seem that the problem is in the head unit and not in the relay box.

Re: need help getting kessil 360w's to work with RA

Posted: Sat Sep 21, 2013 3:48 pm
by Reefbound
ok, I borrowed a neighbor's multimeter and the actinic side on his meter is a steady 3 volts, the daylight side is steady at 1.

Re: need help getting kessil 360w's to work with RA

Posted: Sat Sep 21, 2013 3:49 pm
by rimai
Ok, that's what I was guessing from the other post.
The head unit is the culprit.
You need another one. PM me for RMA.

Re: need help getting kessil 360w's to work with RA

Posted: Sat Sep 21, 2013 3:52 pm
by Reefbound
Ok I will send you a pm in a minute, Since I'm on the east coast do you think it might be wise to send the entire unit back to you for repair/replacement just to be cautious?

Re: need help getting kessil 360w's to work with RA

Posted: Sat Sep 21, 2013 4:05 pm
by Reefbound
pm sent.

Re: need help getting kessil 360w's to work with RA

Posted: Wed Sep 25, 2013 1:11 pm
by Reefbound
Roberto,
New board arrived today thank you, but, After installing new board, running voltage test, 9 volts each leg and uploading your code, only one side will control the lights. I was going to try the wizard but I want to wait and hear from you first.

Re: need help getting kessil 360w's to work with RA

Posted: Wed Sep 25, 2013 1:31 pm
by rimai
So, you set them to 70% and they output 9V?
Doesn't sound right.

Re: need help getting kessil 360w's to work with RA

Posted: Wed Sep 25, 2013 1:47 pm
by Reefbound
Checked again, my apologies, On the actinic side I have 6 volts, On the day light 9. So you understand what I have right now, I can control the lights to an extent. I can control the light color be more blue or more white. I cannot control the intensity dim vs. bright.

Re: need help getting kessil 360w's to work with RA

Posted: Wed Sep 25, 2013 1:52 pm
by rimai
That's exactly what you had before.
So, the issue is not the head unit board.
I think you will need to send it back.

Re: need help getting kessil 360w's to work with RA

Posted: Wed Sep 25, 2013 2:03 pm
by Reefbound
Ok, I don't have a problem with that. What else can be the issue? I'm thinking return entire unit for replacement/ refund.

Re: need help getting kessil 360w's to work with RA

Posted: Wed Sep 25, 2013 3:58 pm
by Reefbound
Before I do anything I'm going to wait for your response.

Re: need help getting kessil 360w's to work with RA

Posted: Wed Sep 25, 2013 4:06 pm
by rimai
Yes, it could be either the relay box or the svga cable.
I think I remember seeing this in the past vaguely and the issue was the cable.
So, your choice.
You can send everything back for me to look at or I can send you another cable to check.

Re: need help getting kessil 360w's to work with RA

Posted: Wed Sep 25, 2013 4:22 pm
by Reefbound
At this point I'm going to send the entire control system including the unused ph probe and all cables back to you for a complete check out. I'm not going to change the board out unless you want me to but, I will include the changed out board in the same box. Let me know if this is suitable to you. will I need another RMA number for the return?

Getting Kessil lights to work partII

Posted: Fri Oct 11, 2013 12:52 pm
by Reefbound
Roberto, Thanks for getting everything turned back to me so quickly. As we spoke about in our pm, I have the code from the wizard loaded but I wont know if it ramps down for a couple of hours.

Re: need help getting kessil 360w's to work with RA

Posted: Fri Oct 11, 2013 3:29 pm
by Reefbound
Ok, They have not even started to ramp down. I'm wondering something. In your code that you loaded includes these lines.

ReefAngel.PWM.SetActinic(ap);
ReefAngel.PWM.SetDaylight(dp);

specifically (ap) (dp)

In the code done by the wizard looks like this

ReefAngel.PWM.SetDaylight( PWMParabola(7,0,18,0,12,100,12) );
ReefAngel.PWM.SetActinic( PWMParabola(8,0,19,0,12,100,12) );

do you think that by adding the ap,dp it may allow it to work? again I'm not code writing literate.

Re: need help getting kessil 360w's to work with RA

Posted: Fri Oct 11, 2013 5:02 pm
by rimai
So nothing with the wizard code, huh?
That's so strange... Just doesn't make sense.
Can you post your code?

Re: need help getting kessil 360w's to work with RA

Posted: Sat Oct 12, 2013 12:43 am
by Reefbound
Nothing at all with the wizard code. Here is the code you asked for.

#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
ReefAngel.AddStandardMenu(); // Add Standard Menu

// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = 0;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = 0;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port1Bit | Port2Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = 0;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 869 );


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

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


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

void loop()
{
ReefAngel.PWM.SetDaylight( PWMParabola(7,0,18,0,12,100,12) );
ReefAngel.PWM.SetActinic( PWMParabola(8,0,19,0,12,100,12) );
////// Place your custom code below here


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

// This should always be the last line
ReefAngel.ShowInterface();
}

Re: need help getting kessil 360w's to work with RA

Posted: Sat Oct 12, 2013 9:15 am
by rimai
Ok, I'd like you to try this:

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
ReefAngel.AddStandardMenu(); // Add Standard Menu

// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = 0;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = 0;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port1Bit | Port2Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = 0;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 869 );


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

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


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

void loop()
{
////// Place your custom code below here
  pinMode(daylightPWMPin,OUTPUT);
  pinMode(actinicPWMPin,OUTPUT);
  digitalWrite(daylightPWMPin, 2.55*PWMParabola(7,0,18,0,12,100,12));
  digitalWrite(actinicPWMPin, 2.55*PWMParabola(8,0,19,0,12,100,12));
////// Place your custom code above here

// This should always be the last line
ReefAngel.ShowInterface();
}

Re: need help getting kessil 360w's to work with RA

Posted: Sat Oct 12, 2013 5:46 pm
by Reefbound
Sorry it took so long to get back to you, Very busy day. This a.m. I loaded a different code. I had everything start at the same time and it worked to a point. The lights turned on and ramped up at 8am BUT, they did not ramp down and turn off. I was hopeful. I will load your new code Sunday a.m. and will report what happens.

Re: need help getting kessil 360w's to work with RA

Posted: Sun Oct 13, 2013 7:43 am
by Reefbound
I tried to load your sketch and I get a compiling error.

Globals\Globals .cpp .o: In function 'PWMParabola(unsigned char' unsigned char' unsigned char' unsigned char' unsigned char' unsigned char' unsigned char') ':
C:/users/eddie/documents/audrino/libraries/Globals\Globals.ccp: 93 : undefined reference to 'Lightoverride '

Re: need help getting kessil 360w's to work with RA

Posted: Sun Oct 13, 2013 8:11 am
by rimai
Sorry, Let's try this:

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
ReefAngel.AddStandardMenu(); // Add Standard Menu

// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = 0;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = 0;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port1Bit | Port2Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = 0;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 869 );


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

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


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

void loop()
{
////// Place your custom code below here
  pinMode(daylightPWMPin,OUTPUT);
  pinMode(actinicPWMPin,OUTPUT);
  digitalWrite(daylightPWMPin, 2.55*MyPWMParabola(7,0,18,0,12,100,12));
  digitalWrite(actinicPWMPin, 2.55*MyPWMParabola(8,0,19,0,12,100,12));
////// Place your custom code above here

// This should always be the last line
ReefAngel.ShowInterface();
}

byte MyPWMParabola(byte startHour, byte startMinute, byte endHour, byte endMinute, byte startPWM, byte endPWM, byte oldValue)
{
	// Contribution of thekameleon
	// http://forum.reefangel.com/viewtopic.php?p=23813#p23813
	int current_hour = hour();
	int start = NumMins(startHour, startMinute);
	int end = NumMins(endHour, endMinute);
	if (start > end) //Start is greater than End so its over midnight
	{
		//Example: 2300hrs to 0200hrs
		if (current_hour < endHour) start -= 1440; //past midnight
		if (current_hour >= startHour) end += 1440; //before midnight
	}

	int current = NumMins(current_hour, minute());

	if ( current <= start || current >= end)
		return oldValue;
	else
	{
		byte pwmDelta = endPWM - startPWM;
		byte parabolaPhase = constrain(map(current, start, end, 0, 180), 0, 180);
		return startPWM + (pwmDelta * sin(radians(parabolaPhase)));
	}
}