(Another) DIY LED Controller - Simple Arduino Style

Hi Arduinophiles!
I am having a very basic issue:
I have just set up my wiring by directly driving my P modell driver with 2n222´s without a pot.
Unfortunately I don´t have a 10v power supply but a 9v one which gives me 8,9V at the output. When I directly hook up the power supply to the white and blue cable of the Meanwell (without 2n222s and without arduino) I get a very bright light on both channels, white and blue.
So far soo god.

Then, I tried to hook up my arduino on pin 3 and 11 and I can power on and off the channels by doing an analogWrite(3, x); and analogWrite(11, x);
The threshold between no power at all and lights on seems to be arround an x value of 35. But now, I have the following problem:

void setup() {

pinMode(11, OUTPUT);

}


void loop() {

analogWrite(11, 40);
delay(5000);
analogWrite(11, 255);


Should switch from low dimming to high dimming every five seconds, but it doesn´t!
It just leaves the light on at the same value, while

void loop() {

analogWrite(11, 20);
delay(5000);
analogWrite(11, 255);

Turns the light on and off every five seconds due to 20 being below the threshold.

What´s the problem here? Can it be the voltage being too low? But I have seen people here also using 9v instead of 10 even on the P modell.

Can I get help please??

Yellobello,

You only have a delay after the first analogWrite so the second analogWrite happens so fast that you don't see it. Try adding another delay after the second analogWrite and you should see it switch back and fourth. See below.

void loop() {

analogWrite(11, 40);
delay(5000);
analogWrite(11, 255);
delay(5000);
 
Hi Arduinophiles!
I am having a very basic issue:
I have just set up my wiring by directly driving my P modell driver with 2n222´s without a pot.
Unfortunately I don´t have a 10v power supply but a 9v one which gives me 8,9V at the output. When I directly hook up the power supply to the white and blue cable of the Meanwell (without 2n222s and without arduino) I get a very bright light on both channels, white and blue.
So far soo god.

Then, I tried to hook up my arduino on pin 3 and 11 and I can power on and off the channels by doing an analogWrite(3, x); and analogWrite(11, x);
The threshold between no power at all and lights on seems to be arround an x value of 35. But now, I have the following problem:

void setup() {

pinMode(11, OUTPUT);

}


void loop() {

analogWrite(11, 40);
delay(5000);
analogWrite(11, 255);


Should switch from low dimming to high dimming every five seconds, but it doesn´t!
It just leaves the light on at the same value, while

void loop() {

analogWrite(11, 20);
delay(5000);
analogWrite(11, 255);

Turns the light on and off every five seconds due to 20 being below the threshold.

What´s the problem here? Can it be the voltage being too low? But I have seen people here also using 9v instead of 10 even on the P modell.

Can I get help please??

How many LEDs in the string? maybe not related but I had something similar happen... when connected directly the string worked... but when connected via an arduino it would blink every 5 seconds. I had 8 XPG CW ea in a two paralled strings (total 16)... based on the meanwells spec this "should" work... and it does with a direct voltage to the dimming circuit.. I added two more in each string and it works nicely with the Arduino now
 
How many LEDs in the string?
12 on each String... but I am concerned that the issue is related to my power supply for the PWM only delivering 9V. Is that possible?
Have you guys heared of an 7810 IC that can make 10V out of 12? I have difficulties finding a 10V source, but i have 12V for my fan.. so this might be a possibilty :-)
I will let you know what happens...
 
YelloBello,

You can use a 12v power source and adjust the output to 10v. Rat Shack sells an onboard 10K pot. Just wire it up to use the dial and your meter to get to 10V. That is how I have mine setup and it is working fine.

Thanks,
 
Hey guys, thought it was about time to introduce myself. I've been watching this thread for a little over a year, then some life happened, then I bought a bunch of parts, then some more life happened... long story short, I'm finally getting started on the controller and putting together the LEDs and I just wanted to thank all of you for the education!

Perhaps I'll be able to contribute a little now that I've gotten this far, and in case anyone else is interested in an iPhone/iPad interface vs an LCD.

Here's where I'm at so far:
http://www.reefcentral.com/forums/blog.php?bt=1489

Anyway, thanks again for sharing your knowledge!

Donnie
 
Hi guys, just to let you know: IC7810 is an awesome little piece to make you 10V out of anything above 10volts. 10V power supplys are somewhat uncommon. I have a box with 40-50 power supplies and only one is 10v(defective), most of them are 9 and 12V ones. Here in germany out of the three biggest electronics shops only one of them sells a 10V supply, and that one is a huge lab supply. Even on ebay there is only one vendor, and theirs come from china.
I am using 12v for my fans already and with the 7810 I have an easy option for making good and stable 10V for the PWM signal. Since it gives me 1.5Amps I can also power my Arduino and moon light from the 7810. Amazing.
For the people that are ordering their 2n222´s: they should seriously consider the option to buy a 7810 and leave the pot away, since it makes 10v with no problems.

I will now include it in my setup and let you know if the cause of my problems were the 9V.
 
Hello to all, like speedracer, Im also very thankful of this thread. I was able to successfully built mine by following his build to the teeth. Specially the other build he is doing found here. https://sites.google.com/site/caddnima/sandbox.

Yellobello, like you, i had a hard time finding a regulated power supply. so I ended up using regulated 9 volts, 2 amps. Just make sure to re-adjust the SVR2 inside the drivers. And also like you, it also powers my arduino. So far so good. Less parts and simpler.
 
Ahh.. what else can be adjusted inside the meanwells? The sheet of paper that came with the aquastyle shipping said to adjust the output to 650-700mA, but I did not know where to adjust it, so I have to open the drivers?
 
hey guys, long thread....... :) but great stuff. All my parts are on order now. Only thing im struggling with is the power supply. Just found a 12v 0.75A plug in a box of random wires. Would that work if i fitted a POT?
 
Yea, it says in steves leds documentation that it goes down to 1%. That is a ton better than the Meanwells. I made my order on friday morning and he gave me a discount on shipping cause I am way close. It should be here either later today or monday. Now if I can get my damn RTC set and the clock working, I would be good to go.
 
Moncapitane,

Use the sketch inside the rtc library to set your rtc. Once it is set it will be good to go for further sketches.
 
Which RTC library has them? All the libraries I have been downloading seem to not work with Arduino 1.0.1 nor 1.0.

moncapitane,
You can try this for setting your clock. If this don't work with your libraries, say something and I can post a link to them.



PHP:
#include <Wire.h>
#include "RTClib.h"


 
RTC_DS1307 RTC;

unsigned char i2cAddress = 0x4C;  // LCD module I2C address

void setup () 


{
 Serial.begin(9600);
    Wire.begin();
    RTC.begin();
 
  if (! RTC.isrunning()) {
    Serial.println("RTC is NOT running!");
    // following line sets the RTC to the date & time this sketch was compiled
   RTC.adjust(DateTime(__DATE__, __TIME__));
  }}
  
  void loop (){
    DateTime now = RTC.now(); // Get time from RTC
   //Serial.print (dayMinute);  // Output the variable value to the serial port so I can see if it is correct.  Yes, an usless comment
    
     Serial.print(now.year(), DEC);
    Serial.print('/');
    Serial.print(now.month(), DEC);
    Serial.print('/');
    Serial.print(now.day(), DEC);
    Serial.print(' ');
    Serial.print(now.hour(), DEC);
    Serial.print(':');
    Serial.print(now.minute(), DEC);
    Serial.print(':');
    Serial.print(now.second(), DEC);
    Serial.println();
  }
 
Back
Top