PWM problems
-
- Posts: 13
- Joined: Sun Jan 01, 2012 4:06 pm
PWM problems
I have had the reef angel for a long time and programmed it once and left it alone since I got it. I have recently purchased LEDs with 48p drivers. I cant get the LEDs to function and the only source of problem that I can find is the pwm output on the controller. The LEDs will flash when the drivers are unplugged but will not light. Any help would be much appreciated
Re: PWM problems
How lond ago was your purchase?
Did you purchase the PWM Booster with your order?
Did you purchase the PWM Booster with your order?
Roberto.
-
- Posts: 13
- Joined: Sun Jan 01, 2012 4:06 pm
Re: PWM problems
It was a long time ago and I remember having to purchase a pwm add on. From images I saw I do have a 2nd gen unit. Thanks for the super quick reply!
-
- Posts: 13
- Joined: Sun Jan 01, 2012 4:06 pm
Re: PWM problems
// Autogenerated file by RAGen (v1.1.0.126), (01/01/2012 16:07)
// RA_010112_1607.pde
//
// This version designed for v0.8.5 Beta 17 or later
/* The following features are enabled for this PDE File:
#define DisplayImages
#define WavemakerSetup
#define DateTimeSetup
#define DisplayLEDPWM
#define StandardLightSetup
#define PWMEXPANSION
*/
#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>
void setup()
{
ReefAngel.Init(); //Initialize controller
ReefAngel.WaterChangePorts = B11011000;
ReefAngel.OverheatShutoffPorts = B00001100;
ReefAngel.LightsOnPorts = B00000011;
// Ports that are always on
ReefAngel.Relay.On(Port7);
ReefAngel.Relay.On(Port8);
}
void loop()
{
// Specific functions
ReefAngel.StandardLights(Port1);
ReefAngel.StandardLights(Port2);
ReefAngel.StandardHeater(Port3);
ReefAngel.StandardHeater(Port4);
ReefAngel.Wavemaker1(Port5);
ReefAngel.Wavemaker2(Port6);
ReefAngel.ShowInterface();
}
Re: PWM problems
Ok, we need to place the code for your PWM output to work.
How would you like them to work?
Sunrise/sunset effect or straight full on/off?
Should they follow the same time schedule as your Port1 and Port2 sockets?
How would you like them to work?
Sunrise/sunset effect or straight full on/off?
Should they follow the same time schedule as your Port1 and Port2 sockets?
Roberto.
-
- Posts: 13
- Joined: Sun Jan 01, 2012 4:06 pm
Re: PWM problems
I am terrible with all aspects of coding: I would like a sunrise/sunset. I don't know what the current time settings are, but matching them up would be fine if that gets me going . I am planning on using Port 1 to run my LEDs. Can I split 1 output to 4 drivers?
Re: PWM problems
Yes, but I would highly advise not to plug all 4 into the same socket.
The inrush current will degrade the relay and fusing it eventually.
The prefered way would be each driver in its own socket, but that may be too much for some. Try not to go with more than 2 in the same socket.
Try this code:
It's ramping up both channels from 15% to 100% within 1 hour and the same thing on the opposite end.
The inrush current will degrade the relay and fusing it eventually.
The prefered way would be each driver in its own socket, but that may be too much for some. Try not to go with more than 2 in the same socket.
Try this code:
Code: Select all
// Autogenerated file by RAGen (v1.1.0.126), (01/01/2012 16:07)
// RA_010112_1607.pde
//
// This version designed for v0.8.5 Beta 17 or later
/* The following features are enabled for this PDE File:
#define DisplayImages
#define WavemakerSetup
#define DateTimeSetup
#define DisplayLEDPWM
#define StandardLightSetup
#define PWMEXPANSION
*/
#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>
void setup()
{
ReefAngel.Init(); //Initialize controller
ReefAngel.WaterChangePorts = B11011000;
ReefAngel.OverheatShutoffPorts = B00001100;
ReefAngel.LightsOnPorts = B00000011;
// Ports that are always on
ReefAngel.Relay.On(Port7);
ReefAngel.Relay.On(Port8);
}
void loop()
{
// Specific functions
ReefAngel.StandardLights(Port1);
ReefAngel.StandardLights(Port2);
ReefAngel.StandardHeater(Port3);
ReefAngel.StandardHeater(Port4);
ReefAngel.Wavemaker1(Port5);
ReefAngel.Wavemaker2(Port6);
ReefAngel.PWM.SetActinic(PWMSlope(InternalMemory.StdLightsOnHour_read(),InternalMemory.StdLightsOnMinute_read(),InternalMemory.StdLightsOffHour_read(),InternalMemory.StdLightsOffMinute_read(),15,100,60,0));
ReefAngel.PWM.SetDaylight(PWMSlope(InternalMemory.StdLightsOnHour_read(),InternalMemory.StdLightsOnMinute_read(),InternalMemory.StdLightsOffHour_read(),InternalMemory.StdLightsOffMinute_read(),15,100,60,0));
ReefAngel.ShowInterface();
}
Roberto.
-
- Posts: 13
- Joined: Sun Jan 01, 2012 4:06 pm
Re: PWM problems
Awesome, I will give it a shot. You were instrumental the first time I got it working and your help is always greatly appreciated
-
- Posts: 13
- Joined: Sun Jan 01, 2012 4:06 pm
Re: PWM problems
Still a no go, anything Else I could be missing?
edit:
Does it matter which output I use on the RA?
Does polarity matter and if so which side is which? (I have tried both ways)
I feel like Clark Griswold on Christmas
edit:
Does it matter which output I use on the RA?
Does polarity matter and if so which side is which? (I have tried both ways)
I feel like Clark Griswold on Christmas
Last edited by SCStephens on Sun Jan 01, 2012 5:23 pm, edited 1 time in total.
Re: PWM problems
Did it compile and got uploaded properly?
On your RA screen, do you see AP and DP?
What do they say?
On your RA screen, do you see AP and DP?
What do they say?
Roberto.
-
- Posts: 13
- Joined: Sun Jan 01, 2012 4:06 pm
Re: PWM problems
Everything compiled/loaded fine. AP/DP both 100%
-
- Posts: 13
- Joined: Sun Jan 01, 2012 4:06 pm
Re: PWM problems
Got it, Im an idiot, thanks
-
- Posts: 13
- Joined: Sun Jan 01, 2012 4:06 pm
Re: PWM problems
I'm happy to report that I am up and running with my Reefangel controlled LEDs. Thank you very much for your help . I am having trouble with space constraints and WiFi, do I need the WiFi installed in the controller? I can't seem to make it fit with everything else. Do I need the ragen pwm option if I don't have the expansion module?
Re: PWM problems
If you use Simple Menu feature, it will decrease the code size considerably.
Roberto.
-
- Posts: 13
- Joined: Sun Jan 01, 2012 4:06 pm
Re: PWM problems
Messing with coding and getting this at the bottom. Compiling never finishes, any ideas?
Exception in thread "Thread-5" java.lang.NoClassDefFoundError: com/oroinc/text/regex/MalformedPatternException
at processing.app.Sketch.preprocess(Unknown Source)
at processing.app.Sketch.build(Unknown Source)
at processing.app.Sketch.build(Unknown Source)
at processing.app.Editor$DefaultRunHandler.run(Unknown Source)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassNotFoundException: com.oroinc.text.regex.MalformedPatternException
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 5 more
Exception in thread "Thread-5" java.lang.NoClassDefFoundError: com/oroinc/text/regex/MalformedPatternException
at processing.app.Sketch.preprocess(Unknown Source)
at processing.app.Sketch.build(Unknown Source)
at processing.app.Sketch.build(Unknown Source)
at processing.app.Editor$DefaultRunHandler.run(Unknown Source)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassNotFoundException: com.oroinc.text.regex.MalformedPatternException
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 5 more
Re: PWM problems
That's an Arduino thing I've seen once in a while too. I don't know what makes it do that, but I just restart the Arduino application.
Roberto.