Maybe I'm having a strange problem... Here's my code:
Code: Select all
ReefAngel.PWM.SetActinic(PWMSlope(11,0,20,0,100,70,120,ReefAngel.PWM.GetActinicValue()));
Code: Select all
ReefAngel.PWM.SetActinic(PWMSlope(11,0,20,0,100,70,120,ReefAngel.PWM.GetActinicValue()));
Code: Select all
ReefAngel.PWM.SetActinic(PWMSlope(11,0,20,0,70,100,120,ReefAngel.PWM.GetActinicValue()));
Code: Select all
ReefAngel.PWM.SetActinic(100-PWMSlope(11,0,20,0,0,30,120,ReefAngel.PWM.GetActinicValue()));
Code: Select all
byte BuckPuckActinic=0;
Code: Select all
BuckPuckActinic=PWMSlope(11,0,20,0,0,30,120,BuckPuckActinic);
ReefAngel.PWM.SetActinic(100-BuckPuckActinic);
Code: Select all
// Autogenerated file by RAGen (v1.0.4.92), (06/03/2011 21:13)
// RA_060311_2113.pde
//
// This version designed for v0.8.5 Beta 12 or later
/* The following features are enabled for this PDE File:
#define DisplayImages
#define DateTimeSetup
#define VersionMenu
#define ATOSetup
#define DirectTempSensor
#define DisplayLEDPWM
#define SingleATOSetup
#define StandardLightSetup
*/
#include <ReefAngel_Colors.h>
#include <ReefAngel_CustomColors.h>
#include <ReefAngel_Features.h>
#include <ReefAngel_Globals.h>
#include <ReefAngel_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <ReefAngel_EEPROM.h>
#include <ReefAngel_NokiaLCD.h>
#include <ReefAngel_ATO.h>
#include <ReefAngel_Joystick.h>
#include <ReefAngel_LED.h>
#include <ReefAngel_TempSensor.h>
#include <ReefAngel_Relay.h>
#include <ReefAngel_PWM.h>
#include <ReefAngel_Timer.h>
#include <ReefAngel_Memory.h>
#include <ReefAngel.h>
byte BuckPuckActinic=0;
byte BuckPuckDaylight=0;
void setup()
{
ReefAngel.Init(); //Initialize controller
ReefAngel.FeedingModePorts = B00000001; //turns off return pump
ReefAngel.WaterChangePorts = B01110001; //turns off return pump, heater, fan/chiller and ATO
ReefAngel.OverheatShutoffPorts = B00101110; //turns off lights and heater
ReefAngel.LightsOnPorts = B00001110; //turns on lights
// Ports that are always on
ReefAngel.Relay.On(Port1);
ReefAngel.Relay.On(Port8);
}
void loop()
{
ReefAngel.ShowInterface();
if (hour(now())<12)
BuckPuckActinic=PWMSlope(7,0,9,0,0,60,60,BuckPuckActinic); //actinic leds ramp up from 0% at 7:30am to 60% at 8:30am and ramp down from 6:00pm to 7:00pm back to 0%
else
BuckPuckActinic=PWMSlope(19,0,20,0,0,60,60,BuckPuckActinic); //actinic leds ramp up from 0% at 7:30am to 60% at 8:30am and ramp down from 6:00pm to 7:00pm back to 0%
BuckPuckDaylight=PWMSlope(8,30,18,0,0,60,60,BuckPuckDaylight); //daylight leds ramp up from 0% at 8:30am to 50% at 9:30am and ramp down from 5:00pm to 6:0pm back to 0%
ReefAngel.PWM.SetActinic(100-BuckPuckActinic); // invert value for buckpucks
ReefAngel.PWM.SetDaylight(100-BuckPuckDaylight); // invert value for buckpucks
// Specific functions
ReefAngel.StandardLights(Port2);
ReefAngel.StandardLights(Port3);
ReefAngel.StandardLights(Port4);
ReefAngel.StandardFan(Port5);
ReefAngel.StandardHeater(Port6);
ReefAngel.SingleATOHigh(Port7);
}
Hmm gotcha. Would it be better to build that circuit they describe on the wiring diagram in order to have them run in a non-inverted state?rimai wrote:nanotrevor is having a hard time with pucks.
In my opinion, the way the pucks were designed is wrong, but that's just me. They may think the same thing of my controller design.
The issue he's having is exactly because of the - from RA connecting to LED string directly. The LED string is a high side of the driver and creates disturbunces and noise that is carried to the RA, causing it to lock-up or present weird behaviors.
I'm working with him on trying to isolate the 2 sides with opto-isolators, which should take care of his noise problem.
if its wired with a transistor there is no - led connection. i tried it, i have the parts but didn't have any luck, i wired the other way cause it was quick and worked with the code inversion...but this would prob solve all probs to wire this wayrimai wrote:I don't think that would solve the issue. The biggest problem is connecting the LED- to RA ground.
hmm, prob why it didn't work for me, i thought i wired it wrong somehow.rimai wrote:The picutre above would never work the way it is.
The signal LO/HI needs a ground reference, which isn't represented in the design.
Can you post your schematics?icecool2 wrote:Well, you can mark Recom drivers as compatible with your design. I do have some isolation built into my PCB, but nothing unusual that you wouldn't expect any novice to design in.
rimai wrote:Can you post your schematics?icecool2 wrote:Well, you can mark Recom drivers as compatible with your design. I do have some isolation built into my PCB, but nothing unusual that you wouldn't expect any novice to design in.
I'm interested to know how you connected the RA GND to your drivers.
I'm starting to think I originally led nanotrevor into the wrong path
i actually tried that on another arduino based controller i had tried and it didn't work connecting to vin - instead of led -rimai wrote:Sorry Trevor...
I've been reading lots of places that people just have these problems with the buckpucks. Not just you.
The solution always seems to be optoisolation, like we've been working on.
But, there was a couple of places where they mention connecting the Vin- to ground, instead of LED- to ground.
I don't know if that would make any difference on the whole issue, but it would be worth trying.