Suggesting shield/breakout board for dimming operation via 10Vdc/PWM/resistance

Hello all,

I am about to control the LEDs light intensity via the dimming function in a power supply.

The power supply is pretty well known brand, Mean Well. I am going to use HLG-600H-42-B.

Please see the page 5 in this spec file at

http://www.meanwell.com/search/HLG-600H/HLG-600H-spec.pdf

Output constant current level can be adjusted through output cable by connecting the one of following add-ons between DIM+ and DIM- in a power supply:

  • a resistance
  • 0 ~ 10Vdc
  • 10Vdc PWM signal

My questions:

  • Do you have any products (shield or breakout board) can provide one of the following capabilities: varying 0~10Vdc power or controlling 10Vdc PWM signal or providing 0-100KΩ resistance value.
  • If I go with HLG-600H-42-A, which the output V and I level can be adjusted manually through internal potentiometer. Should I adjust V and how about adjust I level?

Any thoughts?

Thank you for your help.

If I read the manual correctly, you can use one of three dimming methods.

PWM being the easiest.

Connect DIM- (white) to Arduino ground.

Small NPN transistor (e.g. BC547).
emitter to ground.
collector to DIM+ (blue)
1k resistor between base and one of Arduino's PWM outputs.

Write 0-255 to the PWM pin for 100-0% dimming.
Leo..

Cool.

Currently, I did not have those parts you mentioned.

I just tried two methods. One worked and the other did't work.

The work one:
Connect DIM- (white) to Arduino ground.
Connect DIM+ (blue) to Arduino 5V.
Write 0-255 to the PWM pin for dimming.

Not working one:
I used SparkFun MOSFET Power Control Kit.
Connect 9Vdc power supply + and - to MOSFET + and -.
Connect MOSFET c to Arduino PWM pin.
Connect DIM- (white) to breakout board -.
Connect DIM+ (blue) to breakout board +.
Write 0-255 to the PWM pin, but it did not work.

An internal pull-up resistor is common in CC LED controller ICs.
You can then use resistive dimming (pot), or PWM, without an extra 10volt source.

Connecting PWM directly to the dim input works, but only dims between 0 and 50%.

Just edited post#1.
With a transistor, 0 PWM (ground) is LEDs fully on, and 255 PWM (+5volt) is LEDs off.
The transistor inverts everything.
Leo..

Hi Wawa:

I just tried to connect dim+ to Arduino pin3 and dim- to Arduino GND.

LEDs ramped up and down.

However, I measured the Vo on the power supply outlet end. It went up to 41.2V and gradually down to ~17V.

My questions:

  • why the Vo did not go down to 0V? How can I switch off LEDs using PWM in this case?
  • why the Vo can go up to ~42V? The manual said that I need to dim the LEDs based on 10V PWM control. I think I am just using 5V on board.

Thanks a lot. Learn a lot from you.

ps. dim+ and dim- are two wires for dimming function on the LED power supply.

Here is the code for testing the dimming function.

int ledControlPin = 3; // Must be a PWM pin -- 3, 5, 6, 9, 10, 11

void setup()
{
  // Setup the LED control pin as output, start low
  pinMode(ledControlPin, OUTPUT);
  digitalWrite(ledControlPin, LOW);
}

void loop()
{
  for (int i=0; i<=255; i+=1) // Sweep LED on 
  {
    analogWrite(ledControlPin, i);
    delay(100);
  }
  delay(1000); // Hold at full brightness
  for (int i=255; i>=0; i-=1) // Sweep LED off
  {
    analogWrite(ledControlPin, i);
    delay(100);
  }
}

You can't measure PWM with a multimeter, only with a scope.
PWM is full on, or full off.
With PWM you control the time that the lights are on or off.
The repeat frequency depends on the pin used. Pin 3 is ~500herz.
PWM switches the lights on/off so fast that our eyes/brain think the LEDs are dimming.

Remember that this is a constant current supply, not a constant voltage supply. 17volt means nothing.
Max voltage you will measure (with 100% PWM) is the forward voltage of the LEDs.

10volt is the control voltage. Nothing to do with the LED voltage.
You are now using 5volt PWM from the Arduino.
That limits dimming to 0-50%, because it's a mix of PWM and voltage control.
A transistor, as explained in post#1, fixes this.

Do the LEDs turn off when PWM is 0.
Maybe have a longer delay in your code to SEE if they turn off.
Leo..

I just realised the power of this LED supply after reading your other post.
http://forum.arduino.cc/index.php?topic=338931.0

The minimum this supply needs is 7 LEDs in a string, and 12 would be better...

But 7.1 Amp is also the minimum......

That's a shipload of LEDs, and a shipload of light.

What are you trying to do.
Are you building a lighthouse.
Leo..

I am building a research project in school.
I am testing LED ramping up/down that looks similar to light intensity of sunrise and sunset.

I cannot find BC547 around me.

Can I use 2N2222A instead of BC547?

Here is the spec comparison:
Type Package Ic(mA) Vce Vcb hfe@Ic FT(MHz)
BC547 TO-92 100 45 50 110-800 2
2N2222 TO-18 800 40 75 100-300 150

I will post what I got.

I tried last night to connect DIM + and DIM - to a bench power supply stepping down from 10V to open state. I also read Vo from a meter.

Here is what I got the varying voltage for DIM vs. Vo:

DIM 10V —> Vo 42.1V
DIM 9V —> Vo 42.1V
DIM 8V —> Vo 42.1V
DIM 7V —> Vo 42.1V
DIM 6V —> Vo 42.1V
DIM 5V —> Vo 41.1V
DIM 4V —> Vo 40.0V
DIM 3V —> Vo 38.9V
DIM 2V —> Vo 37.6V
DIM 1V —> Vo 36.0V
DIM power off —> Vo 36.9V

My questions:

  • Can you please let me know why Vo in this case did not follow the 0 ~ 10V dimming function?

  • What is the 0 ~ 10V and 10V PWM signal dimming function here? I thought that I need to either varying voltage for DIM or controlling PWM when Arduino Board is powered by 12V.

Thanks for your time to show me how it works.

Just as a tip - use and old fashioned analog multimeter (AKA an AVO meter) set it for a 0 to 5V DC range and measure the voltage on pin 13 (the one with the led on it.

Upload the fade example and watch the meter! Have fun.

Mark

Yes, an

changks:
Can I use 2N2222A instead of BC547?

Yes, almost any small signal NPN transistor can be used here.

As I told you before, this is a constant current LED driver.
Voltage has no meaning.

To test this 600watt driver, you have to connect a bunch of LEDs to it.
At least SEVEN in a string and at least SEVEN of those strings if the LEDs are 3watt each.
That is at least 47 3watt LEDs, mounted on a heatsink with forced cooling.

Or get COB (chip-on-board) LEDs.
Try to find 10-string or 12-string (30-40volt) COB LEDs
e.g.

Don't think of trying a 200watt LED without the best heatsink paste and a big (CPU) heatsink with fan.
Running it bare will destroy it in 2 seconds.
Leo..

changks:

  • Can you please let me know why Vo in this case did not follow the 0 ~ 10V dimming function?

  • What is the 0 ~ 10V and 10V PWM signal dimming function here? I thought that I need to either varying voltage for DIM or controlling PWM when Arduino Board is powered by 12V.

50%PWM is 50% of the time on.

5volt is half power.

So 50% PWM, and 5volt, is 25% of the power.

If you use the transistor, you will only use PWM dimming, so 0-100% control.
Leo..

Thanks all. That is a good step-by-step tutorial.

I followed Wawa post #1 for the wiring work.

I used a 2N2222A NPN switching transistor instead of using BC547 NPN general purpose transistor.

I am about to wire entire thing in a prototype board.

The 600W power supply can drive 24 25W panels. Each panel did not generate heat, because each panel use a little power.

I notice that HLG-600H-42-B come with REMOTE ON/OFF CONTROL.

Do you think it is useful?

Question: how to connect these wires to Arduino for switching power on/off.

  • RC+(Brown)
  • RC- & GND(Black)
  • +5VSB(Yellow)

Cheers!

The remote pin can switch the supply into standby (< 0.5watt), by connecting RC+ to RC-

You can't use BOTH functions, RC and PWM, if you don't share Dim- and RC-
But the manual is NOT clear if you can share DIM- and RC-
I would not try.

If... you want to use both, and power the Arduino from this suppy...

Connect RC-/ground to Arduino ground.
Connect +5SB to Arduino 5volt
Connect RC+ to an Arduino output pin.

Do NOT use the transistor circuit I gave you.
Use an opto instead.
Opto transistor emitter to DIM- and collector to DIM+
Opto LED cathode to Arduino ground.
Opto LED anode via 1k current limiting resistor to an Arduino PWM pin.

Before you change to this, measure the resistance between DIM- and RC-/ground.
If it's ZERO ohms, the whole story changes.
Leo..

Hi Leo:

Just make this clear: the 2N2222A transistor still can be used if not going to use both DIM and RC functions?

Any particular reason to use an opto?

Thanks.

Read the post again.

I'm not sure if DIM and RC can have shared grounds.
It's not in the datasheet.

A grounded RC circuit, and an opto for the PWM could take care of that.

Measure the resistance between DIM- and RC-/ground....
The outcome of that could change things.
Leo..