Go Down

Topic: 3W Dimmable LED Driver DC 7-30V 700mA (Read 3586 times) previous topic - next topic

Chewe

Hi all!

This is my first project, and i'm a newbie on arduino. I'm trying to dim a 3w led trhough analogWrite to a Driver, but it seems that i don't get how to... as led stays on without considering A3 values i send to.

My board is an arduino mini pro 328p 5v, which i power on usb.

and the Led Driver is this one -> http://www.ebay.co.uk/itm/3W-Dimmable-LED-Driver-DC-7-30V-700mA-Supports-PWM-Dimming-Light-Controller-12V-/140943595190?pt=US_Lighting_Parts_and_Accessories&hash=item20d0e496b6

So i plugged driver pwm to arduino A3, led+- to 3w led, and VC to a 5V 500ma.

Any tip to get it working? Did i choose the right controller?

AWOL

Quote
So i plugged driver pwm to arduino A3,

A3 is an analogue input, not a PWM output.
Please post your code.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Grumpy_Mike

Quote
Did i choose the right controller?

Yes but the wrong pin.
Only certain pins are capable of PWM control, for your Arduino:-
Quote
PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analogWrite() function.



Chewe

Wow! Thx for that fast responses!

Never thought that i should plug to pin3 to get analog output, as my logic was on a3!

I.m gonna try tomorrow and post code.

Thanks for your tips!

Grumpy_Mike

Quote
Never thought that i should plug to pin3 to get analog output,

It is a PWM output not an analogue one. It is still digital.
http://www.thebox.myzen.co.uk/Tutorial/PWM.html

Chewe

Hi all, here again to report no progress.

After plugging it to Pin3, I still have not been able to at first shut the led off, to afterwards code the values to dim the light. It stills output as full open light.

The led driver is powered by 7.5v DC

here is my test code.

Code: [Select]

void setup()

{
}

void loop()
{
  analogWrite(3, 0);  // analogRead values go from 0 to 1023, analogWrite values from 0 to 255
}


Headroom

Perhaps you start reading and understanding the alnalogWrite sample http://arduino.cc/en/Reference/AnalogWrite provided on the Arduino website. The code you posted above is missing an essential line in the setup that configures your pin 3 as an output.

Also, you may want to urgently mount your LED to a heat sink with some thermal tape, thermal epoxy or screws and thermal paste. If the LED gets the full 700mA for too long it will overheat and that will dramatically reduce its lifetime!
http://trippylighting.com

http://ledshield.wordpress.com/

AWOL

Quote
Perhaps you start reading and understanding the alnalogWrite sample http://arduino.cc/en/Reference/AnalogWrite provided on the Arduino website. The code you posted above is missing an essential line in the setup that configures your pin 3 as an output.

Headroom, there's no pinMode missing, if that's what you're implying
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Chewe

Thx awol, as i read analogwrite function doesn.t require to be declared to be on output mode.

Any tip to explain why doesn.t react to pwm led driver?

By the way, once i get it working i will consider heatsink as i want to drive it on short pulses, and right now i use it for test purpose, so it doesn.t ouput that much heat.

Grumpy_Mike

Well that code you posted only ever sets pin 3 to off so I am not sure what you expect it to do.
Have you connect the arduino's ground to the ground of your dimmer board?

Headroom


Quote
Perhaps you start reading and understanding the alnalogWrite sample http://arduino.cc/en/Reference/AnalogWrite provided on the Arduino website. The code you posted above is missing an essential line in the setup that configures your pin 3 as an output.

Headroom, there's no pinMode missing, if that's what you're implying

Yup, that's what I was referring to. Guess I need to do my own reading  XD

@OP
The LED driver you are using employs a PT4115. The data sheet recommends an input voltage of 6-30V and has an under voltage lockout of 5.1V. I have used three of these http://www.ebay.com/itm/high-efficient-led-driver-0-35-and-0-7-and-1A-good-use-Arduino-/370632520478?pt=LH_DefaultDomain_0&hash=item564b6b731e which use the same chip and when trying these out first I had hoped to get by with a 5V wall wart I had handy. Unfortunately at 4.9V it was below the low voltage lockout. When I used a 9V Wallwart things started working as expected :-)
http://trippylighting.com

http://ledshield.wordpress.com/

Chewe

Hi all

First, i finally got working the PWM Led Driver thanks to all your comments... basically i didn't plug it to ground  :smiley-red:.. So much obligated, Thanks.

Now i've got the same problem... with the Led driver that HeadRoom suggested. Great Price though.

I've plugged 9V Battery to IN+/-, LED +/- to V/grnd, and Arduino PIN3 to Led Driver DIM Pin. But it doesn't react at all to PWM = 0, as it always stays on, like PIN3 wasn't even connected to DIM pin.

Any tip?

Chagrin

Do you have your grounds connected between your Arduino and 9V?

Datasheet for the PT4115: www.micro-bridge.com/data/CRpowtech/PT4115E.pdf


Chewe

Thanks Chagrin!

Again, the ground problem... or i should say my poor knowledge of IC...  :smiley-red:

So now everything works fine.

And now, hopefully my last question.

With the first board (although Vin Specs are the same or higher as the second one) i can use arduino and led driver just by using a 9V battery plugged to Arduino, and from MiniPro supply the led driver and Led.

On the second board... I cannot figure why it doesn't work, as i have to power the mini with usb, and Led driver with 9V...

Any thought?

Headroom

Perhaps you post a little schematic of what is connected how. From your description I cannot gather what a schematic would look like.
http://trippylighting.com

http://ledshield.wordpress.com/

Go Up