Pages: [1] 2   Go Down
Author Topic: 3W Dimmable LED Driver DC 7-30V 700mA  (Read 2973 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 1
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?


* driver.jpg (71.71 KB, 600x600 - viewed 62 times.)
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 302
Posts: 26290
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
So i plugged driver pwm to arduino A3,
A3 is an analogue input, not a PWM output.
Please post your code.
Logged

"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.

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 626
Posts: 34150
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 626
Posts: 34150
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
void setup()

{
}

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


* led test.jpg (54.65 KB, 700x525 - viewed 72 times.)
Logged

Offline Offline
Sr. Member
****
Karma: 7
Posts: 282
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged


Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 302
Posts: 26290
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

"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.

Offline Offline
Newbie
*
Karma: 1
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 626
Posts: 34150
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Offline Offline
Sr. Member
****
Karma: 7
Posts: 282
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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  smiley-lol

@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 :-)
Logged


Offline Offline
Newbie
*
Karma: 1
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?


* LedDriver.JPG (41.19 KB, 600x600 - viewed 82 times.)
Logged

Dubuque, Iowa, USA
Offline Offline
Faraday Member
**
Karma: 47
Posts: 2512
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Offline Offline
Sr. Member
****
Karma: 7
Posts: 282
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Perhaps you post a little schematic of what is connected how. From your description I cannot gather what a schematic would look like.
Logged


Pages: [1] 2   Go Up
Jump to: