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

Do you have a question on how to do something.
Ask in here.
Reefbound
Posts: 46
Joined: Wed Sep 18, 2013 1:54 pm

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

Post 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?
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

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

Post 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
You do not have the required permissions to view the files attached to this post.
Roberto.
Reefbound
Posts: 46
Joined: Wed Sep 18, 2013 1:54 pm

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

Post by Reefbound »

USB power cable?
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

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

Post 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.
Roberto.
Reefbound
Posts: 46
Joined: Wed Sep 18, 2013 1:54 pm

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

Post by Reefbound »

Yes standard, Let me ask. Can I hook up the controller and power cable and test that way with it apart?
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

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

Post by rimai »

Yes, try doing that.
Roberto.
Reefbound
Posts: 46
Joined: Wed Sep 18, 2013 1:54 pm

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

Post by Reefbound »

I'm not getting any voltage on both pins testing this way.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

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

Post by rimai »

Did you set both channels to 70%?
Roberto.
Reefbound
Posts: 46
Joined: Wed Sep 18, 2013 1:54 pm

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

Post 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.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

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

Post 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.
Roberto.
Reefbound
Posts: 46
Joined: Wed Sep 18, 2013 1:54 pm

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

Post 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.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

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

Post 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.
Roberto.
Reefbound
Posts: 46
Joined: Wed Sep 18, 2013 1:54 pm

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

Post 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?
Reefbound
Posts: 46
Joined: Wed Sep 18, 2013 1:54 pm

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

Post by Reefbound »

pm sent.
Reefbound
Posts: 46
Joined: Wed Sep 18, 2013 1:54 pm

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

Post 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.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

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

Post by rimai »

So, you set them to 70% and they output 9V?
Doesn't sound right.
Roberto.
Reefbound
Posts: 46
Joined: Wed Sep 18, 2013 1:54 pm

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

Post 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.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

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

Post 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.
Roberto.
Reefbound
Posts: 46
Joined: Wed Sep 18, 2013 1:54 pm

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

Post 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.
Reefbound
Posts: 46
Joined: Wed Sep 18, 2013 1:54 pm

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

Post by Reefbound »

Before I do anything I'm going to wait for your response.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

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

Post 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.
Roberto.
Reefbound
Posts: 46
Joined: Wed Sep 18, 2013 1:54 pm

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

Post 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?
Reefbound
Posts: 46
Joined: Wed Sep 18, 2013 1:54 pm

Getting Kessil lights to work partII

Post 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.
Reefbound
Posts: 46
Joined: Wed Sep 18, 2013 1:54 pm

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

Post 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.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

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

Post by rimai »

So nothing with the wizard code, huh?
That's so strange... Just doesn't make sense.
Can you post your code?
Roberto.
Reefbound
Posts: 46
Joined: Wed Sep 18, 2013 1:54 pm

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

Post 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();
}
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

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

Post 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();
}
Roberto.
Reefbound
Posts: 46
Joined: Wed Sep 18, 2013 1:54 pm

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

Post 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.
Reefbound
Posts: 46
Joined: Wed Sep 18, 2013 1:54 pm

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

Post 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 '
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

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

Post 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)));
	}
}
Roberto.
Post Reply