(Another) DIY LED Controller - Simple Arduino Style

I bought a 20x4 screen off ebay there are tons they dont make a shield for this screen you have to also order a pin header for it as it does not cone with one usually
 
JeffD did you buy the lcd shield? did you put it on top of the arduino? then you have to change the code because we rewired ours (remote connection) to free up some pins....

You have to show us pics of your gig...

See these lines.....


PHP:
LiquidCrystal lcd(12, 13, 4, 5, 6, 7);   // typically 8, 9, 4, 5, 6, 7
                                         // have to change to free up more pwm pins

If right now its on top of your arduino as in directly plugin... then use the typical set.... 8, 9, 4, 5, 6, 7
 
katchupoy, How can I add a few small blue LED's powered by the arduino as moon lighting for a few hours to the code and board?
 
katchupoy, Ok so looking into this a little more I need you to add a moonlight phase to my current sketch if you wouldnt mind. I want to add 6 or so blue small LED's to my project on whatever pin for a moonlight phase from 8am to 10am and again at 10pm to 12am. Hooking up the LED's I will use one of the transistors and supply power just like its setup for the meanwells.
 
Is your controller control the power of the light too, or another timer will turn power on just few minutes before the PWM kick in?
 
Is your controller control the power of the light too, or another timer will turn power on just few minutes before the PWM kick in?

This controls the dimming on the meanwell driver from off 0% to full blast 100% and in between. The meanwell plugs in to the wall outlet and this controls the on off dimming cycle so in a sense replaces the timers and you can use them on something else now
 
So the meanwell does not completely shut off, it's in the sleep mode then....my plan set up is using Cat driver, so I am looking for a way to shut down the power supply too.
 
after 3-4 hours of screwing around and trying to find the "right" BMP to hex converter....I finally got custome images on the LED. There are 3 images: sunrise(fade in), sun up (max), sunset(fade out). Each will be shown during appropriate cycle. Making a moon image as well.
IMAG0054.jpg
 
Hello!

I´m making this build and it is "kind" of working, I say "kind" because the leds dim are made with huge steps, not smooth. In the first step, 0/1 to 26 it ligth up like 0 to 40% or 50% of total power. When it turns on I can see leds with a very wheak ligth, on the next step... BUmmm, 40% of total power. Same thing on both blues and whites.
I´m using the 48P driven with 2n2222.
As I´m in test mode I have my ramp´s set to 10 minutes now.
Already tryed to change this :

int bluepercent[11] = { 0, 26, 52, 78, 103, 128, 154, 180, 205, 230, 255 }; // this line is needed if you are using meanwell ELN60-48P
int whitepercent[11] = { 0, 26, 52, 78, 103, 128, 154, 180, 205, 230, 255 }; // these are the values in 10% increments

to lower values like : 0, 2, 5, 10, .... no luck.

So, is this behaviour normal or do I have something wrong in my code?

many thanks,
Henrique
 
Ugh. Long post eaten...

Short version. Got pretty comfortable doing static images on the GLCD (graphical). Not sure if it will work on the 16x2s, etc. I'll put together a post on how I did what I did later.

Going to start working on the IR interface. Wondering about making interactive menu via LCD and buttons. Not idea where to begin on that one.

Spent too many hours trying to get % ramp up/down per minute, but gave up in frustration and pain of a new head cold. 10% steps will have to be good enough for now.

thanks again for the work you guys have done before me. I doubt I would have tried if I would have started from scratch on my own.

The times on the right are temporary and stand for blue up, white up, full on, white down, blue down, full off.

IMAG0057.jpg
 
const int ledPin1 = 2; // pin number for relay 1
const int ledPin2 = 8; // pin number for relay 2


int ledState1 = LOW;
int ledState2 = LOW;
long previousMillis1 = 0;
long previousMillis2 = 0;
long interval1 = 30000; // interval at which to blink (milliseconds) for RELAY1
long interval2 = 50000; // interval at which to blink (milliseconds) for RELAY2


/*||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| L E D D I M M I N G P A R T |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||*/
/*||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| F A D E S I N A N D O U T |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||*/



int blueramptime = 60 ; // time for blue LEDs to dim on and off in minutes
int whiteramptime = 180 ; // time for white LEDs to dim on and off in minutes
int bluemin = 0 ; // minimmum dimming value of blue LEDs, range of 0-255
int bluemax = 255 ; // maximum dimming value of blue LEDs, range of 0-255
int whitemin = 0 ; // minimum dimming value of white LEDs, range of 0-255
int whitemax = 255 ; // maximum dimming value of white LEDs, range of 0-255
int photoperiod = 240 ; // amount of time array is on at full power in minutes
int ontime = 10 ; // time of day (hour, 24h clock) to begin photoperiod fade in
int blue = 3; // blue LEDs connected to digital pin 3 (pwm)
int white = 11; // white LEDs connected to digital pin 11 (pwm)


int bluepercent[11] = { 0, 1, 2, 5, 8 ,12, 18, 27, 44, 80, 255 }; // this line is needed if you are using meanwell ELN60-48D
int whitepercent[11] = { 0, 1, 2, 5, 8 ,12, 18, 27, 44, 80, 255 }; // these are the values in 10% increments


You called relay 1,2 but actually just a switch for transistor to enable the meanwell?
Eventually, I can put a solid state relay here to turn on my power supply on/off instead, correct?

int bluepercent[11], does this suppose to be [3]?
 
shikhyung, no that is for a wavemaker setup but I see no reason why you couldnt modify the code to turn on and off the power supply
 
I am currently trying to add a 3rd led control for moonlighting so far no dice wish me lick lol I messed something up
 
well, I refer to Cesar hardware wired list, he has dig pin 2 connect to 2N2222 transistor???
int bluepercent[11] , what is that [11] means?
 
I dropped in the IR code, which seems to work, but now when my screen updates the clock every second it has artifacts. It's like it's trying to redraw the whole screen every second but has issues remembering where each pixel goes...any thoughts?

IMAG0059.jpg
 
Back
Top