(Another) DIY LED Controller - Simple Arduino Style

My LCD says blue: 10 so I am adjusting at max, my lights are still pretty dim tho.. could this be because I only have the blue's hooked up for the time being? do I need to hook up the whites as well before I will get brightness?
 
no you must have done something wrong in the setup. did you meter the amps going to the leds at full power? you need to adjust the meanwells pot inside it and meter how much power is going to the actual leds. oh make sure your power supply is not set to 3v or 6v because I did this at first but noticed a few minutes later. if you are running a single string of LED's they need to be 750mA at full power or if you are running 2 strings it needs to be 1.5A but with a 1A quick blow fuse before the first LED on both strings so if one string has a problem you dont fry the other string when all the power dumps into it it will blow the fuse instead.
 
If you believe you have noise problem, then grounding is the key. make sure every signal should have a twisted pair signal/ground. Specially for the relays- board.

wait im confused its been a long day. so twist the 5v and ground together like a braided wire only with the 2?
 
I have gotten my LED's to fire at full strength, but I can't seem to figure out the dimming part.. I just copy/pasted the code from like 20 pages ago.. is there a newer code I should use or a different code because I am using P instead of D?
 
Oh you need to comment out the D part and un comment the P part of the dimming steps that could be your issue

this part

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

//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

make it look like this

//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

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
 
I did that before and was wondering if there was more that I needed to change.

I tried hooking up just the power supply to the driver ignoring the transistor circuit all together and that's when my LED's come on full power. I am fairly certain that my transistor circuit is correct, but to double check a couple things is there a way to see the direction of the transistor? I have been going off the shape (half circle) and didn't know if there was another. I am also not sure about the wattage for the resistor. My resistor is 1k but for the watt's I guess with 1/4w because I wasn't sure. I have everything wired through my breadboard and perhaps that is my problem if you say the code is all correct
 
Hmmm I need to see pics of the wiring take good ones and post em up for me. I am heading to bed soon but ill check back here in the morning its almost 2am here lol and im beat
 
Thanks again for all of your help so far... Im starting to think more and more that I have a problem with the sketch, but I have included a picture of my breadboard as well..

Keep in mind, everything is being done with only my RB lights because it's a big hassle to hook up everything when I can't even get one strand to work. If I need to hook up both then I while when I get everything figured out.

First the sketch.

I changed the time in my sketch so that when I plug my arduino into my computer the time starts at 9:59:45am every time because my dim work starts at 10:00:00am and I didn't want to wait long while I was experimenting.

I copy/pasted the original code from this thread but I will copy what I have in case it was changed somewhere along the way..

Here is the first part of my problem I think

const int ledPin1 = 3; // pin number for relay 1
const int ledPin2 = 9; // 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

The first two lines original were for pins 2 and 8 (im guessing this was for the non PWM pins? I figured this out like 10 minutes ago and when I changed it to my PWM pins it was the first time the brightness has ever changed on my light without me adjusting the pot

I don't know what these relays are but Im guessing they are my LED colors (RB and CW for 1 and 2)

Now that I have changed it, my LED's are coming on dim when I turn everything on (they are on before my arduino tells them to be?) then 15 seconds after my ramp up is supposed to begin they go from dim to 100% (im guessing) After they have been on for 30 seconds they dim back to the original brightness. This continues every minute.
In seconds:
0-15 = nothing
15-45 = 100%
45-00 = nothing

My LCD counts from 0-10 over the course of the first minute because I changed the ramp up time from 60 -> 1. This makes my Blue's increase 1 every 6 seconds instead of every 6 minutes so I can see the changes quickly instead of waiting an hour. It stays at 10 once the first minute is up. The whites, however, don't begin ramping until 10:01:00 which I don't understand because I dont see anything that says they ramp up after the blues?

I changed the rampup time from 1 back to the original 60 and it still follows the same pattern I have listed above..
 
photo4hw.jpg
 
wait im confused its been a long day. so twist the 5v and ground together like a braided wire only with the 2?
If you look closely, you see that I run each relay with each own ground pin and twisted around the signal pin. (blue.whi, orange/whi, green/whi, ...)
I do the same for all signal pair in the controller board. All ground pin meet together at one point at the end.
picture.php
 
Guys hope you can help me i am just starting out and been looking for hours now to find out if i am doing something wrong or not.

i have just got started with examples and am now trying the learning.
i have read the getting started with Arduino 3 times and have only just got a little bit of it so far but trying.

what i want to know is i have just tried to get the display going with the hello world (i can see you guys laughing now) and i have it working but no backlight on (i think this is right as the sketch dosent have anything in it about backlight) would i be right thinking there should not be any backlight if so i will be happy i have done it right

Sorry for the basic question but hopefully i am moving foward.

also i have the duemilanove and a 16x2 shield with no buttons

this is what i am using
/*
LiquidCrystal Library - Hello World

Demonstrates the use a 16x2 LCD display. The LiquidCrystal
library works with all LCD displays that are compatible with the
Hitachi HD44780 driver. There are many of them out there, and you
can usually tell them by the 16-pin interface.

This sketch prints "Hello World!" to the LCD
and shows the time.

The circuit:
* LCD RS pin to digital pin 12
* LCD Enable pin to digital pin 11
* LCD D4 pin to digital pin 5
* LCD D5 pin to digital pin 4
* LCD D6 pin to digital pin 3
* LCD D7 pin to digital pin 2
* LCD R/W pin to ground
* 10K resistor:
* ends to +5V and ground
* wiper to LCD VO pin (pin 3)

Library originally added 18 Apr 2008
by David A. Mellis
library modified 5 Jul 2009
by Limor Fried (http://www.ladyada.net)
example added 9 Jul 2009
by Tom Igoe
modified 22 Nov 2010
by Tom Igoe

This example code is in the public domain.

http://www.arduino.cc/en/Tutorial/LiquidCrystal
*/

// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("hello, muzza!");
}

void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 1);
// print the number of seconds since reset:
lcd.print(millis()/1000);
}
 
Last edited:
Carty, those relay pins are for the wave maker if you decide to buy relays they are not for the LED's

Muz, the backlight is controlled by the last 2 spots on the lcd give it either 3.3v for a dimmer backlight or 5v for full backlight the outter most pin is ground
 
so heres another stab on the diagram. This time with pots and using only one power supply...

arduino%2Btransistor%2Bpot_simple.jpg

hi katchupoy,

in the above diagram please advise where the GND of both the pots go. I am sorry but i am completely noob with electronic and i am following your thread and instruction on this thread.

regards
ikram
 
wait I may be wrong those may goto the power supply groung give me a little bit I am building one as we speak I need to look at my one running my tank
 
Martin,
I ordered the i2C and was looking at the examples I needed to load to use it. I am using reef ninja's sketch but not sure which of the examples to use and how to incorporate it. Can you give me a few pointers?

Thanks
Rawn

You'll need to download the modified Library from here.

Change this: LiquidCrystal lcd(22,23,24,25,26,27);
to this: LiquidCrystal lcd(0);

and nothing needs to be changed as far as the other lcd code
 
Do you remember this? This is the original wiring diagram "with pot" and without Arduino...

wiringdiag.jpg



Well the only change we will do with this wiring is to "tap" or "cut" the negative side from the "10v" signal going to the LED driver.

WiringDiagNPN.jpg


This diagram is only for one channel and for one Arduino pin. It means 1 ramp up and down. One channel can have 1,2 or 4 LED drivers connected to it, but this only means that all of them will ramp up and ramp down at the same time.

If you need to put another channel, example... white, then you just need to duplicate the wiring, resistor, transistor and use another arduino pin.

Here look at this
 
IMG_20110706_125607.jpg


Skillz.... gonna get all 5 working with rtc and lcd then wire up for meanwells Ill post a final version when I finish em later today
 
Back
Top