Controlling LED brightness with a PWM signal to LED driver

Hello Everyone,

I have ordered a LED driver (Mean Well LDD-600HW https://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?langId=-1&storeId=10001&productId=2155971&catalogId=10001&krypto=9x3mj8umRTq%2Bz45%2B%2FVCmYNKve39bJ12tZf1V8nTh83hfocjRhIYBqA%3D%3D&ddkey=https:StoreCatalogDrillDownView) for controlling a high-current LED (~600mA). The brightness is controlled via a PWM signal sent to the driver.

I am having trouble wrapping my brain around how this is going to work, and here's why...

The data sheet (https://www.jameco.com/Jameco/Products/ProdDS/2155971.pdf) says that I will only have 5 wires.

1: + power supply 2: - power supply 3: + LED 4: - LED 5: PWM signal.

Since the Vin voltage is between 9 ~ 56 VDC, and the PWM signal HIGH is between 2.5 ~ 6 VDC, how does this work? How can I use my Arduino to provide this PWM signal? Can I hook my arduino ground to the -Vin (24VDC)? I am powering the Arduino with USB cable. Will this fry stuff? can grounds of differing voltages be intermixed??

Am I missing something?

Power ON with dimming: DIM ~ -Vin >2.5 ~ 6VDC or open circuit
Power OFF : DIM ~ -Vin < 0.8VDC or short

Looks like <0.8V to >2.5V is all that’s needed for PWM input.

Worst case, you drive a transistor that then drives the PWM input with a higher voltage.

Beat me to it.

Arduino supplies the right voltage. Set an Arduino PWM pin as output, tie it to the driver's PWM pin. Do an AnalogWrite with the value you want. Try out some values. It should actually be very easy. Jameco gives that part as 6 weeks. You are a more patient man than I am.

It's out here too:

http://www.powergatellc.com/mean-well-ldd-600hw-dc-dc-converter.html

Out at Mouser and twice as expensive:

http://www.mouser.com/ProductDetail/Mean-Well/LDD-600HW/?qs=%2fha2pyFadugY%252bMb2jfJk7gk%252b7F8TsK7k5E3%252bptG3SoM%3d

Why do you want this part in particular?

I thought that a voltage didn't "exist" without a path to ground. Hence my troubles.

You are a more patient man than I am.

I received the box as I was typing my first post, not even joking. Order first and figure out the mess during that six weeks!

Why do you want this part in particular?

These are just the ones that I found that fit what I was doing. I am still new to this, what would you guys recommend as a suitable replacement in the future. I was wondering why these seemed so obscure...

brian15co: I thought that a voltage didn't "exist" without a path to ground. Hence my troubles.

There is some discussion of how to connect common grounds with two supply voltages here:

http://arduino.cc/forum/index.php/topic,89655.0.html

So after hooking up my system, I burned out the pin #3 on my Arduino. That is the pin I was using to provide PWM to the LED driver. I had my system hooked up identical to the below picture “circuit B” (taken from the suggested post on common grounds). I had an N-channel MOSFET as my transistor. I had all my grounds meet on the bus of a breadboard. I was powering my arduino via USB

After several tests, pin #3 is definitely burned but the rest of the arduino seems to be alive.

Any suggestions or things I may have done wrong?

CaptureArd.PNG

No current limit resistors in either circuit.

Circuit A - Vf across LED ~1.5V? (5V - 1.5V)/.035A = 100 ohm, or higher. Many Opto's only 10mA thru the LED for fully saturated output transistor.

Circuit B - Vbe ~ 0.7V (5V - 0.7V)/.035A = 123 ohm, or higher. Transistor may not need 35mA to go into full saturation.

So I am still having issues with the setup, and I am now convinced that it has something to do with the N-Channel MOSFET that I am using to turn on and off the LED. If you see the attached schematic, you can see what I am talking about. I have my DVM hooked up as shown and my test sketch is turning on and off the light at about 0.25 HZ. Right now i do not have anything hooked to the dimming pin on the LED driver.

When I hook the driver directly to the power supply, I see +5 VDC at the dimming pin, and shorting it to ground turns off the light (expected behavior according to MeanWell tech support). When I have the driver hooked to the MOSFET switch as shown, I see +5 V at the dimming pin when the light is on (arduino digital pin 2 HIGH), and ~ 23.5 V when the light is off (arduino digital pin 2 LOW)

I have so far burned two of these drivers and two of my arduino PWM pins. Let’s just say I’m learning real fast :stuck_out_tongue_closed_eyes:

We will deal with the dimming after I figure out what is wrong with my usage of the MOSFET I guess.

-Brian

→ missing picture

I believe you want to be wired up like this.
Pick the LED indicator method you want (top or bottom).
For direct drive, the top circuit, Higher PWM (analogWrite) values = brighter output.
For the bottom two, the PWM is inverted, so Lower PWM values = brighter output.

Thanks for the info, Crossroads. The top scheme did work!

… But I am still confused as to what was happening with my MOSFET. I thought that you could use them in place of a relay in a situation like this. I wanted one digital pin to control wether or not the LDD-600H was getting power or not, and the PWM pin would control the brightness. When I had teh driver hooked directly to the power supply the errant voltage in the “off” state wasn’t there, so I knew it was some issue with the MOSFET I was not seeing.

Even though the light works now, I can’t move on till i know what’s going on!

I don’t know. If the wiring was like one of these, I don’t see a reason for it not to work.

Brian,

The reason that you burned out the Arduino pin is that you didn't have a current limiting resistor on the Arduino side. Take circuit B. When Arduino pin 3 goes high, current is free to not only flow from the emitter (arrow part) to the collector (the current you want, going to the load) but also from the emitter to the base (which connects to the Arduino). Without a current limiting resistor, you are trying to have the Arduino sink an amount of (negative) current limited by the resistance of the wires and the tiny semiconductor junction. This will fry the Arduino pin very quickly.

Going back to circuit B, you need to put about a 1k resistor between the Arduino and the transistor. That will limit the current and save the Arduino from damage.

The transistor allows you to control a large current (emitter to collector) with a small current (emitter to base), but you have to make sure that the emitter to base current is small. Putting a current limiting resistor in there will do just that.

The fundamental problem is that if you connect any constant voltage source (battery, power supply, Arduino output) to ground with a nearly zero resistance connection, nearly infinite current will try to flow. Nearly infinite currents tend to make things go snap crackle pop and then stop working.

Hope this helps.

Regards, Martin

5V PWM with 24V source